Compare commits

...

22 Commits

Author SHA1 Message Date
Vercel Release Bot
91b7f6dcd9 Version Packages (#9973)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@29.3.4

### Patch Changes

- Updated dependencies
\[[`67e556bc8`](67e556bc80),
[`ba10fb4dd`](ba10fb4dd4)]:
    -   @vercel/remix-builder@1.8.9
    -   @vercel/next@3.8.4

## @vercel/next@3.8.4

### Patch Changes

- Update handling for react prebundled flag
([#9974](https://github.com/vercel/vercel/pull/9974))

## @vercel/remix-builder@1.8.9

### Patch Changes

- Upgrade `@remix-run/dev` fork to v1.16.1
([#9971](https://github.com/vercel/vercel/pull/9971))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-18 10:38:24 -07:00
JJ Kasper
ba10fb4dd4 [next] Update handling for react prebundled flag (#9974)
This ensures we properly set the prebundled react flag conditionally for
app and pages ensuring they are kept separate when bundling.

x-ref: https://github.com/vercel/next.js/issues/49169
2023-05-18 06:37:50 -07:00
Nathan Rajlich
18c1c45ce3 Add changeset for @remix-run/dev updater GH Action (#9972)
Adds a changeset file when the GH Action to update `@remix-run/dev`
creates a pull request.
2023-05-17 16:39:09 -07:00
Vercel Release Bot
67e556bc80 [remix] Upgrade @remix-run/dev to version 1.16.1 (#9971)
This auto-generated PR updates @remix-run/dev to version 1.16.1
2023-05-17 19:34:12 +00:00
Sean Massa
7235000181 fix release script (#9959)
The [previous PR](https://github.com/vercel/vercel/pull/9942) used `github.repos`, but I think this needs to be `github.rest.repos`.

- [Docs](https://octokit.github.io/rest.js/v19#repos)
- [Failed GH Action](https://github.com/vercel/vercel/actions/runs/4994578940/jobs/8945329301)
2023-05-17 18:26:30 +00:00
Sean Massa
5124d431ea fix deploy from local (#9969)
Local deployments of this repo would fail because this repo assumes that it's only ever deployed via git connection.
2023-05-17 17:45:28 +00:00
Vercel Release Bot
c879401bbc Version Packages (#9966)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@29.3.3

### Patch Changes

- Updated dependencies
\[[`6c6f3ce9d`](6c6f3ce9d2)]:
    -   @vercel/next@3.8.3

## @vercel/next@3.8.3

### Patch Changes

- Ensure un-necessary rsc routes are not added
([#9963](https://github.com/vercel/vercel/pull/9963))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-17 10:45:41 +02:00
JJ Kasper
6c6f3ce9d2 [next] Ensure un-necessary rsc routes are not added (#9963)
These routes aren't needed for RSC as `_next/data` isn't used for
routing app paths.

x-ref: [slack
thread](https://vercel.slack.com/archives/C058FQFKAGH/p1684272340654679?thread_ts=1684271538.503259&cid=C058FQFKAGH)
2023-05-16 16:33:09 -07:00
Vercel Release Bot
aa83680832 [examples] Upgrade Next.js to version 13.4.2 (#9943)
This auto-generated PR updates Next.js to version 13.4.2
2023-05-16 22:54:10 +00:00
Vercel Release Bot
06113d3e39 Version Packages (#9962)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-16 15:53:57 -05:00
Luc Leray
5150f21404 [vc dev] Fix serverless function size limit condition (#9961)
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-05-16 14:17:00 -05:00
Sean Massa
eb6bb98406 empty push test 2023-05-16 11:49:25 -05:00
Vercel Release Bot
d8e3b6e738 Version Packages (#9950)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-05-16 11:48:06 -05:00
Luc Leray
25da051d62 [vc dev] Skip 50MB zip size limit for Python (#9944)
Do not apply the 50MB zip size limit for Python serverless function during `vc dev`.

Related to internal PR: https://github.com/vercel/api/pull/19279
2023-05-16 15:58:04 +00:00
Vercel Release Bot
f57af66dc2 [tests] Upgrade Turbo to version 1.9.4 (#9952)
This auto-generated PR updates Turbo to version 1.9.4
2023-05-16 03:21:01 +00:00
Nathan Rajlich
b2f71d5352 Remove "Required PR Label" workflow (#9958)
Changesets enforces this, so no need for this extra workflow anymore.
2023-05-15 14:38:30 -07:00
Lee Robinson
6115f0d74a Update README (#9951)
To be more clear about what Vercel is actually providing you, as a developer.
2023-05-13 20:32:46 +00:00
Nathan Rajlich
14c877e468 [cli] Sort keys in vc env pull (#9949)
Makes sense to have the output be deterministic. Alphabetical sort seems like a logical choice.
2023-05-12 22:08:59 +00:00
Nathan Rajlich
d80732d74f [release] Promote vercel CLI release to "latest" (#9942)
It's possible that changesets will promote a release to latest that is
not the Vercel CLI release. This script ensures that a `vercel@` release
is always the latest after a publish happens.
2023-05-11 13:40:34 -07:00
Vercel Release Bot
b739c1845c Version Packages (#9939)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-11 10:46:10 -05:00
Sean Massa
e9f0fcf397 [cli] remove vc rollback beta label (#9928)
Remove the "beta" label from `vc rollback`.
2023-05-11 15:16:48 +00:00
Sean Massa
924a20a0fc [tests] make prettier ignore .changeset (#9938) 2023-05-11 09:50:14 -05:00
34 changed files with 1039 additions and 791 deletions

View File

@@ -56,6 +56,15 @@ jobs:
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- 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

View File

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

View File

@@ -12,6 +12,7 @@ packages/gatsby-plugin-vercel-analytics
node_modules
dist
pnpm-lock.yaml
.changeset
.vscode
.DS_Store
.next

View File

@@ -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

View File

@@ -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"

View File

@@ -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",

View File

@@ -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"
}

View File

@@ -31,7 +31,7 @@
"source-map-support": "0.5.12",
"ts-eager": "2.0.2",
"ts-jest": "29.1.0",
"turbo": "1.9.3",
"turbo": "1.9.4",
"typescript": "4.9.5"
},
"scripts": {

View File

@@ -1,5 +1,39 @@
# vercel
## 29.3.4
### Patch Changes
- Updated dependencies [[`67e556bc8`](https://github.com/vercel/vercel/commit/67e556bc80c821c233120a2ec1611adb8e195baa), [`ba10fb4dd`](https://github.com/vercel/vercel/commit/ba10fb4dd4155a75df79b98a0c43a6c42eac7b62)]:
- @vercel/remix-builder@1.8.9
- @vercel/next@3.8.4
## 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

View File

@@ -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:

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "29.2.1",
"version": "29.3.4",
"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.4",
"@vercel/node": "2.14.2",
"@vercel/python": "3.1.60",
"@vercel/redwood": "1.1.15",
"@vercel/remix-builder": "1.8.8",
"@vercel/remix-builder": "1.8.9",
"@vercel/ruby": "1.3.76",
"@vercel/static-build": "1.3.30"
},

View File

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

View File

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

View File

@@ -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(

View File

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

View File

@@ -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',

View File

@@ -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 () => {

View File

@@ -0,0 +1,13 @@
# @vercel/next
## 3.8.4
### Patch Changes
- Update handling for react prebundled flag ([#9974](https://github.com/vercel/vercel/pull/9974))
## 3.8.3
### Patch Changes
- Ensure un-necessary rsc routes are not added ([#9963](https://github.com/vercel/vercel/pull/9963))

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.8.2",
"version": "3.8.4",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",

View File

@@ -386,7 +386,7 @@ export async function serverBuild({
const apiPages: string[] = [];
const nonApiPages: string[] = [];
const streamingPages: string[] = [];
const appRouterPages: string[] = [];
lambdaPageKeys.forEach(page => {
if (
@@ -401,15 +401,20 @@ export async function serverBuild({
if (nonLambdaSsgPages.has(pathname)) {
return;
}
const normalizedPathname = normalizePage(pathname);
if (isDynamicRoute(pathname)) {
dynamicPages.push(normalizePage(pathname));
if (isDynamicRoute(normalizedPathname)) {
dynamicPages.push(normalizedPathname);
}
if (pageMatchesApi(page)) {
apiPages.push(page);
} else if (appDir && lambdaAppPaths[page]) {
streamingPages.push(page);
} else if (
(appPathRoutesManifest?.[`${normalizedPathname}/page`] ||
appPathRoutesManifest?.[`${normalizedPathname}/route`]) &&
lambdaAppPaths[page]
) {
appRouterPages.push(page);
} else {
nonApiPages.push(page);
}
@@ -570,6 +575,15 @@ export async function serverBuild({
`${getNextServerPath(nextVersion)}/next-server.js`
);
const appLauncher = launcher.replace(
'// pre-next-server-target',
`process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = "${
requiredServerFilesManifest.config?.experimental?.serverActions
? 'experimental'
: 'next'
}"`
);
if (
entryDirectory !== '.' &&
path.posix.join('/', entryDirectory) !== routesManifest.basePath
@@ -585,10 +599,6 @@ export async function serverBuild({
);
}
const launcherFiles: { [name: string]: FileFsRef | FileBlob } = {
[path.join(path.relative(baseDir, projectDir), '___next_launcher.cjs')]:
new FileBlob({ data: launcher }),
};
const pageTraces: {
[page: string]: { [key: string]: FileFsRef };
} = {};
@@ -597,7 +607,7 @@ export async function serverBuild({
} = {};
const mergedPageKeys = [
...nonApiPages,
...streamingPages,
...appRouterPages,
...apiPages,
...internalPages,
];
@@ -758,10 +768,10 @@ export async function serverBuild({
pageExtensions,
});
const streamingPageLambdaGroups = await getPageLambdaGroups({
const appRouterLambdaGroups = await getPageLambdaGroups({
entryPath: projectDir,
config,
pages: streamingPages,
pages: appRouterPages,
prerenderRoutes,
pageTraces,
compressedPages,
@@ -773,10 +783,11 @@ export async function serverBuild({
pageExtensions,
});
for (const group of streamingPageLambdaGroups) {
for (const group of appRouterLambdaGroups) {
if (!group.isPrerenders) {
group.isStreaming = true;
}
group.isAppRouter = true;
}
const apiLambdaGroups = await getPageLambdaGroups({
@@ -812,7 +823,7 @@ export async function serverBuild({
pseudoLayerBytes: group.pseudoLayerBytes,
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
})),
streamingPageLambdaGroups: streamingPageLambdaGroups.map(group => ({
appRouterLambdaGroups: appRouterLambdaGroups.map(group => ({
pages: group.pages,
isPrerender: group.isPrerenders,
pseudoLayerBytes: group.pseudoLayerBytes,
@@ -826,7 +837,7 @@ export async function serverBuild({
);
const combinedGroups = [
...pageLambdaGroups,
...streamingPageLambdaGroups,
...appRouterLambdaGroups,
...apiLambdaGroups,
];
@@ -905,6 +916,10 @@ export async function serverBuild({
}
}
const launcherFiles: { [name: string]: FileFsRef | FileBlob } = {
[path.join(path.relative(baseDir, projectDir), '___next_launcher.cjs')]:
new FileBlob({ data: group.isAppRouter ? appLauncher : launcher }),
};
const operationType = getOperationType({ group, prerenderManifest });
const lambda = await createLambdaFromPseudoLayers({
@@ -1041,7 +1056,8 @@ export async function serverBuild({
canUsePreviewMode,
prerenderManifest.bypassToken || '',
true,
middleware.dynamicRouteMap
middleware.dynamicRouteMap,
inversedAppPathManifest
).then(arr =>
localizeDynamicRoutes(
arr,
@@ -1201,24 +1217,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 +1596,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 +1672,7 @@ export async function serverBuild({
// Dynamic routes (must come after dataRoutes as dataRoutes are more
// specific)
...completeDynamicRoutes,
...dynamicRoutes,
...(isNextDataServerResolving
? [

View File

@@ -18,6 +18,8 @@ if (process.env.NODE_ENV !== 'production' && region !== 'dev1') {
process.env.NODE_ENV = 'production';
}
// pre-next-server-target
// eslint-disable-next-line
const NextServer = require('__NEXT_SERVER_PATH__').default;
const nextServer = new NextServer({

View File

@@ -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
@@ -1330,6 +1350,7 @@ export type LambdaGroup = {
pages: string[];
memory?: number;
maxDuration?: number;
isAppRouter?: boolean;
isStreaming?: boolean;
isPrerenders?: boolean;
isApiLambda: boolean;

View File

@@ -0,0 +1,18 @@
"use client";
import react from 'react'
export const MoreData = () => {
const [mounted, setMounted] = react.useState(false)
react.useEffect(() => {
setMounted(true)
}, [])
return (
<>
<p>more data</p>
{mounted && <p>mounted!</p>}
</>
)
}

View File

@@ -0,0 +1,3 @@
import react from 'react'
export const DataContext = react.createContext(null)

View File

@@ -0,0 +1,28 @@
import react from 'react'
import { MoreData } from '../../components/more-data'
import { DataContext } from '../../data-context'
const ValueItem = () => {
const value = react.useContext(DataContext)
return <p>{value}</p>
}
export default function Page(props) {
return (
<>
<DataContext.Provider value={'hello context'}>
<p>hello from pages/blog-ssr/[slug]</p>
<ValueItem />
<MoreData />
</DataContext.Provider>
</>
);
}
export function getServerSideProps() {
return {
props: {
now: Date.now()
}
}
}

View File

@@ -160,6 +160,16 @@
"status": 200,
"mustContain": "hello from pages/blog/[slug]"
},
{
"path": "/blog-ssr/123",
"status": 200,
"mustContain": "hello from pages/blog-ssr/[slug]"
},
{
"path": "/blog-ssr/321",
"status": 200,
"mustContain": "hello context"
},
{
"path": "/dynamic/category-1/id-1",
"status": 200,

View File

@@ -65,7 +65,14 @@ if (parseInt(process.versions.node.split('.')[0], 10) >= 16) {
}
}
expect(lambdas.size).toBe(3);
expect(
buildResult.routes.some(
route =>
route.src?.includes('_next/data') && route.src?.includes('.rsc')
)
).toBeFalsy();
expect(lambdas.size).toBe(4);
expect(buildResult.output['dashboard']).toBeDefined();
expect(buildResult.output['dashboard/another']).toBeDefined();
expect(buildResult.output['dashboard/changelog']).toBeDefined();

View File

@@ -48,11 +48,13 @@ async function main() {
fs.remove(join(outDir, 'serverless-functions/serverless-handler.d.mts')),
]);
// Copy type file for ts test
await fs.copyFile(
join(outDir, 'index.d.ts'),
join(__dirname, 'test/fixtures/15-helpers/ts/types.d.ts')
);
if (process.env.CI) {
// Copy type file for ts test
await fs.copyFile(
join(outDir, 'index.d.ts'),
join(__dirname, 'test/fixtures/15-helpers/ts/types.d.ts')
);
}
await fs.copyFile(
join(__dirname, 'src/edge-functions/edge-handler-template.js'),

View File

@@ -1,5 +1,11 @@
# @vercel/remix-builder
## 1.8.9
### Patch Changes
- Upgrade `@remix-run/dev` fork to v1.16.1 ([#9971](https://github.com/vercel/vercel/pull/9971))
## 1.8.8
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix-builder",
"version": "1.8.8",
"version": "1.8.9",
"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-patch.1",
"@remix-run/dev": "npm:@vercel/remix-run-dev@1.16.1",
"@vercel/build-utils": "6.7.2",
"@vercel/nft": "0.22.5",
"@vercel/static-config": "2.0.17",

1147
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

19
utils/pack.ts vendored
View File

@@ -6,9 +6,8 @@ import { TurboDryRun } from './types';
const rootDir = path.join(__dirname, '..');
async function main() {
const { stdout: sha } = await execa('git', ['rev-parse', '--short', 'HEAD'], {
cwd: rootDir,
});
const sha = await getSha();
const { stdout: turboStdout } = await execa(
'turbo',
['run', 'build', '--dry=json'],
@@ -50,6 +49,20 @@ async function main() {
}
}
async function getSha(): Promise<string> {
try {
const { stdout } = await execa('git', ['rev-parse', '--short', 'HEAD'], {
cwd: rootDir,
});
return stdout;
} catch (error) {
console.error(error);
console.log('Assuming this is not a git repo. Using "local" as the SHA.');
return 'local';
}
}
main().catch(err => {
console.log('error running pack:', err);
process.exit(1);

24
utils/update-latest-release.js vendored Normal file
View File

@@ -0,0 +1,24 @@
module.exports = async ({ github, context }) => {
const { owner, repo } = context.repo;
const response = await github.rest.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.rest.repos.updateRelease({
owner,
repo,
release_id: latestVercelRelease.id,
make_latest: true,
});
};

View File

@@ -7,7 +7,8 @@ module.exports = async ({ github, context }, newVersion) => {
execSync('git config --global user.name vercel-release-bot');
execSync('git checkout main');
const packagePath = path.join(__dirname, '..', 'packages', 'remix');
const repoRootPath = path.join(__dirname, '..');
const packagePath = path.join(repoRootPath, 'packages', 'remix');
const oldVersion = JSON.parse(
fs.readFileSync(path.join(packagePath, 'package.json'), 'utf-8')
).dependencies['@remix-run/dev'];
@@ -42,6 +43,17 @@ module.exports = async ({ github, context }, newVersion) => {
{ cwd: packagePath }
);
const changesetName = path.join(repoRootPath, `.changeset/${branch}.md`);
fs.writeFileSync(
changesetName,
`---
'@vercel/remix-builder': patch
---
Update \`@remix-run/dev\` fork to v${newVersion}
`
);
execSync(`git checkout -b ${branch}`);
execSync('git add -A');
execSync(`git commit -m ${branch}`);
@@ -54,8 +66,8 @@ module.exports = async ({ github, context }, newVersion) => {
repo,
head: branch,
base: 'main',
title: `[remix] Upgrade @remix-run/dev to version ${newVersion}`,
body: `This auto-generated PR updates @remix-run/dev to version ${newVersion}`,
title: `[remix] Update \`@remix-run/dev\` to v${newVersion}`,
body: `This auto-generated PR updates \`@remix-run/dev\` to version ${newVersion}.`,
});
await github.rest.issues.addLabels({