From f6f36982029f2bb019615b5959b09aea48fff16a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 09:24:29 -0400 Subject: [PATCH] [ci] release v1.x-2022-07 (#2094) Co-authored-by: github-actions[bot] --- .changeset/beige-singers-play.md | 6 ----- .changeset/blue-parents-tease.md | 5 ---- .changeset/empty-rocks-lick.md | 16 ----------- .changeset/late-buses-film.md | 5 ---- .changeset/mighty-apples-cross.md | 24 ----------------- .changeset/moody-spoons-lay.md | 10 ------- .changeset/neat-months-sparkle.md | 5 ---- .changeset/nervous-singers-cheat.md | 6 ----- .changeset/old-tips-act.md | 5 ---- .changeset/silent-cars-watch.md | 5 ---- .changeset/thirty-bees-boil.md | 5 ---- .changeset/weak-stingrays-design.md | 5 ---- packages/create-hydrogen-app/CHANGELOG.md | 27 +++++++++++++++++++ packages/create-hydrogen-app/package.json | 2 +- packages/hydrogen-ui/CHANGELOG.md | 25 +++++++++++++++++ packages/hydrogen-ui/package.json | 2 +- packages/hydrogen/CHANGELOG.md | 27 ++++++++++++++++++- packages/hydrogen/package.json | 2 +- packages/hydrogen/src/version.ts | 2 +- packages/playground/async-config/package.json | 2 +- .../playground/server-components/package.json | 2 +- templates/demo-store/package.json | 2 +- templates/hello-world/package.json | 2 +- 23 files changed, 86 insertions(+), 106 deletions(-) delete mode 100644 .changeset/beige-singers-play.md delete mode 100644 .changeset/blue-parents-tease.md delete mode 100644 .changeset/empty-rocks-lick.md delete mode 100644 .changeset/late-buses-film.md delete mode 100644 .changeset/mighty-apples-cross.md delete mode 100644 .changeset/moody-spoons-lay.md delete mode 100644 .changeset/neat-months-sparkle.md delete mode 100644 .changeset/nervous-singers-cheat.md delete mode 100644 .changeset/old-tips-act.md delete mode 100644 .changeset/silent-cars-watch.md delete mode 100644 .changeset/thirty-bees-boil.md delete mode 100644 .changeset/weak-stingrays-design.md diff --git a/.changeset/beige-singers-play.md b/.changeset/beige-singers-play.md deleted file mode 100644 index 8344d79708..0000000000 --- a/.changeset/beige-singers-play.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/hydrogen-ui-alpha': patch ---- - -- Added `` (which is equivalent to `` in Hydrogen) -- Added `useProduct()` (which is equivalent to `useProductOptions()` in Hydrogen) diff --git a/.changeset/blue-parents-tease.md b/.changeset/blue-parents-tease.md deleted file mode 100644 index bd55063366..0000000000 --- a/.changeset/blue-parents-tease.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': minor ---- - -Add the `useDelay` hook for artificial delays when rendering server components. This is useful to debug timing issues or building suspense boundary fallback UI. See the [`useDelay` documentation](https://shopify.dev/api/hydrogen/hooks/global/usedelay). diff --git a/.changeset/empty-rocks-lick.md b/.changeset/empty-rocks-lick.md deleted file mode 100644 index 1e46eb187b..0000000000 --- a/.changeset/empty-rocks-lick.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -We've exposed the private server-to-server Storefront API token in the Hydrogen config file. This private token is required when deploying to production, otherwise the requests to the storefront API will be rate-limited. This change will make it easier to configure Hydrogen when deploying to non-Oxygen environments. We'll also display a warning in production mode if this token is not defined. - -We've also added the `storefrontId` property to the config. This enables Hydrogen data to display properly in the Shopify admin analytics dashboard. - -Lastly, we've updated all Oxygen environment variables to a more consistent naming convention. The previous variables are still available, but are deprecated, and will be removed in the future. You’ll see a warning in your console if you use the old environment variables. You can update your variable references using this table: - -| **Old Oxygen variable** | **New Oxygen variable** | -| ----------------------------------- | ---------------------------- | -| SHOPIFY_STORE_DOMAIN | PUBLIC_STORE_DOMAIN | -| SHOPIFY_STOREFRONT_API_PUBLIC_TOKEN | PUBLIC_STOREFRONT_API_TOKEN | -| SHOPIFY_STOREFRONT_API_SECRET_TOKEN | PRIVATE_STOREFRONT_API_TOKEN | -| SHOPIFY_STOREFRONT_ID | PUBLIC_STOREFRONT_ID | diff --git a/.changeset/late-buses-film.md b/.changeset/late-buses-film.md deleted file mode 100644 index 203ee73ff1..0000000000 --- a/.changeset/late-buses-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -Fixed dev-mode Hydrogen builds to properly show `PUBLIC_` prefixed environment variables diff --git a/.changeset/mighty-apples-cross.md b/.changeset/mighty-apples-cross.md deleted file mode 100644 index ff2450e7f7..0000000000 --- a/.changeset/mighty-apples-cross.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -'create-hydrogen-app': patch ---- - -If the demo store e2e tests are sometimes failing, update your `vite.config.js` to make sure that tests only execute on one thread: - -```diff -export default defineConfig({ - plugins: [hydrogen()], - resolve: { - alias: [{find: /^~\/(.*)/, replacement: '/src/$1'}], - }, - optimizeDeps: { - include: ['@headlessui/react', 'clsx', 'react-use', 'typographic-base'], - }, - test: { - globals: true, - testTimeout: 10000, - hookTimeout: 10000, -+ maxThreads: 1, -+ minThreads: 1, - }, -}); -``` diff --git a/.changeset/moody-spoons-lay.md b/.changeset/moody-spoons-lay.md deleted file mode 100644 index f0df5500f8..0000000000 --- a/.changeset/moody-spoons-lay.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@shopify/hydrogen-ui-alpha': patch ---- - -Added - -- `` component -- `flattenConnection()` function -- `parseMetafield()` function -- `parseMetafieldValue()` function diff --git a/.changeset/neat-months-sparkle.md b/.changeset/neat-months-sparkle.md deleted file mode 100644 index 142d45ad42..0000000000 --- a/.changeset/neat-months-sparkle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen-ui-alpha': patch ---- - -Fix package exports and remove the `browser` field. diff --git a/.changeset/nervous-singers-cheat.md b/.changeset/nervous-singers-cheat.md deleted file mode 100644 index 3f3df23e47..0000000000 --- a/.changeset/nervous-singers-cheat.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@shopify/hydrogen-ui-alpha': patch ---- - -- Migrated ``, and also improved the types for it as well - the types now come directly from the `@google/model-viewer` repo. -- Migrated `` and implemented the `mediaOptions` prop for it as outlined in https://github.com/Shopify/hydrogen/issues/686 diff --git a/.changeset/old-tips-act.md b/.changeset/old-tips-act.md deleted file mode 100644 index bdaee8c52b..0000000000 --- a/.changeset/old-tips-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen': patch ---- - -An issue with previewing hydrogen in production has been fixed. Make sure that you upgrade both `@shopify/cli` and `@shopify/cli-hydrogen` to 3.12.0. diff --git a/.changeset/silent-cars-watch.md b/.changeset/silent-cars-watch.md deleted file mode 100644 index 2e681db354..0000000000 --- a/.changeset/silent-cars-watch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'create-hydrogen-app': patch ---- - -Fix the demostore e2e tests to be more stable diff --git a/.changeset/thirty-bees-boil.md b/.changeset/thirty-bees-boil.md deleted file mode 100644 index da616afd5b..0000000000 --- a/.changeset/thirty-bees-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen-ui-alpha': patch ---- - -Add `createStorefrontClient` and related documentation, to improve the developer experience when querying the Storefront API. diff --git a/.changeset/weak-stingrays-design.md b/.changeset/weak-stingrays-design.md deleted file mode 100644 index 2f6a73aad9..0000000000 --- a/.changeset/weak-stingrays-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen-ui-alpha': patch ---- - -Add TypeScript type helpers for correctly setting the return types from the Storefront API. diff --git a/packages/create-hydrogen-app/CHANGELOG.md b/packages/create-hydrogen-app/CHANGELOG.md index c0c63e31b7..d91764f588 100644 --- a/packages/create-hydrogen-app/CHANGELOG.md +++ b/packages/create-hydrogen-app/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 1.4.0 + +### Patch Changes + +- If the demo store e2e tests are sometimes failing, update your `vite.config.js` to make sure that tests only execute on one thread: ([#2144](https://github.com/Shopify/hydrogen/pull/2144)) by [@blittle](https://github.com/blittle) + + ```diff + export default defineConfig({ + plugins: [hydrogen()], + resolve: { + alias: [{find: /^~\/(.*)/, replacement: '/src/$1'}], + }, + optimizeDeps: { + include: ['@headlessui/react', 'clsx', 'react-use', 'typographic-base'], + }, + test: { + globals: true, + testTimeout: 10000, + hookTimeout: 10000, + + maxThreads: 1, + + minThreads: 1, + }, + }); + ``` + +* Fix the demostore e2e tests to be more stable ([#2006](https://github.com/Shopify/hydrogen/pull/2006)) by [@blittle](https://github.com/blittle) + ## 1.3.2 ## 1.3.1 diff --git a/packages/create-hydrogen-app/package.json b/packages/create-hydrogen-app/package.json index 3faebc3332..7c9aaf906e 100644 --- a/packages/create-hydrogen-app/package.json +++ b/packages/create-hydrogen-app/package.json @@ -4,7 +4,7 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "version": "1.3.2", + "version": "1.4.0", "main": "index.js", "license": "MIT", "bin": { diff --git a/packages/hydrogen-ui/CHANGELOG.md b/packages/hydrogen-ui/CHANGELOG.md index 26e7569d72..d0206e868e 100644 --- a/packages/hydrogen-ui/CHANGELOG.md +++ b/packages/hydrogen-ui/CHANGELOG.md @@ -1,5 +1,30 @@ # @shopify/hydrogen-ui-alpha +## 2022.7.4 + +### Patch Changes + +- - Added `` (which is equivalent to `` in Hydrogen) ([#2099](https://github.com/Shopify/hydrogen/pull/2099)) by [@frehner](https://github.com/frehner) + + - Added `useProduct()` (which is equivalent to `useProductOptions()` in Hydrogen) + +* Added ([#2089](https://github.com/Shopify/hydrogen/pull/2089)) by [@frehner](https://github.com/frehner) + + - `` component + - `flattenConnection()` function + - `parseMetafield()` function + - `parseMetafieldValue()` function + +- Fix package exports and remove the `browser` field. ([#2120](https://github.com/Shopify/hydrogen/pull/2120)) by [@frehner](https://github.com/frehner) + +* - Migrated ``, and also improved the types for it as well - the types now come directly from the `@google/model-viewer` repo. ([#2115](https://github.com/Shopify/hydrogen/pull/2115)) by [@frehner](https://github.com/frehner) + + - Migrated `` and implemented the `mediaOptions` prop for it as outlined in https://github.com/Shopify/hydrogen/issues/686 + +- Add `createStorefrontClient` and related documentation, to improve the developer experience when querying the Storefront API. ([#2140](https://github.com/Shopify/hydrogen/pull/2140)) by [@frehner](https://github.com/frehner) + +* Add TypeScript type helpers for correctly setting the return types from the Storefront API. ([#2122](https://github.com/Shopify/hydrogen/pull/2122)) by [@frehner](https://github.com/frehner) + ## 2022.7.3 ### Patch Changes diff --git a/packages/hydrogen-ui/package.json b/packages/hydrogen-ui/package.json index 5c9bf046a8..6c933dbbb8 100644 --- a/packages/hydrogen-ui/package.json +++ b/packages/hydrogen-ui/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/hydrogen-ui-alpha", - "version": "2022.7.3", + "version": "2022.7.4", "description": "Components for modern custom Shopify storefronts", "homepage": "https://github.com/Shopify/hydrogen#readme", "license": "MIT", diff --git a/packages/hydrogen/CHANGELOG.md b/packages/hydrogen/CHANGELOG.md index bb03a650d9..070dc36198 100644 --- a/packages/hydrogen/CHANGELOG.md +++ b/packages/hydrogen/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 1.4.0 + +### Minor Changes + +- Add the `useDelay` hook for artificial delays when rendering server components. This is useful to debug timing issues or building suspense boundary fallback UI. See the [`useDelay` documentation](https://shopify.dev/api/hydrogen/hooks/global/usedelay). ([#2109](https://github.com/Shopify/hydrogen/pull/2109)) by [@blittle](https://github.com/blittle) + +### Patch Changes + +- We've exposed the private server-to-server Storefront API token in the Hydrogen config file. This private token is required when deploying to production, otherwise the requests to the storefront API will be rate-limited. This change will make it easier to configure Hydrogen when deploying to non-Oxygen environments. We'll also display a warning in production mode if this token is not defined. ([#1998](https://github.com/Shopify/hydrogen/pull/1998)) by [@blittle](https://github.com/blittle) + + We've also added the `storefrontId` property to the config. This enables Hydrogen data to display properly in the Shopify admin analytics dashboard. + + Lastly, we've updated all Oxygen environment variables to a more consistent naming convention. The previous variables are still available, but are deprecated, and will be removed in the future. You’ll see a warning in your console if you use the old environment variables. You can update your variable references using this table: + + | **Old Oxygen variable** | **New Oxygen variable** | + | ----------------------------------- | ---------------------------- | + | SHOPIFY_STORE_DOMAIN | PUBLIC_STORE_DOMAIN | + | SHOPIFY_STOREFRONT_API_PUBLIC_TOKEN | PUBLIC_STOREFRONT_API_TOKEN | + | SHOPIFY_STOREFRONT_API_SECRET_TOKEN | PRIVATE_STOREFRONT_API_TOKEN | + | SHOPIFY_STOREFRONT_ID | PUBLIC_STOREFRONT_ID | + +* Fixed dev-mode Hydrogen builds to properly show `PUBLIC_` prefixed environment variables ([#2142](https://github.com/Shopify/hydrogen/pull/2142)) by [@blittle](https://github.com/blittle) + +- An issue with previewing hydrogen in production has been fixed. Make sure that you upgrade both `@shopify/cli` and `@shopify/cli-hydrogen` to 3.12.0. ([#2144](https://github.com/Shopify/hydrogen/pull/2144)) by [@blittle](https://github.com/blittle) + ## 1.3.2 ### Patch Changes @@ -278,7 +303,7 @@ If your Store is based on the "Demo Store" tempate, and you are using the `test: } from '@shopify/hydrogen/platforms'; // Platform entry handler - export default function (request) { + export default function(request) { if (isAsset(new URL(request.url).pathname)) { return platformAssetHandler(request); } diff --git a/packages/hydrogen/package.json b/packages/hydrogen/package.json index 09f6a53702..70bd83e3b3 100644 --- a/packages/hydrogen/package.json +++ b/packages/hydrogen/package.json @@ -7,7 +7,7 @@ "engines": { "node": ">=14" }, - "version": "1.3.2", + "version": "1.4.0", "description": "Modern custom Shopify storefronts", "license": "MIT", "main": "dist/esnext/index.js", diff --git a/packages/hydrogen/src/version.ts b/packages/hydrogen/src/version.ts index 59a31112de..a7f3630781 100644 --- a/packages/hydrogen/src/version.ts +++ b/packages/hydrogen/src/version.ts @@ -1 +1 @@ -export const LIB_VERSION = '1.3.2'; +export const LIB_VERSION = '1.4.0'; diff --git a/packages/playground/async-config/package.json b/packages/playground/async-config/package.json index 2e754d1768..1c9fb1ea78 100644 --- a/packages/playground/async-config/package.json +++ b/packages/playground/async-config/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@cloudflare/kv-asset-handler": "*", - "@shopify/hydrogen": "^1.3.2", + "@shopify/hydrogen": "^1.4.0", "miniflare": "^1.3.3", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/packages/playground/server-components/package.json b/packages/playground/server-components/package.json index 9b81eccb78..701c72858e 100644 --- a/packages/playground/server-components/package.json +++ b/packages/playground/server-components/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@cloudflare/kv-asset-handler": "*", - "@shopify/hydrogen": "^1.3.2", + "@shopify/hydrogen": "^1.4.0", "miniflare": "^1.3.3", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/templates/demo-store/package.json b/templates/demo-store/package.json index 408d33be33..deb3ff0db0 100644 --- a/templates/demo-store/package.json +++ b/templates/demo-store/package.json @@ -38,7 +38,7 @@ "prettier": "@shopify/prettier-config", "dependencies": { "@headlessui/react": "^1.7.0", - "@shopify/hydrogen": "^1.3.2", + "@shopify/hydrogen": "^1.4.0", "clsx": "^1.1.1", "graphql-tag": "^2.12.6", "react": "^18.2.0", diff --git a/templates/hello-world/package.json b/templates/hello-world/package.json index 37619528ec..a149bc2105 100644 --- a/templates/hello-world/package.json +++ b/templates/hello-world/package.json @@ -20,7 +20,7 @@ "vite": "^2.9.13" }, "dependencies": { - "@shopify/hydrogen": "^1.3.2", + "@shopify/hydrogen": "^1.4.0", "react": "^18.2.0", "react-dom": "^18.2.0" }