Skip to content

Commit

Permalink
[ci] release v1.x-2022-07 (#2278)
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] authored Nov 15, 2022
1 parent 20e5b79 commit e98a65b
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 74 deletions.
17 changes: 0 additions & 17 deletions .changeset/calm-ears-wonder.md

This file was deleted.

30 changes: 0 additions & 30 deletions .changeset/dull-camels-report.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gold-papayas-grin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/red-ears-retire.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/serious-geckos-heal.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thick-ladybugs-hug.md

This file was deleted.

55 changes: 54 additions & 1 deletion packages/hydrogen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# Changelog

## 1.6.2

### Patch Changes

- Add a helper method to get headers to proxy the online store. These headers are necessary to prevent the online store from throttling proxied requests: ([#2300](https://github.com/Shopify/hydrogen/pull/2300)) by [@blittle](https://github.com/blittle)

```ts
import {getOnlineStorefrontHeaders} from '@shopify/hydrogen';

async function handleEvent(event) {
const response = fetch(`https://hydrogen.shop/products/hydrogen`, {
headers: getOnlineStorefrontHeaders(event.request),
});

return response;
}
```

* Remove automatic origin support from `fetchSync` on the server. ([#2276](https://github.com/Shopify/hydrogen/pull/2276)) by [@jplhomer](https://github.com/jplhomer)

**Important: Please test that your Hydrogen app is using `fetchSync` correctly before shipping this version of Hydrogen to production.**

Developers should never be making `fetch` requests on the server against their own Hydrogen app. This is because some production runtimes prohibit invoking `fetch` requests to servers in the same region. Other runtimes will fail to resolve DNS when invoked from within the same process.

This change makes it **required** to pass a fully-qualified URL (including origin) to `fetchSync` when it's being used on the server:

```jsx
// MyComponent.server.jsx

// ❌ You should not use this pattern, and it will now fail:
fetchSync('/api/path').json();
```

Instead, you should query the data directly, or extract the data query to a function and call it inside your server component:

```jsx
// MyComponent.server.jsx
import {sharedQuery} from './shared-location.server';

// ✅ Do this instead:
useQuery('shared-query', sharedQuery);
```

This is not considered a breaking change because the intention of the server-side `fetchSync` API was never to enable calling a Hydrogen app from itself, but rather to call third-party APIs from the server.

- Fix issue with preload cache which would cause problems when scaled to large amounts of traffic in production. ([#2316](https://github.com/Shopify/hydrogen/pull/2316)) by [@jplhomer](https://github.com/jplhomer)

* Add more UAs to the bot detection list to improve parity with SEO tools ([#2297](https://github.com/Shopify/hydrogen/pull/2297)) by [@davecyen](https://github.com/davecyen)

- Fix RSC responses in some situations where the pathname contains double quotes. ([#2320](https://github.com/Shopify/hydrogen/pull/2320)) by [@frandiox](https://github.com/frandiox)

* Fix unhandled errors when parsing invalid RSC states from URL. ([#2315](https://github.com/Shopify/hydrogen/pull/2315)) by [@frandiox](https://github.com/frandiox)

## 1.6.1

### Hydrogen UI React
Expand Down Expand Up @@ -463,7 +516,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);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"engines": {
"node": ">=14"
},
"version": "1.6.1",
"version": "1.6.2",
"description": "Modern custom Shopify storefronts",
"license": "MIT",
"main": "dist/esnext/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const LIB_VERSION = '1.6.1';
export const LIB_VERSION = '1.6.2';
2 changes: 1 addition & 1 deletion packages/playground/async-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"@cloudflare/kv-asset-handler": "*",
"@shopify/hydrogen": "^1.6.1",
"@shopify/hydrogen": "^1.6.2",
"miniflare": "^1.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/server-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"@cloudflare/kv-asset-handler": "*",
"@shopify/hydrogen": "^1.6.1",
"@shopify/hydrogen": "^1.6.2",
"miniflare": "^1.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion templates/demo-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"prettier": "@shopify/prettier-config",
"dependencies": {
"@headlessui/react": "^1.7.0",
"@shopify/hydrogen": "^1.6.1",
"@shopify/hydrogen": "^1.6.2",
"clsx": "^1.1.1",
"graphql-tag": "^2.12.6",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"vite": "^2.9.13"
},
"dependencies": {
"@shopify/hydrogen": "^1.6.1",
"@shopify/hydrogen": "^1.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down

0 comments on commit e98a65b

Please sign in to comment.