Compare commits

..

31 Commits

Author SHA1 Message Date
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
Sean Massa
e0f8bc9820 Publish Stable
- @vercel/build-utils@6.3.2
 - vercel@28.16.8
 - @vercel/client@12.4.2
 - @vercel/edge@0.3.1
 - @vercel/frameworks@1.3.2
 - @vercel/fs-detectors@3.8.2
 - @vercel/gatsby-plugin-vercel-builder@1.1.10
 - @vercel/go@2.3.9
 - @vercel/hydrogen@0.0.55
 - @vercel/next@3.6.2
 - @vercel/node-bridge@3.1.13
 - @vercel/node@2.9.9
 - @vercel/python@3.1.51
 - @vercel/redwood@1.1.7
 - @vercel/remix@1.4.2
 - @vercel/routing-utils@2.1.10
 - @vercel/ruby@1.3.68
 - @vercel/static-build@1.3.13
2023-02-28 10:26:29 -06:00
Chris Barber
ebd2e1822c [routing-utils] Add missing 'middlewareRawSrc' to route schema (#9564)
Need to add `middlewareRawSrc` to route schema so the build container will accept the new property.

This PR blocks https://github.com/vercel/vercel/pull/9435.

Linear: https://linear.app/vercel/issue/VCCLI-411/display-uncompressed-edge-middleware-matcher-show-the-list-of-matches
2023-02-28 03:59:06 +00:00
Steven
31bc2581f3 [cli] Remove unncessary warning when monorepo setting override (#9565)
This warning is not actionable by the user so this PR removes it.
2023-02-27 16:23:49 -05:00
Steven
96759a9fda [hydrogen] Add missing envPrefix (#9551)
- Follow up to #9326
2023-02-27 20:01:05 +00:00
Jimmy Lai
ad2864bca5 [next] add support for the integration hook file tracing (#9562)
Adds support for bundling properly the dependencies used by the experimental instrumentation hook file, `instrumentation.js`, by adding the generated nft file to the list of server deps

fixes NEXT-631
2023-02-27 18:58:12 +00:00
Sean Massa
40fbc993d7 [tests] extract noisey setup to make test clearer (#9509)
Clarify dev server tests with a small function extraction.
2023-02-27 17:05:27 +00:00
Sean Massa
1f30e56a6d [cli][dev] remove link to 404 FAQ (#9508) 2023-02-27 10:37:57 -06:00
Nathan Rajlich
58d6268899 [frameworks] Check for remix.config.mjs for "remix" auto-detection (#9558)
Moving this to a separate PR based on this comment:
https://github.com/vercel/vercel/pull/9556#discussion_r1117939290

This will need to be merged and released before the relevant E2E test in
#9556 will pass.

Co-authored-by: Steven <steven@ceriously.com>
2023-02-27 10:07:32 -05:00
Nathan Rajlich
4e6659ace7 [remix] Fix sending multiple response headers with the same name with Node.js (#9533)
i.e. `Set-Cookie`. Right now only one will be sent and others will be lost. This update matches the code being used in `@remix-run/vercel`.
2023-02-27 07:19:58 +00:00
Nathan Rajlich
769234b6a6 [remix] Inject Edge entrypoint into @remix-run/vercel during Edge Function creation (#9553)
There's [a PR](https://github.com/remix-run/remix/pull/5537) opened on
Remix to add an Edge compatible entrypoint to `@remix-run/vercel`. This
is only really needed specifically for projects that have a custom
server.js entrypoint file, which is not strictly necessary anymore, but
there are some edge cases where a project might still want to have one.
So this PR is necessary for those kinds of projects to be able to use
Edge runtime.

Even when they merge the PR, it would be good to leave this injection
code around for some time to continue support for older
`@remix-run/vercel` versions in existing projects.
2023-02-25 00:53:30 -08:00
JJ Kasper
53cab61e88 [next] Fix deploying with cached build (#9555)
This leverages the relative app dir field in the required files manifest when available so that we don't rely on absolute paths from a cached build since the cache can be restored in a separate context where the value no longer applies.

x-ref: https://github.com/vercel/next.js/pull/45864
x-ref: https://github.com/vercel/next.js/pull/46393
x-ref: https://github.com/vercel/next.js/discussions/39432#discussioncomment-4914549
x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1675821643786319)
2023-02-25 02:46:06 +00:00
Nathan Rajlich
3a65acfb32 [remix] Don't create output for Pathless Layout Routes without any child routes at the root level (#9539)
Fixes https://github.com/vercel/community/discussions/1587.
2023-02-25 01:17:01 +00:00
Nathan Rajlich
48eed7532a [tests] Properly test for multiple headers with same name in probes (#9538)
Updates the `responseHeaders` probe checks to properly test for multiple headers with the same name.

Previously the probes were using `headers.get()` which concats multiple headers into a single string, which results in the test not really checking if there are in fact multiple headers with the same name. Using `headers.raw()` allows us to properly test for that.

A couple of Python tests that were already checking for multiple `set-cookie` headers needed to be updated to match the full value, since the check now properly validates the full string match of each header (before it was basically just doing a `string.includes()` check).

This is a precursor for https://github.com/vercel/vercel/pull/9533.
2023-02-24 22:07:00 +00:00
Cody Olsen
f09d6fce85 [frameworks] add envPrefix to hydrogen framework (#9326)
Hydrogen uses the `PUBLIC_` env prefix, [it also supports
`VITE_`](8168cd2dd8/packages/hydrogen/src/framework/plugins/vite-plugin-hydrogen-config.ts (L127))
but [the docs only talk about
`PUBLIC_`](https://shopify.dev/custom-storefronts/hydrogen/environment-variables#public-variables).
2023-02-24 15:40:55 -05:00
Chris Barber
cc82c499db [cli] Added fetch dist-tags http status validation (#9549)
If for some reason the `get-latest-worker.js` fails to get the dist-tags, it doesn't check the status code and proceeds to `JSON.parse()` the response. If for example npm returns 401 Unauthorized, you get a cryptic JSON parse error message.
2023-02-24 20:14:53 +00:00
Steven
f0bc207717 [build-utils] Handle error during readConfigFile() (#9542)
This fixes a confusing error:

```
$ vercel build
Vercel CLI 28.16.6
Error: duplicated mapping key in "/vercel/path0/pnpm-lock.yaml" at line 1215, column -164:
      /@react-dnd/asap/4.0.1:
      ^
```
2023-02-24 18:02:35 +00:00
Steven
151c7f99ee [tests] Pass token to cron github actions (#9544)
https://github.com/actions/github-script#using-a-separate-github-token
2023-02-24 11:14:17 -05:00
Steven
61c2c494bf Revert "[tests] Update cron with token in git checkout" (#9543)
Reverts vercel/vercel#9541
2023-02-24 11:07:29 -05:00
Steven
7f49816129 [tests] Update cron with token in git checkout (#9541)
Hopefully this will fix the issue where actions do not run against the
automated PR.
2023-02-24 10:51:03 -05:00
96 changed files with 47422 additions and 36515 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

@@ -25,6 +25,7 @@ jobs:
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-next.js')
await script({ github, context })

View File

@@ -25,6 +25,7 @@ jobs:
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-turbo.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

1
.npmrc
View File

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

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.2"
},
"scripts": {
"lerna": "lerna",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/build-utils",
"version": "6.3.1",
"version": "6.3.2",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.js",

View File

@@ -25,12 +25,16 @@ export async function readConfigFile<T>(
if (data) {
const str = data.toString('utf8');
if (name.endsWith('.json')) {
return JSON.parse(str) as T;
} else if (name.endsWith('.toml')) {
return (toml.parse(str) as unknown) as T;
} else if (name.endsWith('.yaml') || name.endsWith('.yml')) {
return yaml.safeLoad(str, { filename: name }) as T;
try {
if (name.endsWith('.json')) {
return JSON.parse(str) as T;
} else if (name.endsWith('.toml')) {
return toml.parse(str) as unknown as T;
} else if (name.endsWith('.yaml') || name.endsWith('.yml')) {
return yaml.safeLoad(str, { filename: name }) as T;
}
} catch (error: unknown) {
console.log(`Error while parsing config file: "${name}"`);
}
}
}

View File

@@ -0,0 +1,77 @@
import { join } from 'path';
import { writeFile, rm } from 'fs/promises';
import { readConfigFile } from '../src';
describe('Test `readConfigFile()`', () => {
let logMessages: string[];
const originalConsoleLog = console.log;
beforeEach(() => {
logMessages = [];
console.log = m => {
logMessages.push(m);
};
});
afterEach(() => {
console.log = originalConsoleLog;
});
const doesnotexist = join(__dirname, 'does-not-exist.json');
const tsconfig = join(__dirname, '../tsconfig.json');
const invalid = join(__dirname, 'invalid.json');
it('should return null when file does not exist', async () => {
expect(await readConfigFile(doesnotexist)).toBeNull();
expect(logMessages).toEqual([]);
});
it('should return parsed object when file exists', async () => {
expect(await readConfigFile(tsconfig)).toMatchObject({
compilerOptions: {
strict: true,
},
});
expect(logMessages).toEqual([]);
});
it('should return parsed object when at least one file exists', async () => {
const files = [doesnotexist, tsconfig];
expect(await readConfigFile(files)).toMatchObject({
compilerOptions: {
strict: true,
},
});
expect(logMessages).toEqual([]);
});
it('should return null when parse fails', async () => {
try {
await writeFile(invalid, 'borked');
expect(await readConfigFile(invalid)).toBeNull();
} finally {
await rm(invalid);
}
expect(logMessages.length).toBe(1);
expect(logMessages[0]).toMatch(
/^Error while parsing config file.+invalid.json/
);
});
it('should return parsed object when at least one file is valid', async () => {
try {
await writeFile(invalid, 'borked');
expect(await readConfigFile([invalid, tsconfig])).toMatchObject({
compilerOptions: {
strict: true,
},
});
} finally {
await rm(invalid);
}
expect(logMessages.length).toBe(1);
expect(logMessages[0]).toMatch(
/^Error while parsing config file.+invalid.json/
);
});
});

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "28.16.7",
"version": "28.16.10",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -41,16 +41,16 @@
"node": ">= 14"
},
"dependencies": {
"@vercel/build-utils": "6.3.1",
"@vercel/go": "2.3.8",
"@vercel/hydrogen": "0.0.54",
"@vercel/next": "3.6.1",
"@vercel/node": "2.9.8",
"@vercel/python": "3.1.50",
"@vercel/redwood": "1.1.6",
"@vercel/remix": "1.4.1",
"@vercel/ruby": "1.3.67",
"@vercel/static-build": "1.3.12"
"@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.10",
"@vercel/python": "3.1.51",
"@vercel/redwood": "1.1.7",
"@vercel/remix": "1.4.3",
"@vercel/ruby": "1.3.68",
"@vercel/static-build": "1.3.14"
},
"devDependencies": {
"@alex_neo/jest-expect-message": "1.0.5",
@@ -93,13 +93,13 @@
"@types/which": "1.3.2",
"@types/write-json-file": "2.2.1",
"@types/yauzl-promise": "2.1.0",
"@vercel/client": "12.4.1",
"@vercel/client": "12.4.2",
"@vercel/error-utils": "1.0.8",
"@vercel/frameworks": "1.3.1",
"@vercel/fs-detectors": "3.8.1",
"@vercel/frameworks": "1.3.2",
"@vercel/fs-detectors": "3.8.2",
"@vercel/fun": "1.0.4",
"@vercel/ncc": "0.24.0",
"@vercel/routing-utils": "2.1.9",
"@vercel/routing-utils": "2.1.10",
"@zeit/source-map-support": "0.6.2",
"ajv": "6.12.2",
"alpha-sort": "2.0.1",

View File

@@ -9,6 +9,7 @@ import { ProjectLinkAndSettings } from '../projects/project-settings';
import { Output } from '../output';
import title from 'title';
import { PartialProjectSettings } from '../input/edit-project-settings';
import { debug } from '@vercel/build-utils';
export async function setMonorepoDefaultSettings(
cwd: string,
@@ -26,8 +27,8 @@ export async function setMonorepoDefaultSettings(
value: string
) => {
if (projectSettings[command]) {
output.warn(
`Cannot automatically assign ${command} as it is already set via project settings or configuration overrides.`
debug(
`Skipping auto-assignment of ${command} as it is already set via project settings or configuration overrides.`
);
} else {
projectSettings[command] = value;

View File

@@ -6,6 +6,4 @@
{{?}}
<span class="devinfo-line">ID: <code>{{! it.request_id }}</code>
</p>
<a href="https://vercel.link/404"><div class="note">Click here to learn more about this error.</div></a>
</main>

View File

@@ -247,6 +247,14 @@ async function fetchDistTags(name) {
});
res.on('end', () => {
try {
if (res.statusCode && res.statusCode >= 400) {
return reject(
new Error(
`Fetch dist-tags failed ${res.statusCode} ${res.statusMessage}`
)
);
}
resolve(JSON.parse(buf));
} catch (err) {
reject(err);

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,
},

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/client",
"version": "12.4.1",
"version": "12.4.2",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -43,8 +43,8 @@
]
},
"dependencies": {
"@vercel/build-utils": "6.3.1",
"@vercel/routing-utils": "2.1.9",
"@vercel/build-utils": "6.3.2",
"@vercel/routing-utils": "2.1.10",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",
"async-sema": "3.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/edge",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/frameworks",
"version": "1.3.1",
"version": "1.3.2",
"main": "./dist/frameworks.js",
"types": "./dist/frameworks.d.ts",
"files": [
@@ -21,7 +21,7 @@
"@types/js-yaml": "3.12.1",
"@types/node": "14.18.33",
"@types/node-fetch": "2.5.8",
"@vercel/routing-utils": "2.1.9",
"@vercel/routing-utils": "2.1.10",
"ajv": "6.12.2",
"typescript": "4.3.4"
}

View File

@@ -202,12 +202,13 @@ export const frameworks = [
useRuntime: { src: 'package.json', use: '@vercel/remix' },
ignoreRuntimes: ['@vercel/node'],
detectors: {
every: [
// Intentionally does not detect a package name
// https://github.com/vercel/vercel/pull/7761
some: [
{
path: 'remix.config.js',
},
{
path: 'remix.config.mjs',
},
],
},
settings: {
@@ -1698,6 +1699,7 @@ export const frameworks = [
description: 'React framework for headless commerce',
website: 'https://hydrogen.shopify.dev',
useRuntime: { src: 'package.json', use: '@vercel/hydrogen' },
envPrefix: 'PUBLIC_',
detectors: {
some: [
{

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/fs-detectors",
"version": "3.8.1",
"version": "3.8.2",
"description": "Vercel filesystem detectors",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -20,8 +20,8 @@
},
"dependencies": {
"@vercel/error-utils": "1.0.8",
"@vercel/frameworks": "1.3.1",
"@vercel/routing-utils": "2.1.9",
"@vercel/frameworks": "1.3.2",
"@vercel/routing-utils": "2.1.10",
"glob": "8.0.3",
"js-yaml": "4.1.0",
"json5": "2.2.2",
@@ -35,7 +35,7 @@
"@types/minimatch": "3.0.5",
"@types/node": "14.18.33",
"@types/semver": "7.3.10",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"typescript": "4.3.4"
}
}

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.9",
"version": "1.1.11",
"main": "dist/index.js",
"files": [
"dist",
@@ -14,9 +14,9 @@
"build:src": "tsc -p tsconfig.src.json"
},
"dependencies": {
"@vercel/build-utils": "6.3.1",
"@vercel/node": "2.9.8",
"@vercel/routing-utils": "2.1.9",
"@vercel/build-utils": "6.3.2",
"@vercel/node": "2.9.10",
"@vercel/routing-utils": "2.1.10",
"ajv": "8.12.0",
"esbuild": "0.14.47",
"etag": "1.8.1",

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/go",
"version": "2.3.8",
"version": "2.3.9",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -36,7 +36,7 @@
"@types/node": "14.18.33",
"@types/node-fetch": "^2.3.0",
"@types/tar": "^4.0.0",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"@vercel/ncc": "0.24.0",
"async-retry": "1.3.1",
"execa": "^1.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/hydrogen",
"version": "0.0.54",
"version": "0.0.55",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -21,7 +21,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"@vercel/static-config": "2.0.13",
"execa": "3.2.0",
"fs-extra": "11.1.0",

View File

@@ -7,6 +7,7 @@ import {
execCommand,
getEnvForPackageManager,
getNodeVersion,
getPrefixedEnvVars,
getSpawnOptions,
glob,
readConfigFile,
@@ -29,6 +30,15 @@ export const build: BuildV2 = async ({
await download(files, workPath, meta);
const prefixedEnvs = getPrefixedEnvVars({
envPrefix: 'PUBLIC_',
envs: process.env,
});
for (const [key, value] of Object.entries(prefixedEnvs)) {
process.env[key] = value;
}
const mountpoint = dirname(entrypoint);
const entrypointDir = join(workPath, mountpoint);

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.6.1",
"version": "3.6.2",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -45,9 +45,9 @@
"@types/semver": "6.0.0",
"@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"@vercel/nft": "0.22.5",
"@vercel/routing-utils": "2.1.9",
"@vercel/routing-utils": "2.1.10",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",
"bytes": "3.1.2",

View File

@@ -150,6 +150,10 @@ export async function serverBuild({
nextVersion,
EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION
);
const projectDir = requiredServerFilesManifest.relativeAppDir
? path.join(baseDir, requiredServerFilesManifest.relativeAppDir)
: requiredServerFilesManifest.appDir || entryPath;
let appBuildTraces: UnwrapPromise<ReturnType<typeof glob>> = {};
let appDir: string | null = null;
@@ -269,9 +273,10 @@ export async function serverBuild({
let initialFileList: string[];
let initialFileReasons: NodeFileTraceReasons;
let nextServerBuildTrace;
let instrumentationHookBuildTrace;
const nextServerFile = resolveFrom(
requiredServerFilesManifest.appDir || entryPath,
projectDir,
`${getNextServerPath(nextVersion)}/next-server.js`
);
@@ -287,6 +292,22 @@ export async function serverBuild({
// if the trace is unavailable we trace inside the runtime
}
try {
instrumentationHookBuildTrace = JSON.parse(
await fs.readFile(
path.join(
entryPath,
outputDirectory,
'server',
'instrumentation.js.nft.json'
),
'utf8'
)
);
} catch (_) {
// if the trace is unavailable it means `instrumentation.js` wasn't used
}
if (nextServerBuildTrace) {
initialFileList = nextServerBuildTrace.files.map((file: string) => {
return path.relative(
@@ -321,6 +342,18 @@ export async function serverBuild({
initialFileReasons = result.reasons;
}
if (instrumentationHookBuildTrace) {
initialFileList = initialFileList.concat(
instrumentationHookBuildTrace.files.map((file: string) => {
return path.relative(
baseDir,
path.join(entryPath, outputDirectory, 'server', file)
);
})
);
debug('Using instrumentation.js.nft.json trace from build');
}
debug('collecting initial Next.js server files');
await Promise.all(
initialFileList.map(
@@ -437,8 +470,8 @@ export async function serverBuild({
file
);
if (requiredServerFilesManifest.appDir) {
fsPath = path.join(requiredServerFilesManifest.appDir, file);
if (projectDir) {
fsPath = path.join(projectDir, file);
}
const relativePath = path.relative(baseDir, fsPath);
@@ -516,7 +549,7 @@ export async function serverBuild({
`conf: ${JSON.stringify({
...requiredServerFilesManifest.config,
distDir: path.relative(
requiredServerFilesManifest.appDir || entryPath,
projectDir,
path.join(entryPath, outputDirectory)
),
compress: false,
@@ -543,10 +576,8 @@ export async function serverBuild({
}
const launcherFiles: { [name: string]: FileFsRef | FileBlob } = {
[path.join(
path.relative(baseDir, requiredServerFilesManifest.appDir || entryPath),
'___next_launcher.cjs'
)]: new FileBlob({ data: launcher }),
[path.join(path.relative(baseDir, projectDir), '___next_launcher.cjs')]:
new FileBlob({ data: launcher }),
};
const pageTraces: {
[page: string]: { [key: string]: FileFsRef };
@@ -594,7 +625,7 @@ export async function serverBuild({
traceResult = await nodeFileTrace(pathsToTrace, {
base: baseDir,
cache: traceCache,
processCwd: requiredServerFilesManifest.appDir || entryPath,
processCwd: projectDir,
});
traceResult.esmFileList.forEach(file => traceResult?.fileList.add(file));
parentFilesMap = getFilesMapFromReasons(
@@ -703,7 +734,7 @@ export async function serverBuild({
const pageExtensions = requiredServerFilesManifest.config?.pageExtensions;
const pageLambdaGroups = await getPageLambdaGroups({
entryPath: requiredServerFilesManifest.appDir || entryPath,
entryPath: projectDir,
config,
pages: nonApiPages,
prerenderRoutes,
@@ -718,7 +749,7 @@ export async function serverBuild({
});
const streamingPageLambdaGroups = await getPageLambdaGroups({
entryPath: requiredServerFilesManifest.appDir || entryPath,
entryPath: projectDir,
config,
pages: streamingPages,
prerenderRoutes,
@@ -739,7 +770,7 @@ export async function serverBuild({
}
const apiLambdaGroups = await getPageLambdaGroups({
entryPath: requiredServerFilesManifest.appDir || entryPath,
entryPath: projectDir,
config,
pages: apiPages,
prerenderRoutes,
@@ -873,10 +904,7 @@ export async function serverBuild({
},
layers: [group.pseudoLayer, groupPageFiles],
handler: path.join(
path.relative(
baseDir,
requiredServerFilesManifest.appDir || entryPath
),
path.relative(baseDir, projectDir),
'___next_launcher.cjs'
),
operationType,

View File

@@ -811,6 +811,7 @@ export async function createLambdaFromPseudoLayers({
export type NextRequiredServerFilesManifest = {
appDir?: string;
relativeAppDir?: string;
files: string[];
ignore: string[];
config: Record<string, any>;
@@ -954,6 +955,7 @@ export async function getRequiredServerFilesManifest(
ignore: [],
config: {},
appDir: manifestData.appDir,
relativeAppDir: manifestData.relativeAppDir,
};
switch (manifestData.version) {

View File

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

View File

@@ -0,0 +1,7 @@
{
"name": "web",
"private": true,
"scripts": {
"build": "next build && rm -rf .next/cache && node post-build.js"
}
}

View File

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

View File

@@ -0,0 +1,12 @@
export default function Page() {
return <p>ssg page</p>;
}
export function getStaticProps() {
return {
props: {
now: Date.now(),
},
revalidate: 3,
};
}

View File

@@ -0,0 +1,11 @@
export default function Page() {
return <p>ssp page</p>;
}
export function getServerSideProps() {
return {
props: {
now: Date.now(),
},
};
}

View File

@@ -0,0 +1,19 @@
const fs = require('fs');
const path = require('path');
const requiredFilesManifestPath = path.join(
__dirname,
'.next/required-server-files.json'
);
const requiredFilesManifest = JSON.parse(
fs.readFileSync(requiredFilesManifestPath, 'utf8')
);
fs.writeFileSync(
requiredFilesManifestPath,
JSON.stringify({
...requiredFilesManifest,
appDir: '/non-existent/apps/web',
})
);

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, { skipForceNew: true });
Object.assign(ctx, info);
});
});

View File

@@ -0,0 +1,15 @@
{
"workspaces": [
"apps/*"
],
"private": true,
"dependencies": {
"next": "13.2.2-canary.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"turbo": "1.8.2"
},
"scripts": {
"build": "turbo build --cache-dir=turbo-cache"
}
}

View File

@@ -0,0 +1 @@
{ "hash": "3d4a11a80ae91055", "duration": 5510 }

View File

@@ -0,0 +1,8 @@
{
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**"]
}
}
}

View File

@@ -0,0 +1,30 @@
{
"builds": [
{
"src": "package.json",
"use": "@vercel/next",
"config": {
"rootDirectory": "apps/web",
"buildCommand": "cd ../../ && yarn build",
"installCommand": "yarn"
}
}
],
"probes": [
{
"path": "/",
"status": 200,
"mustContain": "index page"
},
{
"path": "/ssg",
"status": 200,
"mustContain": "ssg page"
},
{
"path": "/ssp",
"status": 200,
"mustContain": "ssp page"
}
]
}

View File

@@ -0,0 +1,227 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@next/env@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.2.2-canary.0.tgz#0f843ef602ff25441f17f10d09a93942baa8232b"
integrity sha512-EDy4UF4oXGmWgMq9w8P7Wg7JoYbrGY7EVnZcNoyMDU8o9KeiviYjK2IR3yFBulG0/1I2UbVu2wIM1xPYsQIonQ==
"@next/swc-android-arm-eabi@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.2-canary.0.tgz#62510cc5b11b677a63363788848efdc8aeda9cf8"
integrity sha512-/si1jk3wtrarhdVPQloSubTJjLeuTpgT7V2R2w+acWzvBBsrs2ThhZodLz0fJRKcYKmeDZebhtYGUkxkcm48Tw==
"@next/swc-android-arm64@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.2.2-canary.0.tgz#967fe8a63d59bdd22f57056ef83005242b559c1a"
integrity sha512-MKImVjggMFvPJju48fvz/KqjiqXaKoimGz3Vmc3c12WaSIEa5O1sevw0dQKPI6sv+1Mf5MuP7XlLQ9bWJo+72Q==
"@next/swc-darwin-arm64@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.2-canary.0.tgz#1250cf70dc129b765ae11bc596cd4d298a129afe"
integrity sha512-Sj+hCut5c6K2lOIJpV9KDsDJNe1dVacAE8WWmvotoeu4ab1W0//axZOxksq0S3240oF9CJ8QPZo+q5lPV6Gn2Q==
"@next/swc-darwin-x64@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.2-canary.0.tgz#13dde75f037194d46799542111608679c73dc8dc"
integrity sha512-/lv1J5ts5UhQ5V2V0PpIkQJw8kJywMgvPegZ/yf0fy9QOOdGCAw1dXtZsKUISrJmuzPcCZo0F56Zjbyb6lCLsw==
"@next/swc-freebsd-x64@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.2-canary.0.tgz#f9709e88c60207fb17244895cfe23a4a2d40b099"
integrity sha512-ECQyYOYd1AKu/oTNeI5pWDXebgKTIWXCs84IN9rXsM7f+FOQmVU8V+gK6Oisw3jya68B1vmfMqLDGQClDDIMAg==
"@next/swc-linux-arm-gnueabihf@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.2-canary.0.tgz#bdcef78c71820ff64c1225796dc383c8d72fcaed"
integrity sha512-/UQf0yoIwJJhgV8dpDmgWq/Q3/IxqFRsUHfBiy2M6kGVYwB9CnsjZzHwUKmg7sASdv+atW+oc4PIXXN6W9CCgg==
"@next/swc-linux-arm64-gnu@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.2-canary.0.tgz#e77b30092c22eb0af16a7a6c150d51fa84f0ceb0"
integrity sha512-pv0m+4hnKyq0MwEVAvrJScoYme4GKoPieP0Tj32oRK6P1gafFK4uJxF6zMVPlO0D/tGI7EkoHZjv/7sU5pSYSA==
"@next/swc-linux-arm64-musl@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.2-canary.0.tgz#779514bb2d0e7feced48fac1da0bc344180c8511"
integrity sha512-Bpc7nLJoP6dVPG9lOqCGqWkfiMo143YRx7+cvxSl1FVupkGP7Ntldvl3zS/m2CnU/5egQEjC2C5jEgQRY92Zhw==
"@next/swc-linux-x64-gnu@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.2-canary.0.tgz#d9022f44e0b243d32d39eeac683b1f189ff41487"
integrity sha512-2RPr5AxawTUVaQGrkhWWpjVdExPiA8wEJL6E1itI2gNav8LU3FEsIr9juQURv47Xn2KE286fw8214D6+D0RExg==
"@next/swc-linux-x64-musl@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.2-canary.0.tgz#8868f650f11594862fa183e0a0dac66d9c72973b"
integrity sha512-gKr5tJoJKGSlmDdpmoO1fe6oUeVMz2TluspKPM4ulc0rqyXjrRmQ9pd/oqEoypUKTUkqL49lt4hTL98MkhvXWg==
"@next/swc-win32-arm64-msvc@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.2-canary.0.tgz#29faaa4b760128c648f153964e94a8191bb0b2d7"
integrity sha512-0N7+lcV8ycqzgJIye40+Vl0iUk/mu3919T2kfnt20WU7gP+rpRJkPfP44yxBdt7U7XYtnqldM2Ox969y+0qJVw==
"@next/swc-win32-ia32-msvc@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.2-canary.0.tgz#078350e676d1a146442dbc7b1f5c4e03cb1345a5"
integrity sha512-vqdsKfJcfvf37P7YcJeIaPP5E7iSR7yTaHwgBpvY6Q0tDRxPv0gr4nRXElBs/V1VcxMaSx9PyyiQkKYB6UzEhg==
"@next/swc-win32-x64-msvc@13.2.2-canary.0":
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.2-canary.0.tgz#7ca59776b5440e6de3aee341d571a8a4f7cbb40a"
integrity sha512-Hf1XQaP/hpi9ddS128u8+npotRzX5EOt9y4nxzHRKn6BmjgAKY7CEBsFQMsjVHWqit2Jt3jXspgaCVIFOCE9Ng==
"@swc/helpers@0.4.14":
version "0.4.14"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74"
integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==
dependencies:
tslib "^2.4.0"
caniuse-lite@^1.0.30001406:
version "1.0.30001457"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz#6af34bb5d720074e2099432aa522c21555a18301"
integrity sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==
client-only@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
"js-tokens@^3.0.0 || ^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
loose-envify@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
nanoid@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
next@13.2.2-canary.0:
version "13.2.2-canary.0"
resolved "https://registry.yarnpkg.com/next/-/next-13.2.2-canary.0.tgz#7b8c9e2391d947fb66636fe988af644f2e930db2"
integrity sha512-sAzQCPI06df+TY7NI6txOkc7sOC7sErnOGF7vXA28GcQ0r4V09s4GDe8XTlPckxJ7o2Ky4OU1eN4NJ3vnDCcZQ==
dependencies:
"@next/env" "13.2.2-canary.0"
"@swc/helpers" "0.4.14"
caniuse-lite "^1.0.30001406"
postcss "8.4.14"
styled-jsx "5.1.1"
optionalDependencies:
"@next/swc-android-arm-eabi" "13.2.2-canary.0"
"@next/swc-android-arm64" "13.2.2-canary.0"
"@next/swc-darwin-arm64" "13.2.2-canary.0"
"@next/swc-darwin-x64" "13.2.2-canary.0"
"@next/swc-freebsd-x64" "13.2.2-canary.0"
"@next/swc-linux-arm-gnueabihf" "13.2.2-canary.0"
"@next/swc-linux-arm64-gnu" "13.2.2-canary.0"
"@next/swc-linux-arm64-musl" "13.2.2-canary.0"
"@next/swc-linux-x64-gnu" "13.2.2-canary.0"
"@next/swc-linux-x64-musl" "13.2.2-canary.0"
"@next/swc-win32-arm64-msvc" "13.2.2-canary.0"
"@next/swc-win32-ia32-msvc" "13.2.2-canary.0"
"@next/swc-win32-x64-msvc" "13.2.2-canary.0"
picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
postcss@8.4.14:
version "8.4.14"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
dependencies:
nanoid "^3.3.4"
picocolors "^1.0.0"
source-map-js "^1.0.2"
react-dom@18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
dependencies:
loose-envify "^1.1.0"
scheduler "^0.23.0"
react@18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
dependencies:
loose-envify "^1.1.0"
scheduler@^0.23.0:
version "0.23.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
dependencies:
loose-envify "^1.1.0"
source-map-js@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
styled-jsx@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f"
integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==
dependencies:
client-only "0.0.1"
tslib@^2.4.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
turbo-darwin-64@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.8.2.tgz#14c52e97d128c63fd3c7b2f15963123f02b9aa0e"
integrity sha512-j77U0uOeppENexFsIvvzExADSqMBEeCHnm+6LSNQfaajHSrbUVSTsuD6ZMYHamT6bslc+ZZm21jdecWkwZFBbw==
turbo-darwin-arm64@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.8.2.tgz#ae5efdb89cbdd667feacd3fe8e9c8110691a4d95"
integrity sha512-1NoAvjlwt2wycsAFJouauy9epn9DptSMy6BoGqxJVc4jiibsLepp9qYc4f1/ln0zjd3FR1IvhGOiBfdpqMN7hg==
turbo-linux-64@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.8.2.tgz#02442a48104db83c1e53409c85744fdeacbded56"
integrity sha512-TcT3CRYnBYA46kLGGbGC2jDyCEAvMgVpUdpIZGTmod48EKpZaEfVgTkpa4GJde8W68yRFogPZjPVL3yJHFpXSA==
turbo-linux-arm64@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.8.2.tgz#890ad0691671cb252e756dcd56295895f61d369a"
integrity sha512-Mb9+KBy4YJzPMZ6WGoMzMVZ6EtueCSvOvgmNpVFgkwbtabfBuaBOvN+irtg4RRSWvJQTDTziLABieocEEXZImQ==
turbo-windows-64@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.8.2.tgz#a57b902cdccdb69d1efa18772bee9e277e079583"
integrity sha512-/+R5ikRrw2w2w38JtNPubGLIQHgUC70m783DI9aPgaM5c8P5D/Y0k6HgjuC/uXgiaz2h3R7p7YWlr+2/E0bqyA==
turbo-windows-arm64@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.8.2.tgz#0f976a2c6b8a46447fc277d5a9f7d8615792bdde"
integrity sha512-s07viz5nXSx4kyiksuPM4FGLRkoaGMaw0BpwFjdRQsl1p+WclUN1IPdokVPKOmFpu5pNCVYlG/raP/mXAEzDCg==
turbo@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.8.2.tgz#869e674a524cde4f449ae4458f4651818e2ffe00"
integrity sha512-G/uJx6bZK5RwTWHsRN/MP0MvXFznmCaL3MQXdSf+OG/q0o8GE7+yivyyWEplWI1Asc8AEN909A/wlIkoz2FKTg==
optionalDependencies:
turbo-darwin-64 "1.8.2"
turbo-darwin-arm64 "1.8.2"
turbo-linux-64 "1.8.2"
turbo-linux-arm64 "1.8.2"
turbo-windows-64 "1.8.2"
turbo-windows-arm64 "1.8.2"

View File

@@ -0,0 +1,8 @@
const path = require('path');
const { deployAndTest } = require('../../utils');
describe(`${__dirname.split(path.sep).pop()}`, () => {
it('should deploy and pass probe checks', async () => {
await deployAndTest(__dirname);
});
});

View File

@@ -0,0 +1,3 @@
export function register() {
globalThis.isOdd = require('is-odd');
}

View File

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

View File

@@ -0,0 +1,16 @@
{
"name": "instrumentation-hook",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "canary",
"react": "latest",
"react-dom": "latest",
"is-odd": "3.0.1"
}
}

View File

@@ -0,0 +1,5 @@
export default async (req, res) => {
res.status(200).json({
payload: `isOdd: ${globalThis.isOdd(3)}`,
});
};

View File

@@ -0,0 +1,11 @@
export default function Home(props) {
return `isOdd: ${props.isOdd}`;
}
export async function getServerSideProps() {
return {
props: {
isOdd: globalThis.isOdd(2),
},
};
}

View File

@@ -0,0 +1,14 @@
{
"probes": [
{
"path": "/",
"status": 200,
"mustContain": "isOdd: false"
},
{
"path": "/api/hello",
"status": 200,
"mustContain": "isOdd: true"
}
]
}

View File

@@ -71,8 +71,11 @@ export const createLoggerServer = async (): Promise<LoggerServer> => {
process.env.NEXT_TELEMETRY_DISABLED = '1';
export async function deployAndTest(fixtureDir) {
const { deploymentId, deploymentUrl } = await testDeployment(fixtureDir);
export async function deployAndTest(fixtureDir, opts) {
const { deploymentId, deploymentUrl } = await testDeployment(
fixtureDir,
opts
);
return {
deploymentId,

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node-bridge",
"version": "3.1.12",
"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.8",
"version": "2.9.10",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -31,8 +31,8 @@
"dependencies": {
"@edge-runtime/vm": "2.0.0",
"@types/node": "14.18.33",
"@vercel/build-utils": "6.3.1",
"@vercel/node-bridge": "3.1.12",
"@vercel/build-utils": "6.3.2",
"@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,22 +1,29 @@
import { forkDevServer, readMessage } from '../src/fork-dev-server';
import { resolve } from 'path';
import { resolve, extname } from 'path';
import fetch from 'node-fetch';
jest.setTimeout(10 * 1000);
test('runs a mjs endpoint', async () => {
const child = forkDevServer({
function testForkDevServer(entrypoint: string) {
const ext = extname(entrypoint);
const isTypeScript = ext === '.ts';
const isEsm = ext === '.mjs';
return forkDevServer({
maybeTranspile: true,
config: {},
isEsm: true,
isTypeScript: false,
isEsm,
isTypeScript,
meta: {},
require_: require,
tsConfig: undefined,
workPath: resolve(__dirname, './dev-fixtures'),
entrypoint: './esm-module.mjs',
entrypoint,
devServerPath: resolve(__dirname, '../dist/dev-server.js'),
});
}
test('runs a mjs endpoint', async () => {
const child = testForkDevServer('./esm-module.mjs');
try {
const result = await readMessage(child);
@@ -44,18 +51,7 @@ test('runs a mjs endpoint', async () => {
});
test('runs a esm typescript endpoint', async () => {
const child = forkDevServer({
maybeTranspile: true,
config: {},
isEsm: true,
isTypeScript: true,
meta: {},
require_: require,
tsConfig: undefined,
workPath: resolve(__dirname, './dev-fixtures'),
entrypoint: './esm-module.ts',
devServerPath: resolve(__dirname, '../dist/dev-server.js'),
});
const child = testForkDevServer('./esm-module.ts');
try {
const result = await readMessage(child);

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/python",
"version": "3.1.50",
"version": "3.1.51",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -23,7 +23,7 @@
"@types/execa": "^0.9.0",
"@types/jest": "27.4.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"@vercel/ncc": "0.24.0",
"execa": "^1.0.0",
"typescript": "4.3.4"

View File

@@ -17,7 +17,7 @@
{
"path": "/cookie_wsgi.py",
"responseHeaders": {
"set-cookie": ["one=first", "two=second"]
"set-cookie": ["one=first; Path=/", "two=second; Path=/"]
}
}
]

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/redwood",
"version": "1.1.6",
"version": "1.1.7",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs",
@@ -20,14 +20,14 @@
},
"dependencies": {
"@vercel/nft": "0.22.5",
"@vercel/routing-utils": "2.1.9",
"@vercel/routing-utils": "2.1.10",
"semver": "6.1.1"
},
"devDependencies": {
"@types/aws-lambda": "8.10.19",
"@types/node": "14.18.33",
"@types/semver": "6.0.0",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"execa": "3.2.0",
"fs-extra": "11.1.0",
"typescript": "4.3.4"

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix",
"version": "1.4.1",
"version": "1.4.3",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -18,7 +18,8 @@
"files": [
"dist",
"server-node.mjs",
"server-edge.mjs"
"server-edge.mjs",
"vercel-edge-entrypoint.js"
],
"dependencies": {
"@remix-run/dev": "1.13.0",
@@ -30,7 +31,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "14.18.33",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"typescript": "4.9.4"
}
}

View File

@@ -54,11 +54,13 @@ function createRemixRequest(req, res) {
}
async function sendRemixResponse(res, nodeResponse) {
res.statusCode = nodeResponse.status;
res.statusMessage = nodeResponse.statusText;
for (const [name, value] of nodeResponse.headers.entries()) {
res.setHeader(name, value);
}
let multiValueHeaders = nodeResponse.headers.raw();
res.writeHead(
nodeResponse.status,
nodeResponse.statusText,
multiValueHeaders
);
if (nodeResponse.body) {
await writeReadableStreamToWritable(nodeResponse.body, res);

View File

@@ -5,6 +5,7 @@ import {
debug,
download,
execCommand,
FileBlob,
FileFsRef,
getEnvForPackageManager,
getNodeVersion,
@@ -92,6 +93,14 @@ export const build: BuildV2 = async ({
await runNpmInstall(entrypointFsDirname, [], spawnOpts, meta, nodeVersion);
}
const remixDevPackageJsonPath = _require.resolve(
'@remix-run/dev/package.json',
{ paths: [entrypointFsDirname] }
);
const remixVersion = JSON.parse(
await fs.readFile(remixDevPackageJsonPath, 'utf8')
).version;
// Make `remix build` output production mode
spawnOpts.env.NODE_ENV = 'production';
@@ -207,14 +216,16 @@ module.exports = config;`;
repoRootPath,
join(entrypointFsDirname, serverBuildPath),
remixConfig.serverEntryPoint,
nodeVersion
nodeVersion,
remixVersion
),
hasEdgeRoute
? createRenderEdgeFunction(
entrypointFsDirname,
repoRootPath,
join(entrypointFsDirname, serverBuildPath),
remixConfig.serverEntryPoint
remixConfig.serverEntryPoint,
remixVersion
)
: undefined,
]);
@@ -237,6 +248,12 @@ module.exports = config;`;
const path = 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.
if (!path) {
continue;
}
let isEdge = false;
for (const currentRoute of getRouteIterator(route, remixConfig.routes)) {
const staticConfig = staticConfigsMap.get(currentRoute);
@@ -294,7 +311,8 @@ async function createRenderNodeFunction(
rootDir: string,
serverBuildPath: string,
serverEntryPoint: string | undefined,
nodeVersion: NodeVersion
nodeVersion: NodeVersion,
remixVersion: string
): Promise<NodejsLambda> {
const files: Files = {};
@@ -331,6 +349,10 @@ async function createRenderNodeFunction(
shouldAddSourcemapSupport: false,
operationType: 'SSR',
experimentalResponseStreaming: true,
framework: {
slug: 'remix',
version: remixVersion,
},
});
return fn;
@@ -340,7 +362,8 @@ async function createRenderEdgeFunction(
entrypointDir: string,
rootDir: string,
serverBuildPath: string,
serverEntryPoint: string | undefined
serverEntryPoint: string | undefined,
remixVersion: string
): Promise<EdgeFunction> {
const files: Files = {};
@@ -355,6 +378,8 @@ async function createRenderEdgeFunction(
await fs.copyFile(sourceHandlerPath, handlerPath);
}
let remixRunVercelPkgJson: string | undefined;
// Trace the handler with `@vercel/nft`
const trace = await nodeFileTrace([handlerPath], {
base: rootDir,
@@ -373,6 +398,35 @@ async function createRenderEdgeFunction(
if (basename(fsPath) === 'package.json') {
// For Edge Functions, patch "main" field to prefer "browser" or "module"
const pkgJson = JSON.parse(source.toString());
// When `@remix-run/vercel` is detected, we need to modify the `package.json`
// to include the "browser" field so that the proper Edge entrypoint file
// is used. This is a temporary stop gap until this PR is merged:
// https://github.com/remix-run/remix/pull/5537
if (pkgJson.name === '@remix-run/vercel') {
pkgJson.browser = 'dist/edge.js';
pkgJson.dependencies['@remix-run/server-runtime'] =
pkgJson.dependencies['@remix-run/node'];
if (!remixRunVercelPkgJson) {
remixRunVercelPkgJson = JSON.stringify(pkgJson, null, 2) + '\n';
// Copy in the edge entrypoint so that NFT can properly resolve it
const vercelEdgeEntrypointPath = join(
__dirname,
'../vercel-edge-entrypoint.js'
);
const vercelEdgeEntrypointDest = join(
dirname(fsPath),
'dist/edge.js'
);
await fs.copyFile(
vercelEdgeEntrypointPath,
vercelEdgeEntrypointDest
);
}
}
for (const prop of ['browser', 'module']) {
const val = pkgJson[prop];
if (typeof val === 'string') {
@@ -393,7 +447,15 @@ async function createRenderEdgeFunction(
}
for (const file of trace.fileList) {
files[file] = await FileFsRef.fromFsPath({ fsPath: join(rootDir, file) });
if (
remixRunVercelPkgJson &&
file.endsWith(`@remix-run${sep}vercel${sep}package.json`)
) {
// Use the modified `@remix-run/vercel` package.json which contains "browser" field
files[file] = new FileBlob({ data: remixRunVercelPkgJson });
} else {
files[file] = await FileFsRef.fromFsPath({ fsPath: join(rootDir, file) });
}
}
const fn = new EdgeFunction({
@@ -401,6 +463,10 @@ async function createRenderEdgeFunction(
deploymentTarget: 'v8-worker',
name: 'render',
entrypoint: handler,
framework: {
slug: 'remix',
version: remixVersion,
},
});
return fn;
@@ -435,14 +501,7 @@ 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.`
);
await ensureSymlink(pkgDir, join(pnpmDir, '..'), pkgName);
return;
}
}
@@ -460,14 +519,7 @@ 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.`
);
await ensureSymlink(pkgDir, join(npmDir, '..'), pkgName);
return;
}
}
@@ -477,6 +529,37 @@ async function ensureResolvable(start: string, base: string, pkgName: string) {
);
}
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.`
);
}
function isEdgeRuntime(runtime: string): boolean {
return runtime === 'edge' || runtime === 'experimental-edge';
}

View File

@@ -41,9 +41,12 @@ export function getPathFromRoute(
route: ConfigRoute,
routes: RouteManifest
): string {
if (route.id === 'root' || (route.parentId === 'root' && route.index)) {
return 'index';
}
const pathParts: string[] = [];
for (const currentRoute of getRouteIterator(route, routes)) {
if (currentRoute.index) pathParts.push('index');
if (currentRoute.path) pathParts.push(currentRoute.path);
}
const path = pathParts.reverse().join('/');

View File

@@ -0,0 +1,4 @@
// This is a pathless layout route at the root level,
// but there are no child routes, so a function should
// not be created for this route.
export default () => <div>pathless layout route</div>;

View File

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

View File

@@ -0,0 +1,3 @@
// This is a pathless layout route without any child routes,
// but Remix will serve this since its not at the root level.
export default () => <div>nested2 pathless layout route</div>;

View File

@@ -0,0 +1,10 @@
import type { LoaderFunction } from '@remix-run/server-runtime';
export const config = { runtime: 'edge' };
export const loader: LoaderFunction = () => {
const headers = new Headers();
headers.append('Set-Cookie', 'hello=world');
headers.append('Set-Cookie', 'foo=bar');
return new Response(null, { headers });
};

View File

@@ -0,0 +1,8 @@
import type { LoaderFunction } from '@remix-run/server-runtime';
export const loader: LoaderFunction = () => {
const headers = new Headers();
headers.append('Set-Cookie', 'hello=world');
headers.append('Set-Cookie', 'foo=bar');
return new Response(null, { headers });
};

View File

@@ -15,10 +15,38 @@
{ "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" },
{ "path": "/nested/index", "status": 404, "mustContain": "Not Found" },
{ "path": "/asdf", "status": 404, "mustContain": "Not Found" },
{ "path": "/instanceof", "mustContain": "InstanceOfRequest: true" },
{ "path": "/projects/edge", "mustContain": "\"isEdge\":true" },
{ "path": "/projects/node", "mustContain": "\"isEdge\":false" }
{ "path": "/projects/node", "mustContain": "\"isEdge\":false" },
{
"path": "/__pathless",
"status": 404,
"mustContain": "Not Found"
},
{
"path": "/nested2",
"mustContain": "nested2 pathless layout route"
},
{
"path": "/nested2/__pathless",
"status": 404,
"mustContain": "Not Found"
},
{
"path": "/set-cookie-edge",
"status": 200,
"responseHeaders": {
"set-cookie": ["hello=world", "foo=bar"]
}
},
{
"path": "/set-cookie-node",
"status": 200,
"responseHeaders": {
"set-cookie": ["hello=world", "foo=bar"]
}
}
]
}

View File

@@ -0,0 +1,9 @@
export const config = { runtime: 'edge' };
export default function Edge() {
return (
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.4' }}>
<h1>Welcome to Remix@Edge</h1>
</div>
);
}

View File

@@ -1,4 +1,4 @@
import { json, LoaderFunction } from "@remix-run/node";
import { json, LoaderFunction } from "@remix-run/server-runtime";
export const loader: LoaderFunction = ({ context }) => {
return json(context);

View File

@@ -11,6 +11,7 @@
],
"probes": [
{ "path": "/", "mustContain": "Welcome to Remix" },
{ "path": "/edge", "mustContain": "Welcome to Remix@Edge" },
{ "path": "/load-context", "mustContain": "{\"nodeLoadContext\":true}" }
]
}

View File

@@ -5,7 +5,7 @@
"src": "package.json",
"use": "@vercel/remix",
"config": {
"installCommand": "npm install --install-strategy=linked",
"installCommand": "npm install --install-strategy=linked && ln -sf broken 'node_modules/@remix-run/server-runtime'",
"zeroConfig": true
}
}

View File

@@ -4,6 +4,12 @@ import type { RouteManifest } from '@remix-run/dev/dist/config/routes';
describe('getPathFromRoute()', () => {
const routes: RouteManifest = {
root: { path: '', id: 'root', file: 'root.tsx' },
'routes/__pathless': {
path: undefined,
id: 'routes/__pathless',
parentId: 'root',
file: 'routes/__pathless.tsx',
},
'routes/$foo.$bar.$baz': {
path: ':foo/:bar/:baz',
id: 'routes/$foo.$bar.$baz',
@@ -22,12 +28,24 @@ describe('getPathFromRoute()', () => {
parentId: 'root',
file: 'routes/projects.tsx',
},
'routes/projects/__pathless': {
path: undefined,
id: 'routes/projects/__pathless',
parentId: 'routes/projects',
file: 'routes/projects/__pathless.tsx',
},
'routes/projects/index': {
path: undefined,
index: true,
id: 'routes/projects/indexx',
id: 'routes/projects/index',
parentId: 'routes/projects',
file: 'routes/projects/indexx.tsx',
file: 'routes/projects/index.tsx',
},
'routes/projects/create': {
path: 'create',
id: 'routes/projects/create',
parentId: 'routes/projects',
file: 'routes/projects/create.tsx',
},
'routes/projects/$': {
path: '*',
@@ -57,11 +75,14 @@ describe('getPathFromRoute()', () => {
};
it.each([
{ id: 'root', expected: '' },
{ 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/index', expected: 'projects/index' },
{ 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' },

View File

@@ -0,0 +1,21 @@
/**
* Edge runtime entrypoint for `@remix-run/vercel`.
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var serverRuntime = require('@remix-run/server-runtime');
/**
* Returns a request handler for the Vercel Edge runtime that serves
* the Remix SSR response.
*/
function createRequestHandler({ build, mode }) {
let handleRequest = serverRuntime.createRequestHandler(build, mode);
return request => {
return handleRequest(request);
};
}
exports.createRequestHandler = createRequestHandler;

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/routing-utils",
"version": "2.1.9",
"version": "2.1.10",
"description": "Vercel routing utilities",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@@ -155,6 +155,12 @@ export const routesSchema = {
},
middleware: { type: 'number' },
middlewarePath: { type: 'string' },
middlewareRawSrc: {
type: 'array',
items: {
type: 'string',
},
},
has: hasSchema,
missing: hasSchema,
},

View File

@@ -1,7 +1,7 @@
{
"name": "@vercel/ruby",
"author": "Nathan Cahill <nathan@nathancahill.com>",
"version": "1.3.67",
"version": "1.3.68",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
@@ -22,7 +22,7 @@
"devDependencies": {
"@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0",
"@vercel/build-utils": "6.3.1",
"@vercel/build-utils": "6.3.2",
"@vercel/ncc": "0.24.0",
"execa": "2.0.4",
"fs-extra": "^7.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "1.3.12",
"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.9"
"@vercel/gatsby-plugin-vercel-analytics": "1.0.8",
"@vercel/gatsby-plugin-vercel-builder": "1.1.11"
},
"devDependencies": {
"@types/aws-lambda": "8.10.64",
@@ -42,11 +42,11 @@
"@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0",
"@types/semver": "7.3.13",
"@vercel/build-utils": "6.3.1",
"@vercel/frameworks": "1.3.1",
"@vercel/fs-detectors": "3.8.1",
"@vercel/build-utils": "6.3.2",
"@vercel/frameworks": "1.3.2",
"@vercel/fs-detectors": "3.8.2",
"@vercel/ncc": "0.24.0",
"@vercel/routing-utils": "2.1.9",
"@vercel/routing-utils": "2.1.10",
"@vercel/static-config": "2.0.13",
"execa": "3.2.0",
"fs-extra": "10.0.0",

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

144
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.2
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.2
api:
specifiers:
@@ -204,23 +204,23 @@ importers:
'@types/which': 1.3.2
'@types/write-json-file': 2.2.1
'@types/yauzl-promise': 2.1.0
'@vercel/build-utils': 6.3.1
'@vercel/client': 12.4.1
'@vercel/build-utils': 6.3.2
'@vercel/client': 12.4.2
'@vercel/error-utils': 1.0.8
'@vercel/frameworks': 1.3.1
'@vercel/fs-detectors': 3.8.1
'@vercel/frameworks': 1.3.2
'@vercel/fs-detectors': 3.8.2
'@vercel/fun': 1.0.4
'@vercel/go': 2.3.8
'@vercel/hydrogen': 0.0.54
'@vercel/go': 2.3.9
'@vercel/hydrogen': 0.0.55
'@vercel/ncc': 0.24.0
'@vercel/next': 3.6.1
'@vercel/node': 2.9.8
'@vercel/python': 3.1.50
'@vercel/redwood': 1.1.6
'@vercel/remix': 1.4.1
'@vercel/routing-utils': 2.1.9
'@vercel/ruby': 1.3.67
'@vercel/static-build': 1.3.12
'@vercel/next': 3.6.2
'@vercel/node': 2.9.10
'@vercel/python': 3.1.51
'@vercel/redwood': 1.1.7
'@vercel/remix': 1.4.3
'@vercel/routing-utils': 2.1.10
'@vercel/ruby': 1.3.68
'@vercel/static-build': 1.3.14
'@zeit/source-map-support': 0.6.2
ajv: 6.12.2
alpha-sort: 2.0.1
@@ -444,8 +444,8 @@ importers:
'@types/node-fetch': 2.5.4
'@types/recursive-readdir': 2.2.0
'@types/tar-fs': 1.16.1
'@vercel/build-utils': 6.3.1
'@vercel/routing-utils': 2.1.9
'@vercel/build-utils': 6.3.2
'@vercel/routing-utils': 2.1.10
'@zeit/fetch': 5.2.0
async-retry: 1.2.3
async-sema: 3.0.0
@@ -525,7 +525,7 @@ importers:
'@types/js-yaml': 3.12.1
'@types/node': 14.18.33
'@types/node-fetch': 2.5.8
'@vercel/routing-utils': 2.1.9
'@vercel/routing-utils': 2.1.10
ajv: 6.12.2
js-yaml: 3.13.1
typescript: 4.3.4
@@ -549,10 +549,10 @@ importers:
'@types/minimatch': 3.0.5
'@types/node': 14.18.33
'@types/semver': 7.3.10
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/error-utils': 1.0.8
'@vercel/frameworks': 1.3.1
'@vercel/routing-utils': 2.1.9
'@vercel/frameworks': 1.3.2
'@vercel/routing-utils': 2.1.10
glob: 8.0.3
js-yaml: 4.1.0
json5: 2.2.2
@@ -597,9 +597,9 @@ importers:
'@types/fs-extra': 11.0.1
'@types/node': 14.18.33
'@types/react': 18.0.26
'@vercel/build-utils': 6.3.1
'@vercel/node': 2.9.8
'@vercel/routing-utils': 2.1.9
'@vercel/build-utils': 6.3.2
'@vercel/node': 2.9.10
'@vercel/routing-utils': 2.1.10
ajv: 8.12.0
esbuild: 0.14.47
etag: 1.8.1
@@ -632,7 +632,7 @@ importers:
'@types/node': 14.18.33
'@types/node-fetch': ^2.3.0
'@types/tar': ^4.0.0
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/ncc': 0.24.0
async-retry: 1.3.1
execa: ^1.0.0
@@ -664,7 +664,7 @@ importers:
specifiers:
'@types/jest': 27.5.1
'@types/node': 14.18.33
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/static-config': 2.0.13
execa: 3.2.0
fs-extra: 11.1.0
@@ -695,9 +695,9 @@ importers:
'@types/semver': 6.0.0
'@types/text-table': 0.2.1
'@types/webpack-sources': 3.2.0
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/nft': 0.22.5
'@vercel/routing-utils': 2.1.9
'@vercel/routing-utils': 2.1.10
async-sema: 3.0.1
buffer-crc32: 0.2.13
bytes: 3.1.2
@@ -774,10 +774,10 @@ importers:
'@types/node': 14.18.33
'@types/node-fetch': ^2.6.1
'@types/test-listen': 1.1.0
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/ncc': 0.24.0
'@vercel/nft': 0.22.5
'@vercel/node-bridge': 3.1.12
'@vercel/node-bridge': 3.1.14
'@vercel/static-config': 2.0.13
content-type: 1.0.4
cookie: 0.4.0
@@ -858,7 +858,7 @@ importers:
'@types/execa': ^0.9.0
'@types/jest': 27.4.1
'@types/node': 14.18.33
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/ncc': 0.24.0
execa: ^1.0.0
typescript: 4.3.4
@@ -876,9 +876,9 @@ importers:
'@types/aws-lambda': 8.10.19
'@types/node': 14.18.33
'@types/semver': 6.0.0
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/nft': 0.22.5
'@vercel/routing-utils': 2.1.9
'@vercel/routing-utils': 2.1.10
execa: 3.2.0
fs-extra: 11.1.0
semver: 6.1.1
@@ -901,7 +901,7 @@ importers:
'@remix-run/dev': 1.13.0
'@types/jest': 27.5.1
'@types/node': 14.18.33
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/nft': 0.22.5
'@vercel/static-config': 2.0.13
path-to-regexp: 6.2.1
@@ -948,7 +948,7 @@ importers:
dependencies:
path-to-regexp: 6.1.0
optionalDependencies:
ajv: 6.12.6
ajv: 6.12.2
devDependencies:
'@types/jest': 27.4.1
'@types/node': 14.18.33
@@ -958,7 +958,7 @@ importers:
specifiers:
'@types/fs-extra': 8.0.0
'@types/semver': 6.0.0
'@vercel/build-utils': 6.3.1
'@vercel/build-utils': 6.3.2
'@vercel/ncc': 0.24.0
execa: 2.0.4
fs-extra: ^7.0.1
@@ -985,13 +985,13 @@ importers:
'@types/node-fetch': 2.5.4
'@types/promise-timeout': 1.3.0
'@types/semver': 7.3.13
'@vercel/build-utils': 6.3.1
'@vercel/frameworks': 1.3.1
'@vercel/fs-detectors': 3.8.1
'@vercel/gatsby-plugin-vercel-analytics': 1.0.7
'@vercel/gatsby-plugin-vercel-builder': 1.1.9
'@vercel/build-utils': 6.3.2
'@vercel/frameworks': 1.3.2
'@vercel/fs-detectors': 3.8.2
'@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.9
'@vercel/routing-utils': 2.1.10
'@vercel/static-config': 2.0.13
execa: 3.2.0
fs-extra: 10.0.0
@@ -7578,6 +7578,14 @@ packages:
resolution: {integrity: sha512-hCOfMzbFx5IDutmWLAt6MZwOUjIfSM9G9FyVxytmE4Rs/5YDPWQrD/+IR1w+FweD9H2oOZEnv36TmkjhNURBVA==}
dev: false
/ajv-keywords/3.5.2_ajv@6.12.2:
resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==}
peerDependencies:
ajv: ^6.9.1
dependencies:
ajv: 6.12.2
dev: true
/ajv-keywords/3.5.2_ajv@6.12.6:
resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==}
peerDependencies:
@@ -7593,7 +7601,6 @@ packages:
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
dev: true
/ajv/6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
@@ -7602,6 +7609,7 @@ packages:
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
dev: true
/ajv/8.12.0:
resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==}
@@ -11844,7 +11852,7 @@ packages:
'@babel/code-frame': 7.12.11
'@eslint/eslintrc': 0.4.3
'@humanwhocodes/config-array': 0.5.0
ajv: 6.12.6
ajv: 6.12.2
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.4
@@ -11892,7 +11900,7 @@ packages:
dependencies:
'@eslint/eslintrc': 1.4.1
'@humanwhocodes/config-array': 0.9.5
ajv: 6.12.6
ajv: 6.12.2
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.4
@@ -20701,8 +20709,8 @@ packages:
engines: {node: '>= 8.9.0'}
dependencies:
'@types/json-schema': 7.0.11
ajv: 6.12.6
ajv-keywords: 3.5.2_ajv@6.12.6
ajv: 6.12.2
ajv-keywords: 3.5.2_ajv@6.12.2
dev: true
/schema-utils/2.7.1:
@@ -22519,65 +22527,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.2:
resolution: {integrity: sha512-j77U0uOeppENexFsIvvzExADSqMBEeCHnm+6LSNQfaajHSrbUVSTsuD6ZMYHamT6bslc+ZZm21jdecWkwZFBbw==}
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.2:
resolution: {integrity: sha512-1NoAvjlwt2wycsAFJouauy9epn9DptSMy6BoGqxJVc4jiibsLepp9qYc4f1/ln0zjd3FR1IvhGOiBfdpqMN7hg==}
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.2:
resolution: {integrity: sha512-TcT3CRYnBYA46kLGGbGC2jDyCEAvMgVpUdpIZGTmod48EKpZaEfVgTkpa4GJde8W68yRFogPZjPVL3yJHFpXSA==}
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.2:
resolution: {integrity: sha512-Mb9+KBy4YJzPMZ6WGoMzMVZ6EtueCSvOvgmNpVFgkwbtabfBuaBOvN+irtg4RRSWvJQTDTziLABieocEEXZImQ==}
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.2:
resolution: {integrity: sha512-/+R5ikRrw2w2w38JtNPubGLIQHgUC70m783DI9aPgaM5c8P5D/Y0k6HgjuC/uXgiaz2h3R7p7YWlr+2/E0bqyA==}
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.2:
resolution: {integrity: sha512-s07viz5nXSx4kyiksuPM4FGLRkoaGMaw0BpwFjdRQsl1p+WclUN1IPdokVPKOmFpu5pNCVYlG/raP/mXAEzDCg==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo/1.7.4:
resolution: {integrity: sha512-8RLedDoUL0kkVKWEZ/RMM70BvKLyDFen06QuKKhYC2XNOfNKqFDqzIdcY/vGick869bNIWalChoy4O07k0HLsA==}
/turbo/1.8.2:
resolution: {integrity: sha512-G/uJx6bZK5RwTWHsRN/MP0MvXFznmCaL3MQXdSf+OG/q0o8GE7+yivyyWEplWI1Asc8AEN909A/wlIkoz2FKTg==}
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.2
turbo-darwin-arm64: 1.8.2
turbo-linux-64: 1.8.2
turbo-linux-arm64: 1.8.2
turbo-windows-64: 1.8.2
turbo-windows-arm64: 1.8.2
dev: true
/tweetnacl/0.14.5:

View File

@@ -10,7 +10,7 @@ const ms = require('ms');
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
async function nowDeploy(projectName, bodies, randomness, uploadNowJson) {
async function nowDeploy(projectName, bodies, randomness, uploadNowJson, opts) {
const files = Object.keys(bodies)
.filter(n =>
uploadNowJson
@@ -68,7 +68,7 @@ async function nowDeploy(projectName, bodies, randomness, uploadNowJson) {
let deploymentUrl;
{
const json = await deploymentPost(nowDeployPayload);
const json = await deploymentPost(nowDeployPayload, opts);
if (json.error && json.error.code === 'missing_files')
throw new Error('Missing files');
deploymentId = json.id;
@@ -137,8 +137,11 @@ async function filePost(body, digest) {
return json;
}
async function deploymentPost(payload) {
const url = '/v13/deployments?skipAutoDetectionConfirmation=1&forceNew=1';
async function deploymentPost(payload, opts = {}) {
const url = `/v13/deployments?skipAutoDetectionConfirmation=1${
// skipForceNew allows turbo cache to be leveraged
!opts.skipForceNew ? `&forceNew=1` : ''
}`;
const resp = await fetchWithAuth(url, {
method: 'POST',
body: JSON.stringify(payload),

View File

@@ -220,26 +220,47 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
hadTest = true;
}
/**
* @type Record<string, string[]>
*/
const rawHeaders = resp.headers.raw();
if (probe.responseHeaders) {
// eslint-disable-next-line no-loop-func
Object.keys(probe.responseHeaders).forEach(header => {
const actual = resp.headers.get(header);
const expected = probe.responseHeaders[header];
const isEqual = Array.isArray(expected)
? expected.every(h => actual.includes(h))
: typeof expected === 'string' &&
expected.startsWith('/') &&
expected.endsWith('/')
? new RegExp(expected.slice(1, -1)).test(actual)
: expected === actual;
if (!isEqual) {
const headers = Array.from(resp.headers.entries())
.map(([k, v]) => ` ${k}=${v}`)
.join('\n');
const actualArr = rawHeaders[header.toLowerCase()];
let expectedArr = probe.responseHeaders[header];
throw new Error(
`Page ${probeUrl} does not have expected response header ${header}.\n\nExpected: ${expected}.\n\nActual: ${headers}`
);
// Header should not exist
if (expectedArr === null) {
if (actualArr) {
throw new Error(
`Page ${probeUrl} contains response header "${header}", but probe says it should not.\n\nActual: ${formatHeaders(
rawHeaders
)}`
);
}
return;
}
if (!Array.isArray(expectedArr)) {
expectedArr = [expectedArr];
}
for (const expected of expectedArr) {
let isEqual = false;
for (const actual of actualArr) {
isEqual =
expected.startsWith('/') && expected.endsWith('/')
? new RegExp(expected.slice(1, -1)).test(actual)
: expected === actual;
if (isEqual) break;
}
if (!isEqual) {
throw new Error(
`Page ${probeUrl} does not have expected response header ${header}.\n\nExpected: ${expected}.\n\nActual: ${formatHeaders(
rawHeaders
)}`
);
}
}
});
hadTest = true;
@@ -249,12 +270,10 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
const expected = probe.notResponseHeaders[header];
if (headerValue === expected) {
const headers = Array.from(resp.headers.entries())
.map(([k, v]) => ` ${k}=${v}`)
.join('\n');
throw new Error(
`Page ${probeUrl} has unexpected response header ${header}.\n\nDid not expect: ${header}=${expected}.\n\nAll: ${headers}`
`Page ${probeUrl} has unexpected response header ${header}.\n\nDid not expect: ${header}=${expected}.\n\nAll: ${formatHeaders(
rawHeaders
)}`
);
}
});
@@ -264,7 +283,7 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
assert(hadTest, 'probe must have a test condition');
}
async function testDeployment(fixturePath) {
async function testDeployment(fixturePath, opts) {
const projectName = path
.basename(fixturePath)
.toLowerCase()
@@ -329,7 +348,8 @@ async function testDeployment(fixturePath) {
projectName,
bodies,
randomness,
uploadNowJson
uploadNowJson,
opts
);
const probeCtx = {};
@@ -434,6 +454,15 @@ async function spawnAsync(...args) {
});
}
/**
* @param {Record<string, string[]>} headers
*/
function formatHeaders(headers) {
return Object.entries(headers)
.flatMap(([name, values]) => values.map(v => ` ${name}: ${v}`))
.join('\n');
}
module.exports = {
packAndDeploy,
testDeployment,

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