diff --git a/.changeset/curly-spies-hunt.md b/.changeset/curly-spies-hunt.md deleted file mode 100644 index 2f572d72ce..0000000000 --- a/.changeset/curly-spies-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Add new `loader` API for setting seo tags within route module diff --git a/.changeset/flat-lions-yell.md b/.changeset/flat-lions-yell.md deleted file mode 100644 index 87d86be43f..0000000000 --- a/.changeset/flat-lions-yell.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/hydrogen': patch -'@shopify/hydrogen-react': patch ---- - -`ShopPayButton` component now can receive a `storeDomain`. The component now does not require `ShopifyProvider`. diff --git a/.changeset/green-sheep-build.md b/.changeset/green-sheep-build.md deleted file mode 100644 index f677318db1..0000000000 --- a/.changeset/green-sheep-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/create-hydrogen': patch ---- - -Fix register and login issues in the demostore diff --git a/.changeset/lazy-books-attend.md b/.changeset/lazy-books-attend.md deleted file mode 100644 index adb46b9d73..0000000000 --- a/.changeset/lazy-books-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/create-hydrogen': patch ---- - -Adding decoding prop to the SpreadMedia component diff --git a/.changeset/nasty-carrots-juggle.md b/.changeset/nasty-carrots-juggle.md deleted file mode 100644 index a1b6e97b51..0000000000 --- a/.changeset/nasty-carrots-juggle.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@shopify/hydrogen': patch -'@shopify/cli-hydrogen': patch ---- - -1. Update Remix to 1.14.0 -1. Add `Cache-Control` defaults to all the demo store routes diff --git a/.changeset/popular-plants-applaud.md b/.changeset/popular-plants-applaud.md deleted file mode 100644 index b933060ea6..0000000000 --- a/.changeset/popular-plants-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Fixed a typo in the install deps flag. The flag is now SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS. diff --git a/.changeset/rare-dryers-study.md b/.changeset/rare-dryers-study.md deleted file mode 100644 index 90f4dae49b..0000000000 --- a/.changeset/rare-dryers-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Display warning for deprecated flags. diff --git a/.changeset/silent-pianos-battle.md b/.changeset/silent-pianos-battle.md deleted file mode 100644 index 0e323a1a44..0000000000 --- a/.changeset/silent-pianos-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Fix bug in CLI not recognising the --install-deps flag when creating projects diff --git a/.changeset/smart-students-poke.md b/.changeset/smart-students-poke.md deleted file mode 100644 index 2927b61d44..0000000000 --- a/.changeset/smart-students-poke.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Added `robots` option to SEO config that allows users granular control over the robots meta tag. This can be set on both a global and per-page basis using the handle.seo property. - -Example: - -```ts -export handle = { - seo: { - robots: { - noIndex: false, - noFollow: false, - } - } -} -``` diff --git a/.changeset/tall-falcons-punch.md b/.changeset/tall-falcons-punch.md deleted file mode 100644 index 46755e3823..0000000000 --- a/.changeset/tall-falcons-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/cli-hydrogen': patch ---- - -Fix `check routes` command to correctly check the standard route `/discount/` instead of `/discounts/`. diff --git a/.changeset/weak-sheep-sing.md b/.changeset/weak-sheep-sing.md deleted file mode 100644 index c7df72c435..0000000000 --- a/.changeset/weak-sheep-sing.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -'@shopify/hydrogen-react': patch -'@shopify/remix-oxygen': patch -'@shopify/hydrogen': patch ---- - -Fix active cart session event in Live View - -Introducing `getStorefrontHeaders` that collects the required Shopify headers for making a -Storefront API call. - -- Make cart constants available as exports from `@shopify/hydrogen-react` -- Deprecating `buyerIp` and `requestGroupId` props from `createStorefrontClient` from `@shopify/hydrogen` -- Deprecating `getBuyerIp` function from `@shopify/remix-oxygen` - -```diff -+ import {getStorefrontHeaders} from '@shopify/remix-oxygen'; -import {createStorefrontClient, storefrontRedirect} from '@shopify/hydrogen'; - -export default { - async fetch( - request: Request, - env: Env, - executionContext: ExecutionContext, - ): Promise { - - const {storefront} = createStorefrontClient({ - cache, - waitUntil, -- buyerIp: getBuyerIp(request), - i18n: {language: 'EN', country: 'US'}, - publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, - privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, - storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, - storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-01', - storefrontId: env.PUBLIC_STOREFRONT_ID, -- requestGroupId: request.headers.get('request-id'), -+ storefrontHeaders: getStorefrontHeaders(request), - }); -``` diff --git a/.changeset/wild-moons-flow.md b/.changeset/wild-moons-flow.md deleted file mode 100644 index f2f48b94e9..0000000000 --- a/.changeset/wild-moons-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/create-hydrogen': patch ---- - -- Added a route to the Demo store that demonstrates redirecting an order status url back to the online store primary domain. diff --git a/.changeset/witty-goats-tap.md b/.changeset/witty-goats-tap.md deleted file mode 100644 index a883066176..0000000000 --- a/.changeset/witty-goats-tap.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/create-hydrogen': patch -'@shopify/cli-hydrogen': patch ---- - -Stop hydrating with `requestIdleCallback` diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 94e4c6d4ae..43de5be3df 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,27 @@ # @shopify/cli-hydrogen +## 4.0.9 + +### Patch Changes + +- 1. Update Remix to 1.14.0 ([#599](https://github.com/Shopify/hydrogen/pull/599)) by [@blittle](https://github.com/blittle) + + 1. Add `Cache-Control` defaults to all the demo store routes + +- Fixed a typo in the install deps flag. The flag is now SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS. ([#672](https://github.com/Shopify/hydrogen/pull/672)) by [@cartogram](https://github.com/cartogram) + +- Display warning for deprecated flags. ([#609](https://github.com/Shopify/hydrogen/pull/609)) by [@cartogram](https://github.com/cartogram) + +- Fix bug in CLI not recognising the --install-deps flag when creating projects ([#644](https://github.com/Shopify/hydrogen/pull/644)) by [@cartogram](https://github.com/cartogram) + +- Fix `check routes` command to correctly check the standard route `/discount/` instead of `/discounts/`. ([#601](https://github.com/Shopify/hydrogen/pull/601)) by [@frandiox](https://github.com/frandiox) + +- Stop hydrating with `requestIdleCallback` ([#667](https://github.com/Shopify/hydrogen/pull/667)) by [@juanpprieto](https://github.com/juanpprieto) + +- Updated dependencies [[`c78f441`](https://github.com/Shopify/hydrogen/commit/c78f4410cccaf99d93b2a4e4fbd877fcaa2c1bce), [`7fca5d5`](https://github.com/Shopify/hydrogen/commit/7fca5d569be1d6749fdfa5ada6723d8186f0d775)]: + - @shopify/hydrogen-react@2023.1.7 + - @shopify/remix-oxygen@1.0.4 + ## 4.0.8 ### Patch Changes diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index a5104a5748..07a8f62b36 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -1 +1 @@ -{"version":"4.0.8","commands":{"hydrogen:build":{"id":"hydrogen:build","description":"Builds a Hydrogen storefront for production.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"sourcemap":{"name":"sourcemap","type":"boolean","description":"Generate sourcemaps for the build.","allowNo":false},"disable-route-warning":{"name":"disable-route-warning","type":"boolean","description":"Disable warning about missing standard routes.","allowNo":false},"base":{"name":"base","type":"option","hidden":true,"multiple":false},"entry":{"name":"entry","type":"option","hidden":true,"multiple":false},"target":{"name":"target","type":"option","hidden":true,"multiple":false}},"args":[]},"hydrogen:check":{"id":"hydrogen:check","description":"Returns diagnostic information about a Hydrogen storefront.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[{"name":"resource","description":"The resource to check. Currently only 'routes' is supported.","required":true,"options":["routes"]}]},"hydrogen:dev":{"id":"hydrogen:dev","description":"Runs Hydrogen storefront in an Oxygen worker for development.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"port":{"name":"port","type":"option","description":"Port to run the server on.","multiple":false,"default":3000},"disable-virtual-routes":{"name":"disable-virtual-routes","type":"boolean","description":"Disable rendering fallback routes when a route file doesn't exist","allowNo":false},"host":{"name":"host","type":"option","hidden":true,"multiple":false}},"args":[]},"hydrogen:init":{"id":"hydrogen:init","description":"Creates a new Hydrogen storefront.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the new Hydrogen storefront.","multiple":false},"language":{"name":"language","type":"option","description":"Sets the template language to use. One of `js` or `ts`.","multiple":false},"template":{"name":"template","type":"option","description":"Sets the template to use. One of `demo-store` or `hello-world`.","multiple":false},"install-deps":{"name":"install-deps","type":"boolean","description":"Auto install dependencies using the active package manager","allowNo":true}},"args":[]},"hydrogen:preview":{"id":"hydrogen:preview","description":"Runs a Hydrogen storefront in an Oxygen worker for production.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"port":{"name":"port","type":"option","description":"Port to run the server on.","multiple":false,"default":3000}},"args":[]},"hydrogen:generate:route":{"id":"hydrogen:generate:route","description":"Generates a standard Shopify route.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"adapter":{"name":"adapter","type":"option","description":"Remix adapter used in the route. The default is `@shopify/remix-oxygen`.","multiple":false},"typescript":{"name":"typescript","type":"boolean","description":"Generate TypeScript files","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[{"name":"route","description":"The route to generate. One of home,page,cart,products,collections,policies,robots,sitemap,account,all.","required":true,"options":["home","page","cart","products","collections","policies","robots","sitemap","account","all"]}]},"hydrogen:generate:routes":{"id":"hydrogen:generate:routes","description":"Generates all supported standard shopify routes.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"adapter":{"name":"adapter","type":"option","description":"Remix adapter used in the route. The default is `@shopify/remix-oxygen`.","multiple":false},"typescript":{"name":"typescript","type":"boolean","description":"Generate TypeScript files","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[]}}} \ No newline at end of file +{"version":"4.0.9","commands":{"hydrogen:build":{"id":"hydrogen:build","description":"Builds a Hydrogen storefront for production.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"sourcemap":{"name":"sourcemap","type":"boolean","description":"Generate sourcemaps for the build.","allowNo":false},"disable-route-warning":{"name":"disable-route-warning","type":"boolean","description":"Disable warning about missing standard routes.","allowNo":false},"base":{"name":"base","type":"option","hidden":true,"multiple":false},"entry":{"name":"entry","type":"option","hidden":true,"multiple":false},"target":{"name":"target","type":"option","hidden":true,"multiple":false}},"args":[]},"hydrogen:check":{"id":"hydrogen:check","description":"Returns diagnostic information about a Hydrogen storefront.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[{"name":"resource","description":"The resource to check. Currently only 'routes' is supported.","required":true,"options":["routes"]}]},"hydrogen:dev":{"id":"hydrogen:dev","description":"Runs Hydrogen storefront in an Oxygen worker for development.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"port":{"name":"port","type":"option","description":"Port to run the server on.","multiple":false,"default":3000},"disable-virtual-routes":{"name":"disable-virtual-routes","type":"boolean","description":"Disable rendering fallback routes when a route file doesn't exist","allowNo":false},"host":{"name":"host","type":"option","hidden":true,"multiple":false}},"args":[]},"hydrogen:init":{"id":"hydrogen:init","description":"Creates a new Hydrogen storefront.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the new Hydrogen storefront.","multiple":false},"language":{"name":"language","type":"option","description":"Sets the template language to use. One of `js` or `ts`.","multiple":false},"template":{"name":"template","type":"option","description":"Sets the template to use. One of `demo-store` or `hello-world`.","multiple":false},"install-deps":{"name":"install-deps","type":"boolean","description":"Auto install dependencies using the active package manager","allowNo":true}},"args":[]},"hydrogen:preview":{"id":"hydrogen:preview","description":"Runs a Hydrogen storefront in an Oxygen worker for production.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"port":{"name":"port","type":"option","description":"Port to run the server on.","multiple":false,"default":3000}},"args":[]},"hydrogen:generate:route":{"id":"hydrogen:generate:route","description":"Generates a standard Shopify route.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"adapter":{"name":"adapter","type":"option","description":"Remix adapter used in the route. The default is `@shopify/remix-oxygen`.","multiple":false},"typescript":{"name":"typescript","type":"boolean","description":"Generate TypeScript files","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[{"name":"route","description":"The route to generate. One of home,page,cart,products,collections,policies,robots,sitemap,account,all.","required":true,"options":["home","page","cart","products","collections","policies","robots","sitemap","account","all"]}]},"hydrogen:generate:routes":{"id":"hydrogen:generate:routes","description":"Generates all supported standard shopify routes.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"adapter":{"name":"adapter","type":"option","description":"Remix adapter used in the route. The default is `@shopify/remix-oxygen`.","multiple":false},"typescript":{"name":"typescript","type":"boolean","description":"Generate TypeScript files","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[]}}} \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index 6b921f5eb4..5a352a2d70 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -4,7 +4,7 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "version": "4.0.8", + "version": "4.0.9", "license": "SEE LICENSE IN LICENSE.md", "type": "module", "scripts": { @@ -27,8 +27,8 @@ }, "peerDependencies": { "@remix-run/react": "^1.14.0", - "@shopify/hydrogen-react": "^2023.1.6", - "@shopify/remix-oxygen": "^1.0.3" + "@shopify/hydrogen-react": "^2023.1.7", + "@shopify/remix-oxygen": "^1.0.4" }, "dependencies": { "@oclif/core": "^1.20.4", diff --git a/packages/create-hydrogen/CHANGELOG.md b/packages/create-hydrogen/CHANGELOG.md index 95f64803fc..e7561de3f3 100644 --- a/packages/create-hydrogen/CHANGELOG.md +++ b/packages/create-hydrogen/CHANGELOG.md @@ -1,5 +1,20 @@ # @shopify/create-hydrogen +## 4.0.5 + +### Patch Changes + +- Fix register and login issues in the demostore ([#659](https://github.com/Shopify/hydrogen/pull/659)) by [@blittle](https://github.com/blittle) + +- Adding decoding prop to the SpreadMedia component ([#642](https://github.com/Shopify/hydrogen/pull/642)) by [@rafaelstz](https://github.com/rafaelstz) + +- - Added a route to the Demo store that demonstrates redirecting an order status url back to the online store primary domain. ([#540](https://github.com/Shopify/hydrogen/pull/540)) by [@johncraigcole](https://github.com/johncraigcole) + +- Stop hydrating with `requestIdleCallback` ([#667](https://github.com/Shopify/hydrogen/pull/667)) by [@juanpprieto](https://github.com/juanpprieto) + +- Updated dependencies [[`bceddb4`](https://github.com/Shopify/hydrogen/commit/bceddb44c8f108706428b87201b16ce46b3228c0), [`09259cf`](https://github.com/Shopify/hydrogen/commit/09259cf13af59afecaa86d24ae5ae7696232dd60), [`4443a2b`](https://github.com/Shopify/hydrogen/commit/4443a2b9c85bec3e2a1773d5bc69350dec008df2), [`3344b79`](https://github.com/Shopify/hydrogen/commit/3344b79de67a631293a5a3c3c518d5a7e1924757), [`d8821f8`](https://github.com/Shopify/hydrogen/commit/d8821f85f5313b9326f9c2cbfe33e3e854e48bd2), [`a841303`](https://github.com/Shopify/hydrogen/commit/a84130378424bdebfd33eeef268b61ab7a80f65a)]: + - @shopify/cli-hydrogen@4.0.9 + ## 4.0.4 ### Patch Changes diff --git a/packages/create-hydrogen/package.json b/packages/create-hydrogen/package.json index 90fb63354d..36e5bc3442 100644 --- a/packages/create-hydrogen/package.json +++ b/packages/create-hydrogen/package.json @@ -5,7 +5,7 @@ "@shopify:registry": "https://registry.npmjs.org" }, "license": "SEE LICENSE IN LICENSE.md", - "version": "4.0.4", + "version": "4.0.5", "type": "module", "scripts": { "build": "tsup --clean --config ./tsup.config.ts", @@ -13,7 +13,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@shopify/cli-hydrogen": "^4.0.8" + "@shopify/cli-hydrogen": "^4.0.9" }, "bin": "dist/create-app.js", "files": [ diff --git a/packages/hydrogen-react/CHANGELOG.md b/packages/hydrogen-react/CHANGELOG.md index 09cc955119..9541042e31 100644 --- a/packages/hydrogen-react/CHANGELOG.md +++ b/packages/hydrogen-react/CHANGELOG.md @@ -1,5 +1,46 @@ # @shopify/hydrogen-react +## 2023.1.7 + +### Patch Changes + +- `ShopPayButton` component now can receive a `storeDomain`. The component now does not require `ShopifyProvider`. ([#645](https://github.com/Shopify/hydrogen/pull/645)) by [@lordofthecactus](https://github.com/lordofthecactus) + +- Fix active cart session event in Live View ([#614](https://github.com/Shopify/hydrogen/pull/614)) by [@wizardlyhel](https://github.com/wizardlyhel) + + Introducing `getStorefrontHeaders` that collects the required Shopify headers for making a + Storefront API call. + + - Make cart constants available as exports from `@shopify/hydrogen-react` + - Deprecating `buyerIp` and `requestGroupId` props from `createStorefrontClient` from `@shopify/hydrogen` + - Deprecating `getBuyerIp` function from `@shopify/remix-oxygen` + + ```diff + + import {getStorefrontHeaders} from '@shopify/remix-oxygen'; + import {createStorefrontClient, storefrontRedirect} from '@shopify/hydrogen'; + + export default { + async fetch( + request: Request, + env: Env, + executionContext: ExecutionContext, + ): Promise { + + const {storefront} = createStorefrontClient({ + cache, + waitUntil, + - buyerIp: getBuyerIp(request), + i18n: {language: 'EN', country: 'US'}, + publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, + privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, + storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, + storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-01', + storefrontId: env.PUBLIC_STOREFRONT_ID, + - requestGroupId: request.headers.get('request-id'), + + storefrontHeaders: getStorefrontHeaders(request), + }); + ``` + ## 2023.1.6 ### Patch Changes diff --git a/packages/hydrogen-react/package.json b/packages/hydrogen-react/package.json index 20e5d8c46a..ba186f24da 100644 --- a/packages/hydrogen-react/package.json +++ b/packages/hydrogen-react/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/hydrogen-react", - "version": "2023.1.6", + "version": "2023.1.7", "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 5fe724c6e0..e0f57db8e4 100644 --- a/packages/hydrogen/CHANGELOG.md +++ b/packages/hydrogen/CHANGELOG.md @@ -1,5 +1,70 @@ # @shopify/hydrogen +## 2023.1.6 + +### Patch Changes + +- Add new `loader` API for setting seo tags within route module ([#591](https://github.com/Shopify/hydrogen/pull/591)) by [@cartogram](https://github.com/cartogram) + +- `ShopPayButton` component now can receive a `storeDomain`. The component now does not require `ShopifyProvider`. ([#645](https://github.com/Shopify/hydrogen/pull/645)) by [@lordofthecactus](https://github.com/lordofthecactus) + +- 1. Update Remix to 1.14.0 ([#599](https://github.com/Shopify/hydrogen/pull/599)) by [@blittle](https://github.com/blittle) + + 1. Add `Cache-Control` defaults to all the demo store routes + +- Added `robots` option to SEO config that allows users granular control over the robots meta tag. This can be set on both a global and per-page basis using the handle.seo property. ([#572](https://github.com/Shopify/hydrogen/pull/572)) by [@cartogram](https://github.com/cartogram) + + Example: + + ```ts + export handle = { + seo: { + robots: { + noIndex: false, + noFollow: false, + } + } + } + ``` + +- Fix active cart session event in Live View ([#614](https://github.com/Shopify/hydrogen/pull/614)) by [@wizardlyhel](https://github.com/wizardlyhel) + + Introducing `getStorefrontHeaders` that collects the required Shopify headers for making a + Storefront API call. + + - Make cart constants available as exports from `@shopify/hydrogen-react` + - Deprecating `buyerIp` and `requestGroupId` props from `createStorefrontClient` from `@shopify/hydrogen` + - Deprecating `getBuyerIp` function from `@shopify/remix-oxygen` + + ```diff + + import {getStorefrontHeaders} from '@shopify/remix-oxygen'; + import {createStorefrontClient, storefrontRedirect} from '@shopify/hydrogen'; + + export default { + async fetch( + request: Request, + env: Env, + executionContext: ExecutionContext, + ): Promise { + + const {storefront} = createStorefrontClient({ + cache, + waitUntil, + - buyerIp: getBuyerIp(request), + i18n: {language: 'EN', country: 'US'}, + publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, + privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, + storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, + storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-01', + storefrontId: env.PUBLIC_STOREFRONT_ID, + - requestGroupId: request.headers.get('request-id'), + + storefrontHeaders: getStorefrontHeaders(request), + }); + ``` + +- Updated dependencies [[`c78f441`](https://github.com/Shopify/hydrogen/commit/c78f4410cccaf99d93b2a4e4fbd877fcaa2c1bce), [`7fca5d5`](https://github.com/Shopify/hydrogen/commit/7fca5d569be1d6749fdfa5ada6723d8186f0d775)]: + - @shopify/hydrogen-react@2023.1.7 + ## 2023.1.5 ### Patch Changes diff --git a/packages/hydrogen/package.json b/packages/hydrogen/package.json index 2297694863..af6e794d18 100644 --- a/packages/hydrogen/package.json +++ b/packages/hydrogen/package.json @@ -5,7 +5,7 @@ "@shopify:registry": "https://registry.npmjs.org" }, "type": "module", - "version": "2023.1.5", + "version": "2023.1.6", "license": "SEE LICENSE IN LICENSE.md", "main": "dist/index.cjs", "module": "dist/production/index.js", @@ -52,7 +52,7 @@ "dist" ], "dependencies": { - "@shopify/hydrogen-react": "2023.1.6", + "@shopify/hydrogen-react": "2023.1.7", "react": "^18.2.0" }, "peerDependencies": { diff --git a/packages/hydrogen/src/version.ts b/packages/hydrogen/src/version.ts index bbff426c51..9bfd2d74dc 100644 --- a/packages/hydrogen/src/version.ts +++ b/packages/hydrogen/src/version.ts @@ -1 +1 @@ -export const LIB_VERSION = '2023.1.5'; +export const LIB_VERSION = '2023.1.6'; diff --git a/packages/remix-oxygen/CHANGELOG.md b/packages/remix-oxygen/CHANGELOG.md index ce641ee3cc..745313cf55 100644 --- a/packages/remix-oxygen/CHANGELOG.md +++ b/packages/remix-oxygen/CHANGELOG.md @@ -1,5 +1,44 @@ # @shopify/remix-oxygen +## 1.0.4 + +### Patch Changes + +- Fix active cart session event in Live View ([#614](https://github.com/Shopify/hydrogen/pull/614)) by [@wizardlyhel](https://github.com/wizardlyhel) + + Introducing `getStorefrontHeaders` that collects the required Shopify headers for making a + Storefront API call. + + - Make cart constants available as exports from `@shopify/hydrogen-react` + - Deprecating `buyerIp` and `requestGroupId` props from `createStorefrontClient` from `@shopify/hydrogen` + - Deprecating `getBuyerIp` function from `@shopify/remix-oxygen` + + ```diff + + import {getStorefrontHeaders} from '@shopify/remix-oxygen'; + import {createStorefrontClient, storefrontRedirect} from '@shopify/hydrogen'; + + export default { + async fetch( + request: Request, + env: Env, + executionContext: ExecutionContext, + ): Promise { + + const {storefront} = createStorefrontClient({ + cache, + waitUntil, + - buyerIp: getBuyerIp(request), + i18n: {language: 'EN', country: 'US'}, + publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, + privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, + storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, + storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-01', + storefrontId: env.PUBLIC_STOREFRONT_ID, + - requestGroupId: request.headers.get('request-id'), + + storefrontHeaders: getStorefrontHeaders(request), + }); + ``` + ## 1.0.3 ### Patch Changes diff --git a/packages/remix-oxygen/package.json b/packages/remix-oxygen/package.json index 529feb152c..541c403726 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": "1.0.3", + "version": "1.0.4", "license": "SEE LICENSE IN LICENSE.md", "main": "dist/index.cjs", "module": "dist/production/index.js", diff --git a/templates/demo-store/package.json b/templates/demo-store/package.json index b1aee4486e..cf5b10f21b 100644 --- a/templates/demo-store/package.json +++ b/templates/demo-store/package.json @@ -18,9 +18,9 @@ "@headlessui/react": "^1.7.2", "@remix-run/react": "1.14.0", "@shopify/cli": "3.29.0", - "@shopify/cli-hydrogen": "^4.0.8", - "@shopify/hydrogen": "^2023.1.5", - "@shopify/remix-oxygen": "^1.0.3", + "@shopify/cli-hydrogen": "^4.0.9", + "@shopify/hydrogen": "^2023.1.6", + "@shopify/remix-oxygen": "^1.0.4", "clsx": "^1.2.1", "concurrently": "^7.5.0", "cross-env": "^7.0.3", diff --git a/templates/hello-world/package.json b/templates/hello-world/package.json index 0e64ab319a..26c8618ab7 100644 --- a/templates/hello-world/package.json +++ b/templates/hello-world/package.json @@ -15,9 +15,9 @@ "dependencies": { "@remix-run/react": "1.14.0", "@shopify/cli": "3.29.0", - "@shopify/cli-hydrogen": "^4.0.8", - "@shopify/hydrogen": "^2023.1.5", - "@shopify/remix-oxygen": "^1.0.3", + "@shopify/cli-hydrogen": "^4.0.9", + "@shopify/hydrogen": "^2023.1.6", + "@shopify/remix-oxygen": "^1.0.4", "graphql": "^16.6.0", "graphql-tag": "^2.12.6", "isbot": "^3.6.6", diff --git a/templates/skeleton/package.json b/templates/skeleton/package.json index 2c641eb510..97d75ea0d9 100644 --- a/templates/skeleton/package.json +++ b/templates/skeleton/package.json @@ -14,9 +14,9 @@ "dependencies": { "@remix-run/react": "1.14.0", "@shopify/cli": "3.29.0", - "@shopify/cli-hydrogen": "^4.0.8", - "@shopify/hydrogen": "^2023.1.5", - "@shopify/remix-oxygen": "^1.0.3", + "@shopify/cli-hydrogen": "^4.0.9", + "@shopify/hydrogen": "^2023.1.6", + "@shopify/remix-oxygen": "^1.0.4", "graphql": "^16.6.0", "graphql-tag": "^2.12.6", "isbot": "^3.6.6",