From f59886e331c08f446e0e637a3d531f46c3c94797 Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Wed, 1 Nov 2023 13:10:51 +0200 Subject: [PATCH 1/6] chore(repo): Enter pre-release changeset mode with alpha-v5 tag Since we are using the pre-release changeset mode there is no need to generate canary releases upon merging commits to main using the `canary` related npm commands and gh actions. Also with this change we will stop producing a `canary` version on every main merge. --- .changeset/pre.json | 22 +++++++++++++++++ .github/workflows/release-canary.yml | 36 ---------------------------- package.json | 2 -- scripts/canary.mjs | 18 -------------- 4 files changed, 22 insertions(+), 56 deletions(-) create mode 100644 .changeset/pre.json delete mode 100644 .github/workflows/release-canary.yml delete mode 100755 scripts/canary.mjs diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000000..eb7dcd3a8ab --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,22 @@ +{ + "mode": "pre", + "tag": "alpha-v5", + "initialVersions": { + "@clerk/backend": "0.31.3", + "@clerk/chrome-extension": "0.4.10", + "@clerk/clerk-js": "4.63.0", + "eslint-config-custom": "0.3.0", + "@clerk/clerk-expo": "0.19.12", + "@clerk/fastify": "0.6.17", + "gatsby-plugin-clerk": "4.4.18", + "@clerk/localizations": "1.26.7", + "@clerk/nextjs": "4.25.7", + "@clerk/clerk-react": "4.27.0", + "@clerk/remix": "3.1.0", + "@clerk/clerk-sdk-node": "4.12.16", + "@clerk/shared": "1.0.0", + "@clerk/themes": "1.7.9", + "@clerk/types": "3.57.0" + }, + "changesets": [] +} \ No newline at end of file diff --git a/.github/workflows/release-canary.yml b/.github/workflows/release-canary.yml deleted file mode 100644 index 9a8497df3b4..00000000000 --- a/.github/workflows/release-canary.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Canary release -run-name: Canary release from ${{ github.ref_name }} - -on: - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - canary-release: - if: ${{ github.repository == 'clerkinc/javascript' }} - runs-on: ${{ vars.RUNNER_NORMAL }} - env: - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ vars.TURBO_TEAM }} - TURBO_REMOTE_ONLY: true - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup - - - name: Version packages for canary - id: version-packages - run: npm run version:canary | tail -1 >> "$GITHUB_OUTPUT" - - - name: Canary release - if: steps.version-packages.outputs.success == '1' - run: npm run release:canary - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 9e8b48118d1..4f5bfbafd13 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "nuke": "./scripts/nuke.sh", "prepare": "husky install", "release": "TURBO_FORCE=true FORCE_COLOR=1 npm run build -- --force && changeset publish && git push --follow-tags", - "release:canary": "TURBO_FORCE=true FORCE_COLOR=1 npm run build && changeset publish --tag canary --no-git-tag", "release:snapshot": "TURBO_FORCE=true FORCE_COLOR=1 npm run build && changeset publish --tag snapshot --no-git-tag", "release:staging": "TURBO_FORCE=true FORCE_COLOR=1 npm run build && changeset publish --tag staging --no-git-tag", "test": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}", @@ -38,7 +37,6 @@ "turbo:clean": "turbo daemon clean", "update:lockfile": "npm run nuke && npm install -D --arch=x64 --platform=linux turbo && npm install -D --arch=arm64 --platform=darwin turbo", "version": "changeset version && ./scripts/version-info.sh", - "version:canary": "./scripts/canary.mjs", "version:snapshot": "./scripts/snapshot.mjs", "version:staging": "./scripts/staging.mjs", "yalc:all": "for d in packages/*/; do echo $d; cd $d; yalc push --replace --sig; cd '../../'; done" diff --git a/scripts/canary.mjs b/scripts/canary.mjs deleted file mode 100755 index e3e552c01c4..00000000000 --- a/scripts/canary.mjs +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env zx - -import 'zx/globals'; - -import { constants } from './common.mjs'; - -await $`npx json -I -f ${constants.ChangesetConfigFile} -e "this.changelog = false"`; - -const res = await $`npx changeset version --snapshot canary`; -const success = !res.stderr.includes('No unreleased changesets found'); - -await $`git checkout HEAD -- ${constants.ChangesetConfigFile}`; - -if (success) { - echo('success=1'); -} else { - echo('success=0'); -} From 75c4640c739aea9348ee6e021ccd69dd82d78ce5 Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Tue, 31 Oct 2023 22:23:31 +0200 Subject: [PATCH 2/6] chore(repo): Rename main-v4 to release/v4 references --- .github/workflows/ci.yml | 2 +- .github/workflows/release-prod.yml | 2 +- .github/workflows/release-staging.yml | 2 +- docs/PUBLISH.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8f83bfe7ca..848c321e22b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: pull_request: branches: - main - - main-v4 + - release/v4 - ci-updates concurrency: diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index 17019296f7d..32ce43ea75e 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -4,7 +4,7 @@ run-name: Production release PR on: push: branches: - - main-v4 + - release/v4 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/release-staging.yml b/.github/workflows/release-staging.yml index c494f2674fe..3e571f4541e 100644 --- a/.github/workflows/release-staging.yml +++ b/.github/workflows/release-staging.yml @@ -4,7 +4,7 @@ run-name: Staging release from ${{ github.ref_name }} on: push: branches: - - main-v4 + - release/v4 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/docs/PUBLISH.md b/docs/PUBLISH.md index 1a8c347d0d4..e23e3945c73 100644 --- a/docs/PUBLISH.md +++ b/docs/PUBLISH.md @@ -50,7 +50,7 @@ If a PR got merged into `main` that should also be released in older versions (e Duplicate the `.env.example` file inside `scripts` and rename it to `.env`. Fill out the `GITHUB_ACCESS_TOKEN` variable. Afterwards, you'll be able to run the CLI like so: ```shell -node backports.mjs main-v4 1234 +node backports.mjs release/v4 1234 ``` -The command above will backport the PR `1234` to the branch `main-v4`. +The command above will backport the PR `1234` to the branch `release/v4`. From 63aee996d6fdd028e66dfa3821362d64d50de3f8 Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Tue, 31 Oct 2023 21:27:10 +0200 Subject: [PATCH 3/6] fix(repo): Enable Version Package and Release prod in main Since we have enabled the changeset pre-release mode the versions produced by the Version packages PR will be pre-release tags with a `alpha-v${next-major-version}` tag. So there is no need to block the Version Packages PR from being merged and we will need to exit changeset pre-release mode to release the stable next major version. --- .github/workflows/release-prod.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index 32ce43ea75e..b1266ae2569 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -4,6 +4,7 @@ run-name: Production release PR on: push: branches: + - main - release/v4 concurrency: From ba20a5ecd508b70f288ccb17c170f8e13d27420c Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Wed, 1 Nov 2023 13:44:46 +0200 Subject: [PATCH 4/6] fix(repo): Fix changeset of clerk.dev renaming to be shown as breaking change --- .changeset/friendly-vans-develop.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.changeset/friendly-vans-develop.md b/.changeset/friendly-vans-develop.md index 9499e2010b6..724a1508cdb 100644 --- a/.changeset/friendly-vans-develop.md +++ b/.changeset/friendly-vans-develop.md @@ -1,12 +1,12 @@ --- -'gatsby-plugin-clerk': patch -'@clerk/clerk-js': patch -'@clerk/clerk-sdk-node': patch -'@clerk/backend': patch -'@clerk/fastify': patch -'@clerk/nextjs': patch -'@clerk/shared': patch -'@clerk/clerk-expo': patch +'gatsby-plugin-clerk': major +'@clerk/clerk-js': major +'@clerk/clerk-sdk-node': major +'@clerk/backend': major +'@clerk/fastify': major +'@clerk/nextjs': major +'@clerk/shared': major +'@clerk/clerk-expo': major --- Internal update default apiUrl domain from clerk.dev to clerk.com From 31540ea10764576f8824ebef6a79b94972d3a39b Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Wed, 1 Nov 2023 13:47:06 +0200 Subject: [PATCH 5/6] fix(repo): Fix changeset of dropping resources and avatar shimmer to be considered breaking --- .changeset/thin-phones-drop.md | 2 +- .changeset/tough-roses-hunt.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/thin-phones-drop.md b/.changeset/thin-phones-drop.md index 9e256160a0a..fa834f8bb92 100644 --- a/.changeset/thin-phones-drop.md +++ b/.changeset/thin-phones-drop.md @@ -1,5 +1,5 @@ --- -'@clerk/nextjs': patch +'@clerk/nextjs': major --- Drop `user`, `session`, and `organization` resources from the returned value of `auth()`. diff --git a/.changeset/tough-roses-hunt.md b/.changeset/tough-roses-hunt.md index ccfd10a14d4..9c136ec3533 100644 --- a/.changeset/tough-roses-hunt.md +++ b/.changeset/tough-roses-hunt.md @@ -1,6 +1,6 @@ --- -'@clerk/clerk-js': patch -'@clerk/types': patch +'@clerk/clerk-js': major +'@clerk/types': major --- Avatar Shimmer will be enabled by default for `` and ``. From db5a9316ce0740e3a744e55c57b91876d447cbd7 Mon Sep 17 00:00:00 2001 From: Lennart Date: Wed, 1 Nov 2023 13:02:35 +0100 Subject: [PATCH 6/6] try again --- .github/workflows/release-prod.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml index b1266ae2569..36ee80a8840 100644 --- a/.github/workflows/release-prod.yml +++ b/.github/workflows/release-prod.yml @@ -40,8 +40,6 @@ jobs: id: changesets uses: changesets/action@v1 with: - title: Version Packages - commit: "chore(repo): Version packages" publish: npm run release env: GITHUB_TOKEN: ${{ secrets.CLERK_COOKIE_PAT }}