Compare commits

..

35 Commits

Author SHA1 Message Date
Sean Massa
a92c68e0ff Publish Stable
- vercel@28.16.13
 - @vercel/next@3.6.4
 - @vercel/remix@1.6.0
2023-03-06 13:47:36 -06:00
Vercel Release Bot
84f3a5bc1b [tests] Upgrade Turbo to version 1.8.3 (#9604)
This auto-generated PR updates Turbo to version 1.8.3
2023-03-06 16:26:41 +00:00
JJ Kasper
186bd9bb51 [next] Fix api prefixed app routes serverless streaming (#9603)
Fixes: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1677753703572609)
2023-03-04 01:50:54 +00:00
Nathan Rajlich
9ae84ba05f [remix] Add test for escaped route paths (#9516)
In Remix routes, you can [use bracket notation to escape the filesystem routing behavior](https://remix.run/docs/en/1.14.0/file-conventions/routes-files#escaping-special-characters). For example `app/routes/receipt[.]pdf.tsx` would be available at path `/receipt.pdf` (whereas, unescaped, it would be at `/receipt/pdf`).

This adds an e2e test for that behavior.
2023-03-03 21:33:12 +00:00
Jeemin Choi(최지민)
a638755e95 [cli] change patch-inquirer-legacy to patch-inquirer (#8919)
Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2023-03-03 14:27:11 -06:00
Nathan Rajlich
15eb018f84 [remix] Clean up dev symlink upon config error (#9595)
Move the try/catch block to immediately after the symlink call, so that if reading the `remix.config.js` file throws an error or if there's an error parsing the `export const config` in a route, the catch block will clean up after itself properly.

I recommend reviewing with [whitespace changes hidden](https://github.com/vercel/vercel/pull/9595/files?w=1).
2023-03-03 20:02:27 +00:00
Ethan Arrowood
7f89aca52c [tests] Add more remix tests (#9600)
Adds some more tests to the remix project. 

- 05-root-only : tests a remix app with only a `root.jsx` route.
  - https://kentcdodds.com/blog/super-simple-start-to-remix
- 06-v2-routing : tests the remix v2 routing works
2023-03-03 18:18:14 +00:00
Nathan Rajlich
dc9ec1bc6d [remix] Return framework.version in build result (#9596) 2023-03-03 04:29:55 +00:00
Nathan Rajlich
df93b01248 [examples] Run prettier on Remix template (#9594) 2023-03-03 01:58:15 +00:00
Nathan Rajlich
fb37ad22ab [remix] Fix support for optional path params (#9590)
Changes the way that routes with optional params are stored on Vercel to not use `?` in the name, because it's not possible to have a route destination with a `?` that's pointing to a function.

So instead of the function with a name such as `:lang?`, it will be stored on Vercel with a name like `(:lang)`, which can be routed to.
2023-03-02 23:28:26 +00:00
Vercel Release Bot
684f69bc5b [remix] Upgrade @remix-run/dev to version 1.14.0 (#9593)
This auto-generated PR updates @remix-run/dev to version 1.14.0
2023-03-02 20:57:25 +00:00
Ethan Arrowood
ddae78458d Fix remix updater workflow when fetching latest version (#9592) 2023-03-02 11:54:29 -08:00
Nathan Rajlich
fc614a7a92 Publish Stable
- vercel@28.16.12
 - @vercel/remix@1.5.1
2023-03-02 09:00:40 -08:00
Nathan Rajlich
6e4ea0774e [remix] Make symlink logic of @remix-run/dev work in monorepos (#9591)
Utilize `require.resolve()` to determine the correct location of
`@remix-run/dev`, instead of assuming it's in
"node_modules/@remix-run/dev" relative to the project work path.

Fixes https://github.com/orgs/vercel/discussions/1671.

Manually tested with yarn and pnpm on this template:
https://github.com/remix-run/examples/tree/main/turborepo-vercel
2023-03-02 08:58:00 -08:00
Nathan Rajlich
cfc1c9e818 Publish Stable
- vercel@28.16.11
 - @vercel/next@3.6.3
 - @vercel/remix@1.5.0
2023-03-01 17:24:34 -08:00
Vercel Release Bot
62a872fc0e [remix] Upgrade @remix-run/dev to version 1.13.0-patch.2 (#9589)
This auto-generated PR updates @remix-run/dev to version 1.13.0-patch.2
2023-03-02 00:10:12 +00:00
Vercel Release Bot
03b5bfbaa2 [examples] Upgrade Next.js to version 13.2.3 (#9586)
This auto-generated PR updates Next.js to version 13.2.3
2023-03-01 23:34:51 +00:00
Nathan Rajlich
aa305e5c66 [remix] Add better error message when server build directory is missing (#9584)
Show a more helpful message instead of showing a cryptic error messsage:

> Error: ENOENT: no such file or directory, copyfile
'/var/task/node_modules/@vercel/remix/server-node.mjs' ->
'/vercel/path0/packages/web/build/server-node.mjs'

This is probably due to a bad user configuration (i.e. with Turbo), but
tell them to contact support anyways in case there is a different cause
that we would need to address.
2023-03-01 15:08:44 -08:00
Ethan Arrowood
2309c43fce add vercel/remix-run-dev updater workflow (#9588)
Adds a github workflow and javascript updater script that will update
the `@remix-run/dev` version to the latest release of
`@vercel/remix-run-dev`
2023-03-01 13:50:23 -08:00
Nathan Rajlich
0bbb06daa7 [remix] Support "regions", "memory" and "maxDuration" in static config (#9442)
Apply the `regions` configuration (for both Edge and Node) and `memory`/`maxDuration` (only for Node) in a page's static config export, i.e.

```js
export const config = { runtime: 'edge', regions: ['iad1'] }

// or for Node
export const config = { runtime: 'nodejs', regions: ['iad1'], maxDuration: 5, memory: 3008 }
```

Similar to `runtime`, these config values can be inherited from a parent layout route to apply to all sub-routes. Routes with common config settings get placed into a common server bundle, meaning that there may now be more than 2 functions created (previously was one Edge, one Node), allowing for more granularity between the server build bundles.
2023-03-01 21:45:10 +00:00
Nathan Rajlich
61de63d285 [remix] Split Edge and Node server builds using serverBundles config (#9504)
Utilize the [`serverBundles`](https://github.com/remix-run/remix/pull/5479) config option to generate two server bundle builds. One contains only the routes that should run in Node.js, and the other contains only the routes that should run in the Edge runtime. In the future we could update this configuration to generate more than two bundles to be more granular and allow for infinite scalability.

Because the `serverBundles` PR is not yet merged, this PR introduces usage of a forked version of `@remix-run/dev` which incorporates our changes. Hopefully usage of a fork is temporary, but it gets us unblocked for now.
2023-03-01 03:10:42 +00:00
Steven
1ca3704297 [next] Fix incorrect 404 when i18n and appDir configured (#9582)
Fix incorrect 404 when visiting the `/` route with `i18n` and `appDir` configured
2023-03-01 02:02:55 +00:00
Nathan Rajlich
ae4180b287 [tests] Use probes.json instead of vercel.json for e2e tests (#9556)
Makes it easier to test fixtures directly via CLI deployments.

Coincidentally, this also revealed that auto-detection of Remix apps wasn't working correctly if there's a `remix.config.mjs` file. So `@vercel/frameworks` is updated to account for that case as well.
2023-03-01 01:02:43 +00:00
Steven
40081cb319 Publish Stable
- vercel@28.16.10
 - @vercel/remix@1.4.3
2023-02-28 19:12:33 -05:00
Steven
9200be61d2 [tests] Publish with npm@9 (#9583)
https://vercel.slack.com/archives/C04DUD7EB1B/p1676488464681929
2023-03-01 00:09:40 +00:00
Nathan Rajlich
1390f6d2ee [remix] Gracefully handle symlink creation when updating Remix packages (#9569)
Fixes an edge-case error when changing the version of Remix and then making a deployment to Vercel when there is already an existing build cache:

> Error: EEXIST: file already exists, symlink '../.pnpm/@remix-run+server-runtime@1.5.0_biqbaboplfbrettd7655fr4n2y/node_modules/@remix-run/server-runtime' -> '/vercel/path0/node_modules/@remix-run/server-runtime'

This would happen because the symlink was created in a previous run, but no longer points to a valid path because it's a different version. To fix we'll delete the previous symlink when the target value does not match.
2023-02-28 22:51:58 +00:00
Nathan Rajlich
b78cfc9ba5 [remix] Set framework property on Lambda / EdgeFunction (#9579) 2023-02-28 22:16:05 +00:00
Chris Barber
803a9363f9 Publish Stable
- vercel@28.16.9
 - @vercel/gatsby-plugin-vercel-analytics@1.0.8
 - @vercel/gatsby-plugin-vercel-builder@1.1.11
 - @vercel/node-bridge@3.1.14
 - @vercel/node@2.9.10
 - @vercel/static-build@1.3.14
2023-02-28 15:32:23 -06:00
Chris Barber
4a0a3b64a2 [node] Added middlewareRawSrc to BOA route config (#9435)
Blocked by https://github.com/vercel/vercel/pull/9564

The build output's route configuration contains a compiled `src` from the list of `matchers` in middleware config, however we need to also save the original inputs so that we can render something meaningful in the web UI. The new prop added to the route is called `middlewareRawSrc` of type `string[]`.

This PR depends on https://github.com/vercel/api/pull/17231.

Linear: https://linear.app/vercel/issue/VCCLI-411/display-uncompressed-edge-middleware-matcher-show-the-list-of-matches
2023-02-28 21:26:26 +00:00
Mehul Kar
347c2de3a2 [tests] Adopt Workspace Configurations from turbo@1.8 (#9573) 2023-02-28 20:49:28 +00:00
Ethan Arrowood
a05cc11719 [tests] Fix gatsby cron job script - git diff operation (#9577)
as titled
2023-02-28 13:13:57 -07:00
Ethan Arrowood
55b999ea9b [tests] add missing -w option for pnpm in gatsby cron job script (#9575)
as titled
2023-02-28 13:05:31 -07:00
Ethan Arrowood
8babc3694f [tests] Fix gatsby cron job (#9574)
Changes logic so its a single npm call instead of multiple
2023-02-28 11:59:58 -08:00
Ethan Arrowood
6dc0321216 [tests] add missing __dirname from gatsby cron job script (#9572)
as titled
2023-02-28 11:40:05 -08:00
Ethan Arrowood
3df8c05792 [tests] Add cron job to update gatsby fixtures (#9510)
PR to add a cron job and script that automatically updates gatsby
fixture versions.
2023-02-28 11:32:00 -08:00
96 changed files with 67876 additions and 38602 deletions

View File

@@ -0,0 +1,31 @@
name: Cron Update Gatsby Fixtures
on:
# Allow manual runs
workflow_dispatch:
# Run once a week https://crontab.guru/once-a-week
schedule:
- cron: '0 0 * * 0'
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# 0 means fetch all commits so we can commit and push in the script below
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable pnpm
- name: Create Pull Request
uses: actions/github-script@v6
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
# See https://github.com/actions/github-script#run-a-separate-file-with-an-async-function
with:
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
script: |
const script = require('./utils/update-gatsby-fixtures.js')
await script({ github, context })

View File

@@ -16,6 +16,9 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -41,6 +44,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
- name: install npm@9
run: npm i -g npm@9
- name: install pnpm@7.24.2
run: npm i -g pnpm@7.24.2
- name: Install

View File

@@ -0,0 +1,28 @@
name: Update @remix-run/dev
on:
workflow_dispatch:
inputs:
new-version:
type: string
description: "Optional version to update @remix-run/dev to inside of @vercel/remix"
jobs:
update-remix-run-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
- name: Enable corepack
run: corepack enable pnpm
- name: Update @remix-run/dev
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
script: |
const script = require('./utils/update-remix-run-dev.js')
await script({ github, context }, "${{ inputs.new-version }}")

1
.npmrc
View File

@@ -1,3 +1,4 @@
provenance=true
save-exact=true
hoist-pattern[]=!"**/@types/**"
hoist-pattern[]=!"**/typedoc"

View File

@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}

View File

@@ -8,9 +8,9 @@
"name": "nextjs",
"version": "0.1.0",
"dependencies": {
"eslint": "8.34.0",
"eslint-config-next": "13.2.1",
"next": "13.2.1",
"eslint": "8.35.0",
"eslint-config-next": "13.2.3",
"next": "13.2.3",
"react": "18.2.0",
"react-dom": "18.2.0"
}
@@ -27,9 +27,9 @@
}
},
"node_modules/@eslint/eslintrc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
"integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz",
"integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==",
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
@@ -48,6 +48,14 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/@eslint/js": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz",
"integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.8",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
@@ -79,22 +87,22 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
},
"node_modules/@next/env": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.1.tgz",
"integrity": "sha512-Hq+6QZ6kgmloCg8Kgrix+4F0HtvLqVK3FZAnlAoS0eonaDemHe1Km4kwjSWRE3JNpJNcKxFHF+jsZrYo0SxWoQ=="
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.2.3.tgz",
"integrity": "sha512-FN50r/E+b8wuqyRjmGaqvqNDuWBWYWQiigfZ50KnSFH0f+AMQQyaZl+Zm2+CIpKk0fL9QxhLxOpTVA3xFHgFow=="
},
"node_modules/@next/eslint-plugin-next": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.2.1.tgz",
"integrity": "sha512-r0i5rcO6SMAZtqiGarUVMr3k256X0R0j6pEkKg4PxqUW+hG0qgMxRVAJsuoRG5OBFkCOlSfWZJ0mP9fQdCcyNg==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.2.3.tgz",
"integrity": "sha512-QmMPItnU7VeojI1KnuwL9SLFWEwmaNHNlnOGpoTwdLoSiP9sc8KYiAHWEc4/44L+cAdCxcZYvn7frcRNP5l84Q==",
"dependencies": {
"glob": "7.1.7"
}
},
"node_modules/@next/swc-android-arm-eabi": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.1.tgz",
"integrity": "sha512-Yua7mUpEd1wzIT6Jjl3dpRizIfGp9NR4F2xeRuQv+ae+SDI1Em2WyM9m46UL+oeW5GpMiEHoaBagr47RScZFmQ==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.3.tgz",
"integrity": "sha512-mykdVaAXX/gm+eFO2kPeVjnOCKwanJ9mV2U0lsUGLrEdMUifPUjiXKc6qFAIs08PvmTMOLMNnUxqhGsJlWGKSw==",
"cpu": [
"arm"
],
@@ -107,9 +115,9 @@
}
},
"node_modules/@next/swc-android-arm64": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.1.tgz",
"integrity": "sha512-Bifcr2f6VwInOdq1uH/9lp8fH7Nf7XGkIx4XceVd32LPJqG2c6FZU8ZRBvTdhxzXVpt5TPtuXhOP4Ij9UPqsVw==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.2.3.tgz",
"integrity": "sha512-8XwHPpA12gdIFtope+n9xCtJZM3U4gH4vVTpUwJ2w1kfxFmCpwQ4xmeGSkR67uOg80yRMuF0h9V1ueo05sws5w==",
"cpu": [
"arm64"
],
@@ -122,9 +130,9 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.1.tgz",
"integrity": "sha512-gvqm+fGMYxAkwBapH0Vvng5yrb6HTkIvZfY4oEdwwYrwuLdkjqnJygCMgpNqIFmAHSXgtlWxfYv1VC8sjN81Kw==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.3.tgz",
"integrity": "sha512-TXOubiFdLpMfMtaRu1K5d1I9ipKbW5iS2BNbu8zJhoqrhk3Kp7aRKTxqFfWrbliAHhWVE/3fQZUYZOWSXVQi1w==",
"cpu": [
"arm64"
],
@@ -137,9 +145,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.1.tgz",
"integrity": "sha512-HGqVqmaZWj6zomqOZUVbO5NhlABL0iIaxTmd0O5B0MoMa5zpDGoaHSG+fxgcWMXcGcxmUNchv1NfNOYiTKoHOg==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.3.tgz",
"integrity": "sha512-GZctkN6bJbpjlFiS5pylgB2pifHvgkqLAPumJzxnxkf7kqNm6rOGuNjsROvOWVWXmKhrzQkREO/WPS2aWsr/yw==",
"cpu": [
"x64"
],
@@ -152,9 +160,9 @@
}
},
"node_modules/@next/swc-freebsd-x64": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.1.tgz",
"integrity": "sha512-N/a4JarAq+E+g+9K2ywJUmDIgU2xs2nA+BBldH0oq4zYJMRiUhL0iaN9G4e72VmGOJ61L/3W6VN8RIUOwTLoqQ==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.3.tgz",
"integrity": "sha512-rK6GpmMt/mU6MPuav0/M7hJ/3t8HbKPCELw/Uqhi4732xoq2hJ2zbo2FkYs56y6w0KiXrIp4IOwNB9K8L/q62g==",
"cpu": [
"x64"
],
@@ -167,9 +175,9 @@
}
},
"node_modules/@next/swc-linux-arm-gnueabihf": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.1.tgz",
"integrity": "sha512-WaFoerF/eRbhbE57TaIGJXbQAERADZ/RZ45u6qox9beb5xnWsyYgzX+WuN7Tkhyvga0/aMuVYFzS9CEay7D+bw==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.3.tgz",
"integrity": "sha512-yeiCp/Odt1UJ4KUE89XkeaaboIDiVFqKP4esvoLKGJ0fcqJXMofj4ad3tuQxAMs3F+qqrz9MclqhAHkex1aPZA==",
"cpu": [
"arm"
],
@@ -182,9 +190,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.1.tgz",
"integrity": "sha512-R+Jhc1/RJTnncE9fkePboHDNOCm1WJ8daanWbjKhfPySMyeniKYRwGn5SLYW3S8YlRS0QVdZaaszDSZWgUcsmA==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.3.tgz",
"integrity": "sha512-/miIopDOUsuNlvjBjTipvoyjjaxgkOuvlz+cIbbPcm1eFvzX2ltSfgMgty15GuOiR8Hub4FeTSiq3g2dmCkzGA==",
"cpu": [
"arm64"
],
@@ -197,9 +205,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.1.tgz",
"integrity": "sha512-oI1UfZPidGAVddlL2eOTmfsuKV9EaT1aktIzVIxIAgxzQSdwsV371gU3G55ggkurzfdlgF3GThFePDWF0d8dmw==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.3.tgz",
"integrity": "sha512-sujxFDhMMDjqhruup8LLGV/y+nCPi6nm5DlFoThMJFvaaKr/imhkXuk8uCTq4YJDbtRxnjydFv2y8laBSJVC2g==",
"cpu": [
"arm64"
],
@@ -212,9 +220,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.1.tgz",
"integrity": "sha512-PCygPwrQmS+7WUuAWWioWMZCzZm4PG91lfRxToLDg7yIm/3YfAw5N2EK2TaM9pzlWdvHQAqRMX/oLvv027xUiA==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.3.tgz",
"integrity": "sha512-w5MyxPknVvC9LVnMenAYMXMx4KxPwXuJRMQFvY71uXg68n7cvcas85U5zkdrbmuZ+JvsO5SIG8k36/6X3nUhmQ==",
"cpu": [
"x64"
],
@@ -227,9 +235,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.1.tgz",
"integrity": "sha512-sUAKxo7CFZYGHNxheGh9nIBElLYBM6md/liEGfOTwh/xna4/GTTcmkGWkF7PdnvaYNgcPIQgHIMYiAa6yBKAVw==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.3.tgz",
"integrity": "sha512-CTeelh8OzSOVqpzMFMFnVRJIFAFQoTsI9RmVJWW/92S4xfECGcOzgsX37CZ8K982WHRzKU7exeh7vYdG/Eh4CA==",
"cpu": [
"x64"
],
@@ -242,9 +250,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.1.tgz",
"integrity": "sha512-qDmyEjDBpl/vBXxuOOKKWmPQOcARcZIMach1s7kjzaien0SySut/PHRlj56sosa81Wt4hTGhfhZ1R7g1n7+B8w==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.3.tgz",
"integrity": "sha512-7N1KBQP5mo4xf52cFCHgMjzbc9jizIlkTepe9tMa2WFvEIlKDfdt38QYcr9mbtny17yuaIw02FXOVEytGzqdOQ==",
"cpu": [
"arm64"
],
@@ -257,9 +265,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.1.tgz",
"integrity": "sha512-2joqFQ81ZYPg6DcikIzQn3DgjKglNhPAozx6dL5sCNkr1CPMD0YIkJgT3CnYyMHQ04Qi3Npv0XX3MD6LJO8OCA==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.3.tgz",
"integrity": "sha512-LzWD5pTSipUXTEMRjtxES/NBYktuZdo7xExJqGDMnZU8WOI+v9mQzsmQgZS/q02eIv78JOCSemqVVKZBGCgUvA==",
"cpu": [
"ia32"
],
@@ -272,9 +280,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.1.tgz",
"integrity": "sha512-r3+0fSaIZT6N237iMzwUhfNwjhAFvXjqB+4iuW+wcpxW+LHm1g/IoxN8eSRcb8jPItC86JxjAxpke0QL97qd6g==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.3.tgz",
"integrity": "sha512-aLG2MaFs4y7IwaMTosz2r4mVbqRyCnMoFqOcmfTi7/mAS+G4IMH0vJp4oLdbshqiVoiVuKrAfqtXj55/m7Qu1Q==",
"cpu": [
"x64"
],
@@ -356,13 +364,13 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
},
"node_modules/@typescript-eslint/parser": {
"version": "5.53.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.53.0.tgz",
"integrity": "sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==",
"version": "5.54.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.54.0.tgz",
"integrity": "sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==",
"dependencies": {
"@typescript-eslint/scope-manager": "5.53.0",
"@typescript-eslint/types": "5.53.0",
"@typescript-eslint/typescript-estree": "5.53.0",
"@typescript-eslint/scope-manager": "5.54.0",
"@typescript-eslint/types": "5.54.0",
"@typescript-eslint/typescript-estree": "5.54.0",
"debug": "^4.3.4"
},
"engines": {
@@ -382,12 +390,12 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "5.53.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz",
"integrity": "sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==",
"version": "5.54.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz",
"integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==",
"dependencies": {
"@typescript-eslint/types": "5.53.0",
"@typescript-eslint/visitor-keys": "5.53.0"
"@typescript-eslint/types": "5.54.0",
"@typescript-eslint/visitor-keys": "5.54.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -398,9 +406,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "5.53.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.53.0.tgz",
"integrity": "sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==",
"version": "5.54.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz",
"integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
@@ -410,12 +418,12 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "5.53.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz",
"integrity": "sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==",
"version": "5.54.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz",
"integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==",
"dependencies": {
"@typescript-eslint/types": "5.53.0",
"@typescript-eslint/visitor-keys": "5.53.0",
"@typescript-eslint/types": "5.54.0",
"@typescript-eslint/visitor-keys": "5.54.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -436,11 +444,11 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "5.53.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz",
"integrity": "sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==",
"version": "5.54.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz",
"integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==",
"dependencies": {
"@typescript-eslint/types": "5.53.0",
"@typescript-eslint/types": "5.54.0",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
@@ -670,9 +678,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001457",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz",
"integrity": "sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==",
"version": "1.0.30001458",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz",
"integrity": "sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==",
"funding": [
{
"type": "opencollective",
@@ -967,11 +975,12 @@
}
},
"node_modules/eslint": {
"version": "8.34.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz",
"integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==",
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz",
"integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==",
"dependencies": {
"@eslint/eslintrc": "^1.4.1",
"@eslint/eslintrc": "^2.0.0",
"@eslint/js": "8.35.0",
"@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -985,7 +994,7 @@
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
"espree": "^9.4.0",
"esquery": "^1.4.0",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^6.0.1",
@@ -1022,11 +1031,11 @@
}
},
"node_modules/eslint-config-next": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.2.1.tgz",
"integrity": "sha512-2GAx7EjSiCzJN6H2L/v1kbYrNiwQxzkyjy6eWSjuhAKt+P6d3nVNHGy9mON8ZcYd72w/M8kyMjm4UB9cvijgrw==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.2.3.tgz",
"integrity": "sha512-kPulHiQEHGei9hIaaNGygHRc0UzlWM+3euOmYbxNkd2Nbhci5rrCDeMBMPSV8xgUssphDGmwDHWbk4VZz3rlZQ==",
"dependencies": {
"@next/eslint-plugin-next": "13.2.1",
"@next/eslint-plugin-next": "13.2.3",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -2317,11 +2326,11 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
},
"node_modules/next": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/next/-/next-13.2.1.tgz",
"integrity": "sha512-qhgJlDtG0xidNViJUPeQHLGJJoT4zDj/El7fP3D3OzpxJDUfxsm16cK4WTMyvSX1ciIfAq05u+0HqFAa+VJ+Hg==",
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/next/-/next-13.2.3.tgz",
"integrity": "sha512-nKFJC6upCPN7DWRx4+0S/1PIOT7vNlCT157w9AzbXEgKy6zkiPKEt5YyRUsRZkmpEqBVrGgOqNfwecTociyg+w==",
"dependencies": {
"@next/env": "13.2.1",
"@next/env": "13.2.3",
"@swc/helpers": "0.4.14",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.14",
@@ -2334,19 +2343,19 @@
"node": ">=14.6.0"
},
"optionalDependencies": {
"@next/swc-android-arm-eabi": "13.2.1",
"@next/swc-android-arm64": "13.2.1",
"@next/swc-darwin-arm64": "13.2.1",
"@next/swc-darwin-x64": "13.2.1",
"@next/swc-freebsd-x64": "13.2.1",
"@next/swc-linux-arm-gnueabihf": "13.2.1",
"@next/swc-linux-arm64-gnu": "13.2.1",
"@next/swc-linux-arm64-musl": "13.2.1",
"@next/swc-linux-x64-gnu": "13.2.1",
"@next/swc-linux-x64-musl": "13.2.1",
"@next/swc-win32-arm64-msvc": "13.2.1",
"@next/swc-win32-ia32-msvc": "13.2.1",
"@next/swc-win32-x64-msvc": "13.2.1"
"@next/swc-android-arm-eabi": "13.2.3",
"@next/swc-android-arm64": "13.2.3",
"@next/swc-darwin-arm64": "13.2.3",
"@next/swc-darwin-x64": "13.2.3",
"@next/swc-freebsd-x64": "13.2.3",
"@next/swc-linux-arm-gnueabihf": "13.2.3",
"@next/swc-linux-arm64-gnu": "13.2.3",
"@next/swc-linux-arm64-musl": "13.2.3",
"@next/swc-linux-x64-gnu": "13.2.3",
"@next/swc-linux-x64-musl": "13.2.3",
"@next/swc-win32-arm64-msvc": "13.2.3",
"@next/swc-win32-ia32-msvc": "13.2.3",
"@next/swc-win32-x64-msvc": "13.2.3"
},
"peerDependencies": {
"@opentelemetry/api": "^1.4.0",
@@ -3074,12 +3083,12 @@
}
},
"node_modules/tsconfig-paths": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
"integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==",
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"json5": "^1.0.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
}

View File

@@ -9,9 +9,9 @@
"lint": "next lint"
},
"dependencies": {
"eslint": "8.34.0",
"eslint-config-next": "13.2.1",
"next": "13.2.1",
"eslint": "8.35.0",
"eslint-config-next": "13.2.3",
"next": "13.2.3",
"react": "18.2.0",
"react-dom": "18.2.0"
}

View File

@@ -9,6 +9,10 @@ export default function (
remixContext: EntryContext
) {
const remixServer = <RemixServer context={remixContext} url={request.url} />;
return handleRequest(request, responseStatusCode, responseHeaders, remixServer)
return handleRequest(
request,
responseStatusCode,
responseHeaders,
remixServer
);
}

View File

@@ -7,7 +7,7 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import { Analytics } from '@vercel/analytics/react';
import { Analytics } from "@vercel/analytics/react";
export const meta: MetaFunction = () => ({
charset: "utf-8",

View File

@@ -1,6 +1,4 @@
export const config = {
runtime: 'edge'
};
export const config = { runtime: "edge" };
export default function Edge() {
return (

View File

@@ -32,7 +32,7 @@
"source-map-support": "0.5.12",
"ts-eager": "2.0.2",
"ts-jest": "28.0.5",
"turbo": "1.7.4"
"turbo": "1.8.3"
},
"scripts": {
"lerna": "lerna",

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "28.16.8",
"version": "28.16.13",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -44,13 +44,13 @@
"@vercel/build-utils": "6.3.2",
"@vercel/go": "2.3.9",
"@vercel/hydrogen": "0.0.55",
"@vercel/next": "3.6.2",
"@vercel/node": "2.9.9",
"@vercel/next": "3.6.4",
"@vercel/node": "2.9.10",
"@vercel/python": "3.1.51",
"@vercel/redwood": "1.1.7",
"@vercel/remix": "1.4.2",
"@vercel/remix": "1.6.0",
"@vercel/ruby": "1.3.68",
"@vercel/static-build": "1.3.13"
"@vercel/static-build": "1.3.14"
},
"devDependencies": {
"@alex_neo/jest-expect-message": "1.0.5",

View File

@@ -54,7 +54,7 @@ export default async function list(
eraseFinalAnswer = false, // If true, the line with the final answer that inquirer prints will be erased before returning
}: ListOptions
): Promise<string> {
require('./patch-inquirer-legacy');
require('./patch-inquirer');
let biggestLength = 0;
let selected: string | undefined;

View File

@@ -1,21 +0,0 @@
import chalk from 'chalk';
import inquirer from 'inquirer';
import Prompt from 'inquirer/lib/prompts/base';
// Here we patch inquirer to use a `>` instead of the ugly green `?`
/* eslint-disable no-multiple-empty-lines, no-var, no-undef, no-eq-null, eqeqeq, semi */
const getQuestion = function (this: Prompt) {
var message = `${chalk.bold(`> ${this.opt.message}`)} `;
// Append the default if available, and if question isn't answered
if (this.opt.default != null && this.status !== 'answered') {
message += chalk.dim(`(${this.opt.default}) `);
}
return message;
};
/* eslint-enable */
inquirer.prompt.prompts.input.prototype.getQuestion = getQuestion;
inquirer.prompt.prompts.list.prototype.getQuestion = getQuestion;

View File

@@ -84,7 +84,10 @@ function listRender(choices: (Choice | Separator)[], pointer: number) {
let isSelected = i - separatorOffset === pointer;
let line = (isSelected ? '● ' : '○ ') + choice.name;
line = chalk.cyan(line);
if (isSelected) {
line = chalk.cyan(line);
}
output += line + ' \n';
});

View File

@@ -484,6 +484,7 @@ describe('build', () => {
{
src: '^/.*$',
middlewarePath: 'middleware',
middlewareRawSrc: [],
override: true,
continue: true,
},
@@ -548,6 +549,7 @@ describe('build', () => {
{
src: '^/.*$',
middlewarePath: 'middleware',
middlewareRawSrc: [],
override: true,
continue: true,
},
@@ -612,6 +614,7 @@ describe('build', () => {
{
src: '^\\/about(?:\\/((?:[^\\/#\\?]+?)(?:\\/(?:[^\\/#\\?]+?))*))?[\\/#\\?]?$|^\\/dashboard(?:\\/((?:[^\\/#\\?]+?)(?:\\/(?:[^\\/#\\?]+?))*))?[\\/#\\?]?$',
middlewarePath: 'middleware',
middlewareRawSrc: ['/about/:path*', '/dashboard/:path*'],
override: true,
continue: true,
},

View File

@@ -28,7 +28,7 @@ describe('login', () => {
const user = useUser();
client.setArgv('login');
const exitCodePromise = login(client);
await expect(client.stderr).toOutput(`> Log in to Vercel`);
await expect(client.stderr).toOutput(`? Log in to Vercel`);
// Move down to "Email" option
client.stdin.write('\x1B[B'); // Down arrow
@@ -36,7 +36,7 @@ describe('login', () => {
client.stdin.write('\x1B[B'); // Down arrow
client.stdin.write('\r'); // Return key
await expect(client.stderr).toOutput('> Enter your email address:');
await expect(client.stderr).toOutput('? Enter your email address:');
client.stdin.write(`${user.email}\n`);
@@ -51,7 +51,7 @@ describe('login', () => {
const user = useUser();
client.setArgv('login', '--no-color');
const exitCodePromise = login(client);
await expect(client.stderr).toOutput(`> Log in to Vercel`);
await expect(client.stderr).toOutput(`? Log in to Vercel`);
// Move down to "Email" option
client.stdin.write('\x1B[B'); // Down arrow
@@ -59,7 +59,7 @@ describe('login', () => {
client.stdin.write('\x1B[B'); // Down arrow
client.stdin.write('\r'); // Return key
await expect(client.stderr).toOutput('> Enter your email address:');
await expect(client.stderr).toOutput('? Enter your email address:');
client.stdin.write(`${user.email}\n`);
@@ -93,7 +93,7 @@ describe('login', () => {
const user = useUser();
client.setArgv('login');
const exitCodePromise = login(client);
await expect(client.stderr).toOutput(`> Log in to Vercel`);
await expect(client.stderr).toOutput(`? Log in to Vercel`);
// Move down to "Email" option
client.stdin.write('\x1B[B'); // Down arrow
@@ -101,7 +101,7 @@ describe('login', () => {
client.stdin.write('\x1B[B'); // Down arrow
client.stdin.write('\r'); // Return key
await expect(client.stderr).toOutput('> Enter your email address:');
await expect(client.stderr).toOutput('? Enter your email address:');
client.stdin.write(`${user.email}\n`);
@@ -136,7 +136,7 @@ describe('login', () => {
const user = useUser();
client.setArgv('login');
const exitCodePromise = login(client);
await expect(client.stderr).toOutput(`> Log in to Vercel`);
await expect(client.stderr).toOutput(`? Log in to Vercel`);
// Move down to "Email" option
client.stdin.write('\x1B[B'); // Down arrow
@@ -144,7 +144,7 @@ describe('login', () => {
client.stdin.write('\x1B[B'); // Down arrow
client.stdin.write('\r'); // Return key
await expect(client.stderr).toOutput('> Enter your email address:');
await expect(client.stderr).toOutput('? Enter your email address:');
client.stdin.write(`${user.email}\n`);

13
packages/cli/turbo.json Normal file
View File

@@ -0,0 +1,13 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"build": {
"outputs": [
"dist/**",
"src/util/constants.ts",
"src/util/dev/templates/*.ts"
]
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/gatsby-plugin-vercel-analytics",
"version": "1.0.7",
"version": "1.0.8",
"description": "Track Core Web Vitals in Gatsby projects with Vercel Analytics.",
"main": "index.js",
"files": [

View File

@@ -0,0 +1,9 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["gatsby-browser.js", "web-vitals.js", "index.js"]
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/gatsby-plugin-vercel-builder",
"version": "1.1.10",
"version": "1.1.11",
"main": "dist/index.js",
"files": [
"dist",
@@ -15,7 +15,7 @@
},
"dependencies": {
"@vercel/build-utils": "6.3.2",
"@vercel/node": "2.9.9",
"@vercel/node": "2.9.10",
"@vercel/routing-utils": "2.1.10",
"ajv": "8.12.0",
"esbuild": "0.14.47",

View File

@@ -0,0 +1,9 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["dist/**", "gatsby-node.js"]
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.6.2",
"version": "3.6.4",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",

View File

@@ -154,6 +154,15 @@ export async function serverBuild({
? path.join(baseDir, requiredServerFilesManifest.relativeAppDir)
: requiredServerFilesManifest.appDir || entryPath;
// allow looking up original route from normalized route
const inversedAppPathManifest: Record<string, string> = {};
if (appPathRoutesManifest) {
for (const ogRoute of Object.keys(appPathRoutesManifest)) {
inversedAppPathManifest[appPathRoutesManifest[ogRoute]] = ogRoute;
}
}
let appBuildTraces: UnwrapPromise<ReturnType<typeof glob>> = {};
let appDir: string | null = null;
@@ -186,8 +195,9 @@ export async function serverBuild({
}
const pageMatchesApi = (page: string) => {
const normalizedPage = `/${page.replace(/\.js$/, '')}`;
return (
!appPathRoutesManifest?.[page] &&
!inversedAppPathManifest[normalizedPage] &&
(page.startsWith('api/') || page === 'api.js')
);
};
@@ -1167,15 +1177,9 @@ export async function serverBuild({
// to match prerenders so we can route the same when the
// __rsc__ header is present
const edgeFunctions = middleware.edgeFunctions;
// allow looking up original route from normalized route
const inverseAppPathManifest: Record<string, string> = {};
for (const ogRoute of Object.keys(appPathRoutesManifest)) {
inverseAppPathManifest[appPathRoutesManifest[ogRoute]] = ogRoute;
}
for (let route of Object.values(appPathRoutesManifest)) {
const ogRoute = inverseAppPathManifest[route];
const ogRoute = inversedAppPathManifest[route];
if (ogRoute.endsWith('/route')) {
continue;
@@ -1556,7 +1560,7 @@ export async function serverBuild({
{
src: `^${path.posix.join('/', entryDirectory)}/?(?:${i18n.locales
.map(locale => escapeStringRegexp(locale))
.join('|')})/(.*)`,
.join('|')})/?(.*)`,
dest: `${path.posix.join('/', entryDirectory, '/')}$1`,
check: true,
},

View File

@@ -0,0 +1 @@
.vercel

View File

@@ -0,0 +1,3 @@
export default function Page() {
return <p>My Enter Page</p>;
}

View File

@@ -0,0 +1,10 @@
export default function Root({ children }) {
return (
<html lang="en">
<head>
<title>My Title</title>
</head>
<body>{children}</body>
</html>
);
}

View File

@@ -0,0 +1,3 @@
export default function Page() {
return <p>My Other Page</p>;
}

View File

@@ -0,0 +1,3 @@
export default function Page() {
return <p>My Index Page</p>;
}

View File

@@ -0,0 +1,12 @@
/* eslint-env jest */
const path = require('path');
const { deployAndTest } = require('../../utils');
const ctx = {};
describe(`${__dirname.split(path.sep).pop()}`, () => {
it('should deploy and pass probe checks', async () => {
const info = await deployAndTest(__dirname);
Object.assign(ctx, info);
});
});

View File

@@ -0,0 +1,9 @@
module.exports = {
experimental: {
appDir: true,
},
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
};

View File

@@ -0,0 +1,13 @@
{
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "canary",
"react": "experimental",
"react-dom": "experimental"
}
}

View File

@@ -0,0 +1,34 @@
{
"probes": [
{
"fetchOptions": { "redirect": "manual" },
"path": "/",
"status": 200,
"mustContain": "My Index Page"
},
{
"fetchOptions": { "redirect": "manual" },
"path": "/en",
"status": 200,
"mustContain": "My Index Page"
},
{
"fetchOptions": { "redirect": "manual" },
"path": "/enter",
"status": 200,
"mustContain": "My Enter Page"
},
{
"fetchOptions": { "redirect": "manual" },
"path": "/other",
"status": 200,
"mustContain": "My Other Page"
},
{
"fetchOptions": { "redirect": "manual" },
"path": "/en/other",
"status": 200,
"mustContain": "My Other Page"
}
]
}

View File

@@ -0,0 +1,4 @@
export const GET = req => {
console.log(req.url);
return new Response('hello world');
};

View File

@@ -32,6 +32,12 @@ if (parseInt(process.versions.node.split('.')[0], 10) >= 16) {
expect(buildResult.output['dashboard/changelog']).toBeDefined();
expect(buildResult.output['dashboard/deployments/[id]']).toBeDefined();
expect(buildResult.output['api/hello-again']).toBeDefined();
expect(buildResult.output['api/hello-again'].type).toBe('Lambda');
expect(
buildResult.output['api/hello-again'].experimentalResponseStreaming
).toBe(true);
expect(buildResult.output['edge-route-handler']).toBeDefined();
expect(buildResult.output['edge-route-handler'].type).toBe('EdgeFunction');
expect(buildResult.output['edge-route-handler.rsc']).not.toBeDefined();

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node-bridge",
"version": "3.1.13",
"version": "3.1.14",
"license": "MIT",
"main": "./index.js",
"repository": {

View File

@@ -0,0 +1,9 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["helpers.js", "source-map-support.js"]
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "2.9.9",
"version": "2.9.10",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -32,7 +32,7 @@
"@edge-runtime/vm": "2.0.0",
"@types/node": "14.18.33",
"@vercel/build-utils": "6.3.2",
"@vercel/node-bridge": "3.1.13",
"@vercel/node-bridge": "3.1.14",
"@vercel/static-config": "2.0.13",
"edge-runtime": "2.0.0",
"esbuild": "0.14.47",

View File

@@ -449,9 +449,19 @@ export const build: BuildV3 = async ({
// Middleware is a catch-all for all paths unless a `matcher` property is defined
const src = getRegExpFromMatchers(staticConfig?.matcher);
const middlewareRawSrc: string[] = [];
if (staticConfig?.matcher) {
if (Array.isArray(staticConfig.matcher)) {
middlewareRawSrc.push(...staticConfig.matcher);
} else {
middlewareRawSrc.push(staticConfig.matcher as string);
}
}
routes = [
{
src,
middlewareRawSrc,
middlewarePath: outputPath,
continue: true,
override: true,

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix",
"version": "1.4.2",
"version": "1.6.0",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -22,7 +22,7 @@
"vercel-edge-entrypoint.js"
],
"dependencies": {
"@remix-run/dev": "1.13.0",
"@remix-run/dev": "npm:@vercel/remix-run-dev@1.14.0",
"@vercel/nft": "0.22.5",
"@vercel/static-config": "2.0.13",
"path-to-regexp": "6.2.1",

View File

@@ -1,3 +1,3 @@
import { createRequestHandler } from '@remix-run/server-runtime';
import build from './index.js';
import build from '@remix-run/dev/server-build';
export default createRequestHandler(build);

View File

@@ -9,7 +9,7 @@ import {
installGlobals();
import build from './index.js';
import build from '@remix-run/dev/server-build';
const handleRequest = createRemixRequestHandler(build, process.env.NODE_ENV);

View File

@@ -19,7 +19,7 @@ import {
scanParentDirs,
walkParentDirs,
} from '@vercel/build-utils';
import { getConfig, BaseFunctionConfig } from '@vercel/static-config';
import { getConfig } from '@vercel/static-config';
import { nodeFileTrace } from '@vercel/nft';
import { readConfig } from '@remix-run/dev/dist/config';
import type {
@@ -29,18 +29,36 @@ import type {
PackageJson,
BuildResultV2Typical,
} from '@vercel/build-utils';
import type { RemixConfig } from '@remix-run/dev/dist/config';
import type { BaseFunctionConfig } from '@vercel/static-config';
import type { AppConfig, RemixConfig } from '@remix-run/dev/dist/config';
import type { ConfigRoute } from '@remix-run/dev/dist/config/routes';
import {
calculateRouteConfigHash,
findConfig,
getPathFromRoute,
getRegExpFromPath,
getRouteIterator,
getResolvedRouteConfig,
isLayoutRoute,
ResolvedRouteConfig,
ResolvedNodeRouteConfig,
ResolvedEdgeRouteConfig,
} from './utils';
const _require: typeof require = eval('require');
const REMIX_RUN_DEV_PATH = dirname(
_require.resolve('@remix-run/dev/package.json')
);
const edgeServerSrcPromise = fs.readFile(
join(__dirname, '../server-edge.mjs'),
'utf-8'
);
const nodeServerSrcPromise = fs.readFile(
join(__dirname, '../server-node.mjs'),
'utf-8'
);
export const build: BuildV2 = async ({
entrypoint,
files,
@@ -93,55 +111,131 @@ export const build: BuildV2 = async ({
await runNpmInstall(entrypointFsDirname, [], spawnOpts, meta, nodeVersion);
}
// Make `remix build` output production mode
spawnOpts.env.NODE_ENV = 'production';
// Make our version of `remix` CLI available to the project's build
// command by creating a symlink to the copy in our node modules,
// so that `serverBundles` works: https://github.com/remix-run/remix/pull/5479
const remixRunDevPath = await ensureResolvable(
entrypointFsDirname,
repoRootPath,
'@remix-run/dev'
);
const remixConfig = await chdirAndReadConfig(entrypointFsDirname);
const remixRoutes = Object.values(remixConfig.routes);
const remixVersion = JSON.parse(
await fs.readFile(join(remixRunDevPath, 'package.json'), 'utf8')
).version;
// We need to patch the `remix.config.js` file to force some values necessary
// for a build that works on either Node.js or the Edge runtime
let remixConfigWrapped = false;
const remixConfigPath = findConfig(entrypointFsDirname, 'remix.config');
const renamedRemixConfigPath = remixConfigPath
? `${remixConfigPath}.original${extname(remixConfigPath)}`
: undefined;
const serverBuildPath = 'build/index.js';
if (remixConfigPath && renamedRemixConfigPath) {
await fs.rename(remixConfigPath, renamedRemixConfigPath);
// Figure out if the `remix.config` file is using ESM syntax
let isESM = false;
try {
_require(renamedRemixConfigPath);
} catch (err: any) {
isESM = err.code === 'ERR_REQUIRE_ESM';
}
const backupRemixRunDevPath = `${remixRunDevPath}.__vercel_backup`;
await fs.rename(remixRunDevPath, backupRemixRunDevPath);
await fs.symlink(REMIX_RUN_DEV_PATH, remixRunDevPath);
let patchedConfig: string;
if (isESM) {
patchedConfig = `import config from './${basename(
renamedRemixConfigPath
)}';
config.serverBuildTarget = undefined;
config.serverModuleFormat = 'cjs';
config.serverPlatform = 'node';
config.serverBuildPath = ${JSON.stringify(serverBuildPath)}
export default config;`;
} else {
patchedConfig = `const config = require('./${basename(
renamedRemixConfigPath
)}');
config.serverBuildTarget = undefined;
config.serverModuleFormat = 'cjs';
config.serverPlatform = 'node';
config.serverBuildPath = ${JSON.stringify(serverBuildPath)}
module.exports = config;`;
}
await fs.writeFile(remixConfigPath, patchedConfig);
}
// These get populated inside the try/catch below
let serverBundles: AppConfig['serverBundles'];
let remixConfig: RemixConfig;
let remixRoutes: ConfigRoute[];
const serverBundlesMap = new Map<string, ConfigRoute[]>();
const resolvedConfigsMap = new Map<ConfigRoute, ResolvedRouteConfig>();
// Run "Build Command"
try {
// Make `remix build` output production mode
spawnOpts.env.NODE_ENV = 'production';
remixConfig = await chdirAndReadConfig(entrypointFsDirname);
remixRoutes = Object.values(remixConfig.routes);
// Read the `export const config` (if any) for each route
const project = new Project();
const staticConfigsMap = new Map<ConfigRoute, BaseFunctionConfig | null>();
for (const route of remixRoutes) {
const routePath = join(remixConfig.appDirectory, route.file);
const staticConfig = getConfig(project, routePath);
staticConfigsMap.set(route, staticConfig);
}
for (const route of remixRoutes) {
const config = getResolvedRouteConfig(
route,
remixConfig.routes,
staticConfigsMap
);
resolvedConfigsMap.set(route, config);
}
// Figure out which routes belong to which server bundles
// based on having common static config properties
for (const route of remixRoutes) {
if (isLayoutRoute(route.id, remixRoutes)) continue;
const config = resolvedConfigsMap.get(route);
if (!config) {
throw new Error(`Expected resolved config for "${route.id}"`);
}
const hash = calculateRouteConfigHash(config);
let routesForHash = serverBundlesMap.get(hash);
if (!Array.isArray(routesForHash)) {
routesForHash = [];
serverBundlesMap.set(hash, routesForHash);
}
routesForHash.push(route);
}
serverBundles = Array.from(serverBundlesMap.entries()).map(
([hash, routes]) => {
const runtime = resolvedConfigsMap.get(routes[0])?.runtime ?? 'nodejs';
return {
serverBuildPath: `build/build-${runtime}-${hash}.js`,
routes: routes.map(r => r.id),
};
}
);
// We need to patch the `remix.config.js` file to force some values necessary
// for a build that works on either Node.js or the Edge runtime
if (remixConfigPath && renamedRemixConfigPath) {
await fs.rename(remixConfigPath, renamedRemixConfigPath);
// Figure out if the `remix.config` file is using ESM syntax
let isESM = false;
try {
_require(renamedRemixConfigPath);
} catch (err: any) {
isESM = err.code === 'ERR_REQUIRE_ESM';
}
let patchedConfig: string;
if (isESM) {
patchedConfig = `import config from './${basename(
renamedRemixConfigPath
)}';
config.serverBuildTarget = undefined;
config.serverModuleFormat = 'cjs';
config.serverPlatform = 'node';
config.serverBuildPath = undefined;
config.serverBundles = ${JSON.stringify(serverBundles)};
export default config;`;
} else {
patchedConfig = `const config = require('./${basename(
renamedRemixConfigPath
)}');
config.serverBuildTarget = undefined;
config.serverModuleFormat = 'cjs';
config.serverPlatform = 'node';
config.serverBuildPath = undefined;
config.serverBundles = ${JSON.stringify(serverBundles)};
module.exports = config;`;
}
await fs.writeFile(remixConfigPath, patchedConfig);
remixConfigWrapped = true;
}
// Run "Build Command"
if (buildCommand) {
debug(`Executing build command "${buildCommand}"`);
await execCommand(buildCommand, {
@@ -171,24 +265,13 @@ module.exports = config;`;
}
} finally {
// Clean up our patched `remix.config.js` to be polite
if (remixConfigPath && renamedRemixConfigPath) {
if (remixConfigWrapped && remixConfigPath && renamedRemixConfigPath) {
await fs.rename(renamedRemixConfigPath, remixConfigPath);
}
}
// Figure out which pages should be edge functions
let hasEdgeRoute = false;
const staticConfigsMap = new Map<ConfigRoute, BaseFunctionConfig>();
const project = new Project();
for (const route of remixRoutes) {
const routePath = join(remixConfig.appDirectory, route.file);
const staticConfig = getConfig(project, routePath);
if (staticConfig) {
staticConfigsMap.set(route, staticConfig);
}
if (staticConfig?.runtime && isEdgeRuntime(staticConfig.runtime)) {
hasEdgeRoute = true;
}
// Remove `@remix-run/dev` symlink
await fs.unlink(remixRunDevPath);
await fs.rename(backupRemixRunDevPath, remixRunDevPath);
}
// This needs to happen before we run NFT to create the Node/Edge functions
@@ -201,23 +284,35 @@ module.exports = config;`;
ensureResolvable(entrypointFsDirname, repoRootPath, '@remix-run/node'),
]);
const [staticFiles, nodeFunction, edgeFunction] = await Promise.all([
const [staticFiles, ...functions] = await Promise.all([
glob('**', join(entrypointFsDirname, 'public')),
createRenderNodeFunction(
entrypointFsDirname,
repoRootPath,
join(entrypointFsDirname, serverBuildPath),
remixConfig.serverEntryPoint,
nodeVersion
),
hasEdgeRoute
? createRenderEdgeFunction(
...serverBundles.map(bundle => {
const firstRoute = remixConfig.routes[bundle.routes[0]];
const config = resolvedConfigsMap.get(firstRoute) ?? {
runtime: 'nodejs',
};
if (config.runtime === 'edge') {
return createRenderEdgeFunction(
entrypointFsDirname,
repoRootPath,
join(entrypointFsDirname, serverBuildPath),
remixConfig.serverEntryPoint
)
: undefined,
join(entrypointFsDirname, bundle.serverBuildPath),
remixConfig.serverEntryPoint,
remixVersion,
config
);
}
return createRenderNodeFunction(
nodeVersion,
entrypointFsDirname,
repoRootPath,
join(entrypointFsDirname, bundle.serverBuildPath),
remixConfig.serverEntryPoint,
remixVersion,
config
);
}),
]);
const output: BuildResultV2Typical['output'] = staticFiles;
@@ -236,7 +331,7 @@ module.exports = config;`;
// Layout routes don't get a function / route added
if (isLayoutRoute(route.id, remixRoutes)) continue;
const path = getPathFromRoute(route, remixConfig.routes);
const { path, rePath } = getPathFromRoute(route, remixConfig.routes);
// If the route is a pathless layout route (at the root level)
// and doesn't have any sub-routes, then a function should not be created.
@@ -244,30 +339,29 @@ module.exports = config;`;
continue;
}
let isEdge = false;
for (const currentRoute of getRouteIterator(route, remixConfig.routes)) {
const staticConfig = staticConfigsMap.get(currentRoute);
if (staticConfig?.runtime) {
isEdge = isEdgeRuntime(staticConfig.runtime);
break;
}
const funcIndex = serverBundles.findIndex(bundle => {
return bundle.routes.includes(route.id);
});
const func = functions[funcIndex];
if (!func) {
throw new Error(`Could not determine server bundle for "${route.id}"`);
}
const fn =
isEdge && edgeFunction
output[path] =
func instanceof EdgeFunction
? // `EdgeFunction` currently requires the "name" property to be set.
// Ideally this property will be removed, at which point we can
// return the same `edgeFunction` instance instead of creating a
// new one for each page.
new EdgeFunction({
...edgeFunction,
...func,
name: path,
})
: nodeFunction;
output[path] = fn;
: func;
// If this is a dynamic route then add a Vercel route
const re = getRegExpFromPath(path);
const re = getRegExpFromPath(rePath);
if (re) {
routes.push({
src: re.source,
@@ -277,18 +371,27 @@ module.exports = config;`;
}
// Add a 404 path for not found pages to be server-side rendered by Remix.
// Use the edge function if one was generated, otherwise use Node.js.
// Use an edge function bundle if one was generated, otherwise use Node.js.
if (!output['404']) {
output['404'] = edgeFunction
? new EdgeFunction({ ...edgeFunction, name: '404' })
: nodeFunction;
const edgeFunctionIndex = Array.from(serverBundlesMap.values()).findIndex(
routes => {
const runtime = resolvedConfigsMap.get(routes[0])?.runtime;
return runtime === 'edge';
}
);
const func =
edgeFunctionIndex !== -1 ? functions[edgeFunctionIndex] : functions[0];
output['404'] =
func instanceof EdgeFunction
? new EdgeFunction({ ...func, name: '404' })
: func;
}
routes.push({
src: '/(.*)',
dest: '/404',
});
return { routes, output };
return { routes, output, framework: { version: remixVersion } };
};
function hasScript(scriptName: string, pkg: PackageJson | null) {
@@ -297,23 +400,33 @@ function hasScript(scriptName: string, pkg: PackageJson | null) {
}
async function createRenderNodeFunction(
nodeVersion: NodeVersion,
entrypointDir: string,
rootDir: string,
serverBuildPath: string,
serverEntryPoint: string | undefined,
nodeVersion: NodeVersion
remixVersion: string,
config: ResolvedNodeRouteConfig
): Promise<NodejsLambda> {
const files: Files = {};
let handler = relative(rootDir, serverBuildPath);
let handlerPath = join(rootDir, handler);
if (!serverEntryPoint) {
handler = join(dirname(handler), 'server-node.mjs');
const baseServerBuildPath = basename(serverBuildPath, '.js');
handler = join(dirname(handler), `server-${baseServerBuildPath}.mjs`);
handlerPath = join(rootDir, handler);
// Copy the `server-node.mjs` file into the "build" directory
const sourceHandlerPath = join(__dirname, '../server-node.mjs');
await fs.copyFile(sourceHandlerPath, handlerPath);
const nodeServerSrc = await nodeServerSrcPromise;
await writeEntrypointFile(
handlerPath,
nodeServerSrc.replace(
'@remix-run/dev/server-build',
`./${baseServerBuildPath}.js`
),
rootDir
);
}
// Trace the handler with `@vercel/nft`
@@ -338,6 +451,13 @@ async function createRenderNodeFunction(
shouldAddSourcemapSupport: false,
operationType: 'SSR',
experimentalResponseStreaming: true,
regions: config.regions,
memory: config.memory,
maxDuration: config.maxDuration,
framework: {
slug: 'remix',
version: remixVersion,
},
});
return fn;
@@ -347,19 +467,29 @@ async function createRenderEdgeFunction(
entrypointDir: string,
rootDir: string,
serverBuildPath: string,
serverEntryPoint: string | undefined
serverEntryPoint: string | undefined,
remixVersion: string,
config: ResolvedEdgeRouteConfig
): Promise<EdgeFunction> {
const files: Files = {};
let handler = relative(rootDir, serverBuildPath);
let handlerPath = join(rootDir, handler);
if (!serverEntryPoint) {
handler = join(dirname(handler), 'server-edge.mjs');
const baseServerBuildPath = basename(serverBuildPath, '.js');
handler = join(dirname(handler), `server-${baseServerBuildPath}.mjs`);
handlerPath = join(rootDir, handler);
// Copy the `server-edge.mjs` file into the "build" directory
const sourceHandlerPath = join(__dirname, '../server-edge.mjs');
await fs.copyFile(sourceHandlerPath, handlerPath);
const edgeServerSrc = await edgeServerSrcPromise;
await writeEntrypointFile(
handlerPath,
edgeServerSrc.replace(
'@remix-run/dev/server-build',
`./${baseServerBuildPath}.js`
),
rootDir
);
}
let remixRunVercelPkgJson: string | undefined;
@@ -447,18 +577,30 @@ async function createRenderEdgeFunction(
deploymentTarget: 'v8-worker',
name: 'render',
entrypoint: handler,
regions: config.regions,
framework: {
slug: 'remix',
version: remixVersion,
},
});
return fn;
}
async function ensureResolvable(start: string, base: string, pkgName: string) {
async function ensureResolvable(
start: string,
base: string,
pkgName: string
): Promise<string> {
try {
const resolvedPath = _require.resolve(pkgName, { paths: [start] });
const resolvedPkgPath = _require.resolve(`${pkgName}/package.json`, {
paths: [start],
});
const resolvedPath = dirname(resolvedPkgPath);
if (!relative(base, resolvedPath).startsWith(`..${sep}`)) {
// Resolved path is within the root of the project, so all good
debug(`"${pkgName}" resolved to '${resolvedPath}'`);
return;
return resolvedPath;
}
} catch (err: any) {
if (err.code !== 'MODULE_NOT_FOUND') {
@@ -481,15 +623,8 @@ async function ensureResolvable(start: string, base: string, pkgName: string) {
const match = packages.find(p => p.startsWith(prefix));
if (match) {
const pkgDir = join(pnpmDir, match, 'node_modules', pkgName);
const symlinkPath = join(pnpmDir, '..', pkgName);
const symlinkDir = dirname(symlinkPath);
const symlinkTarget = relative(symlinkDir, pkgDir);
await fs.mkdir(symlinkDir, { recursive: true });
await fs.symlink(symlinkTarget, symlinkPath);
console.warn(
`WARN: Created symlink for "${pkgName}". To silence this warning, add "${pkgName}" to "dependencies" in your \`package.json\` file.`
);
return;
await ensureSymlink(pkgDir, join(pnpmDir, '..'), pkgName);
return pkgDir;
}
}
@@ -506,15 +641,8 @@ async function ensureResolvable(start: string, base: string, pkgName: string) {
const match = packages.find(p => p.startsWith(prefix));
if (match) {
const pkgDir = join(prefixDir, match, 'node_modules', pkgName);
const symlinkPath = join(npmDir, '..', pkgName);
const symlinkDir = dirname(symlinkPath);
const symlinkTarget = relative(symlinkDir, pkgDir);
await fs.mkdir(symlinkDir, { recursive: true });
await fs.symlink(symlinkTarget, symlinkPath);
console.warn(
`WARN: Created symlink for "${pkgName}". To silence this warning, add "${pkgName}" to "dependencies" in your \`package.json\` file.`
);
return;
await ensureSymlink(pkgDir, join(npmDir, '..'), pkgName);
return pkgDir;
}
}
@@ -523,8 +651,35 @@ async function ensureResolvable(start: string, base: string, pkgName: string) {
);
}
function isEdgeRuntime(runtime: string): boolean {
return runtime === 'edge' || runtime === 'experimental-edge';
async function ensureSymlink(
target: string,
nodeModulesDir: string,
pkgName: string
) {
const symlinkPath = join(nodeModulesDir, pkgName);
const symlinkDir = dirname(symlinkPath);
const relativeTarget = relative(symlinkDir, target);
try {
const existingTarget = await fs.readlink(symlinkPath);
if (existingTarget === relativeTarget) {
// Symlink is already the expected value, so do nothing
return;
} else {
// If a symlink already exists then delete it if the target doesn't match
await fs.unlink(symlinkPath);
}
} catch (err: any) {
// Ignore when path does not exist or is not a symlink
if (err.code !== 'ENOENT' && err.code !== 'EINVAL') {
throw err;
}
}
await fs.symlink(relativeTarget, symlinkPath);
console.warn(
`WARN: Created symlink for "${pkgName}". To silence this warning, add "${pkgName}" to "dependencies" in your \`package.json\` file.`
);
}
async function chdirAndReadConfig(dir: string) {
@@ -538,3 +693,23 @@ async function chdirAndReadConfig(dir: string) {
}
return remixConfig;
}
async function writeEntrypointFile(
path: string,
data: string,
rootDir: string
) {
try {
await fs.writeFile(path, data);
} catch (err: any) {
if (err.code === 'ENOENT') {
throw new Error(
`The "${relative(
rootDir,
dirname(path)
)}" directory does not exist. Please contact support@vercel.com.`
);
}
throw err;
}
}

View File

@@ -5,6 +5,37 @@ import type {
ConfigRoute,
RouteManifest,
} from '@remix-run/dev/dist/config/routes';
import type { BaseFunctionConfig } from '@vercel/static-config';
export interface ResolvedNodeRouteConfig {
runtime: 'nodejs';
regions?: string[];
maxDuration?: number;
memory?: number;
}
export interface ResolvedEdgeRouteConfig {
runtime: 'edge';
regions?: BaseFunctionConfig['regions'];
}
export type ResolvedRouteConfig =
| ResolvedNodeRouteConfig
| ResolvedEdgeRouteConfig;
export interface ResolvedRoutePaths {
/**
* The full URL path of the route, as will be shown
* on the Functions tab in the deployment inspector.
*/
path: string;
/**
* The full URL path of the route, but with syntax that
* is compatible with the `path-to-regexp` module.
*/
rePath: string;
}
const SPLAT_PATH = '/:params+';
const configExts = ['.js', '.cjs', '.mjs'];
@@ -18,6 +49,60 @@ export function findConfig(dir: string, basename: string): string | undefined {
return undefined;
}
function isEdgeRuntime(runtime: string): boolean {
return runtime === 'edge' || runtime === 'experimental-edge';
}
export function getResolvedRouteConfig(
route: ConfigRoute,
routes: RouteManifest,
configs: Map<ConfigRoute, BaseFunctionConfig | null>
): ResolvedRouteConfig {
let runtime: ResolvedRouteConfig['runtime'] | undefined;
let regions: ResolvedRouteConfig['regions'];
let maxDuration: ResolvedNodeRouteConfig['maxDuration'];
let memory: ResolvedNodeRouteConfig['memory'];
for (const currentRoute of getRouteIterator(route, routes)) {
const staticConfig = configs.get(currentRoute);
if (staticConfig) {
if (typeof runtime === 'undefined' && staticConfig.runtime) {
runtime = isEdgeRuntime(staticConfig.runtime) ? 'edge' : 'nodejs';
}
if (typeof regions === 'undefined') {
regions = staticConfig.regions;
}
if (typeof maxDuration === 'undefined') {
maxDuration = staticConfig.maxDuration;
}
if (typeof memory === 'undefined') {
memory = staticConfig.memory;
}
}
}
if (Array.isArray(regions)) {
regions = Array.from(new Set(regions)).sort();
}
if (runtime === 'edge') {
return { runtime, regions };
}
if (regions && !Array.isArray(regions)) {
throw new Error(
`"regions" for route "${route.id}" must be an array of strings`
);
}
return { runtime: 'nodejs', regions, maxDuration, memory };
}
export function calculateRouteConfigHash(config: ResolvedRouteConfig): string {
const str = JSON.stringify(config);
return Buffer.from(str).toString('base64url');
}
export function isLayoutRoute(
routeId: string,
routes: Pick<ConfigRoute, 'id' | 'parentId'>[]
@@ -40,25 +125,39 @@ export function* getRouteIterator(route: ConfigRoute, routes: RouteManifest) {
export function getPathFromRoute(
route: ConfigRoute,
routes: RouteManifest
): string {
if (route.id === 'root' || (route.parentId === 'root' && route.index)) {
return 'index';
): ResolvedRoutePaths {
if (
route.id === 'root' ||
(route.parentId === 'root' && !route.path && route.index)
) {
return { path: 'index', rePath: '/index' };
}
const pathParts: string[] = [];
const rePathParts: string[] = [];
for (const currentRoute of getRouteIterator(route, routes)) {
if (currentRoute.path) pathParts.push(currentRoute.path);
if (!currentRoute.path) continue;
pathParts.push(
currentRoute.path.replace(/:(.+)\?/g, (_, name) => `(:${name})`)
);
rePathParts.push(currentRoute.path);
}
const path = pathParts.reverse().join('/');
return path;
// Replace "/*" at the end to handle "splat routes"
let rePath = rePathParts.reverse().join('/');
rePath =
rePath === '*' ? SPLAT_PATH : `/${rePath.replace(/\/\*$/, SPLAT_PATH)}`;
return { path, rePath };
}
export function getRegExpFromPath(path: string): RegExp | false {
export function getRegExpFromPath(rePath: string): RegExp | false {
const keys: Key[] = [];
// Replace "/*" at the end to handle "splat routes"
const splatPath = '/:params+';
const rePath =
path === '*' ? splatPath : `/${path.replace(/\/\*$/, splatPath)}`;
const re = pathToRegexp(rePath, keys);
return keys.length > 0 ? re : false;
}

View File

@@ -0,0 +1,20 @@
// Edge functions can not use child processes, but this is route
// uses Node.js. So this is here to verify that bundle splitting
// is working correctly (because this route should not exist in
// the Edge bundle).
import { exec } from 'child_process';
import { json } from '@remix-run/node';
export async function loader() {
const hi = await new Promise<string>((resolve, reject) => {
exec(
`echo hi from the B page running in ${process.env.VERCEL_REGION}`,
(err, stdout) => {
if (err) return reject(err);
resolve(stdout);
}
);
});
return json({ hi });
}

View File

@@ -1,7 +1,16 @@
import { loader } from '~/b.server';
import { useLoaderData } from '@remix-run/react';
export const config = { regions: ['sfo1'] };
export { loader };
export default function B() {
const { hi } = useLoaderData<typeof loader>();
return (
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.4" }}>
<h1>B page</h1>
<p>{hi}</p>
</div>
);
}

View File

@@ -0,0 +1,8 @@
import { LoaderFunction } from '@remix-run/node';
export const loader: LoaderFunction = ({ request }) => {
const { pathname } = new URL(request.url);
return new Response(`this is a text file served at: ${pathname}`, {
headers: { 'content-type': 'text/plain' },
});
};

View File

@@ -1,18 +1,8 @@
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/remix",
"config": {
"zeroConfig": true
}
}
],
"probes": [
{ "path": "/", "mustContain": "Welcome to Remix" },
{ "path": "/edge", "mustContain": "Welcome to Remix@Edge" },
{ "path": "/b", "mustContain": "B page" },
{ "path": "/b", "mustContain": "hi from the B page running in sfo1" },
{ "path": "/nested", "mustContain": "Nested index page" },
{ "path": "/nested/another", "mustContain": "Nested another page" },
{ "path": "/nested/index", "status": 404, "mustContain": "Not Found" },
@@ -47,6 +37,15 @@
"responseHeaders": {
"set-cookie": ["hello=world", "foo=bar"]
}
},
{
"path": "/text.txt",
"mustContain": "this is a text file served at: /text.txt"
},
{
"path": "/text-txt",
"status": 404,
"mustContain": "Not Found"
}
]
}

View File

@@ -1,14 +1,4 @@
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/remix",
"config": {
"zeroConfig": true
}
}
],
"probes": [
{ "path": "/", "mustContain": "Welcome to Remix" },
{ "path": "/edge", "mustContain": "Welcome to Remix@Edge" },

View File

@@ -10,13 +10,13 @@
"start": "remix-serve build"
},
"dependencies": {
"@remix-run/react": "^1.7.4",
"@remix-run/serve": "^1.7.4",
"@remix-run/react": "1.5.0",
"@remix-run/serve": "1.5.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^1.7.4",
"@remix-run/dev": "1.5.0",
"@types/react": "^17.0.45",
"@types/react-dom": "^17.0.17",
"typescript": "^4.6.4"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
{
"probes": [
{
"path": "/",
"mustContain": "Welcome to Remix",
"logMustContain": "WARN: Created symlink for \"@remix-run/node\". To silence this warning, add \"@remix-run/node\" to \"dependencies\" in your `package.json` file"
},
{
"path": "/edge",
"mustContain": "Welcome to Remix@Edge",
"logMustContain": "WARN: Created symlink for \"@remix-run/server-runtime\". To silence this warning, add \"@remix-run/server-runtime\" to \"dependencies\" in your `package.json` file"
},
{ "path": "/b", "mustContain": "B page" },
{ "path": "/nested", "mustContain": "Nested index page" },
{ "path": "/nested/another", "mustContain": "Nested another page" },
{ "path": "/nested/index", "mustContain": "<div>nested/index</div>" },
{ "path": "/asdf", "mustContain": "<div>asdf</div>" }
]
}

View File

@@ -1,21 +0,0 @@
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/remix",
"config": {
"zeroConfig": true
}
}
],
"probes": [
{ "path": "/", "mustContain": "Welcome to Remix" },
{ "path": "/edge", "mustContain": "Welcome to Remix@Edge" },
{ "path": "/b", "mustContain": "B page" },
{ "path": "/nested", "mustContain": "Nested index page" },
{ "path": "/nested/another", "mustContain": "Nested another page" },
{ "path": "/nested/index", "mustContain": "<div>nested/index</div>" },
{ "path": "/asdf", "mustContain": "<div>asdf</div>" }
]
}

View File

@@ -0,0 +1,19 @@
{
"probes": [
{
"path": "/",
"mustContain": "Welcome to Remix",
"logMustContain": "WARN: Created symlink for \"@remix-run/node\". To silence this warning, add \"@remix-run/node\" to \"dependencies\" in your `package.json` file"
},
{
"path": "/edge",
"mustContain": "Welcome to Remix@Edge",
"logMustContain": "WARN: Created symlink for \"@remix-run/server-runtime\". To silence this warning, add \"@remix-run/server-runtime\" to \"dependencies\" in your `package.json` file"
},
{ "path": "/b", "mustContain": "B page" },
{ "path": "/nested", "mustContain": "Nested index page" },
{ "path": "/nested/another", "mustContain": "Nested another page" },
{ "path": "/nested/index", "mustContain": "Not Found" },
{ "path": "/asdf", "mustContain": "Not Found" }
]
}

View File

@@ -1,27 +1,8 @@
{
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@vercel/remix",
"config": {
"installCommand": "npm install --install-strategy=linked",
"zeroConfig": true
}
}
],
"installCommand": "npm install --install-strategy=linked && ln -sf broken 'node_modules/@remix-run/server-runtime'",
"build": {
"env": {
"ENABLE_EXPERIMENTAL_COREPACK": "1"
}
},
"probes": [
{ "path": "/", "mustContain": "Welcome to Remix" },
{ "path": "/edge", "mustContain": "Welcome to Remix@Edge" },
{ "path": "/b", "mustContain": "B page" },
{ "path": "/nested", "mustContain": "Nested index page" },
{ "path": "/nested/another", "mustContain": "Nested another page" },
{ "path": "/nested/index", "mustContain": "Not Found" },
{ "path": "/asdf", "mustContain": "Not Found" }
]
}
}

View File

@@ -0,0 +1 @@
.vercel

View File

@@ -0,0 +1,4 @@
import {RemixBrowser} from '@remix-run/react'
import {hydrateRoot} from 'react-dom/client'
hydrateRoot(document, <RemixBrowser />)

View File

@@ -0,0 +1,20 @@
import ReactDOMServer from 'react-dom/server'
import {RemixServer} from '@remix-run/react'
export default function handleRequest(
request,
responseStatusCode,
responseHeaders,
remixContext,
) {
const markup = ReactDOMServer.renderToString(
<RemixServer context={remixContext} url={request.url} />,
)
responseHeaders.set('Content-Type', 'text/html')
return new Response(`<!DOCTYPE html>${markup}`, {
status: responseStatusCode,
headers: responseHeaders,
})
}

View File

@@ -0,0 +1,18 @@
import * as React from 'react'
import {Scripts} from '@remix-run/react'
export default function App() {
const [count, setCount] = React.useState(0)
return (
<html>
<head>
<title>My First Remix App</title>
</head>
<body>
<p>This is a remix app. Hooray!</p>
<button onClick={() => setCount(c => c + 1)}>{count}</button>
<Scripts />
</body>
</html>
)
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
{
"name": "05-root-only",
"private": "true",
"main": "index.js",
"scripts": {
"build": "remix build"
},
"dependencies": {
"@remix-run/node": "^1.14.0",
"@remix-run/react": "^1.14.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^1.14.0"
}
}

View File

@@ -0,0 +1,3 @@
{
"probes": [{ "path": "/", "mustContain": "This is a remix app. Hooray!" }]
}

View File

@@ -0,0 +1 @@
module.exports = {};

View File

@@ -0,0 +1 @@
.vercel

View File

@@ -0,0 +1,4 @@
import {RemixBrowser} from '@remix-run/react'
import {hydrateRoot} from 'react-dom/client'
hydrateRoot(document, <RemixBrowser />)

View File

@@ -0,0 +1,20 @@
import ReactDOMServer from 'react-dom/server'
import {RemixServer} from '@remix-run/react'
export default function handleRequest(
request,
responseStatusCode,
responseHeaders,
remixContext,
) {
const markup = ReactDOMServer.renderToString(
<RemixServer context={remixContext} url={request.url} />,
)
responseHeaders.set('Content-Type', 'text/html')
return new Response(`<!DOCTYPE html>${markup}`, {
status: responseStatusCode,
headers: responseHeaders,
})
}

View File

@@ -0,0 +1,16 @@
import * as React from 'react'
import {Scripts, Outlet} from '@remix-run/react'
export default function Root() {
return (
<html>
<head>
<title>My Remix App</title>
</head>
<body>
<Outlet />
<Scripts />
</body>
</html>
)
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export default function Index () {
return <h1>Index</h1>
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export default function Foo () {
return <h1>Foo</h1>
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export default function FuzzBuzz2 () {
return <h1>Fuzz Buzz 2</h1>
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export default function FuzzBuzz () {
return <h1>Fuzz Buzz</h1>
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export default function NestedIndex () {
return <h1>Nested Index</h1>
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
{
"name": "05-root-only",
"private": "true",
"main": "index.js",
"scripts": {
"build": "remix build"
},
"dependencies": {
"@remix-run/node": "^1.14.0",
"@remix-run/react": "^1.14.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^1.14.0"
}
}

View File

@@ -0,0 +1,9 @@
{
"probes": [
{ "path": "/", "mustContain": "Index" },
{ "path": "/foo", "mustContain": "Foo" },
{ "path": "/nested", "mustContain": "Nested Index" },
{ "path": "/fuzz/buzz", "mustContain": "Fuzz Buzz" },
{ "path": "/fuzz/buzz-2", "mustContain": "Fuzz Buzz 2" }
]
}

View File

@@ -0,0 +1,5 @@
module.exports = {
future: {
v2_routeConvention: true,
},
};

View File

@@ -72,23 +72,92 @@ describe('getPathFromRoute()', () => {
parentId: 'root',
file: 'routes/$.tsx',
},
'routes/nested/index': {
path: 'nested',
index: true,
caseSensitive: undefined,
id: 'routes/nested/index',
parentId: 'root',
file: 'routes/nested/index.tsx',
},
'routes/($lang)/index': {
path: ':lang?',
index: true,
caseSensitive: undefined,
id: 'routes/($lang)/index',
parentId: 'root',
file: 'routes/($lang)/index.tsx',
},
'routes/($lang)/other': {
path: ':lang?/other',
index: undefined,
caseSensitive: undefined,
id: 'routes/($lang)/other',
parentId: 'root',
file: 'routes/($lang)/other.tsx',
},
'routes/($lang)/$pid': {
path: ':lang?/:pid',
index: undefined,
caseSensitive: undefined,
id: 'routes/($lang)/$pid',
parentId: 'root',
file: 'routes/($lang)/$pid.tsx',
},
};
it.each([
{ id: 'root', expected: 'index' },
{ id: 'routes/__pathless', expected: '' },
{ id: 'routes/index', expected: 'index' },
{ id: 'routes/api.hello', expected: 'api/hello' },
{ id: 'routes/projects', expected: 'projects' },
{ id: 'routes/projects/__pathless', expected: 'projects' },
{ id: 'routes/projects/index', expected: 'projects' },
{ id: 'routes/projects/create', expected: 'projects/create' },
{ id: 'routes/projects/$', expected: 'projects/*' },
{ id: 'routes/$foo.$bar.$baz', expected: ':foo/:bar/:baz' },
{ id: 'routes/node', expected: 'node' },
{ id: 'routes/$', expected: '*' },
{ id: 'root', expected: { path: 'index', rePath: '/index' } },
{ id: 'routes/__pathless', expected: { path: '', rePath: '/' } },
{ id: 'routes/index', expected: { path: 'index', rePath: '/index' } },
{
id: 'routes/api.hello',
expected: { path: 'api/hello', rePath: '/api/hello' },
},
{
id: 'routes/nested/index',
expected: { path: 'nested', rePath: '/nested' },
},
{
id: 'routes/projects',
expected: { path: 'projects', rePath: '/projects' },
},
{
id: 'routes/projects/__pathless',
expected: { path: 'projects', rePath: '/projects' },
},
{
id: 'routes/projects/index',
expected: { path: 'projects', rePath: '/projects' },
},
{
id: 'routes/projects/create',
expected: { path: 'projects/create', rePath: '/projects/create' },
},
{
id: 'routes/projects/$',
expected: { path: 'projects/*', rePath: '/projects/:params+' },
},
{
id: 'routes/$foo.$bar.$baz',
expected: { path: ':foo/:bar/:baz', rePath: '/:foo/:bar/:baz' },
},
{ id: 'routes/node', expected: { path: 'node', rePath: '/node' } },
{ id: 'routes/$', expected: { path: '*', rePath: '/:params+' } },
{
id: 'routes/($lang)/index',
expected: { path: '(:lang)', rePath: '/:lang?' },
},
{
id: 'routes/($lang)/other',
expected: { path: '(:lang)/other', rePath: '/:lang?/other' },
},
{
id: 'routes/($lang)/$pid',
expected: { path: '(:lang)/:pid', rePath: '/:lang?/:pid' },
},
])('should return `$expected` for "$id" route', ({ id, expected }) => {
const route = routes[id];
expect(getPathFromRoute(route, routes)).toEqual(expected);
expect(getPathFromRoute(route, routes)).toMatchObject(expected);
});
});

View File

@@ -2,17 +2,18 @@ import { getRegExpFromPath } from '../src/utils';
describe('getRegExpFromPath()', () => {
describe('paths without parameters', () => {
it.each([{ path: 'index' }, { path: 'api/hello' }, { path: 'projects' }])(
'should return `false` for "$path"',
({ path }) => {
expect(getRegExpFromPath(path)).toEqual(false);
}
);
it.each([
{ path: '/index' },
{ path: '/api/hello' },
{ path: '/projects' },
])('should return `false` for "$path"', ({ path }) => {
expect(getRegExpFromPath(path)).toEqual(false);
});
});
describe.each([
{
path: '*',
path: '/:params+',
urls: [
{
url: '/',
@@ -37,7 +38,7 @@ describe('getRegExpFromPath()', () => {
],
},
{
path: 'projects/*',
path: '/projects/:params+',
urls: [
{
url: '/',
@@ -58,7 +59,7 @@ describe('getRegExpFromPath()', () => {
],
},
{
path: ':foo',
path: '/:foo',
urls: [
{
url: '/',
@@ -79,7 +80,7 @@ describe('getRegExpFromPath()', () => {
],
},
{
path: 'blog/:id/edit',
path: '/blog/:id/edit',
urls: [
{
url: '/',
@@ -107,6 +108,65 @@ describe('getRegExpFromPath()', () => {
},
],
},
{
path: '/:lang?',
urls: [
{
url: '/',
expected: true,
},
{
url: '/en',
expected: true,
},
{
url: '/en/other',
expected: false,
},
],
},
{
path: '/:lang?/other',
urls: [
{
url: '/other',
expected: true,
},
{
url: '/en/other',
expected: true,
},
{
url: '/',
expected: false,
},
{
url: '/another',
expected: false,
},
],
},
{
path: '/:lang?/:pid',
urls: [
{
url: '/123',
expected: true,
},
{
url: '/en/123',
expected: true,
},
{
url: '/',
expected: false,
},
{
url: '/en/foo/bar',
expected: false,
},
],
},
])('with path "$path"', ({ path, urls }) => {
const re = getRegExpFromPath(path) as RegExp;

View File

@@ -0,0 +1,76 @@
import { getResolvedRouteConfig } from '../src/utils';
import type {
ConfigRoute,
RouteManifest,
} from '@remix-run/dev/dist/config/routes';
import type { BaseFunctionConfig } from '@vercel/static-config';
describe('getResolvedRouteConfig()', () => {
const staticConfigsMap = new Map<ConfigRoute, BaseFunctionConfig | null>([
[{ id: 'root', file: 'root.tsx' }, null],
[
{ id: 'routes/edge', file: 'routes/edge.tsx', parentId: 'root' },
{ runtime: 'edge' },
],
[
{
id: 'routes/edge/sfo1',
file: 'routes/edge/sfo1.tsx',
parentId: 'routes/edge',
},
{ regions: ['sfo1'] },
],
[
{
id: 'routes/edge/iad1',
file: 'routes/edge/iad1.tsx',
parentId: 'routes/edge',
},
{ regions: ['iad1'] },
],
[
{ id: 'routes/node', file: 'routes/node.tsx' },
{ runtime: 'nodejs', regions: ['sfo1'] },
],
[
{
id: 'routes/node/mem',
file: 'routes/node/mem.tsx',
parentId: 'routes/node',
},
{ maxDuration: 5, memory: 3008 },
],
]);
const routes: RouteManifest = {};
for (const route of staticConfigsMap.keys()) {
routes[route.id] = route;
}
it.each([
{ id: 'root', expected: { runtime: 'nodejs' } },
{ id: 'routes/edge', expected: { runtime: 'edge' } },
{
id: 'routes/edge/sfo1',
expected: { runtime: 'edge', regions: ['sfo1'] },
},
{
id: 'routes/edge/iad1',
expected: { runtime: 'edge', regions: ['iad1'] },
},
{ id: 'routes/node', expected: { runtime: 'nodejs', regions: ['sfo1'] } },
{
id: 'routes/node/mem',
expected: {
runtime: 'nodejs',
regions: ['sfo1'],
maxDuration: 5,
memory: 3008,
},
},
])('should resolve config for "$id" route', ({ id, expected }) => {
const route = routes[id];
const config = getResolvedRouteConfig(route, routes, staticConfigsMap);
expect(config).toMatchObject(expected);
});
});

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "1.3.13",
"version": "1.3.14",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -29,8 +29,8 @@
}
},
"dependencies": {
"@vercel/gatsby-plugin-vercel-analytics": "1.0.7",
"@vercel/gatsby-plugin-vercel-builder": "1.1.10"
"@vercel/gatsby-plugin-vercel-analytics": "1.0.8",
"@vercel/gatsby-plugin-vercel-builder": "1.1.11"
},
"devDependencies": {
"@types/aws-lambda": "8.10.64",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"gatsby": "4.25.2",
"gatsby": "4.25.4",
"gatsby-plugin-image": "^2.21.0",
"gatsby-plugin-manifest": "^4.21.0",
"gatsby-plugin-pnpm": "1.2.10",

View File

@@ -4,7 +4,7 @@ importers:
.:
specifiers:
gatsby: 4.25.2
gatsby: 4.25.4
gatsby-plugin-image: ^2.21.0
gatsby-plugin-manifest: ^4.21.0
gatsby-plugin-pnpm: 1.2.10
@@ -15,13 +15,13 @@ importers:
react: ^18.1.0
react-dom: ^18.1.0
dependencies:
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby-plugin-image: 2.25.0_ydhzldbgycgmvbrpalo2wmdfge
gatsby-plugin-manifest: 4.25.0_gatsby@4.25.2
gatsby-plugin-pnpm: 1.2.10_gatsby@4.25.2
gatsby-plugin-sharp: 4.25.0_gatsby@4.25.2
gatsby-source-filesystem: 4.25.0_gatsby@4.25.2
gatsby-transformer-sharp: 4.25.0_6zi7tjmr4qfzq3ejpz7sb2ox7u
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-plugin-image: 2.25.0_xaovy7gaxklfiuhcegdtqnpnhi
gatsby-plugin-manifest: 4.25.0_gatsby@4.25.4
gatsby-plugin-pnpm: 1.2.10_gatsby@4.25.4
gatsby-plugin-sharp: 4.25.0_gatsby@4.25.4
gatsby-source-filesystem: 4.25.0_gatsby@4.25.4
gatsby-transformer-sharp: 4.25.0_c4ebbafybzmh26iep5hpxccrn4
prop-types: 15.8.1
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
@@ -2330,6 +2330,10 @@ packages:
lodash.deburr: 4.1.0
dev: false
/@socket.io/component-emitter/3.1.0:
resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==}
dev: false
/@swc/helpers/0.4.14:
resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==}
dependencies:
@@ -2385,10 +2389,6 @@ packages:
resolution: {integrity: sha512-20R/mDpKSPWdJs5TOpz3e7zqbeCNuMCPhV7Yndk9KU2Rbij2r5W4RzwDPkzC+2lzUqXYu9rFzTktCBnDjHuNQg==}
dev: false
/@types/component-emitter/1.2.11:
resolution: {integrity: sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==}
dev: false
/@types/configstore/2.1.1:
resolution: {integrity: sha512-YY+hm3afkDHeSM2rsFXxeZtu0garnusBWNG1+7MknmDWQHqcH2w21/xOU9arJUi8ch4qyFklidANLCu3ihhVwQ==}
dev: false
@@ -2411,7 +2411,7 @@ packages:
resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==}
dependencies:
'@types/eslint': 8.4.10
'@types/estree': 0.0.51
'@types/estree': 1.0.0
dev: false
/@types/eslint/7.29.0:
@@ -2424,7 +2424,7 @@ packages:
/@types/eslint/8.4.10:
resolution: {integrity: sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==}
dependencies:
'@types/estree': 0.0.51
'@types/estree': 1.0.0
'@types/json-schema': 7.0.11
dev: false
@@ -2444,7 +2444,7 @@ packages:
resolution: {integrity: sha512-ATA/xrS7CZ3A2WCPVY4eKdNpybq56zqlTirnHhhyOztZM/lPxJzusOBI3BsaXbu6FrUluqzvMlI4sZ6BDYMlMg==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 8.10.66
'@types/node': 18.11.18
dev: false
/@types/http-cache-semantics/4.0.1:
@@ -2482,7 +2482,7 @@ packages:
/@types/mkdirp/0.5.2:
resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==}
dependencies:
'@types/node': 8.10.66
'@types/node': 18.11.18
dev: false
/@types/node-fetch/2.6.2:
@@ -2532,7 +2532,7 @@ packages:
resolution: {integrity: sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==}
dependencies:
'@types/glob': 5.0.37
'@types/node': 8.10.66
'@types/node': 18.11.18
dev: false
/@types/scheduler/0.16.2:
@@ -3180,7 +3180,7 @@ packages:
- supports-color
dev: false
/babel-plugin-remove-graphql-queries/4.25.0_b3vlds4jyvbln6bwxmbjhxwmje:
/babel-plugin-remove-graphql-queries/4.25.0_7b2zndudfh72txnvkexbyma2ty:
resolution: {integrity: sha512-enyqRNRrn7vTG3nwg1V+XhoAJIyUv3ZukQCs5KbHOK+WNDDiGZQzIG+FCiZFACScdZBJWyx7TYRYbOFJZ/KEGg==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -3190,11 +3190,11 @@ packages:
'@babel/core': 7.20.12
'@babel/runtime': 7.20.7
'@babel/types': 7.20.7
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
dev: false
/babel-plugin-remove-graphql-queries/4.25.0_gatsby@4.25.2:
/babel-plugin-remove-graphql-queries/4.25.0_gatsby@4.25.4:
resolution: {integrity: sha512-enyqRNRrn7vTG3nwg1V+XhoAJIyUv3ZukQCs5KbHOK+WNDDiGZQzIG+FCiZFACScdZBJWyx7TYRYbOFJZ/KEGg==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -3203,7 +3203,7 @@ packages:
dependencies:
'@babel/runtime': 7.20.7
'@babel/types': 7.20.7
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
dev: false
@@ -3280,10 +3280,6 @@ packages:
- supports-color
dev: false
/backo2/1.0.2:
resolution: {integrity: sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==}
dev: false
/balanced-match/1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: false
@@ -3294,11 +3290,6 @@ packages:
safe-buffer: 5.2.1
dev: false
/base64-arraybuffer/0.1.4:
resolution: {integrity: sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==}
engines: {node: '>= 0.6.0'}
dev: false
/base64-js/1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
dev: false
@@ -3771,10 +3762,6 @@ packages:
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
dev: false
/component-emitter/1.3.0:
resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==}
dev: false
/compressible/2.0.18:
resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==}
engines: {node: '>= 0.6'}
@@ -3857,7 +3844,7 @@ packages:
dev: false
/cookie-signature/1.0.6:
resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=}
resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==}
dev: false
/cookie/0.4.2:
@@ -4466,43 +4453,39 @@ packages:
once: 1.4.0
dev: false
/engine.io-client/4.1.4:
resolution: {integrity: sha512-843fqAdKeUMFqKi1sSjnR11tJ4wi8sIefu6+JC1OzkkJBmjtc/gM/rZ53tJfu5Iae/3gApm5veoS+v+gtT0+Fg==}
/engine.io-client/6.2.3:
resolution: {integrity: sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw==}
dependencies:
base64-arraybuffer: 0.1.4
component-emitter: 1.3.0
'@socket.io/component-emitter': 3.1.0
debug: 4.3.4
engine.io-parser: 4.0.3
has-cors: 1.1.0
parseqs: 0.0.6
parseuri: 0.0.6
ws: 7.4.6
xmlhttprequest-ssl: 1.6.3
yeast: 0.1.2
engine.io-parser: 5.0.6
ws: 8.2.3
xmlhttprequest-ssl: 2.0.0
transitivePeerDependencies:
- bufferutil
- supports-color
- utf-8-validate
dev: false
/engine.io-parser/4.0.3:
resolution: {integrity: sha512-xEAAY0msNnESNPc00e19y5heTPX4y/TJ36gr8t1voOaNmTojP9b3oK3BbJLFufW2XFPQaaijpFewm2g2Um3uqA==}
engines: {node: '>=8.0.0'}
dependencies:
base64-arraybuffer: 0.1.4
/engine.io-parser/5.0.6:
resolution: {integrity: sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==}
engines: {node: '>=10.0.0'}
dev: false
/engine.io/4.1.2:
resolution: {integrity: sha512-t5z6zjXuVLhXDMiFJPYsPOWEER8B0tIsD3ETgw19S1yg9zryvUfY3Vhtk3Gf4sihw/bQGIqQ//gjvVlu+Ca0bQ==}
/engine.io/6.2.1:
resolution: {integrity: sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==}
engines: {node: '>=10.0.0'}
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.13
'@types/node': 18.11.18
accepts: 1.3.8
base64id: 2.0.0
cookie: 0.4.2
cors: 2.8.5
debug: 4.3.4
engine.io-parser: 4.0.3
ws: 7.4.6
engine.io-parser: 5.0.6
ws: 8.2.3
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -5613,7 +5596,7 @@ packages:
'@parcel/transformer-json': 2.6.2_@parcel+core@2.6.2
dev: false
/gatsby-plugin-image/2.25.0_ydhzldbgycgmvbrpalo2wmdfge:
/gatsby-plugin-image/2.25.0_xaovy7gaxklfiuhcegdtqnpnhi:
resolution: {integrity: sha512-Q1TRjvBF7x50alS22i91rksl7A3g42S0jIdPEQcT9bl8MbFaJiboHGna/jp78nxm9vu4qtUJ1IziRSOu0bgHNQ==}
peerDependencies:
'@babel/core': ^7.12.3
@@ -5628,16 +5611,16 @@ packages:
'@babel/runtime': 7.20.7
'@babel/traverse': 7.20.12
babel-jsx-utils: 1.1.0
babel-plugin-remove-graphql-queries: 4.25.0_gatsby@4.25.2
babel-plugin-remove-graphql-queries: 4.25.0_gatsby@4.25.4
camelcase: 5.3.1
chokidar: 3.5.3
common-tags: 1.8.2
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
gatsby-plugin-sharp: 4.25.0_gatsby@4.25.2
gatsby-plugin-utils: 3.19.0_gatsby@4.25.2
gatsby-source-filesystem: 4.25.0_gatsby@4.25.2
gatsby-plugin-sharp: 4.25.0_gatsby@4.25.4
gatsby-plugin-utils: 3.19.0_gatsby@4.25.4
gatsby-source-filesystem: 4.25.0_gatsby@4.25.4
objectFitPolyfill: 2.3.5
prop-types: 15.8.1
react: 18.2.0
@@ -5647,23 +5630,23 @@ packages:
- supports-color
dev: false
/gatsby-plugin-manifest/4.25.0_gatsby@4.25.2:
/gatsby-plugin-manifest/4.25.0_gatsby@4.25.4:
resolution: {integrity: sha512-2n7v+TvhWUMoOJEaeiPDFsf9jvOImKLZpnzxE8e6ZeeoGeDngXSZhkkP3x2UYIknHtZXUUjFJh8BaVBXiB1dSQ==}
engines: {node: '>=14.15.0'}
peerDependencies:
gatsby: ^4.0.0-next
dependencies:
'@babel/runtime': 7.20.7
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
gatsby-plugin-utils: 3.19.0_gatsby@4.25.2
gatsby-plugin-utils: 3.19.0_gatsby@4.25.4
semver: 7.3.8
sharp: 0.30.7
transitivePeerDependencies:
- graphql
dev: false
/gatsby-plugin-page-creator/4.25.0_5nijmeqlgjulq3py6h447sls2a:
/gatsby-plugin-page-creator/4.25.0_ikkr2w7n6b7ns22fowdw6fv24e:
resolution: {integrity: sha512-plHek7xHSV9l1bLPa1JAnxzBqP7j2ihCPRwpBk/wIJAR8cG65wjAT+Nu8DKpW0+2/MYill84ns1r2m8g0L/7bg==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5675,10 +5658,10 @@ packages:
chokidar: 3.5.3
fs-exists-cached: 1.0.0
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
gatsby-page-utils: 2.25.0
gatsby-plugin-utils: 3.19.0_5nijmeqlgjulq3py6h447sls2a
gatsby-plugin-utils: 3.19.0_ikkr2w7n6b7ns22fowdw6fv24e
gatsby-telemetry: 3.25.0
globby: 11.1.0
lodash: 4.17.21
@@ -5688,17 +5671,17 @@ packages:
- supports-color
dev: false
/gatsby-plugin-pnpm/1.2.10_gatsby@4.25.2:
/gatsby-plugin-pnpm/1.2.10_gatsby@4.25.4:
resolution: {integrity: sha512-29xjIakNEUY42OBb3wI9Thmawr5EcUUOB3dB8nE51yr/TfKQFCREk+HAOATQHTNedG3VZhgU4wVjl2V3wgOXJA==}
peerDependencies:
gatsby: ~2.x.x || ~3.x.x || ~4.x.x
dependencies:
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
lodash.get: 4.4.2
lodash.uniq: 4.5.0
dev: false
/gatsby-plugin-sharp/4.25.0_gatsby@4.25.2:
/gatsby-plugin-sharp/4.25.0_gatsby@4.25.4:
resolution: {integrity: sha512-8XiSKibQyp6pOFHEkEdRCpoDA3Ywcq5PKftNMExZ51MormT0+WqRC7ynuU+0fzktDTbbSyREvblKa+21Id+rRA==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5710,9 +5693,9 @@ packages:
debug: 4.3.4
filenamify: 4.3.0
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
gatsby-plugin-utils: 3.19.0_gatsby@4.25.2
gatsby-plugin-utils: 3.19.0_gatsby@4.25.4
lodash: 4.17.21
probe-image-size: 7.2.3
semver: 7.3.8
@@ -5722,7 +5705,7 @@ packages:
- supports-color
dev: false
/gatsby-plugin-typescript/4.25.0_gatsby@4.25.2:
/gatsby-plugin-typescript/4.25.0_gatsby@4.25.4:
resolution: {integrity: sha512-8BTtiVWuIqIEGx/PBBMWd6FYPgel16hT3js7SMo5oI9K4EPsSxRItgRf41MTJGxRR20EhL4e99g2S8x0v1+odA==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5734,13 +5717,13 @@ packages:
'@babel/plugin-proposal-optional-chaining': 7.20.7_@babel+core@7.20.12
'@babel/preset-typescript': 7.18.6_@babel+core@7.20.12
'@babel/runtime': 7.20.7
babel-plugin-remove-graphql-queries: 4.25.0_b3vlds4jyvbln6bwxmbjhxwmje
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
babel-plugin-remove-graphql-queries: 4.25.0_7b2zndudfh72txnvkexbyma2ty
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
transitivePeerDependencies:
- supports-color
dev: false
/gatsby-plugin-utils/3.19.0_5nijmeqlgjulq3py6h447sls2a:
/gatsby-plugin-utils/3.19.0_gatsby@4.25.4:
resolution: {integrity: sha512-EZtvgHSU5NPbEn6a4cfSpEGCQ09SfwbhoybHTJKj1clop86HSwOCV2iH8RbCc+X6jbdgHaSZsfsl7zG1h7DBUw==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5750,17 +5733,16 @@ packages:
'@babel/runtime': 7.20.7
fastq: 1.15.0
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
gatsby-sharp: 0.19.0
graphql: 15.8.0
graphql-compose: 9.0.10_graphql@15.8.0
graphql-compose: 9.0.10
import-from: 4.0.0
joi: 17.7.0
mime: 3.0.0
dev: false
/gatsby-plugin-utils/3.19.0_gatsby@4.25.2:
/gatsby-plugin-utils/3.19.0_ikkr2w7n6b7ns22fowdw6fv24e:
resolution: {integrity: sha512-EZtvgHSU5NPbEn6a4cfSpEGCQ09SfwbhoybHTJKj1clop86HSwOCV2iH8RbCc+X6jbdgHaSZsfsl7zG1h7DBUw==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5770,10 +5752,11 @@ packages:
'@babel/runtime': 7.20.7
fastq: 1.15.0
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
gatsby-sharp: 0.19.0
graphql-compose: 9.0.10
graphql: 15.8.0
graphql-compose: 9.0.10_graphql@15.8.0
import-from: 4.0.0
joi: 17.7.0
mime: 3.0.0
@@ -5815,7 +5798,7 @@ packages:
sharp: 0.30.7
dev: false
/gatsby-source-filesystem/4.25.0_gatsby@4.25.2:
/gatsby-source-filesystem/4.25.0_gatsby@4.25.4:
resolution: {integrity: sha512-gja4++bPkYpnum4/TxFicr3zRHBArnM2HjT77EE4EuDhdl6qlJYr/heD09LIPN2jdR5gmPwMDjIZnuYZ/6j/aQ==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5825,7 +5808,7 @@ packages:
chokidar: 3.5.3
file-type: 16.5.4
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-core-utils: 3.25.0
md5-file: 5.0.0
mime: 2.6.0
@@ -5855,7 +5838,7 @@ packages:
- encoding
dev: false
/gatsby-transformer-sharp/4.25.0_6zi7tjmr4qfzq3ejpz7sb2ox7u:
/gatsby-transformer-sharp/4.25.0_c4ebbafybzmh26iep5hpxccrn4:
resolution: {integrity: sha512-7aqecTvOUFiNB96ij77UnAGJs7Un0TlkpamG//dSl6Nru9EylGz/NW/Eg0vioQyHLCYdMvd5xO8V3BOHJADsnw==}
engines: {node: '>=14.15.0'}
peerDependencies:
@@ -5866,9 +5849,9 @@ packages:
bluebird: 3.7.2
common-tags: 1.8.2
fs-extra: 10.1.0
gatsby: 4.25.2_biqbaboplfbrettd7655fr4n2y
gatsby-plugin-sharp: 4.25.0_gatsby@4.25.2
gatsby-plugin-utils: 3.19.0_gatsby@4.25.2
gatsby: 4.25.4_biqbaboplfbrettd7655fr4n2y
gatsby-plugin-sharp: 4.25.0_gatsby@4.25.4
gatsby-plugin-utils: 3.19.0_gatsby@4.25.4
probe-image-size: 7.2.3
semver: 7.3.8
sharp: 0.30.7
@@ -5887,8 +5870,8 @@ packages:
- supports-color
dev: false
/gatsby/4.25.2_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-HKSWRdTOK5IBFDDgCKiPXiyszfdTTGZ+pple6My6dQ5a5U+Gn1PpjBIiYj4Me9WJAveQzC7tChsqBVVt7r6few==}
/gatsby/4.25.4_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-4IGQ615FCJi/o9qTvyZeZ4Pr04y+zpmxr531/r8rcJK1fcPC3BFR8QGxCrPNxI4jST/Imu4oRYYhnja/VWBCNg==}
engines: {node: '>=14.15.0'}
hasBin: true
requiresBuild: true
@@ -5933,7 +5916,7 @@ packages:
babel-plugin-add-module-exports: 1.0.4
babel-plugin-dynamic-import-node: 2.3.3
babel-plugin-lodash: 3.3.4
babel-plugin-remove-graphql-queries: 4.25.0_b3vlds4jyvbln6bwxmbjhxwmje
babel-plugin-remove-graphql-queries: 4.25.0_7b2zndudfh72txnvkexbyma2ty
babel-preset-gatsby: 2.25.0_cmslh6tfftwpzuhidsdk3oqsoi
better-opn: 2.1.1
bluebird: 3.7.2
@@ -5983,9 +5966,9 @@ packages:
gatsby-link: 4.25.0_jrmehtgkntpgvrzvp7eiismjfa
gatsby-page-utils: 2.25.0
gatsby-parcel-config: 0.16.0_@parcel+core@2.6.2
gatsby-plugin-page-creator: 4.25.0_5nijmeqlgjulq3py6h447sls2a
gatsby-plugin-typescript: 4.25.0_gatsby@4.25.2
gatsby-plugin-utils: 3.19.0_5nijmeqlgjulq3py6h447sls2a
gatsby-plugin-page-creator: 4.25.0_ikkr2w7n6b7ns22fowdw6fv24e
gatsby-plugin-typescript: 4.25.0_gatsby@4.25.4
gatsby-plugin-utils: 3.19.0_ikkr2w7n6b7ns22fowdw6fv24e
gatsby-react-router-scroll: 5.25.0_jrmehtgkntpgvrzvp7eiismjfa
gatsby-script: 1.10.0_jrmehtgkntpgvrzvp7eiismjfa
gatsby-telemetry: 3.25.0
@@ -6043,8 +6026,8 @@ packages:
shallow-compare: 1.2.2
signal-exit: 3.0.7
slugify: 1.6.5
socket.io: 3.1.2
socket.io-client: 3.1.3
socket.io: 4.5.4
socket.io-client: 4.5.4
st: 2.0.0
stack-trace: 0.0.10
string-similarity: 1.2.2
@@ -6345,10 +6328,6 @@ packages:
resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}
dev: false
/has-cors/1.1.0:
resolution: {integrity: sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==}
dev: false
/has-flag/3.0.0:
resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
engines: {node: '>=4'}
@@ -7987,14 +7966,6 @@ packages:
parse-path: 7.0.0
dev: false
/parseqs/0.0.6:
resolution: {integrity: sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==}
dev: false
/parseuri/0.0.6:
resolution: {integrity: sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==}
dev: false
/parseurl/1.3.3:
resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
engines: {node: '>= 0.8'}
@@ -9303,51 +9274,44 @@ packages:
tslib: 2.4.1
dev: false
/socket.io-adapter/2.1.0:
resolution: {integrity: sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg==}
/socket.io-adapter/2.4.0:
resolution: {integrity: sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==}
dev: false
/socket.io-client/3.1.3:
resolution: {integrity: sha512-4sIGOGOmCg3AOgGi7EEr6ZkTZRkrXwub70bBB/F0JSkMOUFpA77WsL87o34DffQQ31PkbMUIadGOk+3tx1KGbw==}
/socket.io-client/4.5.4:
resolution: {integrity: sha512-ZpKteoA06RzkD32IbqILZ+Cnst4xewU7ZYK12aS1mzHftFFjpoMz69IuhP/nL25pJfao/amoPI527KnuhFm01g==}
engines: {node: '>=10.0.0'}
dependencies:
'@types/component-emitter': 1.2.11
backo2: 1.0.2
component-emitter: 1.3.0
'@socket.io/component-emitter': 3.1.0
debug: 4.3.4
engine.io-client: 4.1.4
parseuri: 0.0.6
socket.io-parser: 4.0.5
engine.io-client: 6.2.3
socket.io-parser: 4.2.2
transitivePeerDependencies:
- bufferutil
- supports-color
- utf-8-validate
dev: false
/socket.io-parser/4.0.5:
resolution: {integrity: sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==}
/socket.io-parser/4.2.2:
resolution: {integrity: sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw==}
engines: {node: '>=10.0.0'}
dependencies:
'@types/component-emitter': 1.2.11
component-emitter: 1.3.0
'@socket.io/component-emitter': 3.1.0
debug: 4.3.4
transitivePeerDependencies:
- supports-color
dev: false
/socket.io/3.1.2:
resolution: {integrity: sha512-JubKZnTQ4Z8G4IZWtaAZSiRP3I/inpy8c/Bsx2jrwGrTbKeVU5xd6qkKMHpChYeM3dWZSO0QACiGK+obhBNwYw==}
/socket.io/4.5.4:
resolution: {integrity: sha512-m3GC94iK9MfIEeIBfbhJs5BqFibMtkRk8ZpKwG2QwxV0m/eEhPIV4ara6XCF1LWNAus7z58RodiZlAH71U3EhQ==}
engines: {node: '>=10.0.0'}
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.13
'@types/node': 18.11.18
accepts: 1.3.8
base64id: 2.0.0
debug: 4.3.4
engine.io: 4.1.2
socket.io-adapter: 2.1.0
socket.io-parser: 4.0.5
engine.io: 6.2.1
socket.io-adapter: 2.4.0
socket.io-parser: 4.2.2
transitivePeerDependencies:
- bufferutil
- supports-color
@@ -10297,9 +10261,9 @@ packages:
typedarray-to-buffer: 3.1.5
dev: false
/ws/7.4.6:
resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==}
engines: {node: '>=8.3.0'}
/ws/8.2.3:
resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ^5.0.2
@@ -10315,8 +10279,8 @@ packages:
engines: {node: '>=8'}
dev: false
/xmlhttprequest-ssl/1.6.3:
resolution: {integrity: sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==}
/xmlhttprequest-ssl/2.0.0:
resolution: {integrity: sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==}
engines: {node: '>=0.4.0'}
dev: false
@@ -10402,10 +10366,6 @@ packages:
yargs-parser: 18.1.3
dev: false
/yeast/0.1.2:
resolution: {integrity: sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==}
dev: false
/yocto-queue/0.1.0:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"gatsby": "4.25.2",
"gatsby": "4.25.4",
"gatsby-plugin-image": "^2.21.0",
"gatsby-plugin-manifest": "^4.21.0",
"gatsby-plugin-pnpm": "1.2.10",

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@
"clean": "gatsby clean"
},
"dependencies": {
"gatsby": "^5.4.2",
"gatsby": "5.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
"clean": "gatsby clean"
},
"dependencies": {
"gatsby": "^5.4.2",
"gatsby": "5.7.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}

292
pnpm-lock.yaml generated
View File

@@ -29,7 +29,7 @@ importers:
source-map-support: 0.5.12
ts-eager: 2.0.2
ts-jest: 28.0.5
turbo: 1.7.4
turbo: 1.8.3
dependencies:
lerna: 5.6.2
devDependencies:
@@ -57,7 +57,7 @@ importers:
source-map-support: 0.5.12
ts-eager: 2.0.2
ts-jest: 28.0.5_jest@28.0.2
turbo: 1.7.4
turbo: 1.8.3
api:
specifiers:
@@ -213,14 +213,14 @@ importers:
'@vercel/go': 2.3.9
'@vercel/hydrogen': 0.0.55
'@vercel/ncc': 0.24.0
'@vercel/next': 3.6.2
'@vercel/node': 2.9.9
'@vercel/next': 3.6.4
'@vercel/node': 2.9.10
'@vercel/python': 3.1.51
'@vercel/redwood': 1.1.7
'@vercel/remix': 1.4.2
'@vercel/remix': 1.6.0
'@vercel/routing-utils': 2.1.10
'@vercel/ruby': 1.3.68
'@vercel/static-build': 1.3.13
'@vercel/static-build': 1.3.14
'@zeit/source-map-support': 0.6.2
ajv: 6.12.2
alpha-sort: 2.0.1
@@ -598,7 +598,7 @@ importers:
'@types/node': 14.18.33
'@types/react': 18.0.26
'@vercel/build-utils': 6.3.2
'@vercel/node': 2.9.9
'@vercel/node': 2.9.10
'@vercel/routing-utils': 2.1.10
ajv: 8.12.0
esbuild: 0.14.47
@@ -777,7 +777,7 @@ importers:
'@vercel/build-utils': 6.3.2
'@vercel/ncc': 0.24.0
'@vercel/nft': 0.22.5
'@vercel/node-bridge': 3.1.13
'@vercel/node-bridge': 3.1.14
'@vercel/static-config': 2.0.13
content-type: 1.0.4
cookie: 0.4.0
@@ -898,7 +898,7 @@ importers:
packages/remix:
specifiers:
'@remix-run/dev': 1.13.0
'@remix-run/dev': npm:@vercel/remix-run-dev@1.14.0
'@types/jest': 27.5.1
'@types/node': 14.18.33
'@vercel/build-utils': 6.3.2
@@ -908,7 +908,7 @@ importers:
ts-morph: 12.0.0
typescript: 4.9.4
dependencies:
'@remix-run/dev': 1.13.0
'@remix-run/dev': /@vercel/remix-run-dev/1.14.0
'@vercel/nft': 0.22.5
'@vercel/static-config': link:../static-config
path-to-regexp: 6.2.1
@@ -988,8 +988,8 @@ importers:
'@vercel/build-utils': 6.3.2
'@vercel/frameworks': 1.3.2
'@vercel/fs-detectors': 3.8.2
'@vercel/gatsby-plugin-vercel-analytics': 1.0.7
'@vercel/gatsby-plugin-vercel-builder': 1.1.10
'@vercel/gatsby-plugin-vercel-analytics': 1.0.8
'@vercel/gatsby-plugin-vercel-builder': 1.1.11
'@vercel/ncc': 0.24.0
'@vercel/routing-utils': 2.1.10
'@vercel/static-config': 2.0.13
@@ -3228,7 +3228,7 @@ packages:
'@jest/types': 29.3.1
'@types/node': 18.11.18
ansi-escapes: 4.3.2
chalk: 4.1.2
chalk: 4.1.0
ci-info: 3.7.1
exit: 0.1.2
graceful-fs: 4.2.10
@@ -3569,7 +3569,7 @@ packages:
'@types/istanbul-reports': 3.0.1
'@types/node': 18.11.18
'@types/yargs': 17.0.19
chalk: 4.1.2
chalk: 4.1.0
dev: true
/@jridgewell/gen-mapping/0.1.1:
@@ -3888,7 +3888,7 @@ packages:
resolution: {integrity: sha512-TInJmbrsmYIwUyrRxytjO82KjJbRwm67F7LoZs1shAq6rMvNqi4NxSY9j+hT/939alFmEq1zssoy/caeLXHRfQ==}
engines: {node: ^14.15.0 || >=16.0.0}
dependencies:
node-fetch: 2.6.7
node-fetch: 2.6.8
npmlog: 6.0.2
transitivePeerDependencies:
- encoding
@@ -4859,7 +4859,7 @@ packages:
'@octokit/request-error': 3.0.2
'@octokit/types': 8.1.0
is-plain-object: 5.0.0
node-fetch: 2.6.7
node-fetch: 2.6.8
universal-user-agent: 6.0.0
transitivePeerDependencies:
- encoding
@@ -5282,76 +5282,6 @@ packages:
webpack: 5.75.0_esbuild@0.14.47
dev: true
/@remix-run/dev/1.13.0:
resolution: {integrity: sha512-hPqUjM9RRcz3inBOWqP3GKhggVz0a0ikWaRZpdKrhpQNCNiF6Hunbx876mJERj2YrmIzJ05eoeQmmdF6xcr4qg==}
engines: {node: '>=14'}
hasBin: true
peerDependencies:
'@remix-run/serve': ^1.13.0
peerDependenciesMeta:
'@remix-run/serve':
optional: true
dependencies:
'@babel/core': 7.20.12
'@babel/generator': 7.20.7
'@babel/parser': 7.20.7
'@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.12
'@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.20.12
'@babel/preset-env': 7.20.2_@babel+core@7.20.12
'@babel/preset-typescript': 7.18.6_@babel+core@7.20.12
'@babel/traverse': 7.20.12
'@babel/types': 7.20.7
'@esbuild-plugins/node-modules-polyfill': 0.1.4_esbuild@0.16.3
'@npmcli/package-json': 2.0.0
'@remix-run/server-runtime': 1.13.0
'@vanilla-extract/integration': 6.0.3
arg: 5.0.2
cacache: 15.3.0
chalk: 4.1.2
chokidar: 3.5.3
dotenv: 16.0.3
esbuild: 0.16.3
execa: 5.1.1
exit-hook: 2.2.1
express: 4.18.2
fast-glob: 3.2.11
fs-extra: 10.1.0
get-port: 5.1.1
gunzip-maybe: 1.4.2
inquirer: 8.2.5
jsesc: 3.0.2
json5: 2.2.3
lodash: 4.17.21
lodash.debounce: 4.0.8
lru-cache: 7.14.1
minimatch: 3.1.2
node-fetch: 2.6.7
ora: 5.4.1
postcss: 8.4.21
postcss-discard-duplicates: 5.1.0_postcss@8.4.21
postcss-load-config: 4.0.1_postcss@8.4.21
postcss-modules: 6.0.0_postcss@8.4.21
prettier: 2.7.1
pretty-ms: 7.0.1
proxy-agent: 5.0.0
recast: 0.21.5
remark-frontmatter: 4.0.1
remark-mdx-frontmatter: 1.1.1
semver: 7.3.8
sort-package-json: 1.57.0
tar-fs: 2.1.1
tsconfig-paths: 4.1.2
ws: 7.4.6
xdm: 2.1.0
transitivePeerDependencies:
- bluebird
- bufferutil
- encoding
- supports-color
- ts-node
- utf-8-validate
dev: false
/@remix-run/node/1.12.0:
resolution: {integrity: sha512-WiyRTEQKTUTf3Z3ke5DOwx+fjCkeD8ilI9kbRws1bG3xfdugaDrV9ra76DOZcrYlmVwjwtKE3mVDSRFtiYTTMw==}
engines: {node: '>=14'}
@@ -5372,8 +5302,8 @@ packages:
engines: {node: '>=14'}
dev: false
/@remix-run/router/1.3.2:
resolution: {integrity: sha512-t54ONhl/h75X94SWsHGQ4G/ZrCEguKSRQr7DrjTciJXW0YU1QhlwYeycvK5JgkzlxmvrK7wq1NB/PLtHxoiDcA==}
/@remix-run/router/1.3.3:
resolution: {integrity: sha512-YRHie1yQEj0kqqCTCJEfHqYSSNlZQ696QJG+MMiW4mxSl9I0ojz/eRhJS4fs88Z5i6D1SmoF9d3K99/QOhI8/w==}
engines: {node: '>=14'}
dev: false
@@ -5390,11 +5320,11 @@ packages:
source-map: 0.7.4
dev: false
/@remix-run/server-runtime/1.13.0:
resolution: {integrity: sha512-gjIW3XCeIlOt3rrOZMD6HixQydRgs1SwYjP99ZAVruG2+gNq/tL2OusMFYTLvtWrybt215tPROyF/6iTLsaO3g==}
/@remix-run/server-runtime/1.14.0:
resolution: {integrity: sha512-qkqfT7DDwVzLICtJxMGthIU4T7DVtLy+oxKAzOi9eiCFlr3aWqV30YJ5Kq6r/kP8tighlnHbj1uEo41+WbD8uA==}
engines: {node: '>=14'}
dependencies:
'@remix-run/router': 1.3.2
'@remix-run/router': 1.3.3
'@types/cookie': 0.4.1
'@types/react': 18.0.26
'@web3-storage/multipart-parser': 1.0.0
@@ -6102,7 +6032,7 @@ packages:
dependencies:
'@types/http-cache-semantics': 4.0.1
'@types/keyv': 3.1.4
'@types/node': 14.18.33
'@types/node': 18.11.18
'@types/responselike': 1.0.0
/@types/chance/1.1.3:
@@ -6192,7 +6122,7 @@ packages:
resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==}
dependencies:
'@types/eslint': 8.4.10
'@types/estree': 0.0.51
'@types/estree': 1.0.0
dev: true
/@types/eslint/7.29.0:
@@ -6205,7 +6135,7 @@ packages:
/@types/eslint/8.4.10:
resolution: {integrity: sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==}
dependencies:
'@types/estree': 0.0.51
'@types/estree': 1.0.0
'@types/json-schema': 7.0.11
dev: true
@@ -6329,7 +6259,7 @@ packages:
resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 14.18.33
'@types/node': 18.11.18
/@types/graceful-fs/4.1.6:
resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==}
@@ -6444,7 +6374,7 @@ packages:
/@types/keyv/3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
'@types/node': 14.18.33
'@types/node': 18.11.18
/@types/load-json-file/2.0.7:
resolution: {integrity: sha512-NrH6jPlV77QCVPhAHofWeiOr77TgpKt82c2RVxSBChWBJqyY/u4ngl3CA4mcsAg/w7rNLrkR7dkObMV0ihLLXw==}
@@ -6566,7 +6496,6 @@ packages:
/@types/node/18.11.18:
resolution: {integrity: sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==}
dev: true
/@types/node/8.10.66:
resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==}
@@ -6652,7 +6581,7 @@ packages:
/@types/responselike/1.0.0:
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
dependencies:
'@types/node': 14.18.33
'@types/node': 18.11.18
/@types/retry/0.12.2:
resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==}
@@ -6661,7 +6590,7 @@ packages:
/@types/rimraf/2.0.5:
resolution: {integrity: sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==}
dependencies:
'@types/glob': 5.0.37
'@types/glob': 7.2.0
'@types/node': 18.11.18
dev: true
@@ -7228,6 +7157,77 @@ packages:
- encoding
- supports-color
/@vercel/remix-run-dev/1.14.0:
resolution: {integrity: sha512-567BSCe3YNTKVKFYWSjC7sj8y0AbiAolCz1roW2JpdZXY7GoxoP+I8mtQV7RGrgpvUzhVL0go1B2EIxFJzZhDQ==}
engines: {node: '>=14'}
hasBin: true
peerDependencies:
'@remix-run/serve': ^1.14.0
peerDependenciesMeta:
'@remix-run/serve':
optional: true
dependencies:
'@babel/core': 7.20.12
'@babel/generator': 7.20.7
'@babel/parser': 7.20.7
'@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.12
'@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.20.12
'@babel/preset-env': 7.20.2_@babel+core@7.20.12
'@babel/preset-typescript': 7.18.6_@babel+core@7.20.12
'@babel/traverse': 7.20.12
'@babel/types': 7.20.7
'@esbuild-plugins/node-modules-polyfill': 0.1.4_esbuild@0.16.3
'@npmcli/package-json': 2.0.0
'@remix-run/server-runtime': 1.14.0
'@vanilla-extract/integration': 6.0.3
arg: 5.0.2
cacache: 15.3.0
chalk: 4.1.2
chokidar: 3.5.3
dotenv: 16.0.3
esbuild: 0.16.3
execa: 5.1.1
exit-hook: 2.2.1
express: 4.18.2
fast-glob: 3.2.11
fs-extra: 10.1.0
get-port: 5.1.1
gunzip-maybe: 1.4.2
inquirer: 8.2.5
jsesc: 3.0.2
json5: 2.2.3
lodash: 4.17.21
lodash.debounce: 4.0.8
lru-cache: 7.14.1
minimatch: 3.1.2
node-fetch: 2.6.8
ora: 5.4.1
postcss: 8.4.21
postcss-discard-duplicates: 5.1.0_postcss@8.4.21
postcss-load-config: 4.0.1_postcss@8.4.21
postcss-modules: 6.0.0_postcss@8.4.21
prettier: 2.7.1
pretty-ms: 7.0.1
proxy-agent: 5.0.0
react-refresh: 0.14.0
recast: 0.21.5
remark-frontmatter: 4.0.1
remark-mdx-frontmatter: 1.1.1
semver: 7.3.8
sort-package-json: 1.57.0
tar-fs: 2.1.1
tsconfig-paths: 4.1.2
ws: 7.4.6
xdm: 2.1.0
transitivePeerDependencies:
- bluebird
- bufferutil
- encoding
- supports-color
- ts-node
- utf-8-validate
dev: false
/@vercel/webpack-asset-relocator-loader/1.7.3:
resolution: {integrity: sha512-vizrI18v8Lcb1PmNNUBz7yxPxxXoOeuaVEjTG9MjvDrphjiSxFZrRJ5tIghk+qdLFRCXI5HBCshgobftbmrC5g==}
dependencies:
@@ -7389,7 +7389,7 @@ packages:
node-fetch: '*'
dependencies:
async-retry: 1.3.3
debug: 3.2.7
debug: 3.1.0
node-fetch: 2.6.7
transitivePeerDependencies:
- supports-color
@@ -7565,14 +7565,6 @@ packages:
dependencies:
clean-stack: 2.2.0
indent-string: 4.0.0
dev: true
/aggregate-error/3.1.0:
resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
engines: {node: '>=8'}
dependencies:
clean-stack: 2.2.0
indent-string: 4.0.0
/ahocorasick/1.0.2:
resolution: {integrity: sha512-hCOfMzbFx5IDutmWLAt6MZwOUjIfSM9G9FyVxytmE4Rs/5YDPWQrD/+IR1w+FweD9H2oOZEnv36TmkjhNURBVA==}
@@ -9298,6 +9290,7 @@ packages:
/cli-width/3.0.0:
resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==}
engines: {node: '>= 10'}
dev: false
/clipboardy/1.2.2:
resolution: {integrity: sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw==}
@@ -9551,7 +9544,7 @@ packages:
dev: true
/concat-map/0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
/concat-stream/1.6.2:
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
@@ -10213,7 +10206,8 @@ packages:
supports-color:
optional: true
dependencies:
ms: 2.1.3
ms: 2.1.2
dev: true
/debug/4.1.1:
resolution: {integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==}
@@ -10426,7 +10420,7 @@ packages:
resolution: {integrity: sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==}
engines: {node: '>=6'}
dependencies:
'@types/glob': 7.1.1
'@types/glob': 7.2.0
globby: 6.1.0
is-path-cwd: 2.2.0
is-path-in-cwd: 2.1.0
@@ -10759,7 +10753,7 @@ packages:
dev: false
/ee-first/1.1.1:
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=}
/ejs/3.1.8:
resolution: {integrity: sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==}
@@ -13764,7 +13758,7 @@ packages:
resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==}
engines: {node: '>=8'}
dependencies:
'@types/glob': 7.1.1
'@types/glob': 7.2.0
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.2.12
@@ -14342,7 +14336,7 @@ packages:
/ignore-walk/3.0.3:
resolution: {integrity: sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==}
dependencies:
minimatch: 3.1.2
minimatch: 3.0.4
dev: true
/ignore-walk/5.0.1:
@@ -14485,25 +14479,6 @@ packages:
through: 2.3.8
dev: true
/inquirer/7.3.3:
resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==}
engines: {node: '>=8.0.0'}
dependencies:
ansi-escapes: 4.3.2
chalk: 4.1.2
cli-cursor: 3.1.0
cli-width: 3.0.0
external-editor: 3.1.0
figures: 3.2.0
lodash: 4.17.21
mute-stream: 0.0.8
run-async: 2.4.1
rxjs: 6.6.7
string-width: 4.2.3
strip-ansi: 6.0.1
through: 2.3.8
dev: true
/inquirer/8.2.5:
resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==}
engines: {node: '>=12.0.0'}
@@ -15359,7 +15334,7 @@ packages:
'@jest/core': 29.3.1
'@jest/test-result': 29.3.1
'@jest/types': 29.3.1
chalk: 4.1.2
chalk: 4.1.0
exit: 0.1.2
graceful-fs: 4.2.10
import-local: 3.1.0
@@ -18736,14 +18711,14 @@ packages:
resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==}
engines: {node: '>=8'}
dependencies:
aggregate-error: 3.1.0
aggregate-error: 3.0.1
dev: true
/p-map/4.0.0:
resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==}
engines: {node: '>=10'}
dependencies:
aggregate-error: 3.1.0
aggregate-error: 3.0.1
dev: false
/p-pipe/3.1.0:
@@ -20108,7 +20083,6 @@ packages:
/react-refresh/0.14.0:
resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==}
engines: {node: '>=0.10.0'}
dev: true
/react-server-dom-webpack/0.0.0-experimental-c8b778b7f-20220825_webpack@5.75.0:
resolution: {integrity: sha512-JyCjbp6ZvkH/T0EuVPdceYlC8u5WqWDSJr2KxDvc81H2eJ+7zYUN++IcEycnR2F+HmER8QVgxfotnIx352zi+w==}
@@ -21954,7 +21928,7 @@ packages:
dependencies:
http-proxy-agent: 4.0.1
https-proxy-agent: 5.0.1
node-fetch: 2.6.8
node-fetch: 2.6.7
stream-events: 1.0.5
uuid: 8.3.2
transitivePeerDependencies:
@@ -22519,65 +22493,65 @@ packages:
safe-buffer: 5.2.1
dev: true
/turbo-darwin-64/1.7.4:
resolution: {integrity: sha512-ZyYrQlUl8K/mYN1e6R7bEhPPYjMakz0DYMaexkyD7TAijQtWmTSd4a+I7VknOYNEssnUZ/v41GU3gPV1JAzxxQ==}
/turbo-darwin-64/1.8.3:
resolution: {integrity: sha512-bLM084Wr17VAAY/EvCWj7+OwYHvI9s/NdsvlqGp8iT5HEYVimcornCHespgJS/yvZDfC+mX9EQkn3V2JmYgGGw==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-darwin-arm64/1.7.4:
resolution: {integrity: sha512-CKIXg9uqp1a+Yeq/c4U0alPOqvwLUq5SBZf1PGYhGqJsfG0fRBtJfkUjHuBsuJIOGXg8rCmcGSWGIsIF6fqYuw==}
/turbo-darwin-arm64/1.8.3:
resolution: {integrity: sha512-4oZjXtzakopMK110kue3z/hqu3WLv+eDLZOX1NGdo49gqca9BeD8GbH+sXpAp6tqyeuzpss+PIliVYuyt7LgbA==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-linux-64/1.7.4:
resolution: {integrity: sha512-RIUl4RUFFyzD2T024vL7509Ygwcw+SEa8NOwPfaN6TtJHK7RZV/SBP3fLNVOptG9WRLnOWX3OvsLMbiOqDLLyA==}
/turbo-linux-64/1.8.3:
resolution: {integrity: sha512-uvX2VKotf5PU14FCxJA5iHItPQno2JWzerMd+g3/h/Asay6dvxvtVjc39MQeGT0H5njSvzVKFkT+3/5q8lgOEg==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-arm64/1.7.4:
resolution: {integrity: sha512-Bg65F0AjYYYxqE6RPf2H5TIGuA/EyWMeGOATHVSZOWAbYcnG3Ly03GZii8AHnUi7ntWBdjwvXf/QbOS1ayNB6A==}
/turbo-linux-arm64/1.8.3:
resolution: {integrity: sha512-E1p+oH3XKMaPS4rqWhYsL4j2Pzc0d/9P5KU7Kn1kqVLo2T3iRA7n2KVULEieUNE0nTH+aIJPXYXOpqCI5wFJaA==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-windows-64/1.7.4:
resolution: {integrity: sha512-rTaV50XZ2BRxRHOHqt1UsWfeDmYLbn8UKE6g2D2ED+uW+kmnTvR9s01nmlGWd2sAuWcRYQyQ2V+O09VfKPKcQw==}
/turbo-windows-64/1.8.3:
resolution: {integrity: sha512-cnzAytHtoLXd0J7aNzRpZFpL/GTjcBmkvAPlbOdf/Pl1iwS4qzGrudZQ+OM1lmLgLIfBPIavsGHBknTwTNib4A==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo-windows-arm64/1.7.4:
resolution: {integrity: sha512-h8sxdKPvHTnWUPtwnYszFMmSO0P/iUUwmYY9n7iYThA71zSao28UeZ0H0Gw75cY3MPjvkjn2C4EBAUGPjuZJLw==}
/turbo-windows-arm64/1.8.3:
resolution: {integrity: sha512-ulIiItNm2w/zYJdD5/oAzjzNns1IjbpweRzpsE8tLXaWwo6+fnXXkyloUug0IUhcd2k6fJXfoiDZfygqpOVuXg==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo/1.7.4:
resolution: {integrity: sha512-8RLedDoUL0kkVKWEZ/RMM70BvKLyDFen06QuKKhYC2XNOfNKqFDqzIdcY/vGick869bNIWalChoy4O07k0HLsA==}
/turbo/1.8.3:
resolution: {integrity: sha512-zGrkU1EuNFmkq6iky6LcMqD4h0OLE8XysVFxQWRIZbcTNnf0XAycbsbeEyiJpiWeqb7qtg2bVuY9EYcNoNhVuQ==}
hasBin: true
requiresBuild: true
optionalDependencies:
turbo-darwin-64: 1.7.4
turbo-darwin-arm64: 1.7.4
turbo-linux-64: 1.7.4
turbo-linux-arm64: 1.7.4
turbo-windows-64: 1.7.4
turbo-windows-arm64: 1.7.4
turbo-darwin-64: 1.8.3
turbo-darwin-arm64: 1.8.3
turbo-linux-64: 1.8.3
turbo-linux-arm64: 1.8.3
turbo-windows-64: 1.8.3
turbo-windows-arm64: 1.8.3
dev: true
/tweetnacl/0.14.5:
@@ -23799,7 +23773,7 @@ packages:
engines: {node: '>=4.0.0'}
dependencies:
chalk: 2.4.2
inquirer: 7.3.3
inquirer: 7.0.4
is-ci: 2.0.0
read: 1.0.7
strip-ansi: 5.2.0

View File

@@ -7,30 +7,6 @@
"outputMode": "new-only",
"outputs": ["dist/**"]
},
"@vercel/node-bridge#build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": ["helpers.js", "source-map-support.js"]
},
"@vercel/gatsby-plugin-vercel-builder#build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": ["dist/**", "gatsby-node.js"]
},
"@vercel/gatsby-plugin-vercel-analytics#build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": ["gatsby-browser.js", "web-vitals.js", "index.js"]
},
"vercel#build": {
"dependsOn": ["^build"],
"outputMode": "new-only",
"outputs": [
"dist/**",
"src/util/constants.ts",
"src/util/dev/templates/*.ts"
]
},
"test-unit": {
"dependsOn": ["build"],
"outputMode": "new-only"

16
utils/exec.js vendored Normal file
View File

@@ -0,0 +1,16 @@
const { execFileSync } = require('node:child_process');
function exec(cmd, args, opts) {
console.log({ input: `${cmd} ${args.join(' ')}` });
const output = execFileSync(cmd, args, {
encoding: 'utf-8',
...opts,
}).trim();
console.log({ output });
console.log();
return output;
}
module.exports = {
exec,
};

1
utils/publish.sh vendored
View File

@@ -13,6 +13,7 @@ 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 || :)"

118
utils/update-gatsby-fixtures.js vendored Normal file
View File

@@ -0,0 +1,118 @@
const path = require('path');
const fs = require('fs');
const { exec } = require('./exec');
const branch = `update/gatsby-fixtures`;
/**
* invoked by ../.github/workflows/cron-test-and-update-gatsby.yml
* @param {{ github: ReturnType<import('@actions/github').getOctokit>, context: import('@actions/github').context }} param0 Defined by https://github.com/actions/github-script
* @returns
*/
module.exports = async ({ github, context }) => {
exec('git', ['config', '--global', 'user.email', 'infra+release@vercel.com']);
exec('git', ['config', '--global', 'user.name', 'vercel-release-bot']);
try {
// Branch may exist if there's already an existing PR
exec('git', ['checkout', branch]);
} catch {
exec('git', ['checkout', '-b', branch]);
}
const fixturesPath = path.join(
__dirname,
'..',
'packages',
'static-build',
'test',
'fixtures'
);
const gatsbyFixtures = [
'gatsby-v2',
'gatsby-v3',
'gatsby-v4-pnpm',
'gatsby-v4',
'gatsby-v5-pathPrefix',
'gatsby-v5',
];
for (const fixture of gatsbyFixtures) {
const fixturePath = path.join(fixturesPath, fixture);
const packageJSONPath = path.join(fixturePath, 'package.json');
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8'));
const oldVersion = packageJSON.dependencies.gatsby;
const major = oldVersion.split('.')[0];
if (fixture.includes('pnpm')) {
exec(
'pnpm',
[
'-w',
'install',
`gatsby@^${major}`,
'--save-exact',
'--lockfile-only',
],
{ cwd: fixturePath }
);
} else {
exec(
'npm',
['install', `gatsby@^${major}`, '--save-exact', '--package-lock-only'],
{ cwd: fixturePath }
);
}
}
// exec throws error on non-zero exit code
// git diff --quiet returns exit code 1 if changes detected
try {
exec('git', ['diff', '--quiet']);
} catch {
exec('git', ['add', '-A']);
exec('git', ['commit', '-m', branch]);
exec('git', ['push', 'origin', branch]);
const { repo, owner } = context.repo;
const pulls = await github.rest.pulls.list({
owner,
repo,
state: 'open',
head: branch,
});
if (pulls.length === 0) {
const pr = await github.rest.pulls.create({
owner,
repo,
head: branch,
base: 'main',
title: '[tests] Update Gatsby fixture versions',
body: 'Automatically generated PR to update Gatsby fixture versions in `@vercel/static-build`',
});
await github.rest.pulls.requestReviewers({
owner,
repo,
pull_number: pr.data.number,
reviewers: [
'Ethan-Arrowood',
'styfle',
'TooTallNate',
'EndangeredMassa',
'cb1kenobi',
],
});
await github.rest.issues.addLabels({
owner,
repo,
issue_number: pr.data.number,
labels: ['area: tests', 'semver: none', 'pr: automerge'],
});
}
}
};

67
utils/update-remix-run-dev.js vendored Normal file
View File

@@ -0,0 +1,67 @@
const { execSync } = require('child_process');
const path = require('path');
const fs = require('fs');
module.exports = async ({ github, context }, newVersion) => {
execSync('git config --global user.email infra+release@vercel.com');
execSync('git config --global user.name vercel-release-bot');
execSync('git checkout main');
const packagePath = path.join(__dirname, '..', 'packages', 'remix');
const oldVersion = JSON.parse(
fs.readFileSync(path.join(packagePath, 'package.json'), 'utf-8')
).dependencies['@remix-run/dev'];
if (newVersion === '') {
newVersion = execSync('npm view @vercel/remix-run-dev dist-tags.latest', {
encoding: 'utf-8',
});
}
newVersion = newVersion.trim();
const branch = `vercel-remix-run-dev-${newVersion.replaceAll('.', '-')}`;
if (oldVersion === newVersion) {
// eslint-disable-next-line no-console
console.log(
`@vercel/remix-run-dev version ${newVersion} did not change, skipping update.`
);
return;
}
if (
execSync(`git ls-remote --heads origin ${branch}`, { encoding: 'utf-8' })
.toString()
.trim()
) {
// eslint-disable-next-line no-console
console.log(`Branch ${branch} already exists, skipping update.`);
return;
}
execSync(
`pnpm install @remix-run/dev@npm:@vercel/remix-run-dev@${newVersion} --save-exact --lockfile-only`,
{ cwd: packagePath }
);
execSync(`git checkout -b ${branch}`);
execSync('git add -A');
execSync(`git commit -m ${branch}`);
execSync(`git push origin ${branch}`);
const { repo, owner } = context.repo;
const pr = await github.rest.pulls.create({
owner,
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}`,
});
await github.rest.issues.addLabels({
owner,
repo,
issue_number: pr.data.number,
labels: ['area: remix', 'semver: patch', 'pr: automerge'],
});
};