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

[ci] release 2023-01 #123

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .changeset/wet-hounds-add.md

This file was deleted.

43 changes: 43 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# @shopify/hydrogen-react

## 2023.1.1

### Patch Changes

- 9bff83c: Updated to Storefront API version `2023-01`

## Storefront API Changes

The Storefront API changelog can be viewed [here](https://shopify.dev/api/release-notes/2023-01#graphql-storefront-api-changes). There are not any breaking changes in the Storefront API itself.

## Storefront Kit changes

### Breaking Changes

- The default Cart query no longer uses `compareAtPriceV2` and `priceV2`; use `compareAtPrice` and `price` instead. The `V2` fields will be removed in an upcoming version of the Storefront API.
- The storefront client and ShopifyProvider now provide the `storeDomain` exactly as it is received; it's recommended that you pass the domain with the protocol and the fully-qualified domain name for your Storefront. For example: `https://hydrogen-test.myshopify.com`
- `parseMetafield`'s implementation has been updated and vastly improved so that it is correctly parsing all the metafield types.

- The parsed metafield will now be found on the `parsedValue` property. For example:

```ts
const metafield = parseMetafield(rawMetafield);

console.log(metafield.parsedValue);
```

- Additionally, a new TypeScript type called `ParsedMetafields` is provided to help the `parseMetafield` function return the correct TypeScript types, by passing the type of metafield into the `ParsedMetafield` type. For example:

```ts
const metafield =
parseMetafield<ParsedMetafield['boolean']>(rawMetafield);

// parsedValue is a boolean
if (metafield.parsedValue === true) {
}
```

- The `<Metafield/>` component has been removed; use `parseMetafield().parsedValue` to have control over what you want to render

### Other Changes

- The TypeScript types for the returned value of `flattenConnection()` should now be friendlier: if you are using a `PartialDeep` object, you'll still get a `PartialDeep` object in return; if you're NOT using a `PartialDeep` object, then the returned type will not be wrapped in `PartialDeep`.

## 2022.10.8

### 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/storefront-kit-react",
"version": "2023.1.0",
"version": "2023.1.1",
"description": "React components, hooks, and utilities for creating custom Shopify storefronts",
"homepage": "https://github.com/Shopify/storefront-kit/tree/main/packages/react",
"license": "MIT",
Expand Down