Skip to content
Draft
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
7 changes: 4 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"$schema": "https://unpkg.com/@changesets/config@4.0.0-next.6/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"baseBranch": "preview",
"updateInternalDependencies": "patch",
"ignore": ["@shopify/hydrogen-example-*", "hydrogen"]
"ignore": ["@shopify/hydrogen-example-*", "hydrogen", "@shopify/storefront-e2e"],
"format": false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc format: false only avoids formatting changelog markdown, it doesn't format pre.json

let's also add .changeset/pre.json to oxfmt.config.ts's ignorePatterns?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking: the declared 3.1.4 schema doesn't know about format, although the installed 4.0.0-next.6 runtime does and honours this value. Worth updating the schema URL so autocomplete and validation describe the config we're actually using.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

}
5 changes: 5 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"mode": "pre",
"tag": "preview",
"changesets": []
}
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Format check
run: pnpm run format:check

- name: Changesets check
run: node scripts/assert-no-major-changesets.ts

- name: Lint
run: pnpm run lint:ci

Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This file must be named release.yml: npm's Trusted Publishing configuration
# for our packages allows a single workflow filename, shared across branches.
name: Release

on:
push:
branches: [preview]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking: (threading) this merge creates the version PR; it doesn't publish until that PR merges. Phase 0 can therefore land separately, but it must land before the generated version PR. The React Router template still needs the deploy flags that bypass the released CLI's 0.0.0-preview-* sniff, and the stale skill assertions need updating.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I'm going to fire up another PR for this.

Edit: actually I'll do it in #3890


concurrency:
group: release-${{ github.ref_name }}
# Queue runs instead of cancelling: a cancel that lands between npm
# publish and tag creation strands state a rerun cannot rebuild
cancel-in-progress: false

jobs:
preview-release:
name: Preview Release
runs-on: ubuntu-latest
if: github.repository_owner == 'shopify'
permissions:
contents: write # push the version branch and create git tags
pull-requests: write # open and update the version PR
id-token: write # generate an ID token for npm Trusted Publishing
env:
npm_config_registry: https://registry.npmjs.org/
TURBO_TELEMETRY_DISABLED: "1"
outputs:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: these outputs aren't consumed by any job in this workflow. Fine to keep if Phase we will use them soon, but for now they do nothing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are intentional — the upcoming dist-preview work hooks a compile job onto this one with needs: preview-release and gates on outputs.published, so keeping them here means that PR does not have to touch this job.

published: ${{ steps.changesets.outputs.published }}
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# Changesets needs full history to generate changelogs with the correct commits
fetch-depth: 0

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
with:
version: 10.33.0

- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: package.json
registry-url: "https://registry.npmjs.org"
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Ensure prerelease mode
# Without pre.json, changeset publish would push a non-prerelease
# version to the npm latest dist-tag, hijacking it from the real
# releases published from main
run: jq -e '.mode == "pre" and .tag == "preview"' .changeset/pre.json

- name: Ensure no major changesets
# Preview releases move only the -preview.<n> suffix; a major
# changeset would move the base version off 2026.10.0
run: node scripts/assert-no-major-changesets.ts

- name: Build packages
run: pnpm run build:pkgs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: publication isn't gated on the full CI suite. CI runs as a sibling workflow, and preview currently has empty required-check arrays, so this can publish while CI is red or still running. Let's require the actual CI check before merging the generated version PR, or run the same format, changeset validation, lint, full workspace build, typecheck, and test sequence here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the CI check to the preview branch protection required status checks, so the version PR cannot merge while CI is red or still running. I think that covers this without duplicating the whole suite inside the release job.


- name: Create preview release PR or publish
id: changesets
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
with:
version: pnpm changeset version
publish: pnpm changeset publish

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: (threading) the root release script still runs changeset publish --tag preview, which the pinned CLI rejects while pre.json is in pre mode. The workflow bypasses the script, but it still reads as the supported release entrypoint and throws when used. Let's drop the explicit tag there, or remove the dead script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — the pinned CLI throws "Releasing under custom tag is not allowed in pre mode!" on the explicit flag. Dropped --tag preview from the script; pre.json supplies the tag now.

commit: "[ci] preview release"
title: "[ci] preview release"
env:
GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
NPM_TOKEN: "" # Empty string forces OIDC authentication
1 change: 1 addition & 0 deletions oxfmt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
sortTailwindcss: true,
sortPackageJson: true,
ignorePatterns: [
".changeset/pre.json",
"dist/**",
"build/**",
".next/**",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"format:check": "oxfmt --check",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "pnpm run build:pkgs && changeset publish --tag preview",
"release": "pnpm run build:pkgs && changeset publish",
"test": "pnpm run test:scripts && turbo run test",
"test:scripts": "node --test scripts/*.test.ts",
"test:benchmark-harness": "tsc -p scripts/storefront-benchmark-harness/tsconfig.json && node --test scripts/storefront-benchmark-harness/*.test.ts",
Expand All @@ -43,6 +43,7 @@
"devDependencies": {
"@arethetypeswrong/cli": "0.18.3",
"@changesets/cli": "3.0.0-next.8",
"@changesets/parse": "1.0.0-next.7",
"@types/node": "^25.8.0",
"lefthook": "^2.1.6",
"oxfmt": "^0.47.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/hydrogen",
"version": "0.0.1",
"version": "2026.10.0-preview.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's port main's Hydrogen changelog before the first version PR merges, otherwise 2026.10.0-preview.1 lands above the branch's unpublished 0.0.1 stub, and we'll need to retrofit the release history afterwards

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather do this when it is time for the main release instead of for preview. Retrofitting is a one-file paste at that point, and preview's changelog can stay self-contained until then.

"description": "Framework-agnostic Shopify storefront SDK and agent skills.",
"license": "MIT",
"author": "Shopify",
Expand Down
98 changes: 16 additions & 82 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading