Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @shopify/cli and cli-kit to 3.75.3 #2760

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/selfish-peas-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'skeleton': patch
'@shopify/cli-hydrogen': patch
---

Bump cli version
2 changes: 1 addition & 1 deletion examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@eslint/js": "^9.18.0",
"@remix-run/dev": "^2.15.3",
"@shopify/cli": "~3.74.1",
"@shopify/cli": "~3.75.3",
"@types/compression": "^1.7.2",
"@types/express": "^4.17.17",
"@types/morgan": "^1.9.4",
Expand Down
859 changes: 740 additions & 119 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.18.0",
"@playwright/test": "^1.40.1",
"@shopify/cli": "~3.74.1",
"@shopify/cli": "~3.75.3",
"@types/eslint": "^9.6.1",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^8.21.0",
Expand Down Expand Up @@ -117,6 +117,6 @@
},
"overrides": {
"@oclif/core": "3.26.5",
"@shopify/cli-kit": "3.74.1"
"@shopify/cli-kit": "3.75.3"
}
}
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@ast-grep/napi": "0.11.0",
"@oclif/core": "3.26.5",
"@shopify/cli-kit": "^3.74.1",
"@shopify/cli-kit": "^3.75.3",
"@shopify/oxygen-cli": "4.6.6",
"@shopify/plugin-cloudflare": "^3.74.1",
"ansi-escapes": "^6.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen-react/src/ExternalVideo.test.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function getExternalVideoData(
mediaContentType: 'EXTERNAL_VIDEO',
embedUrl: externalVideo.embedUrl ?? faker.internet.url(),
host:
(externalVideo.host ?? faker.datatype.number({max: 2, min: 1}) === 1)
externalVideo.host ?? faker.datatype.number({max: 2, min: 1}) === 1
? 'YOUTUBE'
: 'VIMEO',
previewImage: getPreviewImage(externalVideo.previewImage ?? undefined),
Expand Down
22 changes: 11 additions & 11 deletions packages/hydrogen-react/src/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ export const Image = React.forwardRef<HTMLImageElement, HydrogenImageProps>(
const nAspectRatio: string | undefined = aspectRatio
? aspectRatio
: normalizedData.unitsMatch
? [
getNormalizedFixedUnit(normalizedData.width),
getNormalizedFixedUnit(normalizedData.height),
].join('/')
: undefined;
? [
getNormalizedFixedUnit(normalizedData.width),
getNormalizedFixedUnit(normalizedData.height),
].join('/')
: undefined;

return {
width: nWidth,
Expand Down Expand Up @@ -371,10 +371,10 @@ const FixedWidthImage = React.forwardRef<
const fixedAspectRatio = aspectRatio
? aspectRatio
: unitsMatch(normalizedProps.width, normalizedProps.height)
? [intWidth, intHeight].join('/')
: normalizedProps.aspectRatio
? normalizedProps.aspectRatio
: undefined;
? [intWidth, intHeight].join('/')
: normalizedProps.aspectRatio
? normalizedProps.aspectRatio
: undefined;

/*
* The Sizes Array generates an array of all the parts
Expand All @@ -391,8 +391,8 @@ const FixedWidthImage = React.forwardRef<
const fixedHeight = intHeight
? intHeight
: fixedAspectRatio && intWidth
? intWidth * (parseAspectRatio(fixedAspectRatio) ?? 1)
: undefined;
? intWidth * (parseAspectRatio(fixedAspectRatio) ?? 1)
: undefined;

const srcSet = generateSrcSet(normalizedProps.src, sizesArray, loader);
const src = loader({
Expand Down
4 changes: 2 additions & 2 deletions packages/hydrogen-react/src/ProductPrice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export function ProductPrice<
let measurement: Partial<UnitPriceMeasurement> | undefined | null;

const variant = variantId
? (flattenConnection(product?.variants ?? {}).find(
? flattenConnection(product?.variants ?? {}).find(
(variant) => variant?.id === variantId,
) ?? null)
) ?? null
: null;

const variantPriceProperty =
Expand Down
23 changes: 10 additions & 13 deletions packages/hydrogen-react/src/ProductProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,17 @@ function getSelectedVariant(
function getOptions(
variants: PartialDeep<ProductVariantType, {recurseIntoArrays: true}>[],
): OptionWithValues[] {
const map = variants.reduce(
(memo, variant) => {
if (!variant.selectedOptions) {
throw new Error(`'getOptions' requires 'variant.selectedOptions'`);
}
variant?.selectedOptions?.forEach((opt) => {
memo[opt?.name ?? ''] = memo[opt?.name ?? ''] || new Set();
memo[opt?.name ?? ''].add(opt?.value ?? '');
});
const map = variants.reduce((memo, variant) => {
if (!variant.selectedOptions) {
throw new Error(`'getOptions' requires 'variant.selectedOptions'`);
}
variant?.selectedOptions?.forEach((opt) => {
memo[opt?.name ?? ''] = memo[opt?.name ?? ''] || new Set();
memo[opt?.name ?? ''].add(opt?.value ?? '');
});

return memo;
},
{} as Record<string, Set<string>>,
);
return memo;
}, {} as Record<string, Set<string>>);

return Object.keys(map).map((option) => {
return {
Expand Down
26 changes: 13 additions & 13 deletions packages/hydrogen-react/src/flatten-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ export function flattenConnection<
? // if it's not a PartialDeep, then return the infered type
ConnectionBaseType[]
: ConnectionGeneric extends
| PartialDeep<
{edges: {node: Array<infer ConnectionBaseType>}},
{recurseIntoArrays: true}
>
| PartialDeep<
{
nodes: Array<infer ConnectionBaseType>;
},
{recurseIntoArrays: true}
>
? // if it is a PartialDeep, return a PartialDeep inferred type
PartialDeep<ConnectionBaseType[], {recurseIntoArrays: true}>
: never {
| PartialDeep<
{edges: {node: Array<infer ConnectionBaseType>}},
{recurseIntoArrays: true}
>
| PartialDeep<
{
nodes: Array<infer ConnectionBaseType>;
},
{recurseIntoArrays: true}
>
? // if it is a PartialDeep, return a PartialDeep inferred type
PartialDeep<ConnectionBaseType[], {recurseIntoArrays: true}>
: never {
if (!connection) {
const noConnectionErr = `flattenConnection(): needs a 'connection' to flatten, but received '${
connection ?? ''
Expand Down
2 changes: 1 addition & 1 deletion templates/skeleton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@eslint/js": "^9.18.0",
"@graphql-codegen/cli": "5.0.2",
"@remix-run/dev": "^2.15.3",
"@shopify/cli": "~3.74.1",
"@shopify/cli": "~3.75.3",
"@shopify/hydrogen-codegen": "^0.3.2",
"@shopify/mini-oxygen": "^3.1.1",
"@shopify/oxygen-workers-types": "^4.1.2",
Expand Down