Keep vercel@canary up to date with vercel@latest (#10410)

This commit is contained in:
Nathan Rajlich
2023-08-28 22:50:30 -07:00
committed by GitHub
parent 5609a1187b
commit 0e9ec194a3
3 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
---
---

View File

@@ -49,7 +49,7 @@
"prepare": "husky install", "prepare": "husky install",
"pack": "cd utils && node -r ts-eager/register ./pack.ts", "pack": "cd utils && node -r ts-eager/register ./pack.ts",
"ci:version": "changeset version && pnpm install --no-frozen-lockfile", "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": { "lint-staged": {
"./{*,{api,packages,test,utils}/**/*}.{js,ts}": [ "./{*,{api,packages,test,utils}/**/*}.{js,ts}": [

15
utils/update-canary-tags.mjs vendored Normal file
View File

@@ -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' }
);
}