-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v1.x-2022-07' into bl-countries-session
* v1.x-2022-07: (95 commits) [ci] release v1.x-2022-07 (#1170) Try ignoring hello-world to see if it will get bumped Don't consider examples part of the workspace (#1202) Fix headers on oxygen (#1201) Add bot user agents for Seoradar and Adresults, resolves #1199 (#1200) Fix changeset updates to docker deploy documentation to resolve run issues (#1196) Upgrade body-parser (#1162) Fix path for deployments Adds ability to add more than one cookie per response (#1161) Move Demo Store to templates folder (#1132) Avoid additional div element (#1191) Whoops this should only be patch Adds preconnect <link> for CDN (#1160) Bump ejs from 3.1.6 to 3.1.7 (#1147) Fix scroll restoration when server props are changed (#1152) Typo Fixes #1165 by making a missing alt tag a console warning (#1167) Remove concurrency directive for Oxygen deployments Fix hydrogen-ui dev and build issues (#1169) ...
- Loading branch information
Showing
638 changed files
with
16,680 additions
and
13,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
docs/code_of_conduct.md | ||
packages/hydrogen/src/docs/hooks.md | ||
packages/hydrogen/src/docs/components.md | ||
packages/hydrogen/src/docs/hydrogen-reference.md | ||
packages/hydrogen/src/framework/docs/css-support.md | ||
packages/hydrogen/src/foundation/useQuery/README.md | ||
docs/framework/css-support.md | ||
docs/framework/work-with-rsc.md | ||
docs/hooks/global/usequery.md | ||
packages/hydrogen/CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,16 @@ | |
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", {"repo": "shopify/hydrogen"}], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [["@shopify/hydrogen", "create-hydrogen-app"]], | ||
"fixed": [["@shopify/hydrogen", "create-hydrogen-app"]], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "v1.x-2022-07", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [ | ||
"template-hydrogen-default", | ||
"template-hydrogen-hello-world", | ||
"test-server-components", | ||
"hydrogen-playground" | ||
"hydrogen-playground", | ||
"@shopify/hydrogen-ui" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Releasing | ||
|
||
Hydrogen versions are determined exclusively by [changesets](https://github.com/changesets/changesets). When new changesets are merged into a release branch like `v1.x-2022-07`, a new PR will be automatically created containing the proposed version. | ||
|
||
This PR can stay open and will be continously updated by the changesets bot until you are ready to release a new version. | ||
|
||
## Releasing new versions | ||
|
||
When you are ready to release a new version of Hydrogen, follow these steps: | ||
|
||
1. Merge the PR created by the changesets bot. This will convert all changesets into appropriate `CHANGELOG` files, add Git tags, and create GitHub releases for each package contained in the release. | ||
1. Next, visit the Shipit page for Hydrogen containing the version you intend to release, e.g. `Hydrogen v1.x-2022-07`. Click **Deploy** on the merge commit that was recently created. | ||
1. _Most recent stable version only_: After Shipit is finished publishing to NPM, manually [run the Stackblitz publish workflow](https://github.com/Shopify/hydrogen/actions/workflows/publish_stackblitz.yml) in GitHub against the latest stable branch. This is required, because GitHub will not allow a bot to kick off another GitHub Action, and the Changesets bot is the user who created the release. | ||
|
||
## Releasing unstable versions | ||
|
||
Hydrogen maintains an `unstable` branch as a home for features and breaking changes related to the `unstable` version of the Storefront API. | ||
|
||
To release an unstable version: | ||
|
||
1. Merge your changes into the `unstable` branch. | ||
1. Visit the Shipit page for `Hydrogen Unstable` and click **Deploy** on the commit you want to release | ||
|
||
A new snapshot release will be created with your changes and tagged on NPM with `unstable`. You can install the unstable version of Hydrogen using this tag: | ||
|
||
```bash | ||
yarn add @shopify/hydrogen@unstable | ||
|
||
# or start a new project: | ||
npx create-hydrogen-app@unstable | ||
``` | ||
|
||
## Common problems | ||
|
||
**After merging the auto-generated changeset PR, my GitHub Action encountered an Error with the message `No commits between X and changeset-release/Y`** | ||
|
||
This happens when changesets does not properly clear out all the changesets in the `.changesets` directory of the hydrogen repo. The soluction is to create a new PR with all of the `.changesets` removed. The GitHub Action will re-run when you merge the second PR. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# This Action is responsible for deploying the default Hydrogen template to Oxygen. | ||
# It is split out from deployments.yml because Oxygen checks for the presence of this specific workflow in the repo. | ||
# TODO: Merge the workflow if/when Oxygen is more lenient. | ||
name: Oxygen Deployment | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['v1.x-2022-07'] | ||
|
||
jobs: | ||
deploy_oxygen: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository_owner == 'shopify' }} | ||
name: Deploy to Oxygen | ||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
|
||
- name: Install the packages | ||
run: yarn install --frozen-lockfile --ignore-engines | ||
|
||
- name: Build Hydrogen | ||
run: yarn workspace @shopify/hydrogen build | ||
|
||
- name: Generate deployment ID | ||
id: deployment-id | ||
working-directory: ./templates/template-hydrogen-default | ||
run: | | ||
yarn add ulid | ||
echo "::set-output name=ID::$(LC_ALL=C </dev/urandom tr -dc "0123456789abcdefghjkmnpqrstvwxyz" | head -c 9)" | ||
- name: Set asset base URL | ||
shell: bash | ||
run: echo "::set-output name=URL::https://cdn.shopify.com/oxygen/55145660472/9928760/${{ steps.deployment-id.outputs.ID }}/" | ||
id: base-url | ||
|
||
- name: Production build | ||
id: storefront-build | ||
working-directory: ./templates/template-hydrogen-default | ||
run: | | ||
HYDROGEN_ASSET_BASE_URL=${{ steps.base-url.outputs.URL }} yarn build:client | ||
HYDROGEN_ASSET_BASE_URL=${{ steps.base-url.outputs.URL }} yarn build:worker | ||
- name: Publish to Oxygen | ||
id: deploy | ||
uses: shopify/oxygenctl-action@v2 | ||
with: | ||
path: ./templates/template-hydrogen-default | ||
deployment_id: ${{ steps.deployment-id.outputs.ID }} | ||
oxygen_deployment_token: ${{ secrets.OXYGEN_DEPLOYMENT_TOKEN }} | ||
# Hardcode message and timestamp if manual dispatch | ||
commit_message: ${{ github.event.head_commit.message || 'Manual deployment' }} | ||
commit_timestamp: ${{ github.event.head_commit.timestamp || github.event.repository.updated_at }} | ||
|
||
- name: Create GitHub Deployment | ||
uses: shopify/github-deployment-action@v1 | ||
if: always() | ||
with: | ||
token: ${{ github.token }} | ||
environment: 'preview' | ||
preview_url: ${{ steps.deploy.outputs.url }} | ||
description: ${{ github.event.head_commit.message }} | ||
|
||
# Skip this for now. It takes Oxygen a few seconds to make the deployment live, and this 404s. | ||
# - name: Run health check | ||
# run: | | ||
# yarn ts-node scripts/health-check.ts ${{ steps.deploy.outputs.url }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Welcome to the Hydrogen docs! | ||
|
||
Feel free to browse through the docs here or at: https://shopify.dev/api/hydrogen/ |
Oops, something went wrong.