Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
[ci] release 2022-10 (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Nov 16, 2022
1 parent 2dc6ac4 commit a6c2b91
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 66 deletions.
16 changes: 0 additions & 16 deletions .changeset/serious-crabs-chew.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/sharp-squids-accept.md

This file was deleted.

26 changes: 0 additions & 26 deletions .changeset/swift-olives-beam.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/two-birds-complain.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/witty-maps-ring.md

This file was deleted.

53 changes: 53 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 `<ShopifyProvider/>`).

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
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a6c2b91

Please sign in to comment.