diff --git a/.changeset/dry-masks-thank.md b/.changeset/dry-masks-thank.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/dry-masks-thank.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/package.json b/package.json index b93b8f189..642464a2e 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "prepare": "husky install", "pack": "cd utils && node -r ts-eager/register ./pack.ts", "ci:version": "changeset version && pnpm install --no-frozen-lockfile", - "ci:publish": "pnpm publish -r && changeset tag" + "ci:publish": "pnpm publish -r && node utils/update-canary-tags.mjs && changeset tag" }, "lint-staged": { "./{*,{api,packages,test,utils}/**/*}.{js,ts}": [ diff --git a/utils/update-canary-tags.mjs b/utils/update-canary-tags.mjs new file mode 100644 index 000000000..364016d8c --- /dev/null +++ b/utils/update-canary-tags.mjs @@ -0,0 +1,15 @@ +import fs from 'fs'; +import { spawnSync } from 'child_process'; + +const packagesDir = new URL('../packages/', import.meta.url); + +for (const name of fs.readdirSync(packagesDir)) { + const pkg = JSON.parse( + fs.readFileSync(new URL(`${name}/package.json`, packagesDir), 'utf8') + ); + spawnSync( + 'npm', + `dist-tag add ${pkg.name}@${pkg.version} canary`.split(' '), + { stdio: 'inherit' } + ); +}