Skip to content

Commit

Permalink
Clean up changeset (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlyhel authored Jan 25, 2024
1 parent 74316b6 commit 6f90c92
Show file tree
Hide file tree
Showing 53 changed files with 168 additions and 365 deletions.
2 changes: 1 addition & 1 deletion .changeset/blue-beds-destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/hydrogen': patch
---

Fix redirect bug
Fix a bug that allowed undesired redirect to external domains
2 changes: 1 addition & 1 deletion .changeset/brown-lobsters-marry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': minor
---

When generating Codegen, the CLI now looks first at the project GraphQL config (e.g. `.graphqlrc.yml` file) to find the documents for the Storefront API schema.
Check for local project GraphQL config files (example: `.graphqlrc.yml`) when running in Codegen mode
3 changes: 1 addition & 2 deletions .changeset/chatty-tomatoes-breathe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
'@shopify/hydrogen-react': patch
---

* Format code for improved readability contributed by @sanjaiyan-dev
* Fix `<model-viewer>`'s `onPause` event listener
Fix `<model-viewer>`'s `onPause` event listener, with improved readability contributed by @sanjaiyan-dev
5 changes: 0 additions & 5 deletions .changeset/chilled-dogs-smash.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/chilly-cycles-wink.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/chilly-moons-explode.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/cold-chefs-attend.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/cool-chefs-battle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'skeleton': patch
---

Use new Storefront API parameters in 2024-01 to fix redirection to the product's default variant when there are unknown query params in the URL.
Use new parameters introduced in Storefront API v2024-01 to fix redirection to the product's default variant when there are unknown query params in the URL.

```diff
- selectedVariant: variantBySelectedOptions(selectedOptions: $selectedOptions) {
Expand Down
5 changes: 0 additions & 5 deletions .changeset/cool-shoes-shave.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/early-moose-whisper.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': patch
---

Minor update to the default organization of files and folders in the starter template.
Reorganize starter template file and folder structure
2 changes: 1 addition & 1 deletion .changeset/early-planes-pump.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/hydrogen-react': patch
---

Added React.forwardRef to Video and ExternalVideo components
Add `React.forwardRef` to `Video` and `ExternalVideo` components
5 changes: 0 additions & 5 deletions .changeset/fifty-queens-obey.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/five-scissors-sniff.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
'@shopify/cli-hydrogen': patch
---

Fixed step-debugging when running in MiniOxygen's Node.js sandbox
Fix step-debugging when running in the Node.js sandbox
6 changes: 0 additions & 6 deletions .changeset/fluffy-houses-itch.md

This file was deleted.

8 changes: 4 additions & 4 deletions .changeset/forty-bugs-think.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
'@shopify/cli-hydrogen': patch
'@shopify/cli-hydrogen': minor
---

Remove hidden attribute from `deploy` command
Add `deploy` command to Hydrogen CLI

You can now deploy your Hydrogen storefront without connecting to GitHub. Run the `deploy` command from your local terminal or configure a CI/CD (e.g. Bitbucket) for continuous deployment.
You can now deploy your Hydrogen app without connecting to GitHub. Run the `deploy` command from your local terminal or configure your own CI/CD workflows from any platform.

Run `h2 deploy --help` to see additional features of the command.
Run `npx shopify hydrogen deploy --help` for more details.
2 changes: 1 addition & 1 deletion .changeset/friendly-pens-marry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/hydrogen-codegen': minor
---

Export type utilities to create GraphQL clients that can consume the types generated by this package.
Abstract type utilities so they can be reused by other GraphQL schemas
2 changes: 1 addition & 1 deletion .changeset/fuzzy-phones-laugh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': major
---

The worker runtime, previously used with `--worker` flag, is now the default runtime in the `dev` and `preview` commands. The legacy Node.js sandbox runtime can still be used with the `--legacy-runtime` but will be removed in a future release.
Make the worker runtime the default for the local development server when running `dev` and `preview`. To access the legacy Node.js runtime, pass the `--legacy-runtime` flag. The legacy runtime will be deprecated and removed in a future release.
2 changes: 1 addition & 1 deletion .changeset/gorgeous-bikes-admire.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': patch
---

Fix the sourcemaps to be included on Oxygen deployments from the CLI
Generate sourcemaps by default when running the `deploy` command
2 changes: 1 addition & 1 deletion .changeset/green-mice-hide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': patch
---

Rely on server-side check for bundle size >10mb
Remove bundle-size check from the `build` command, in favor of checking server-side with `deploy`
2 changes: 1 addition & 1 deletion .changeset/grumpy-lemons-drive.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'skeleton': patch
---

Updated the GraphQL config in `.graphqlrc.yml` to use the more modern `projects` structure:
Update the GraphQL config in `.graphqlrc.yml` to use the more modern `projects` structure:

```diff
-schema: node_modules/@shopify/hydrogen/storefront.schema.json
Expand Down
19 changes: 10 additions & 9 deletions .changeset/happy-pigs-collect.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
'@shopify/hydrogen': patch
'@shopify/cli-hydrogen': patch
'@shopify/hydrogen': major
---

Better Hydrogen error handling

* Fix storefront client throwing on partial successful errors
* Fix subrequest profiler to better display network errors with url information for SFAPI requests
* Fix subrequest profiler to better display network errors with URL information for Storefront API requests

### Breaking change

Mutation methods of `createCartHandler` used to return an `errors` object that contains `userErrors`. This is now changed back to `userErrors` to be consistent with SFAPI schema.
This update changes the shape of the error objects returned by the `createCartHandler` method.

The `errors` object will now be used for Graphql execution errors.
Previously, mutations could return an `errors` array that contained a `userErrors` array.

`storefront.isApiError` is deprecated.
With this change, these arrays are no longer nested. The response can contain both an `errors` array and a `userErrors` array. `errors` contains GraphQL execution errors. `userErrors` contains errors caused by the cart mutation itself (such as adding a product that has zero inventory).

Updated types:
`storefront.isApiError` is deprecated.

* `cart.get()` used to return a `Cart` type. Now it returns `CartReturn` type to accommodate the `errors` object
* All other `cart` methods (ie. `cart.addLines`) used to return a `CartQueryData` type. Now it returns `CartQueryDataReturn` type to accommodate the `errors` object.
### Updated return types for `createCartHandler` methods

* `cart.get()` used to return a `Cart` type. Now it returns `CartReturn` type to accommodate the `errors` object.
* All other `cart` methods (ie. `cart.addLines`) used to return a `CartQueryData` type. Now it returns `CartQueryDataReturn` type to accommodate the `errors` object.
4 changes: 2 additions & 2 deletions .changeset/heavy-coins-tickle.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@shopify/hydrogen': patch
'@shopify/hydrogen': major
---

💥 Change the behaviour of `createContentSecurityPolicy` where the custom rules passed in will extends the default Shopify and development domains instead of overriding them.
Custom rules passed to `createContentSecurityPolicy` now extend the default Shopify and development domains, instead of overriding them
2 changes: 1 addition & 1 deletion .changeset/honest-hotels-cheer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/hydrogen': patch
---

🐛 fix content security policy for local enviorment for not recognizing localhost asset server as a valid policy
Fix content security policy to recognize `localhost` asset server as a valid source when running the `dev` command
5 changes: 0 additions & 5 deletions .changeset/itchy-plums-return.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-avocados-know.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/late-badgers-return.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'skeleton': patch
---

Change the default HydrogenSession to be more robust in parsing session cookies
Improve resiliency of `HydrogenSession`
7 changes: 3 additions & 4 deletions .changeset/mighty-rivers-dance.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
'@shopify/remix-oxygen': patch
'skeleton': patch
'@shopify/cli-hydrogen': patch
'@shopify/create-hydrogen': patch
---

* Update example and template Remix versions to `^2.5.1`
* Enable future flags:
* `v3_fetcherPersist` - <https://remix.run/docs/en/main/hooks/use-fetchers#additional-resources>
* `v3_relativeSplatpath` - <https://remix.run/docs/en/main/hooks/use-resolved-path#splat-paths>
* Enable Remix future flags:
* [`v3_fetcherPersist`](https://remix.run/docs/en/main/hooks/use-fetchers#additional-resources)
* [`v3_relativeSplatpath`](https://remix.run/docs/en/main/hooks/use-resolved-path#splat-paths)
57 changes: 2 additions & 55 deletions .changeset/neat-falcons-add.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,5 @@
---
'@shopify/remix-oxygen': patch
'@shopify/hydrogen': patch
'@shopify/cli-hydrogen': patch
'@shopify/create-hydrogen': patch
'@shopify/hydrogen': minor
---

Subrequest Profiler (stable) - Provides an overview of network requests happening on the server side

#### How to use:

1. Run `h2 dev`
2. Visit http://localhost:3000/subrequest-profiler

#### Set request display name with `storefront.query`:

```tsx
context.storefront.query(
HOMEPAGE_FEATURED_PRODUCTS_QUERY,
{
displayName: 'Feature products',
variables: {
country,
language,
},
},
)
```

#### Set request debug information with `createWithCache`:

```tsx
const withCache = createWithCache({
cache,
waitUntil,
request,
});

const data3p = async () => {
return await withCache(
['Some unique cache keys'],
CacheLong(),
({addDebugData}) => {
return fetch('https://some-3p-endpoint.com').then(async (response) => {
if (process.env.NODE_ENV === 'development') {
addDebugData({
displayName: '3p endpoint display name',
response,
});
}

return await response.json();
});
},
);
};
```

Add [Subrequest Profiler](https://shopify.dev/docs/custom-storefronts/hydrogen/debugging/subrequest-profiler) developer tool to enable better observability of server-side network requests and caching behaviors
5 changes: 0 additions & 5 deletions .changeset/nine-zebras-swim.md

This file was deleted.

4 changes: 2 additions & 2 deletions .changeset/ninety-lions-develop.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@shopify/hydrogen': patch
'@shopify/hydrogen': minor
---

✨ Make customer client utility official.
Introduce the new [`createCustomerAccountClient`](https://shopify.dev/docs/api/hydrogen/2024-01/utilities/createcustomeraccountclient) for interacting with the Customer Account API
5 changes: 0 additions & 5 deletions .changeset/old-waves-serve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/orange-grapes-raise.md

This file was deleted.

4 changes: 1 addition & 3 deletions .changeset/polite-singers-joke.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
'@shopify/hydrogen': patch
---

Fix the `<Seo />` component to render canonical URLs without trailing slashes. For example, both https://hydrogen.shop/collections/freestyle/ and https://hydrogen.shop/collections/freestyle return a canonical link of https://hydrogen.shop/collections/freestyle.

Thank you @joshuafredrickson for reporting.
Fix the `<Seo />` component to render canonical URLs without trailing slashes. Thanks to @joshuafredrickson for reporting
7 changes: 0 additions & 7 deletions .changeset/proud-buckets-swim.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/quick-apes-pump.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': major
---

Remove deprecated CLI flags.
Remove deprecated `build` command flags `--base`, `--entry`, `--target`. Additionally, `--codegen-unstable` is now `--codegen`.
9 changes: 2 additions & 7 deletions .changeset/selfish-news-mix.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
---
'skeleton': patch
'@shopify/hydrogen': patch
'@shopify/cli-hydrogen': patch
'@shopify/create-hydrogen': patch
---

👩‍💻 improved HydrogenSession typing.
Make default `HydrogenSession` type extensible.

In order to ensure utilies from @shopify/hydrogen will work properly using user implemented HydrogenSession class. We encourage the use of `HydrogenSession` type to ensure all the interface needed had been implemented.

Update implementation of HydrogenSession using type
Update implementation of HydrogenSession using type:

```diff
import {
Expand Down
5 changes: 0 additions & 5 deletions .changeset/shiny-cats-turn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shy-cheetahs-carry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shy-poems-cheat.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/silly-vans-bake.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@shopify/cli-hydrogen': minor
---

Add `--diff` flag to dev and build commands to run examples in monorepo. Examples are now a diff applied on top of the starter template.
Add `--diff` flag to `dev` and `build` commands, used for building Hydrogen app examples.
9 changes: 3 additions & 6 deletions .changeset/strong-cars-run.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
'@shopify/hydrogen-react': patch
'skeleton': patch
'@shopify/hydrogen': patch
'@shopify/cli-hydrogen': patch
'@shopify/create-hydrogen': patch
'@shopify/hydrogen-react': major
'@shopify/hydrogen': major
---

Update to SFAPI 2024-01
Upgrade to [Storefront API v2024-01](https://shopify.dev/docs/api/release-notes/2024-01#storefront-api-changes)
Loading

0 comments on commit 6f90c92

Please sign in to comment.