mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-31 11:49:10 +00:00
Compare commits
23 Commits
@vercel/cl
...
vercel@29.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c879401bbc | ||
|
|
6c6f3ce9d2 | ||
|
|
aa83680832 | ||
|
|
06113d3e39 | ||
|
|
5150f21404 | ||
|
|
eb6bb98406 | ||
|
|
d8e3b6e738 | ||
|
|
25da051d62 | ||
|
|
f57af66dc2 | ||
|
|
b2f71d5352 | ||
|
|
6115f0d74a | ||
|
|
14c877e468 | ||
|
|
d80732d74f | ||
|
|
b739c1845c | ||
|
|
e9f0fcf397 | ||
|
|
924a20a0fc | ||
|
|
fc3b74d06f | ||
|
|
380ed38c71 | ||
|
|
e228cdd373 | ||
|
|
9bd92535d6 | ||
|
|
5825e30700 | ||
|
|
6d5983eaae | ||
|
|
2fd59a3b5a |
8
.changeset/README.md
Normal file
8
.changeset/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Changesets
|
||||
|
||||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
||||
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
||||
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
||||
|
||||
We have a quick list of common questions to get you started engaging with this project in
|
||||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
||||
14
.changeset/config.json
Normal file
14
.changeset/config.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
|
||||
"changelog": [
|
||||
"@svitejs/changesets-changelog-github-compact",
|
||||
{ "repo": "vercel/vercel" }
|
||||
],
|
||||
"commit": false,
|
||||
"fixed": [],
|
||||
"linked": [],
|
||||
"access": "public",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": []
|
||||
}
|
||||
@@ -1,72 +1,72 @@
|
||||
name: Publish
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '!*'
|
||||
|
||||
env:
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
TURBO_TEAM: 'vercel'
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check Release
|
||||
id: check-release
|
||||
run: |
|
||||
tag="$(git describe --tags --exact-match 2> /dev/null || :)"
|
||||
if [[ -z "$tag" ]];
|
||||
then
|
||||
echo "IS_RELEASE=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Setup Go
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.13.15'
|
||||
|
||||
- name: Setup Node
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: install npm@9
|
||||
run: npm i -g npm@9
|
||||
|
||||
- name: install pnpm@8.3.1
|
||||
run: npm i -g pnpm@8.3.1
|
||||
- name: Install
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
run: pnpm install
|
||||
- name: Build
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm build
|
||||
env:
|
||||
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||
- name: Publish
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
run: pnpm publish-from-github
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
version: pnpm version:prepare
|
||||
publish: pnpm release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
NPM_CONFIG_PROVENANCE: 'true'
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
|
||||
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||
- name: Trigger Update
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
|
||||
- name: Set latest Release to `vercel` (if a Publish Happened)
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
script: |
|
||||
const script = require('./utils/update-latest-release.js')
|
||||
await script({ github, context })
|
||||
|
||||
- name: Trigger Update (if a Publish Happened)
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
26
.github/workflows/required-pr-label.yml
vendored
26
.github/workflows/required-pr-label.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Required PR Label
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, labeled, unlabeled, synchronize]
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check PR Labels
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
let missing = false;
|
||||
const labels = context.payload.pull_request.labels.map(l => l.name);
|
||||
if (labels.filter(l => l.startsWith('area:')).length === 0) {
|
||||
console.error('::error::Missing label: Please add at least one "area" label.');
|
||||
missing = true;
|
||||
}
|
||||
if (labels.filter(l => l.startsWith('semver:')).length !== 1) {
|
||||
console.error('::error::Missing label: Please add exactly one "semver" label.');
|
||||
missing = true;
|
||||
}
|
||||
if (missing) {
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('::notice::Success: This pull request has correct labels, thanks!');
|
||||
@@ -12,6 +12,7 @@ packages/gatsby-plugin-vercel-analytics
|
||||
node_modules
|
||||
dist
|
||||
pnpm-lock.yaml
|
||||
.changeset
|
||||
.vscode
|
||||
.DS_Store
|
||||
.next
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
|
||||
## Vercel
|
||||
|
||||
Vercel is the platform for frontend developers, providing the speed and reliability innovators need to create at the moment of inspiration.
|
||||
|
||||
We enable teams to iterate quickly and develop, preview, and ship delightful user experiences. Vercel has zero-configuration support for 35+ frontend frameworks and integrates with your headless content, commerce, or database of choice.
|
||||
Vercel's frontend cloud gives developers frameworks, workflows, and infrastructure to build a faster, more personalized web.
|
||||
|
||||
## Deploy
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export default function Home() {
|
||||
|
||||
<div className={styles.grid}>
|
||||
<a
|
||||
href="https://beta.nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
||||
className={styles.card}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
206
examples/nextjs/package-lock.json
generated
206
examples/nextjs/package-lock.json
generated
@@ -8,9 +8,9 @@
|
||||
"name": "nextjs",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"eslint": "8.39.0",
|
||||
"eslint-config-next": "13.4.1",
|
||||
"next": "13.4.1",
|
||||
"eslint": "8.40.0",
|
||||
"eslint-config-next": "13.4.2",
|
||||
"next": "13.4.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
@@ -49,13 +49,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
|
||||
"integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
|
||||
"integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
"debug": "^4.3.2",
|
||||
"espree": "^9.5.1",
|
||||
"espree": "^9.5.2",
|
||||
"globals": "^13.19.0",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.2.1",
|
||||
@@ -71,9 +71,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "8.39.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz",
|
||||
"integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==",
|
||||
"version": "8.40.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz",
|
||||
"integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==",
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
@@ -109,22 +109,22 @@
|
||||
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.1.tgz",
|
||||
"integrity": "sha512-eD6WCBMFjLFooLM19SIhSkWBHtaFrZFfg2Cxnyl3vS3DAdFRfnx5TY2RxlkuKXdIRCC0ySbtK9JXXt8qLCqzZg=="
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.2.tgz",
|
||||
"integrity": "sha512-Wqvo7lDeS0KGwtwg9TT9wKQ8raelmUxt+TQKWvG/xKfcmDXNOtCuaszcfCF8JzlBG1q0VhpI6CKaRMbVPMDWgw=="
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.4.1.tgz",
|
||||
"integrity": "sha512-tVPS/2FKlA3ANCRCYZVT5jdbUKasBU8LG6bYqcNhyORDFTlDYa4cAWQJjZ7msIgLwMQIbL8CAsxrOL8maa/4Lg==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.4.2.tgz",
|
||||
"integrity": "sha512-ZeFWgrxwckxTpYM+ANeUL9E7LOGPbZKmI94LJIjbDU69iEIgqd4WD0l2pVbOJMr/+vgoZmJ9Dx1m0WJ7WScXHA==",
|
||||
"dependencies": {
|
||||
"glob": "7.1.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.1.tgz",
|
||||
"integrity": "sha512-eF8ARHtYfnoYtDa6xFHriUKA/Mfj/cCbmKb3NofeKhMccs65G6/loZ15a6wYCCx4rPAd6x4t1WmVYtri7EdeBg==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.2.tgz",
|
||||
"integrity": "sha512-6BBlqGu3ewgJflv9iLCwO1v1hqlecaIH2AotpKfVUEzUxuuDNJQZ2a4KLb4MBl8T9/vca1YuWhSqtbF6ZuUJJw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -137,9 +137,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.1.tgz",
|
||||
"integrity": "sha512-7cmDgF9tGWTgn5Gw+vP17miJbH4wcraMHDCOHTYWkO/VeKT73dUWG23TNRLfgtCNSPgH4V5B4uLHoZTanx9bAw==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.2.tgz",
|
||||
"integrity": "sha512-iZuYr7ZvGLPjPmfhhMl0ISm+z8EiyLBC1bLyFwGBxkWmPXqdJ60mzuTaDSr5WezDwv0fz32HB7JHmRC6JVHSZg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -152,9 +152,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.1.tgz",
|
||||
"integrity": "sha512-qwJqmCri2ie8aTtE5gjTSr8S6O8B67KCYgVZhv9gKH44yvc/zXbAY8u23QGULsYOyh1islWE5sWfQNLOj9iryg==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.2.tgz",
|
||||
"integrity": "sha512-2xVabFtIge6BJTcJrW8YuUnYTuQjh4jEuRuS2mscyNVOj6zUZkom3CQg+egKOoS+zh2rrro66ffSKIS+ztFJTg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -167,9 +167,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.1.tgz",
|
||||
"integrity": "sha512-qcC54tWNGDv/VVIFkazxhqH1Bnagjfs4enzELVRlUOoJPD2BGJTPI7z08pQPbbgxLtRiu8gl2mXvpB8WlOkMeA==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.2.tgz",
|
||||
"integrity": "sha512-wKRCQ27xCUJx5d6IivfjYGq8oVngqIhlhSAJntgXLt7Uo9sRT/3EppMHqUZRfyuNBTbykEre1s5166z+pvRB5A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -182,9 +182,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.1.tgz",
|
||||
"integrity": "sha512-9TeWFlpLsBosZ+tsm/rWBaMwt5It9tPH8m3nawZqFUUrZyGRfGcI67js774vtx0k3rL9qbyY6+3pw9BCVpaYUA==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.2.tgz",
|
||||
"integrity": "sha512-NpCa+UVhhuNeaFVUP1Bftm0uqtvLWq2JTm7+Ta48+2Uqj2mNXrDIvyn1DY/ZEfmW/1yvGBRaUAv9zkMkMRixQA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -197,9 +197,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.1.tgz",
|
||||
"integrity": "sha512-sNDGaWmSqTS4QRUzw61wl4mVPeSqNIr1OOjLlQTRuyInxMxtqImRqdvzDvFTlDfdeUMU/DZhWGYoHrXLlZXe6A==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.2.tgz",
|
||||
"integrity": "sha512-ZWVC72x0lW4aj44e3khvBrj2oSYj1bD0jESmyah3zG/3DplEy/FOtYkMzbMjHTdDSheso7zH8GIlW6CDQnKhmQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -212,9 +212,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.1.tgz",
|
||||
"integrity": "sha512-+CXZC7u1iXdLRudecoUYbhbsXpglYv8KFYsFxKBPn7kg+bk7eJo738wAA4jXIl8grTF2mPdmO93JOQym+BlYGA==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.2.tgz",
|
||||
"integrity": "sha512-pLT+OWYpzJig5K4VKhLttlIfBcVZfr2+Xbjra0Tjs83NQSkFS+y7xx+YhCwvpEmXYLIvaggj2ONPyjbiigOvHQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -227,9 +227,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.1.tgz",
|
||||
"integrity": "sha512-vIoXVVc7UYO68VwVMDKwJC2+HqAZQtCYiVlApyKEeIPIQpz2gpufzGxk1z3/gwrJt/kJ5CDZjlhYDCzd3hdz+g==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.2.tgz",
|
||||
"integrity": "sha512-dhpiksQCyGca4WY0fJyzK3FxMDFoqMb0Cn+uDB+9GYjpU2K5//UGPQlCwiK4JHxuhg8oLMag5Nf3/IPSJNG8jw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -242,9 +242,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.1.tgz",
|
||||
"integrity": "sha512-n8V5ImLQZibKTu10UUdI3nIeTLkliEXe628qxqW9v8My3BAH2a7H0SaCqkV2OgqFnn8sG1wxKYw9/SNJ632kSA==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.2.tgz",
|
||||
"integrity": "sha512-O7bort1Vld00cu8g0jHZq3cbSTUNMohOEvYqsqE10+yfohhdPHzvzO+ziJRz4Dyyr/fYKREwS7gR4JC0soSOMw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -326,13 +326,13 @@
|
||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz",
|
||||
"integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz",
|
||||
"integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -352,12 +352,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz",
|
||||
"integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz",
|
||||
"integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/visitor-keys": "5.59.2"
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/visitor-keys": "5.59.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -368,9 +368,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz",
|
||||
"integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz",
|
||||
"integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==",
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
@@ -380,12 +380,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz",
|
||||
"integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz",
|
||||
"integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/visitor-keys": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/visitor-keys": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -406,11 +406,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz",
|
||||
"integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz",
|
||||
"integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -696,9 +696,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001482",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001482.tgz",
|
||||
"integrity": "sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==",
|
||||
"version": "1.0.30001486",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz",
|
||||
"integrity": "sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -908,9 +908,9 @@
|
||||
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.13.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz",
|
||||
"integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==",
|
||||
"version": "5.14.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz",
|
||||
"integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
"tapable": "^2.2.0"
|
||||
@@ -1034,14 +1034,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.39.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
|
||||
"integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==",
|
||||
"version": "8.40.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz",
|
||||
"integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@eslint/eslintrc": "^2.0.2",
|
||||
"@eslint/js": "8.39.0",
|
||||
"@eslint/eslintrc": "^2.0.3",
|
||||
"@eslint/js": "8.40.0",
|
||||
"@humanwhocodes/config-array": "^0.11.8",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
@@ -1052,8 +1052,8 @@
|
||||
"doctrine": "^3.0.0",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^7.2.0",
|
||||
"eslint-visitor-keys": "^3.4.0",
|
||||
"espree": "^9.5.1",
|
||||
"eslint-visitor-keys": "^3.4.1",
|
||||
"espree": "^9.5.2",
|
||||
"esquery": "^1.4.2",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
@@ -1090,11 +1090,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-next": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.4.1.tgz",
|
||||
"integrity": "sha512-ajuxjCkW1hvirr0EQZb3/B/bFH52Z7CT89uCtTcICFL9l30i5c8hN4p0LXvTjdOXNPV5fEDcxBgGHgXdzTj1/A==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.4.2.tgz",
|
||||
"integrity": "sha512-zjLJ9B9bbeWSo5q+iHfdt8gVYyT+y2BpWDfjR6XMBtFRSMKRGjllDKxnuKBV1q2Y/QpwLM2PXHJTMRyblCmRAg==",
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "13.4.1",
|
||||
"@next/eslint-plugin-next": "13.4.2",
|
||||
"@rushstack/eslint-patch": "^1.1.3",
|
||||
"@typescript-eslint/parser": "^5.42.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
@@ -1392,9 +1392,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-visitor-keys": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz",
|
||||
"integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==",
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
|
||||
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
@@ -1403,13 +1403,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "9.5.1",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz",
|
||||
"integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==",
|
||||
"version": "9.5.2",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz",
|
||||
"integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==",
|
||||
"dependencies": {
|
||||
"acorn": "^8.8.0",
|
||||
"acorn-jsx": "^5.3.2",
|
||||
"eslint-visitor-keys": "^3.4.0"
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -2462,11 +2462,11 @@
|
||||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "13.4.1",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.4.1.tgz",
|
||||
"integrity": "sha512-JBw2kAIyhKDpjhEWvNVoFeIzNp9xNxg8wrthDOtMctfn3EpqGCmW0FSviNyGgOSOSn6zDaX48pmvbdf6X2W9xA==",
|
||||
"version": "13.4.2",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.4.2.tgz",
|
||||
"integrity": "sha512-aNFqLs3a3nTGvLWlO9SUhCuMUHVPSFQC0+tDNGAsDXqx+WJDFSbvc233gOJ5H19SBc7nw36A9LwQepOJ2u/8Kg==",
|
||||
"dependencies": {
|
||||
"@next/env": "13.4.1",
|
||||
"@next/env": "13.4.2",
|
||||
"@swc/helpers": "0.5.1",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001406",
|
||||
@@ -2481,15 +2481,15 @@
|
||||
"node": ">=16.8.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "13.4.1",
|
||||
"@next/swc-darwin-x64": "13.4.1",
|
||||
"@next/swc-linux-arm64-gnu": "13.4.1",
|
||||
"@next/swc-linux-arm64-musl": "13.4.1",
|
||||
"@next/swc-linux-x64-gnu": "13.4.1",
|
||||
"@next/swc-linux-x64-musl": "13.4.1",
|
||||
"@next/swc-win32-arm64-msvc": "13.4.1",
|
||||
"@next/swc-win32-ia32-msvc": "13.4.1",
|
||||
"@next/swc-win32-x64-msvc": "13.4.1"
|
||||
"@next/swc-darwin-arm64": "13.4.2",
|
||||
"@next/swc-darwin-x64": "13.4.2",
|
||||
"@next/swc-linux-arm64-gnu": "13.4.2",
|
||||
"@next/swc-linux-arm64-musl": "13.4.2",
|
||||
"@next/swc-linux-x64-gnu": "13.4.2",
|
||||
"@next/swc-linux-x64-musl": "13.4.2",
|
||||
"@next/swc-win32-arm64-msvc": "13.4.2",
|
||||
"@next/swc-win32-ia32-msvc": "13.4.2",
|
||||
"@next/swc-win32-x64-msvc": "13.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint": "8.39.0",
|
||||
"eslint-config-next": "13.4.1",
|
||||
"next": "13.4.1",
|
||||
"eslint": "8.40.0",
|
||||
"eslint-config-next": "13.4.2",
|
||||
"next": "13.4.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
|
||||
19
package.json
19
package.json
@@ -4,10 +4,9 @@
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"packageManager": "pnpm@8.3.1",
|
||||
"dependencies": {
|
||||
"lerna": "5.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "2.26.1",
|
||||
"@svitejs/changesets-changelog-github-compact": "1.1.0",
|
||||
"@types/node": "14.18.33",
|
||||
"@typescript-eslint/eslint-plugin": "5.21.0",
|
||||
"@typescript-eslint/parser": "5.21.0",
|
||||
@@ -32,16 +31,10 @@
|
||||
"source-map-support": "0.5.12",
|
||||
"ts-eager": "2.0.2",
|
||||
"ts-jest": "29.1.0",
|
||||
"typescript": "4.9.5",
|
||||
"turbo": "1.9.3"
|
||||
"turbo": "1.9.4",
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"scripts": {
|
||||
"lerna": "lerna",
|
||||
"version": "pnpm install && git add pnpm-lock.yaml",
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"publish-stable": "echo 'Run `pnpm changelog` for instructions'",
|
||||
"publish-from-github": "./utils/publish.sh",
|
||||
"changelog": "node utils/changelog.js",
|
||||
"build": "node utils/gen.js && turbo --no-update-notifier run build",
|
||||
"vercel-build": "pnpm build && pnpm run pack && cd api && node -r ts-eager/register ./_lib/script/build.ts",
|
||||
"pre-commit": "lint-staged",
|
||||
@@ -53,7 +46,9 @@
|
||||
"lint": "eslint . --cache --ext .ts,.js",
|
||||
"prettier-check": "prettier --check .",
|
||||
"prepare": "husky install",
|
||||
"pack": "cd utils && node -r ts-eager/register ./pack.ts"
|
||||
"pack": "cd utils && node -r ts-eager/register ./pack.ts",
|
||||
"version:prepare": "changeset version && pnpm install --no-frozen-lockfile",
|
||||
"release": "changeset publish"
|
||||
},
|
||||
"lint-staged": {
|
||||
"./{*,{api,packages,test,utils}/**/*}.{js,ts}": [
|
||||
|
||||
34
packages/cli/CHANGELOG.md
Normal file
34
packages/cli/CHANGELOG.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# vercel
|
||||
|
||||
## 29.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`6c6f3ce9d`](https://github.com/vercel/vercel/commit/6c6f3ce9d228b1e038641e4bafb38c3487e7dff7)]:
|
||||
- @vercel/next@3.8.3
|
||||
|
||||
## 29.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [vc dev] Fix serverless function size limit condition ([#9961](https://github.com/vercel/vercel/pull/9961))
|
||||
|
||||
## 29.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Sort environment variables alphabetically in `vercel env pull` ([#9949](https://github.com/vercel/vercel/pull/9949))
|
||||
- Skip 50MB zip size limit for Python ([#9944](https://github.com/vercel/vercel/pull/9944))
|
||||
|
||||
## 29.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [cli] remove `vc rollback` beta label ([#9928](https://github.com/vercel/vercel/pull/9928))
|
||||
|
||||
## 29.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`6d5983eaa`](https://github.com/vercel/vercel/commit/6d5983eaaefe3fd2204f49c3228718ac64a452e3)]:
|
||||
- @vercel/remix-builder@1.8.8
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
## Usage
|
||||
|
||||
Vercel is the platform for frontend developers, providing the speed and reliability innovators need to create at the moment of inspiration.
|
||||
|
||||
We enable teams to iterate quickly and develop, preview, and ship delightful user experiences. Vercel has zero-configuration support for 35+ frontend frameworks and integrates with your headless content, commerce, or database of choice.
|
||||
Vercel's frontend cloud gives developers frameworks, workflows, and infrastructure to build a faster, more personalized web.
|
||||
|
||||
To install the latest version of Vercel CLI, run this command:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "29.2.0",
|
||||
"version": "29.3.3",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -35,11 +35,11 @@
|
||||
"@vercel/build-utils": "6.7.2",
|
||||
"@vercel/go": "2.5.1",
|
||||
"@vercel/hydrogen": "0.0.64",
|
||||
"@vercel/next": "3.8.2",
|
||||
"@vercel/next": "3.8.3",
|
||||
"@vercel/node": "2.14.2",
|
||||
"@vercel/python": "3.1.60",
|
||||
"@vercel/redwood": "1.1.15",
|
||||
"@vercel/remix-builder": "1.8.7",
|
||||
"@vercel/remix-builder": "1.8.8",
|
||||
"@vercel/ruby": "1.3.76",
|
||||
"@vercel/static-build": "1.3.30"
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ export const help = () => `
|
||||
login [email] Logs into your account or creates a new one
|
||||
logout Logs out of your account
|
||||
pull [path] Pull your Project Settings from the cloud
|
||||
rollback [url|id] Quickly revert back to a previous deployment [beta]
|
||||
rollback [url|id] Quickly revert back to a previous deployment
|
||||
switch [scope] Switches between teams and your personal account
|
||||
|
||||
${chalk.dim('Advanced')}
|
||||
|
||||
5
packages/cli/src/commands/env/pull.ts
vendored
5
packages/cli/src/commands/env/pull.ts
vendored
@@ -122,8 +122,9 @@ export default async function pull(
|
||||
|
||||
const contents =
|
||||
CONTENTS_PREFIX +
|
||||
Object.entries(records)
|
||||
.map(([key, value]) => `${key}="${escapeValue(value)}"`)
|
||||
Object.keys(records)
|
||||
.sort()
|
||||
.map(key => `${key}="${escapeValue(records[key])}"`)
|
||||
.join('\n') +
|
||||
'\n';
|
||||
|
||||
|
||||
@@ -157,7 +157,8 @@ const main = async () => {
|
||||
const targetOrSubcommand = argv._[2];
|
||||
const subSubCommand = argv._[3];
|
||||
|
||||
const betaCommands: string[] = ['rollback'];
|
||||
// If empty, leave this code here for easy adding of beta commands later
|
||||
const betaCommands: string[] = [];
|
||||
if (betaCommands.includes(targetOrSubcommand)) {
|
||||
console.log(
|
||||
`${chalk.grey(
|
||||
|
||||
@@ -337,7 +337,10 @@ export async function executeBuild(
|
||||
// Enforce the lambda zip size soft watermark
|
||||
const maxLambdaBytes = bytes('50mb');
|
||||
for (const asset of Object.values(result.output)) {
|
||||
if (asset.type === 'Lambda') {
|
||||
if (
|
||||
asset.type === 'Lambda' &&
|
||||
!(typeof asset.runtime === 'string' && asset.runtime.startsWith('python'))
|
||||
) {
|
||||
const size = asset.zipBuffer.length;
|
||||
if (size > maxLambdaBytes) {
|
||||
throw new LambdaSizeExceededError(size, maxLambdaBytes);
|
||||
|
||||
@@ -31,6 +31,16 @@ const envs: ProjectEnvVariable[] = [
|
||||
updatedAt: 1557241361455,
|
||||
createdAt: 1557241361455,
|
||||
},
|
||||
{
|
||||
type: 'encrypted',
|
||||
id: '781dt89g8r2h789g',
|
||||
key: 'ANOTHER',
|
||||
value: 'one',
|
||||
target: ['preview'],
|
||||
configurationId: null,
|
||||
updatedAt: 1557241361455,
|
||||
createdAt: 1557241361455,
|
||||
},
|
||||
{
|
||||
type: 'encrypted',
|
||||
id: 'r124t6frtu25df16',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import { parse } from 'dotenv';
|
||||
import env from '../../../src/commands/env';
|
||||
import { setupUnitFixture } from '../../helpers/setup-unit-fixture';
|
||||
import { client } from '../../mocks/client';
|
||||
@@ -103,6 +104,13 @@ describe('env', () => {
|
||||
expect(rawDevEnv).toContain(
|
||||
'BRANCH_ENV_VAR="env var for a specific branch"'
|
||||
);
|
||||
|
||||
const parsed = parse(rawDevEnv);
|
||||
const keys = Object.keys(parsed);
|
||||
expect(keys).toHaveLength(3);
|
||||
expect(keys[0]).toEqual('ANOTHER');
|
||||
expect(keys[1]).toEqual('BRANCH_ENV_VAR');
|
||||
expect(keys[2]).toEqual('REDIS_CONNECTION_STRING');
|
||||
});
|
||||
|
||||
it('should handle alternate filename', async () => {
|
||||
|
||||
7
packages/next/CHANGELOG.md
Normal file
7
packages/next/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# @vercel/next
|
||||
|
||||
## 3.8.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Ensure un-necessary rsc routes are not added ([#9963](https://github.com/vercel/vercel/pull/9963))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/next",
|
||||
"version": "3.8.2",
|
||||
"version": "3.8.3",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
||||
|
||||
@@ -1041,7 +1041,8 @@ export async function serverBuild({
|
||||
canUsePreviewMode,
|
||||
prerenderManifest.bypassToken || '',
|
||||
true,
|
||||
middleware.dynamicRouteMap
|
||||
middleware.dynamicRouteMap,
|
||||
inversedAppPathManifest
|
||||
).then(arr =>
|
||||
localizeDynamicRoutes(
|
||||
arr,
|
||||
@@ -1201,24 +1202,6 @@ export async function serverBuild({
|
||||
routesManifest?.rsc?.varyHeader ||
|
||||
'RSC, Next-Router-State-Tree, Next-Router-Prefetch';
|
||||
|
||||
const completeDynamicRoutes: typeof dynamicRoutes = [];
|
||||
|
||||
if (appDir) {
|
||||
for (const route of dynamicRoutes) {
|
||||
completeDynamicRoutes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.rsc)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
completeDynamicRoutes.push(route);
|
||||
}
|
||||
} else {
|
||||
completeDynamicRoutes.push(...dynamicRoutes);
|
||||
}
|
||||
|
||||
return {
|
||||
wildcard: wildcardConfig,
|
||||
images: getImagesConfig(imagesManifest),
|
||||
@@ -1598,7 +1581,8 @@ export async function serverBuild({
|
||||
? // when resolving data routes for middleware we need to include
|
||||
// all dynamic routes including non-SSG/SSP so that the priority
|
||||
// is correct
|
||||
completeDynamicRoutes
|
||||
dynamicRoutes
|
||||
.filter(route => !route.src.includes('.rsc'))
|
||||
.map(route => {
|
||||
route = Object.assign({}, route);
|
||||
let normalizedSrc = route.src;
|
||||
@@ -1673,7 +1657,7 @@ export async function serverBuild({
|
||||
|
||||
// Dynamic routes (must come after dataRoutes as dataRoutes are more
|
||||
// specific)
|
||||
...completeDynamicRoutes,
|
||||
...dynamicRoutes,
|
||||
|
||||
...(isNextDataServerResolving
|
||||
? [
|
||||
|
||||
@@ -304,7 +304,8 @@ export async function getDynamicRoutes(
|
||||
canUsePreviewMode?: boolean,
|
||||
bypassToken?: string,
|
||||
isServerMode?: boolean,
|
||||
dynamicMiddlewareRouteMap?: Map<string, RouteWithSrc>
|
||||
dynamicMiddlewareRouteMap?: Map<string, RouteWithSrc>,
|
||||
appPathRoutesManifest?: Record<string, string>
|
||||
): Promise<RouteWithSrc[]> {
|
||||
if (routesManifest) {
|
||||
switch (routesManifest.version) {
|
||||
@@ -324,55 +325,74 @@ export async function getDynamicRoutes(
|
||||
}
|
||||
case 3:
|
||||
case 4: {
|
||||
return routesManifest.dynamicRoutes
|
||||
.filter(({ page }) => canUsePreviewMode || !omittedRoutes?.has(page))
|
||||
.map(params => {
|
||||
if ('isMiddleware' in params) {
|
||||
const route = dynamicMiddlewareRouteMap?.get(params.page);
|
||||
if (!route) {
|
||||
throw new Error(
|
||||
`Could not find dynamic middleware route for ${params.page}`
|
||||
);
|
||||
}
|
||||
return route;
|
||||
const routes: RouteWithSrc[] = [];
|
||||
|
||||
for (const dynamicRoute of routesManifest.dynamicRoutes) {
|
||||
if (!canUsePreviewMode && omittedRoutes?.has(dynamicRoute.page)) {
|
||||
continue;
|
||||
}
|
||||
const params = dynamicRoute;
|
||||
|
||||
if ('isMiddleware' in params) {
|
||||
const route = dynamicMiddlewareRouteMap?.get(params.page);
|
||||
if (!route) {
|
||||
throw new Error(
|
||||
`Could not find dynamic middleware route for ${params.page}`
|
||||
);
|
||||
}
|
||||
|
||||
const { page, namedRegex, regex, routeKeys } = params;
|
||||
const route: RouteWithSrc = {
|
||||
src: namedRegex || regex,
|
||||
dest: `${
|
||||
!isDev ? path.posix.join('/', entryDirectory, page) : page
|
||||
}${
|
||||
routeKeys
|
||||
? `?${Object.keys(routeKeys)
|
||||
.map(key => `${routeKeys[key]}=$${key}`)
|
||||
.join('&')}`
|
||||
: ''
|
||||
}`,
|
||||
};
|
||||
routes.push(route);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isServerMode) {
|
||||
route.check = true;
|
||||
}
|
||||
const { page, namedRegex, regex, routeKeys } = params;
|
||||
const route: RouteWithSrc = {
|
||||
src: namedRegex || regex,
|
||||
dest: `${
|
||||
!isDev ? path.posix.join('/', entryDirectory, page) : page
|
||||
}${
|
||||
routeKeys
|
||||
? `?${Object.keys(routeKeys)
|
||||
.map(key => `${routeKeys[key]}=$${key}`)
|
||||
.join('&')}`
|
||||
: ''
|
||||
}`,
|
||||
};
|
||||
|
||||
if (isServerMode && canUsePreviewMode && omittedRoutes?.has(page)) {
|
||||
// only match this route when in preview mode so
|
||||
// preview works for non-prerender fallback: false pages
|
||||
route.has = [
|
||||
{
|
||||
type: 'cookie',
|
||||
key: '__prerender_bypass',
|
||||
value: bypassToken || undefined,
|
||||
},
|
||||
{
|
||||
type: 'cookie',
|
||||
key: '__next_preview_data',
|
||||
},
|
||||
];
|
||||
}
|
||||
if (!isServerMode) {
|
||||
route.check = true;
|
||||
}
|
||||
|
||||
return route;
|
||||
});
|
||||
if (isServerMode && canUsePreviewMode && omittedRoutes?.has(page)) {
|
||||
// only match this route when in preview mode so
|
||||
// preview works for non-prerender fallback: false pages
|
||||
route.has = [
|
||||
{
|
||||
type: 'cookie',
|
||||
key: '__prerender_bypass',
|
||||
value: bypassToken || undefined,
|
||||
},
|
||||
{
|
||||
type: 'cookie',
|
||||
key: '__next_preview_data',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
if (appPathRoutesManifest?.[page]) {
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.rsc)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
}
|
||||
routes.push(route);
|
||||
continue;
|
||||
}
|
||||
return routes;
|
||||
}
|
||||
default: {
|
||||
// update MIN_ROUTES_MANIFEST_VERSION
|
||||
|
||||
@@ -65,6 +65,13 @@ if (parseInt(process.versions.node.split('.')[0], 10) >= 16) {
|
||||
}
|
||||
}
|
||||
|
||||
expect(
|
||||
buildResult.routes.some(
|
||||
route =>
|
||||
route.src?.includes('_next/data') && route.src?.includes('.rsc')
|
||||
)
|
||||
).toBeFalsy();
|
||||
|
||||
expect(lambdas.size).toBe(3);
|
||||
expect(buildResult.output['dashboard']).toBeDefined();
|
||||
expect(buildResult.output['dashboard/another']).toBeDefined();
|
||||
|
||||
7
packages/remix/CHANGELOG.md
Normal file
7
packages/remix/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# @vercel/remix-builder
|
||||
|
||||
## 1.8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Upgrade `@remix-run/dev` to v1.16.0-patch.1 to fix erroneous "not found in your node_modules" warning ([#9930](https://github.com/vercel/vercel/pull/9930))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/remix-builder",
|
||||
"version": "1.8.7",
|
||||
"version": "1.8.8",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"homepage": "https://vercel.com/docs",
|
||||
@@ -20,7 +20,7 @@
|
||||
"defaults"
|
||||
],
|
||||
"dependencies": {
|
||||
"@remix-run/dev": "npm:@vercel/remix-run-dev@1.16.0",
|
||||
"@remix-run/dev": "npm:@vercel/remix-run-dev@1.16.0-patch.1",
|
||||
"@vercel/build-utils": "6.7.2",
|
||||
"@vercel/nft": "0.22.5",
|
||||
"@vercel/static-config": "2.0.17",
|
||||
|
||||
3111
pnpm-lock.yaml
generated
3111
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
112
utils/changelog.js
vendored
112
utils/changelog.js
vendored
@@ -1,112 +0,0 @@
|
||||
const { join } = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const parseCommits = require('./changelog/parse');
|
||||
const filterLog = require('./changelog/filter');
|
||||
const groupLog = require('./changelog/group');
|
||||
|
||||
process.chdir(join(__dirname, '..'));
|
||||
|
||||
async function getLatestStableTag() {
|
||||
const headers = {};
|
||||
|
||||
const token = process.env.GITHUB_TOKEN;
|
||||
if (token) {
|
||||
headers['authorization'] = `token ${token}`;
|
||||
}
|
||||
|
||||
const res = await fetch(
|
||||
'https://api.github.com/repos/vercel/vercel/releases/latest',
|
||||
{
|
||||
headers,
|
||||
}
|
||||
);
|
||||
const result = await res.json();
|
||||
if (!result.tag_name) {
|
||||
const message = result.message || JSON.stringify(result);
|
||||
throw new Error(`Failed to fetch releases from github: ${message}`);
|
||||
}
|
||||
|
||||
return result.tag_name;
|
||||
}
|
||||
|
||||
function serializeLog(groupedLog) {
|
||||
const serialized = [];
|
||||
|
||||
for (let area of Object.keys(groupedLog)) {
|
||||
if (serialized.length) {
|
||||
// only push a padding-line above area if we already have content
|
||||
serialized.push('');
|
||||
}
|
||||
|
||||
serialized.push(`### ${area}`);
|
||||
serialized.push('');
|
||||
|
||||
for (let line of groupedLog[area]) {
|
||||
serialized.push(`- ${line}`);
|
||||
}
|
||||
}
|
||||
|
||||
return serialized;
|
||||
}
|
||||
|
||||
function generateLog(tagName) {
|
||||
const logLines = execSync(
|
||||
`git log --pretty=format:"%s [%an] &&& %H" ${tagName}...HEAD`
|
||||
)
|
||||
.toString()
|
||||
.trim()
|
||||
.split('\n');
|
||||
|
||||
const commits = parseCommits(logLines);
|
||||
const filteredCommits = filterLog(commits);
|
||||
const groupedLog = groupLog(filteredCommits);
|
||||
return serializeLog(groupedLog);
|
||||
}
|
||||
|
||||
function findUniqPackagesAffected(tagName) {
|
||||
const pkgs = new Set(
|
||||
execSync(`git diff --name-only ${tagName}...HEAD`)
|
||||
.toString()
|
||||
.trim()
|
||||
.split('\n')
|
||||
.filter(line => line.startsWith('packages/'))
|
||||
.map(line => line.split('/')[1])
|
||||
.map(pkgName => {
|
||||
try {
|
||||
return require(`../packages/${pkgName}/package.json`).name;
|
||||
} catch {
|
||||
// Failed to read package.json (perhaps the pkg was deleted)
|
||||
}
|
||||
})
|
||||
.filter(s => Boolean(s))
|
||||
);
|
||||
|
||||
if (pkgs.size === 0) {
|
||||
pkgs.add('vercel');
|
||||
}
|
||||
|
||||
return pkgs;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const tagName = await getLatestStableTag();
|
||||
if (!tagName) {
|
||||
throw new Error('Unable to find last GitHub Release tag.');
|
||||
}
|
||||
|
||||
const log = generateLog(tagName);
|
||||
const formattedLog = log.join('\n') || 'NO CHANGES DETECTED';
|
||||
console.log(`Changes since the last stable release (${tagName}):`);
|
||||
console.log(`\n${formattedLog}\n`);
|
||||
|
||||
const pkgs = findUniqPackagesAffected(tagName);
|
||||
const pub = Array.from(pkgs).join(',');
|
||||
console.log('To publish a stable release, execute the following:');
|
||||
console.log(
|
||||
`\npnpx lerna version --message "Publish Stable" --exact --no-private --force-publish=${pub}\n`
|
||||
);
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* Filters out "Revert" commits as well as the commits they revert, if found.
|
||||
*/
|
||||
function filterReverts(commits) {
|
||||
const revertCommits = commits.filter(commit => commit.revertsHashes.length);
|
||||
const commitHashes = commits.map(commit => commit.hash);
|
||||
|
||||
let hashesToRemove = [];
|
||||
revertCommits.forEach(revertCommit => {
|
||||
const allFound = revertCommit.revertsHashes.every(hash => {
|
||||
return commitHashes.includes(hash);
|
||||
});
|
||||
|
||||
if (allFound) {
|
||||
hashesToRemove = [
|
||||
...hashesToRemove,
|
||||
...revertCommit.revertsHashes,
|
||||
revertCommit.hash,
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
return commits.filter(commit => !hashesToRemove.includes(commit.hash));
|
||||
}
|
||||
|
||||
function normalizeLog(commits) {
|
||||
commits = commits.filter(line => !line.subject.startsWith('Publish '));
|
||||
return filterReverts(commits);
|
||||
}
|
||||
|
||||
module.exports = normalizeLog;
|
||||
@@ -1,14 +0,0 @@
|
||||
function groupLog(commits) {
|
||||
const grouped = {};
|
||||
|
||||
for (let commit of commits) {
|
||||
for (let area of commit.areas) {
|
||||
grouped[area] = grouped[area] || [];
|
||||
grouped[area].push(commit.subject);
|
||||
}
|
||||
}
|
||||
|
||||
return grouped;
|
||||
}
|
||||
|
||||
module.exports = groupLog;
|
||||
@@ -1,55 +0,0 @@
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const REVERT_MESSAGE_COMMIT_PATTERN = /This reverts commit ([^.^ ]+)/;
|
||||
const AREA_PATTERN = /\[([^\]]+)\]/g;
|
||||
|
||||
function getCommitMessage(hash) {
|
||||
return execSync(`git log --format=%B -n 1 ${hash}`).toString().trim();
|
||||
}
|
||||
|
||||
function parseRevertCommit(message) {
|
||||
// EX: This reverts commit 6dff0875f5f361decdb95ad70a400195006c6bba.
|
||||
// EX: This reverts commit 6dff0875f5f361decdb95ad70a400195006c6bba (#123123).
|
||||
const fullMessageLines = message
|
||||
.trim()
|
||||
.split('\n')
|
||||
.filter(line => line.startsWith('This reverts commit'));
|
||||
return fullMessageLines.map(
|
||||
line => line.match(REVERT_MESSAGE_COMMIT_PATTERN)[1]
|
||||
);
|
||||
}
|
||||
|
||||
function parseAreas(subject) {
|
||||
const areaChunk = subject.split(' ')[0] || '';
|
||||
const areas = areaChunk.match(AREA_PATTERN);
|
||||
if (!areas) {
|
||||
return ['UNCATEGORIZED'];
|
||||
}
|
||||
|
||||
return areas.map(area => area.substring(1, area.length - 1));
|
||||
}
|
||||
|
||||
function parseCommits(logLines) {
|
||||
const commits = [];
|
||||
|
||||
logLines.forEach(line => {
|
||||
let [subject, hash] = line.split(' &&& ');
|
||||
subject = subject.trim();
|
||||
|
||||
const message = getCommitMessage(hash);
|
||||
const revertsHashes = parseRevertCommit(message);
|
||||
const areas = parseAreas(subject);
|
||||
|
||||
commits.push({
|
||||
hash,
|
||||
areas,
|
||||
subject,
|
||||
message,
|
||||
revertsHashes,
|
||||
});
|
||||
});
|
||||
|
||||
return commits;
|
||||
}
|
||||
|
||||
module.exports = parseCommits;
|
||||
36
utils/publish.sh
vendored
36
utils/publish.sh
vendored
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# `yarn` overwrites this value to use the yarn registry, which we
|
||||
# can't publish to. Unset so that the default npm registry is used.
|
||||
unset npm_config_registry
|
||||
|
||||
if [ -z "$NPM_TOKEN" ]; then
|
||||
echo "NPM_TOKEN not found. Did you forget to assign the GitHub Action secret?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
|
||||
echo "Logged in to npm as: $(npm whoami)"
|
||||
echo "Version of npm is: $(npm --version)"
|
||||
|
||||
dist_tag=""
|
||||
tag="$(git describe --tags --exact-match 2> /dev/null || :)"
|
||||
|
||||
if [ -z "$tag" ]; then
|
||||
echo "Not a tagged commit, skipping publish"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$tag" =~ -canary ]]; then
|
||||
echo "Publishing canary release"
|
||||
dist_tag="--dist-tag canary"
|
||||
else
|
||||
echo "Publishing stable release"
|
||||
fi
|
||||
|
||||
pnpm run lerna publish from-git $dist_tag --no-verify-access --yes
|
||||
|
||||
# always update canary dist-tag as we no longer publish canary versions separate
|
||||
node ./utils/update-canary-tag.js
|
||||
32
utils/update-canary-tag.js
vendored
32
utils/update-canary-tag.js
vendored
@@ -1,32 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
const changedFiles = execSync('git diff HEAD~ --name-only')
|
||||
.toString()
|
||||
.split('\n')
|
||||
.map(file => file.trim());
|
||||
|
||||
const changedPackageVersions = new Map();
|
||||
|
||||
for (const file of changedFiles) {
|
||||
if (file.match(/packages\/.+\/package.json/)) {
|
||||
const packageData = JSON.parse(
|
||||
fs.readFileSync(path.join(__dirname, '..', file), 'utf8')
|
||||
);
|
||||
changedPackageVersions.set(packageData.name, packageData.version);
|
||||
}
|
||||
}
|
||||
|
||||
for (const [package, version] of changedPackageVersions) {
|
||||
if (version.includes('canary')) {
|
||||
console.log(
|
||||
`skipping ${package}@${version} as it is already a canary version`
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
execSync(`npm dist-tag add ${package}@${version} canary`).toString()
|
||||
);
|
||||
console.log(`updated canary dist-tag for ${package}@${version}`);
|
||||
}
|
||||
}
|
||||
24
utils/update-latest-release.js
vendored
Normal file
24
utils/update-latest-release.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
module.exports = async ({ github, context }) => {
|
||||
const { owner, repo } = context.repo;
|
||||
const response = await github.repos.listReleases({ owner, repo });
|
||||
|
||||
function isVercelCliRelease(release) {
|
||||
return release.tag_name.startsWith('vercel@');
|
||||
}
|
||||
|
||||
const latestRelease = response.data[0];
|
||||
if (isVercelCliRelease(latestRelease)) {
|
||||
console.log(`Latest release is "${latestRelease.tag_name}" - skipping`);
|
||||
return;
|
||||
}
|
||||
|
||||
const latestVercelRelease = response.data.find(isVercelCliRelease);
|
||||
console.log(`Promoting "${latestVercelRelease.tag_name}" to latest release`);
|
||||
|
||||
await github.repos.updateRelease({
|
||||
owner,
|
||||
repo,
|
||||
release_id: latestVercelRelease.id,
|
||||
make_latest: true,
|
||||
});
|
||||
};
|
||||
54
utils/update-legacy-name.js
vendored
54
utils/update-legacy-name.js
vendored
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Updates the `package.json` file to contain the legacy "now" `name` field.
|
||||
* The provided argument should be a tag containing the new name.
|
||||
*/
|
||||
const fs = require('fs');
|
||||
const { join } = require('path');
|
||||
const npa = require('npm-package-arg');
|
||||
|
||||
const parsed = npa(process.argv[2]);
|
||||
|
||||
// Find the correct directory for this package
|
||||
const packagesDir = join(__dirname, '..', 'packages');
|
||||
const packageDir = fs.readdirSync(packagesDir).find(p => {
|
||||
if (p.startsWith('.')) return false;
|
||||
try {
|
||||
const pkg = JSON.parse(
|
||||
fs.readFileSync(join(packagesDir, p, 'package.json'), 'utf8')
|
||||
);
|
||||
return pkg.name === parsed.name;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
if (!packageDir) {
|
||||
throw new Error(`Could not find the package directory for "${parsed.name}"`);
|
||||
}
|
||||
|
||||
const pkgJsonPath = join(packagesDir, packageDir, 'package.json');
|
||||
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
|
||||
const vcName = pkg.name;
|
||||
const version = pkg.version;
|
||||
|
||||
if (pkg.name === '@vercel/client') {
|
||||
// The legacy name for `@vercel/client` is `now-client` (global scope)
|
||||
pkg.name = 'now-client';
|
||||
} else {
|
||||
pkg.name = pkg.name.replace('vercel', 'now');
|
||||
if (pkg.bin && pkg.bin.vercel) {
|
||||
// The legacy "bin" for Now CLI is "now"
|
||||
pkg.bin = { now: pkg.bin.vercel };
|
||||
}
|
||||
}
|
||||
|
||||
const nowName = pkg.name;
|
||||
console.error(`Updated package name: "${vcName}" -> "${nowName}"`);
|
||||
|
||||
fs.writeFileSync(pkgJsonPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
||||
|
||||
// Log the directory name to stdout for the `publish-legacy.sh`
|
||||
// script to consume for the `npm publish` that happens next.
|
||||
const IFS = '|';
|
||||
console.log([packageDir, vcName, nowName, version].join(IFS));
|
||||
Reference in New Issue
Block a user