From a6c2b91e0eac5c2b4ce876e1b0764301444b830f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 13:31:56 -0700 Subject: [PATCH] [ci] release 2022-10 (#67) Co-authored-by: github-actions[bot] --- .changeset/serious-crabs-chew.md | 16 ---------- .changeset/sharp-squids-accept.md | 8 ----- .changeset/swift-olives-beam.md | 26 --------------- .changeset/two-birds-complain.md | 5 --- .changeset/witty-maps-ring.md | 10 ------ packages/react/CHANGELOG.md | 53 +++++++++++++++++++++++++++++++ packages/react/package.json | 2 +- 7 files changed, 54 insertions(+), 66 deletions(-) delete mode 100644 .changeset/serious-crabs-chew.md delete mode 100644 .changeset/sharp-squids-accept.md delete mode 100644 .changeset/swift-olives-beam.md delete mode 100644 .changeset/two-birds-complain.md delete mode 100644 .changeset/witty-maps-ring.md diff --git a/.changeset/serious-crabs-chew.md b/.changeset/serious-crabs-chew.md deleted file mode 100644 index c22b5723..00000000 --- a/.changeset/serious-crabs-chew.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@shopify/hydrogen-react': patch ---- - -Adds the functions `getStorefrontApiUrl()` and `getPublicTokenHeaders()` to the object returned by `useShop()` (and provided by ``). - -For example: - -```ts -const {storefrontId, getPublicTokenHeaders, getStorefrontApiUrl} = useShop(); - -fetch(getStorefrontApiUrl(), { - headers: getPublicTokenHeaders({contentType: 'json'}) - body: {...} -}) -``` diff --git a/.changeset/sharp-squids-accept.md b/.changeset/sharp-squids-accept.md deleted file mode 100644 index 15e752c7..00000000 --- a/.changeset/sharp-squids-accept.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@shopify/hydrogen-react': patch ---- - -Adds CartLines components and hooks. - -- The `CartLineProvider` component creates a context for using a cart line. -- The `useCartLine` hook provides access to the cart line object. It must be a descendent of a `CartProvider` component. diff --git a/.changeset/swift-olives-beam.md b/.changeset/swift-olives-beam.md deleted file mode 100644 index 24690491..00000000 --- a/.changeset/swift-olives-beam.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'@shopify/hydrogen-react': patch ---- - -Provide a mapping of Storefront API's custom scalars to their actual types, for use with GraphQL CodeGen. - -For example: - -```ts -import {storefrontApiCustomScalars} from '@shopify/hydrogen-react'; - -const config: CodegenConfig = { - // Use the schema that's bundled with @shopify/hydrogen-react - schema: './node_modules/@shopify/hydrogen-react/storefront.schema.json', - generates: { - './gql/': { - preset: 'client', - plugins: [], - config: { - // Use the custom scalar definitions that @shopify/hydrogen-react provides to improve the custom scalar types - scalars: storefrontApiCustomScalars, - }, - }, - }, -}; -``` diff --git a/.changeset/two-birds-complain.md b/.changeset/two-birds-complain.md deleted file mode 100644 index 7b6f6e84..00000000 --- a/.changeset/two-birds-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/hydrogen-react': patch ---- - -Adds additional builds for Node-specific targets, to help ensure that server-side code was getting compiled for server-side runtimes, instead of browser-side code for server-side runtimes. diff --git a/.changeset/witty-maps-ring.md b/.changeset/witty-maps-ring.md deleted file mode 100644 index ced261f0..00000000 --- a/.changeset/witty-maps-ring.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@shopify/hydrogen-react': patch ---- - -Add a new utility helper for getting the myshopify domain for the site: - -```ts -const client = createStorefrontClient(...); -client.getShopifyDomain() === `https://testing.myshopify.com`; -``` diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 4dd1db7e..5fc1f78b 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,58 @@ # @shopify/hydrogen-react +## 2022.10.3 + +### Patch Changes + +- ccfbbbd: Adds the functions `getStorefrontApiUrl()` and `getPublicTokenHeaders()` to the object returned by `useShop()` (and provided by ``). + + For example: + + ```ts + const {storefrontId, getPublicTokenHeaders, getStorefrontApiUrl} = useShop(); + + fetch(getStorefrontApiUrl(), { + headers: getPublicTokenHeaders({contentType: 'json'}) + body: {...} + }) + ``` + +- 0683765: Adds CartLines components and hooks. + + - The `CartLineProvider` component creates a context for using a cart line. + - The `useCartLine` hook provides access to the cart line object. It must be a descendent of a `CartProvider` component. + +- 94fdddd: Provide a mapping of Storefront API's custom scalars to their actual types, for use with GraphQL CodeGen. + + For example: + + ```ts + import {storefrontApiCustomScalars} from '@shopify/hydrogen-react'; + + const config: CodegenConfig = { + // Use the schema that's bundled with @shopify/hydrogen-react + schema: './node_modules/@shopify/hydrogen-react/storefront.schema.json', + generates: { + './gql/': { + preset: 'client', + plugins: [], + config: { + // Use the custom scalar definitions that @shopify/hydrogen-react provides to improve the custom scalar types + scalars: storefrontApiCustomScalars, + }, + }, + }, + }; + ``` + +- 676eb75: Adds additional builds for Node-specific targets, to help ensure that server-side code was getting compiled for server-side runtimes, instead of browser-side code for server-side runtimes. +- 2dc6ac4: Add a new utility helper for getting the myshopify domain for the site: + + ```ts + const client = createStorefrontClient(...); + client.getShopifyDomain() === `https://testing.myshopify.com`; + ``` + ## 2022.10.2 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 8d0e89a7..bb587dc4 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/hydrogen-react", - "version": "2022.10.2", + "version": "2022.10.3", "description": "React components, hooks, and utilities for creating custom Shopify storefronts", "homepage": "https://github.com/Shopify/hydrogen-ui/tree/main/packages/react", "license": "MIT",