From e976ebda73c03dcb4d129a7754a4cfa9ca7939dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Jul 2024 08:43:14 +0000 Subject: [PATCH] [ci] release 2024-07 --- .changeset/big-otters-brake.md | 6 -- .changeset/bright-wombats-count.md | 5 -- .changeset/chilled-points-give.md | 5 -- .changeset/clean-planes-exist.md | 5 -- .changeset/cold-foxes-draw.md | 19 ------ .changeset/dull-needles-doubt.md | 5 -- .changeset/fifty-melons-film.md | 5 -- .changeset/happy-rabbits-draw.md | 7 -- .changeset/light-balloons-hide.md | 5 -- .changeset/metal-kids-exercise.md | 5 -- .changeset/plenty-clocks-hide.md | 5 -- .changeset/red-apes-exercise.md | 5 -- .changeset/red-lamps-switch.md | 65 ------------------- .changeset/six-pumas-allow.md | 5 -- .changeset/strange-keys-glow.md | 5 -- .changeset/stupid-falcons-wash.md | 5 -- .changeset/tall-elephants-drum.md | 5 -- .changeset/wet-apricots-fix.md | 5 -- .changeset/wet-yaks-think.md | 29 --------- .changeset/wise-badgers-march.md | 5 -- .changeset/young-gifts-learn.md | 5 -- examples/express/package.json | 4 +- packages/cli/CHANGELOG.md | 19 ++++++ packages/cli/oclif.manifest.json | 2 +- packages/cli/package.json | 4 +- packages/create-hydrogen/CHANGELOG.md | 10 +++ packages/create-hydrogen/package.json | 4 +- packages/hydrogen-react/CHANGELOG.md | 6 ++ packages/hydrogen-react/package.json | 2 +- packages/hydrogen/CHANGELOG.md | 64 +++++++++++++++++++ packages/hydrogen/package.json | 4 +- packages/hydrogen/src/version.ts | 2 +- packages/mini-oxygen/CHANGELOG.md | 6 ++ packages/mini-oxygen/package.json | 2 +- packages/remix-oxygen/CHANGELOG.md | 6 ++ packages/remix-oxygen/package.json | 2 +- templates/skeleton/CHANGELOG.md | 92 +++++++++++++++++++++++++++ templates/skeleton/package.json | 10 +-- 38 files changed, 221 insertions(+), 224 deletions(-) delete mode 100644 .changeset/big-otters-brake.md delete mode 100644 .changeset/bright-wombats-count.md delete mode 100644 .changeset/chilled-points-give.md delete mode 100644 .changeset/clean-planes-exist.md delete mode 100644 .changeset/cold-foxes-draw.md delete mode 100644 .changeset/dull-needles-doubt.md delete mode 100644 .changeset/fifty-melons-film.md delete mode 100644 .changeset/happy-rabbits-draw.md delete mode 100644 .changeset/light-balloons-hide.md delete mode 100644 .changeset/metal-kids-exercise.md delete mode 100644 .changeset/plenty-clocks-hide.md delete mode 100644 .changeset/red-apes-exercise.md delete mode 100644 .changeset/red-lamps-switch.md delete mode 100644 .changeset/six-pumas-allow.md delete mode 100644 .changeset/strange-keys-glow.md delete mode 100644 .changeset/stupid-falcons-wash.md delete mode 100644 .changeset/tall-elephants-drum.md delete mode 100644 .changeset/wet-apricots-fix.md delete mode 100644 .changeset/wet-yaks-think.md delete mode 100644 .changeset/wise-badgers-march.md delete mode 100644 .changeset/young-gifts-learn.md diff --git a/.changeset/big-otters-brake.md b/.changeset/big-otters-brake.md deleted file mode 100644 index b99f15c788..0000000000 --- a/.changeset/big-otters-brake.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/remix-oxygen': patch -'skeleton': patch ---- - -Update `@shopify/oxygen-workers-types` to fix issues on Windows. diff --git a/.changeset/bright-wombats-count.md b/.changeset/bright-wombats-count.md deleted file mode 100644 index 08b973928b..0000000000 --- a/.changeset/bright-wombats-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -`customerAccount` no longer commit session automatically in any situation. diff --git a/.changeset/chilled-points-give.md b/.changeset/chilled-points-give.md deleted file mode 100644 index 515e5e6f58..0000000000 --- a/.changeset/chilled-points-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -[Bug fix] Allow env-branch to be passed when running `h2 deploy` in CI diff --git a/.changeset/clean-planes-exist.md b/.changeset/clean-planes-exist.md deleted file mode 100644 index 7223b8ae44..0000000000 --- a/.changeset/clean-planes-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen-react': minor ---- - -Add `sellingPlanId` support to `BuyNowButton`. diff --git a/.changeset/cold-foxes-draw.md b/.changeset/cold-foxes-draw.md deleted file mode 100644 index 0401e463e6..0000000000 --- a/.changeset/cold-foxes-draw.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'skeleton': patch -'@shopify/hydrogen': patch ---- - -**Breaking change** - -Previously the `VariantSelector` component would filter out options that only had one value. This is undesireable for some apps. We've removed that filter, if you'd like to retain the existing functionality, simply filter the options prop before it is passed to the `VariantSelector` component: - -```diff - option.values.length > 1)} -- options={product.options} - variants={variants}> - -``` - -Fixes [#1198](https://github.com/Shopify/hydrogen/discussions/1198) diff --git a/.changeset/dull-needles-doubt.md b/.changeset/dull-needles-doubt.md deleted file mode 100644 index 534a955fe3..0000000000 --- a/.changeset/dull-needles-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/mini-oxygen': patch ---- - -Security updates diff --git a/.changeset/fifty-melons-film.md b/.changeset/fifty-melons-film.md deleted file mode 100644 index 307ec6f30f..0000000000 --- a/.changeset/fifty-melons-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Fix CLI upgrade notification when running from a globlal process. diff --git a/.changeset/happy-rabbits-draw.md b/.changeset/happy-rabbits-draw.md deleted file mode 100644 index 771a1869f2..0000000000 --- a/.changeset/happy-rabbits-draw.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'skeleton': patch -'@shopify/cli-hydrogen': patch -'@shopify/create-hydrogen': patch ---- - -Update remix to v2.10.1 diff --git a/.changeset/light-balloons-hide.md b/.changeset/light-balloons-hide.md deleted file mode 100644 index 05273a5c68..0000000000 --- a/.changeset/light-balloons-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'skeleton': patch ---- - -Refactor the cart and product form components diff --git a/.changeset/metal-kids-exercise.md b/.changeset/metal-kids-exercise.md deleted file mode 100644 index 6a5627c2a7..0000000000 --- a/.changeset/metal-kids-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Fix the types for optimistic cart diff --git a/.changeset/plenty-clocks-hide.md b/.changeset/plenty-clocks-hide.md deleted file mode 100644 index ea45793523..0000000000 --- a/.changeset/plenty-clocks-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Fix a small rounding issue when checking stale-while-revalidate timing. diff --git a/.changeset/red-apes-exercise.md b/.changeset/red-apes-exercise.md deleted file mode 100644 index 75dd425fd5..0000000000 --- a/.changeset/red-apes-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': minor ---- - -Add `sellingPlanId` support to `BuyNowButton`. diff --git a/.changeset/red-lamps-switch.md b/.changeset/red-lamps-switch.md deleted file mode 100644 index a5c69e40a6..0000000000 --- a/.changeset/red-lamps-switch.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -'skeleton': patch ---- - -Remove manual setting of session in headers and recommend setting it in server after response is created. - -Step 1: Add `isPending` implementation in session - -```diff -// in app/lib/session.ts -export class AppSession implements HydrogenSession { -+ public isPending = false; - - get unset() { -+ this.isPending = true; - return this.#session.unset; - } - - get set() { -+ this.isPending = true; - return this.#session.set; - } - - commit() { -+ this.isPending = false; - return this.#sessionStorage.commitSession(this.#session); - } -} -``` - -Step 2: update response header if `session.isPending` is true - -```diff -// in server.ts -export default { - async fetch(request: Request): Promise { - try { - const response = await handleRequest(request); - -+ if (session.isPending) { -+ response.headers.set('Set-Cookie', await session.commit()); -+ } - - return response; - } catch (error) { - ... - } - }, -}; -``` - -Step 3: remove setting cookie with session.commit() in routes - -```diff -// in route files -export async function loader({context}: LoaderFunctionArgs) { - return json({}, -- { -- headers: { -- 'Set-Cookie': await context.session.commit(), -- }, - }, - ); -} -``` diff --git a/.changeset/six-pumas-allow.md b/.changeset/six-pumas-allow.md deleted file mode 100644 index f37fd2fe09..0000000000 --- a/.changeset/six-pumas-allow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -skeleton template was updated to do session commit in server call instead of routes diff --git a/.changeset/strange-keys-glow.md b/.changeset/strange-keys-glow.md deleted file mode 100644 index ddbdb462ed..0000000000 --- a/.changeset/strange-keys-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Fix customData from Analytics.Provider not being passed to page view events diff --git a/.changeset/stupid-falcons-wash.md b/.changeset/stupid-falcons-wash.md deleted file mode 100644 index d4410c5a55..0000000000 --- a/.changeset/stupid-falcons-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Auto cookie domain detection for customer privacy api and better error message for missing analytics fields diff --git a/.changeset/tall-elephants-drum.md b/.changeset/tall-elephants-drum.md deleted file mode 100644 index bc11d08eeb..0000000000 --- a/.changeset/tall-elephants-drum.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Remove `PUBLIC_STORE_DOMAIN` environment variable from `.env` when creating new projects with mock.shop. diff --git a/.changeset/wet-apricots-fix.md b/.changeset/wet-apricots-fix.md deleted file mode 100644 index 7424b2b9a5..0000000000 --- a/.changeset/wet-apricots-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/create-hydrogen': major ---- - -The code is now bundled to enhance installation speed. diff --git a/.changeset/wet-yaks-think.md b/.changeset/wet-yaks-think.md deleted file mode 100644 index dba6fe0795..0000000000 --- a/.changeset/wet-yaks-think.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Add a `useOptimisticProduct` hook for optimistically rendering product variant changes. This makes switching product variants instantaneous. Example usage: - -```tsx -function Product() { - const {product: originalProduct, variants} = useLoaderData(); - - // The product.selectedVariant optimistically changed during a page - // transition with one of the preloaded product variants - const product = useOptimisticProduct(originalProduct, variants); - - return ; -} -``` - -This also introduces a small breaking change to the `VariantSelector` component, which now immediately updates which variant is active. If you'd like to retain the current functionality, and have the `VariantSelector` wait for the page navigation to complete before updating, use the `waitForNavigation` prop: - -```tsx - - ... - -``` diff --git a/.changeset/wise-badgers-march.md b/.changeset/wise-badgers-march.md deleted file mode 100644 index 00aee55696..0000000000 --- a/.changeset/wise-badgers-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Return `null` instead of empty object from `cart.get()` when the cart id is invalid. diff --git a/.changeset/young-gifts-learn.md b/.changeset/young-gifts-learn.md deleted file mode 100644 index 4847266237..0000000000 --- a/.changeset/young-gifts-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Added an `--auth-bypass-token-duration` flag to the `deploy` command to allow for specified token duration between 1 to 12 hours. diff --git a/examples/express/package.json b/examples/express/package.json index a0c7420549..8c6b22cc19 100644 --- a/examples/express/package.json +++ b/examples/express/package.json @@ -15,8 +15,8 @@ "@remix-run/react": "^2.10.1", "@remix-run/server-runtime": "^2.10.1", "@shopify/cli": "3.61.2", - "@shopify/cli-hydrogen": "^8.1.1", - "@shopify/hydrogen": "2024.4.7", + "@shopify/cli-hydrogen": "^8.1.2", + "@shopify/hydrogen": "2024.5.0", "compression": "^1.7.4", "cross-env": "^7.0.3", "express": "^4.19.2", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index e340d2f2b3..cf038fd322 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,24 @@ # @shopify/cli-hydrogen +## 8.1.2 + +### Patch Changes + +- [Bug fix] Allow env-branch to be passed when running `h2 deploy` in CI ([#2281](https://github.com/Shopify/hydrogen/pull/2281)) by [@aswamy](https://github.com/aswamy) + +- Fix CLI upgrade notification when running from a globlal process. ([#2184](https://github.com/Shopify/hydrogen/pull/2184)) by [@frandiox](https://github.com/frandiox) + +- Update remix to v2.10.1 ([#2290](https://github.com/Shopify/hydrogen/pull/2290)) by [@michenly](https://github.com/michenly) + +- skeleton template was updated to do session commit in server call instead of routes ([#2137](https://github.com/Shopify/hydrogen/pull/2137)) by [@michenly](https://github.com/michenly) + +- Remove `PUBLIC_STORE_DOMAIN` environment variable from `.env` when creating new projects with mock.shop. ([#2221](https://github.com/Shopify/hydrogen/pull/2221)) by [@frandiox](https://github.com/frandiox) + +- Added an `--auth-bypass-token-duration` flag to the `deploy` command to allow for specified token duration between 1 to 12 hours. ([#2182](https://github.com/Shopify/hydrogen/pull/2182)) by [@NelsonLee-Code](https://github.com/NelsonLee-Code) + +- Updated dependencies [[`0924410f`](https://github.com/Shopify/hydrogen/commit/0924410fa2a1d13d46f09ca42fb1f1de3e0a4f57)]: + - @shopify/mini-oxygen@3.0.4 + ## 8.1.0 ### Minor Changes diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index 28da963b58..28d734f457 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -1680,5 +1680,5 @@ ] } }, - "version": "8.1.1" + "version": "8.1.2" } \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index 090f4cda8c..0c1fc1cea2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -4,7 +4,7 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "version": "8.1.1", + "version": "8.1.2", "license": "MIT", "type": "module", "scripts": { @@ -60,7 +60,7 @@ "@graphql-codegen/cli": "^5.0.2", "@remix-run/dev": "^2.1.0", "@shopify/hydrogen-codegen": "^0.3.1", - "@shopify/mini-oxygen": "^3.0.3", + "@shopify/mini-oxygen": "^3.0.4", "graphql-config": "^5.0.3", "vite": "^5.1.0" }, diff --git a/packages/create-hydrogen/CHANGELOG.md b/packages/create-hydrogen/CHANGELOG.md index 42fa0f2d20..a032edcf90 100644 --- a/packages/create-hydrogen/CHANGELOG.md +++ b/packages/create-hydrogen/CHANGELOG.md @@ -1,5 +1,15 @@ # @shopify/create-hydrogen +## 5.0.0 + +### Major Changes + +- The code is now bundled to enhance installation speed. ([#2184](https://github.com/Shopify/hydrogen/pull/2184)) by [@frandiox](https://github.com/frandiox) + +### Patch Changes + +- Update remix to v2.10.1 ([#2290](https://github.com/Shopify/hydrogen/pull/2290)) by [@michenly](https://github.com/michenly) + ## 4.3.10 ### Patch Changes diff --git a/packages/create-hydrogen/package.json b/packages/create-hydrogen/package.json index 0c4ef6c75e..61cc5d5b0c 100644 --- a/packages/create-hydrogen/package.json +++ b/packages/create-hydrogen/package.json @@ -5,7 +5,7 @@ "@shopify:registry": "https://registry.npmjs.org" }, "license": "MIT", - "version": "4.3.14", + "version": "5.0.0", "type": "module", "scripts": { "build": "tsup --clean", @@ -17,7 +17,7 @@ "@ast-grep/napi": "0.11.0" }, "devDependencies": { - "@shopify/cli-hydrogen": "^8.1.1", + "@shopify/cli-hydrogen": "^8.1.2", "tempy": "3.0.0" }, "bin": "dist/create-app.js", diff --git a/packages/hydrogen-react/CHANGELOG.md b/packages/hydrogen-react/CHANGELOG.md index 66af395d8e..d0c4f36aba 100644 --- a/packages/hydrogen-react/CHANGELOG.md +++ b/packages/hydrogen-react/CHANGELOG.md @@ -1,5 +1,11 @@ # @shopify/hydrogen-react +## 2024.5.0 + +### Minor Changes + +- Add `sellingPlanId` support to `BuyNowButton`. ([#2254](https://github.com/Shopify/hydrogen/pull/2254)) by [@dvisockas](https://github.com/dvisockas) + ## 2024.4.3 ### Patch Changes diff --git a/packages/hydrogen-react/package.json b/packages/hydrogen-react/package.json index 53894a95fc..6c31c97344 100644 --- a/packages/hydrogen-react/package.json +++ b/packages/hydrogen-react/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/hydrogen-react", - "version": "2024.4.4", + "version": "2024.5.0", "description": "React components, hooks, and utilities for creating custom Shopify storefronts", "homepage": "https://github.com/Shopify/hydrogen/tree/main/packages/hydrogen-react", "license": "MIT", diff --git a/packages/hydrogen/CHANGELOG.md b/packages/hydrogen/CHANGELOG.md index 08f1bc62aa..20b300f398 100644 --- a/packages/hydrogen/CHANGELOG.md +++ b/packages/hydrogen/CHANGELOG.md @@ -1,5 +1,69 @@ # @shopify/hydrogen +## 2024.5.0 + +### Minor Changes + +- Add `sellingPlanId` support to `BuyNowButton`. ([#2254](https://github.com/Shopify/hydrogen/pull/2254)) by [@dvisockas](https://github.com/dvisockas) + +### Patch Changes + +- `customerAccount` no longer commit session automatically in any situation. ([#2137](https://github.com/Shopify/hydrogen/pull/2137)) by [@michenly](https://github.com/michenly) + +- **Breaking change** ([#2113](https://github.com/Shopify/hydrogen/pull/2113)) by [@blittle](https://github.com/blittle) + + Previously the `VariantSelector` component would filter out options that only had one value. This is undesireable for some apps. We've removed that filter, if you'd like to retain the existing functionality, simply filter the options prop before it is passed to the `VariantSelector` component: + + ```diff + option.values.length > 1)} + - options={product.options} + variants={variants}> + + ``` + + Fixes [#1198](https://github.com/Shopify/hydrogen/discussions/1198) + +- Fix the types for optimistic cart ([#2132](https://github.com/Shopify/hydrogen/pull/2132)) by [@blittle](https://github.com/blittle) + +- Fix a small rounding issue when checking stale-while-revalidate timing. ([#2220](https://github.com/Shopify/hydrogen/pull/2220)) by [@frandiox](https://github.com/frandiox) + +- Fix customData from Analytics.Provider not being passed to page view events ([#2224](https://github.com/Shopify/hydrogen/pull/2224)) by [@wizardlyhel](https://github.com/wizardlyhel) + +- Auto cookie domain detection for customer privacy api and better error message for missing analytics fields ([#2256](https://github.com/Shopify/hydrogen/pull/2256)) by [@wizardlyhel](https://github.com/wizardlyhel) + +- Add a `useOptimisticProduct` hook for optimistically rendering product variant changes. This makes switching product variants instantaneous. Example usage: ([#2183](https://github.com/Shopify/hydrogen/pull/2183)) by [@blittle](https://github.com/blittle) + + ```tsx + function Product() { + const {product: originalProduct, variants} = useLoaderData(); + + // The product.selectedVariant optimistically changed during a page + // transition with one of the preloaded product variants + const product = useOptimisticProduct(originalProduct, variants); + + return ; + } + ``` + + This also introduces a small breaking change to the `VariantSelector` component, which now immediately updates which variant is active. If you'd like to retain the current functionality, and have the `VariantSelector` wait for the page navigation to complete before updating, use the `waitForNavigation` prop: + + ```tsx + + ... + + ``` + +- Return `null` instead of empty object from `cart.get()` when the cart id is invalid. ([#2258](https://github.com/Shopify/hydrogen/pull/2258)) by [@frandiox](https://github.com/frandiox) + +- Updated dependencies [[`54c2f7ad`](https://github.com/Shopify/hydrogen/commit/54c2f7ad3d0d52e6be10b2a54a1a4fd0cc107a35)]: + - @shopify/hydrogen-react@2024.5.0 + ## 2024.4.3 ### Patch Changes diff --git a/packages/hydrogen/package.json b/packages/hydrogen/package.json index 1b40dfd64c..623b0a4475 100644 --- a/packages/hydrogen/package.json +++ b/packages/hydrogen/package.json @@ -5,7 +5,7 @@ "@shopify:registry": "https://registry.npmjs.org" }, "type": "module", - "version": "2024.4.7", + "version": "2024.5.0", "license": "MIT", "main": "dist/index.cjs", "module": "dist/production/index.js", @@ -63,7 +63,7 @@ "dist" ], "dependencies": { - "@shopify/hydrogen-react": "2024.4.4", + "@shopify/hydrogen-react": "2024.5.0", "content-security-policy-builder": "^2.2.0", "source-map-support": "^0.5.21", "type-fest": "^4.5.0", diff --git a/packages/hydrogen/src/version.ts b/packages/hydrogen/src/version.ts index 6d5eb62122..78a0f6a615 100644 --- a/packages/hydrogen/src/version.ts +++ b/packages/hydrogen/src/version.ts @@ -1 +1 @@ -export const LIB_VERSION = '2024.4.3'; +export const LIB_VERSION = '2024.5.0'; diff --git a/packages/mini-oxygen/CHANGELOG.md b/packages/mini-oxygen/CHANGELOG.md index 0c8a004849..e5c1fa8096 100644 --- a/packages/mini-oxygen/CHANGELOG.md +++ b/packages/mini-oxygen/CHANGELOG.md @@ -1,5 +1,11 @@ # @shopify/mini-oxygen +## 3.0.4 + +### Patch Changes + +- Security updates ([#2263](https://github.com/Shopify/hydrogen/pull/2263)) by [@dependabot](https://github.com/apps/dependabot) + ## 3.0.3 ### Patch Changes diff --git a/packages/mini-oxygen/package.json b/packages/mini-oxygen/package.json index f8faed865f..d78b0a46c0 100644 --- a/packages/mini-oxygen/package.json +++ b/packages/mini-oxygen/package.json @@ -4,7 +4,7 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "version": "3.0.3", + "version": "3.0.4", "license": "MIT", "type": "module", "description": "Development assistant for custom Shopify Oxygen hosted storefronts", diff --git a/packages/remix-oxygen/CHANGELOG.md b/packages/remix-oxygen/CHANGELOG.md index 31ce34d1a6..28d3d3550a 100644 --- a/packages/remix-oxygen/CHANGELOG.md +++ b/packages/remix-oxygen/CHANGELOG.md @@ -1,5 +1,11 @@ # @shopify/remix-oxygen +## 2.0.5 + +### Patch Changes + +- Update `@shopify/oxygen-workers-types` to fix issues on Windows. ([#2252](https://github.com/Shopify/hydrogen/pull/2252)) by [@michenly](https://github.com/michenly) + ## 2.0.4 ### Patch Changes diff --git a/packages/remix-oxygen/package.json b/packages/remix-oxygen/package.json index 9fdec4e039..1a969d6f9d 100644 --- a/packages/remix-oxygen/package.json +++ b/packages/remix-oxygen/package.json @@ -5,7 +5,7 @@ "@shopify:registry": "https://registry.npmjs.org" }, "type": "module", - "version": "2.0.4", + "version": "2.0.5", "license": "MIT", "main": "dist/index.cjs", "module": "dist/production/index.js", diff --git a/templates/skeleton/CHANGELOG.md b/templates/skeleton/CHANGELOG.md index f525a06afb..931e71ab7b 100644 --- a/templates/skeleton/CHANGELOG.md +++ b/templates/skeleton/CHANGELOG.md @@ -1,5 +1,97 @@ # skeleton +## 2024.4.10 + +### Patch Changes + +- Update `@shopify/oxygen-workers-types` to fix issues on Windows. ([#2252](https://github.com/Shopify/hydrogen/pull/2252)) by [@michenly](https://github.com/michenly) + +- **Breaking change** ([#2113](https://github.com/Shopify/hydrogen/pull/2113)) by [@blittle](https://github.com/blittle) + + Previously the `VariantSelector` component would filter out options that only had one value. This is undesireable for some apps. We've removed that filter, if you'd like to retain the existing functionality, simply filter the options prop before it is passed to the `VariantSelector` component: + + ```diff + option.values.length > 1)} + - options={product.options} + variants={variants}> + + ``` + + Fixes [#1198](https://github.com/Shopify/hydrogen/discussions/1198) + +- Update remix to v2.10.1 ([#2290](https://github.com/Shopify/hydrogen/pull/2290)) by [@michenly](https://github.com/michenly) + +- Refactor the cart and product form components ([#2132](https://github.com/Shopify/hydrogen/pull/2132)) by [@blittle](https://github.com/blittle) + +- Remove manual setting of session in headers and recommend setting it in server after response is created. ([#2137](https://github.com/Shopify/hydrogen/pull/2137)) by [@michenly](https://github.com/michenly) + + Step 1: Add `isPending` implementation in session + + ```diff + // in app/lib/session.ts + export class AppSession implements HydrogenSession { + + public isPending = false; + + get unset() { + + this.isPending = true; + return this.#session.unset; + } + + get set() { + + this.isPending = true; + return this.#session.set; + } + + commit() { + + this.isPending = false; + return this.#sessionStorage.commitSession(this.#session); + } + } + ``` + + Step 2: update response header if `session.isPending` is true + + ```diff + // in server.ts + export default { + async fetch(request: Request): Promise { + try { + const response = await handleRequest(request); + + + if (session.isPending) { + + response.headers.set('Set-Cookie', await session.commit()); + + } + + return response; + } catch (error) { + ... + } + }, + }; + ``` + + Step 3: remove setting cookie with session.commit() in routes + + ```diff + // in route files + export async function loader({context}: LoaderFunctionArgs) { + return json({}, + - { + - headers: { + - 'Set-Cookie': await context.session.commit(), + - }, + }, + ); + } + ``` + +- Updated dependencies [[`a0e84d76`](https://github.com/Shopify/hydrogen/commit/a0e84d76b67d4c57c4defee06185949c41782eab), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`710625c7`](https://github.com/Shopify/hydrogen/commit/710625c740a6656488d4b419e2d2451bef9d076f), [`8b9c726d`](https://github.com/Shopify/hydrogen/commit/8b9c726d34f3482b5b5a0da4c7c0c2f20e2c9caa), [`10a419bf`](https://github.com/Shopify/hydrogen/commit/10a419bf1db79cdfd8c41c0223ce695959f60da9), [`58001b80`](https://github.com/Shopify/hydrogen/commit/58001b80440ea929f954b95956d7102fcfcd6e1f), [`6a6278bb`](https://github.com/Shopify/hydrogen/commit/6a6278bb9187b3b5a98cd98ec9dd278882d03c0d), [`dcbd0bbf`](https://github.com/Shopify/hydrogen/commit/dcbd0bbf4073a3e35e96f3cce257f7b19b2b2aea), [`54c2f7ad`](https://github.com/Shopify/hydrogen/commit/54c2f7ad3d0d52e6be10b2a54a1a4fd0cc107a35), [`4337200c`](https://github.com/Shopify/hydrogen/commit/4337200c7908d56c039171c283a4d92c31a8b7b6), [`e96b332b`](https://github.com/Shopify/hydrogen/commit/e96b332ba1aba79aa3d5c2ce18001292070faf49), [`6cd5554b`](https://github.com/Shopify/hydrogen/commit/6cd5554b160d314d35964a5ee8976ed60972bf17), [`9eb60d73`](https://github.com/Shopify/hydrogen/commit/9eb60d73e552c3d22b9325ecbcd5878810893ad3), [`e432533e`](https://github.com/Shopify/hydrogen/commit/e432533e7391ec3fe16a4a24f2b3363206842580), [`de3f70be`](https://github.com/Shopify/hydrogen/commit/de3f70be1a838eda746903cbb38cc25cf0e09fa3), [`83cb96f4`](https://github.com/Shopify/hydrogen/commit/83cb96f42078bf79b20a153d8a8461f75d573ab1)]: + - @shopify/remix-oxygen@2.0.5 + - @shopify/hydrogen@2024.5.0 + - @shopify/cli-hydrogen@8.1.2 + ## 2024.4.5 ### Patch Changes diff --git a/templates/skeleton/package.json b/templates/skeleton/package.json index 3d3b7bc1ba..f3b57df082 100644 --- a/templates/skeleton/package.json +++ b/templates/skeleton/package.json @@ -2,7 +2,7 @@ "name": "skeleton", "private": true, "sideEffects": false, - "version": "2024.4.9", + "version": "2024.4.10", "type": "module", "scripts": { "build": "shopify hydrogen build --codegen", @@ -17,9 +17,9 @@ "@remix-run/react": "^2.10.1", "@remix-run/server-runtime": "^2.10.1", "@shopify/cli": "3.61.2", - "@shopify/cli-hydrogen": "^8.1.1", - "@shopify/hydrogen": "2024.4.7", - "@shopify/remix-oxygen": "^2.0.4", + "@shopify/cli-hydrogen": "^8.1.2", + "@shopify/hydrogen": "2024.5.0", + "@shopify/remix-oxygen": "^2.0.5", "graphql": "^16.6.0", "graphql-tag": "^2.12.6", "isbot": "^3.8.0", @@ -31,7 +31,7 @@ "@remix-run/dev": "^2.10.1", "@remix-run/eslint-config": "^2.10.1", "@shopify/hydrogen-codegen": "^0.3.1", - "@shopify/mini-oxygen": "^3.0.3", + "@shopify/mini-oxygen": "^3.0.4", "@shopify/oxygen-workers-types": "^4.1.2", "@shopify/prettier-config": "^1.1.2", "@total-typescript/ts-reset": "^0.4.2",