mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 12:57:46 +00:00
Compare commits
10 Commits
fixed-team
...
@vercel/py
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a26cbd8199 | ||
|
|
3eb9d8c892 | ||
|
|
83741a0eb9 | ||
|
|
9db0298981 | ||
|
|
af29e9be49 | ||
|
|
c9d53d4e3e | ||
|
|
a26ea7bf12 | ||
|
|
866d0c173d | ||
|
|
5f561f8cfa | ||
|
|
139e8cdb17 |
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -99,7 +99,7 @@ jobs:
|
||||
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
|
||||
- name: 'Upload Test Report to Datadog'
|
||||
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
|
||||
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'
|
||||
run: 'npx @datadog/datadog-ci@2.36.0 junit upload --service vercel-cli .junit-reports'
|
||||
env:
|
||||
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}
|
||||
DD_ENV: ci
|
||||
|
||||
2
examples/package.json
vendored
2
examples/package.json
vendored
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.4.1",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/frameworks": "3.0.2"
|
||||
},
|
||||
"version": null
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 1.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.36",
|
||||
"version": "1.0.37",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.d.ts",
|
||||
"files": [
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@types/node": "14.14.31",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/routing-utils": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 8.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [node] update node@16 deprecation day ([#11671](https://github.com/vercel/vercel/pull/11671))
|
||||
|
||||
## 8.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "8.2.0",
|
||||
"version": "8.2.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
|
||||
@@ -13,7 +13,7 @@ export const NODE_VERSIONS: NodeVersion[] = [
|
||||
major: 16,
|
||||
range: '16.x',
|
||||
runtime: 'nodejs16.x',
|
||||
discontinueDate: new Date('2024-06-15'),
|
||||
discontinueDate: new Date('2025-02-28'),
|
||||
},
|
||||
{
|
||||
major: 14,
|
||||
|
||||
6
packages/build-utils/test/unit.test.ts
vendored
6
packages/build-utils/test/unit.test.ts
vendored
@@ -286,7 +286,7 @@ it('should throw for discontinued versions', async () => {
|
||||
// Mock a future date so that Node 16 becomes discontinued
|
||||
const realDateNow = Date.now;
|
||||
try {
|
||||
global.Date.now = () => new Date('2024-07-16').getTime();
|
||||
global.Date.now = () => new Date('2025-03-01').getTime();
|
||||
|
||||
expect(getSupportedNodeVersion('8.10.x', false)).rejects.toThrow();
|
||||
expect(getSupportedNodeVersion('8.10.x', true)).rejects.toThrow();
|
||||
@@ -356,8 +356,8 @@ it('should warn for deprecated versions, soon to be discontinued', async () => {
|
||||
'Error: Node.js version 12.x has reached End-of-Life. Deployments created on or after 2022-10-03 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
'Error: Node.js version 14.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||
'Error: Node.js version 14.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2024-06-15 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2024-06-15 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2025-02-28 will fail to build. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.',
|
||||
'Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2025-02-28 will fail to build. Please set Node.js Version to 20.x in your Project Settings to use Node.js 20.',
|
||||
]);
|
||||
} finally {
|
||||
global.Date.now = realDateNow;
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
# vercel
|
||||
|
||||
## 34.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3eb9d8c89`](https://github.com/vercel/vercel/commit/3eb9d8c8929592960d88e0395e2a2443f7304d6b), [`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/python@4.3.0
|
||||
- @vercel/build-utils@8.2.1
|
||||
- @vercel/node@3.1.6
|
||||
- @vercel/static-build@2.5.10
|
||||
|
||||
## 34.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Don't create streaming lambdas for pages router routes ([#11660](https://github.com/vercel/vercel/pull/11660))
|
||||
|
||||
- Updated dependencies [[`c9d53d4e3`](https://github.com/vercel/vercel/commit/c9d53d4e3e4591b9b6bde86100564c9ee4c6d1d4), [`5f561f8cf`](https://github.com/vercel/vercel/commit/5f561f8cfa4720801a5cf4598f193ab34539abb9)]:
|
||||
- @vercel/next@4.2.14
|
||||
|
||||
## 34.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "34.2.2",
|
||||
"version": "34.2.4",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -12,8 +12,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|
||||
"vitest-unit-run": "pnpm vitest",
|
||||
"vitest-unit": "pnpm jest test/unit/ --listTests",
|
||||
"vitest-run": "vitest",
|
||||
"vitest-unit": "jest test/unit/ --listTests",
|
||||
"test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
|
||||
"test-dev": "pnpm test test/dev/",
|
||||
"coverage": "codecov",
|
||||
@@ -32,17 +32,17 @@
|
||||
"node": ">= 16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/go": "3.1.1",
|
||||
"@vercel/hydrogen": "1.0.2",
|
||||
"@vercel/next": "4.2.13",
|
||||
"@vercel/node": "3.1.5",
|
||||
"@vercel/python": "4.2.0",
|
||||
"@vercel/next": "4.2.14",
|
||||
"@vercel/node": "3.1.6",
|
||||
"@vercel/python": "4.3.0",
|
||||
"@vercel/redwood": "2.0.9",
|
||||
"@vercel/remix-builder": "2.1.6",
|
||||
"@vercel/ruby": "2.1.0",
|
||||
"@vercel/static-build": "2.5.9",
|
||||
"@vercel/static-build": "2.5.10",
|
||||
"chokidar": "3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -92,8 +92,8 @@
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel-internals/get-package-json": "1.0.0",
|
||||
"@vercel-internals/types": "1.0.36",
|
||||
"@vercel/client": "13.2.7",
|
||||
"@vercel-internals/types": "1.0.37",
|
||||
"@vercel/client": "13.2.8",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/frameworks": "3.0.2",
|
||||
"@vercel/fs-detectors": "5.2.3",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/client
|
||||
|
||||
## 13.2.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 13.2.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/client",
|
||||
"version": "13.2.7",
|
||||
"version": "13.2.8",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"homepage": "https://vercel.com",
|
||||
@@ -37,7 +37,7 @@
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"@zeit/fetch": "5.2.0",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"@types/minimatch": "3.0.5",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.10",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"jest-junit": "16.0.0",
|
||||
"typescript": "4.9.5"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/gatsby-plugin-vercel-builder
|
||||
|
||||
## 2.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 2.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/gatsby-plugin-vercel-builder",
|
||||
"version": "2.0.31",
|
||||
"version": "2.0.32",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "0.25.24",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"esbuild": "0.14.47",
|
||||
"etag": "1.8.1",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@types/node-fetch": "^2.3.0",
|
||||
"@types/tar": "6.1.5",
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"async-retry": "1.3.3",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @vercel/next
|
||||
|
||||
## 4.2.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Don't create streaming lambdas for pages router routes ([#11660](https://github.com/vercel/vercel/pull/11660))
|
||||
|
||||
- Ensure user rewrites still match to action outputs ([#11628](https://github.com/vercel/vercel/pull/11628))
|
||||
|
||||
## 4.2.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/next",
|
||||
"version": "4.2.13",
|
||||
"version": "4.2.14",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
||||
@@ -40,7 +40,7 @@
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/text-table": "0.2.1",
|
||||
"@types/webpack-sources": "3.2.0",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"async-sema": "3.0.1",
|
||||
"buffer-crc32": "0.2.13",
|
||||
|
||||
@@ -252,9 +252,19 @@ export async function serverBuild({
|
||||
|
||||
for (const rewrite of afterFilesRewrites) {
|
||||
if (rewrite.src && rewrite.dest) {
|
||||
// ensures that userland rewrites are still correctly matched to their special outputs
|
||||
// PPR should match .prefetch.rsc, .rsc, and .action
|
||||
// non-PPR should match .rsc and .action
|
||||
// we only add `.action` handling to the regex if flagged on in the build
|
||||
const rscSuffix = isAppPPREnabled
|
||||
? `(\\.prefetch)?\\.rsc${hasActionOutputSupport ? '|\\.action' : ''}`
|
||||
: hasActionOutputSupport
|
||||
? '(\\.action|\\.rsc)'
|
||||
: '\\.rsc';
|
||||
|
||||
rewrite.src = rewrite.src.replace(
|
||||
/\/?\(\?:\/\)\?/,
|
||||
`(?<rscsuff>${isAppPPREnabled ? '(\\.prefetch)?' : ''}\\.rsc)?(?:/)?`
|
||||
`(?<rscsuff>${rscSuffix})?(?:/)?`
|
||||
);
|
||||
let destQueryIndex = rewrite.dest.indexOf('?');
|
||||
|
||||
@@ -937,6 +947,10 @@ export async function serverBuild({
|
||||
const appRouterStreamingActionLambdaGroups: LambdaGroup[] = [];
|
||||
|
||||
for (const group of appRouterLambdaGroups) {
|
||||
if (!group.isPrerenders || group.isExperimentalPPR) {
|
||||
group.isStreaming = true;
|
||||
}
|
||||
|
||||
group.isAppRouter = true;
|
||||
|
||||
// We create a streaming variant of the Prerender lambda group
|
||||
@@ -951,6 +965,9 @@ export async function serverBuild({
|
||||
}
|
||||
|
||||
for (const group of appRouteHandlersLambdaGroups) {
|
||||
if (!group.isPrerenders) {
|
||||
group.isStreaming = true;
|
||||
}
|
||||
group.isAppRouter = true;
|
||||
group.isAppRouteHandler = true;
|
||||
}
|
||||
|
||||
@@ -1508,7 +1508,7 @@ export type LambdaGroup = {
|
||||
maxDuration?: number;
|
||||
isAppRouter?: boolean;
|
||||
isAppRouteHandler?: boolean;
|
||||
readonly isStreaming: boolean;
|
||||
isStreaming?: boolean;
|
||||
readonly isPrerenders: boolean;
|
||||
readonly isExperimentalPPR: boolean;
|
||||
isActionLambda?: boolean;
|
||||
@@ -1565,7 +1565,6 @@ export async function getPageLambdaGroups({
|
||||
const routeName = normalizePage(page.replace(/\.js$/, ''));
|
||||
const isPrerenderRoute = prerenderRoutes.has(routeName);
|
||||
const isExperimentalPPR = experimentalPPRRoutes?.has(routeName) ?? false;
|
||||
const isStreaming = !isPrerenderRoute || isExperimentalPPR;
|
||||
|
||||
let opts: { memory?: number; maxDuration?: number } = {};
|
||||
|
||||
@@ -1637,7 +1636,6 @@ export async function getPageLambdaGroups({
|
||||
...opts,
|
||||
isPrerenders: isPrerenderRoute,
|
||||
isExperimentalPPR,
|
||||
isStreaming,
|
||||
isApiLambda: !!isApiPage(page),
|
||||
pseudoLayerBytes: initialPseudoLayer.pseudoLayerBytes,
|
||||
pseudoLayerUncompressedBytes: initialPseudoLayerUncompressed,
|
||||
|
||||
@@ -273,6 +273,26 @@ describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
expect(body).toContain(JSON.stringify(['id', '1', 'd']));
|
||||
expect(body).not.toContain(JSON.stringify(['id', '1.action', 'd']));
|
||||
});
|
||||
|
||||
it('should work when a rewrite targets an action', async () => {
|
||||
const targetPath = `${basePath}/rsc/static`;
|
||||
const canonicalPath = `/rewrite/${basePath}/rsc/static`;
|
||||
const actionId = findActionId(targetPath, runtime);
|
||||
|
||||
const res = await fetch(
|
||||
`${ctx.deploymentUrl}${canonicalPath}`,
|
||||
generateFormDataPayload(actionId)
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers.get('x-matched-path')).toBe(targetPath + '.action');
|
||||
expect(res.headers.get('content-type')).toBe('text/x-component');
|
||||
if (runtime === 'node') {
|
||||
expect(res.headers.get('x-vercel-cache')).toBe('MISS');
|
||||
} else {
|
||||
expect(res.headers.get('x-edge-runtime')).toBe('1');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('pages', () => {
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
module.exports = {};
|
||||
module.exports = {
|
||||
rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/rewrite/rsc/static',
|
||||
destination: '/rsc/static',
|
||||
},
|
||||
{
|
||||
source: '/rewrite/edge/rsc/static',
|
||||
destination: '/edge/rsc/static',
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/node
|
||||
|
||||
## 3.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`83741a0eb`](https://github.com/vercel/vercel/commit/83741a0eb9e44457b083e8790a11eb89984e6357)]:
|
||||
- @vercel/build-utils@8.2.1
|
||||
|
||||
## 3.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/node",
|
||||
"version": "3.1.5",
|
||||
"version": "3.1.6",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
|
||||
@@ -12,9 +12,10 @@
|
||||
"scripts": {
|
||||
"build": "node build.mjs",
|
||||
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --env node --verbose --bail --runInBand",
|
||||
"test-unit": "pnpm test test/unit",
|
||||
"test-e2e": "pnpm test test/integration",
|
||||
"type-check": "tsc --noEmit"
|
||||
"type-check": "tsc --noEmit",
|
||||
"vitest-run": "vitest",
|
||||
"vitest-unit": "glob --absolute 'test/unit/**/*.test.ts' 'test/unit/**/*.test.mts'"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
@@ -24,7 +25,7 @@
|
||||
"@edge-runtime/primitives": "4.1.0",
|
||||
"@edge-runtime/vm": "3.2.0",
|
||||
"@types/node": "16.18.11",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/nft": "0.27.0",
|
||||
"@vercel/static-config": "3.0.0",
|
||||
@@ -51,13 +52,17 @@
|
||||
"@types/etag": "1.8.0",
|
||||
"@types/jest": "29.5.0",
|
||||
"@vercel/functions": "workspace:*",
|
||||
"@vitest/expect": "1.4.0",
|
||||
"content-type": "1.0.5",
|
||||
"cookie": "0.4.0",
|
||||
"cross-env": "7.0.3",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"glob": "10.3.16",
|
||||
"jest-junit": "16.0.0",
|
||||
"source-map-support": "0.5.12",
|
||||
"tree-kill": "1.2.2"
|
||||
"tree-kill": "1.2.2",
|
||||
"vite": "5.1.6",
|
||||
"vitest": "1.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ async function compile(
|
||||
const babelCompileEnabled =
|
||||
!isEdgeFunction || process.env.VERCEL_EDGE_NO_BABEL !== '1';
|
||||
if (babelCompileEnabled && esmPaths.length) {
|
||||
const babelCompile = require('./babel').compile;
|
||||
const babelCompile = (await import('./babel.js')).compile;
|
||||
for (const path of esmPaths) {
|
||||
const pathDir = join(workPath, dirname(path));
|
||||
if (!pkgCache.has(pathDir)) {
|
||||
@@ -348,7 +348,7 @@ async function compile(
|
||||
);
|
||||
}
|
||||
console.log(`Compiling "${filename}" from ESM to CommonJS...`);
|
||||
const { code, map } = babelCompile(filename, source);
|
||||
const { code, map } = babelCompile(filename, String(source));
|
||||
shouldAddSourcemapSupport = true;
|
||||
preparedFiles[path] = new FileBlob({
|
||||
data: `${code}\n//# sourceMappingURL=${filename}.map`,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { afterAll, describe, expect, test, vi } from 'vitest';
|
||||
import { forkDevServer, readMessage } from '../../src/fork-dev-server';
|
||||
import { resolve, extname } from 'path';
|
||||
import { createServer } from 'http';
|
||||
@@ -7,7 +8,7 @@ import { fetch } from 'undici';
|
||||
import { promisify } from 'util';
|
||||
import { setTimeout } from 'timers/promises';
|
||||
|
||||
jest.setTimeout(20 * 1000);
|
||||
vi.setConfig({ testTimeout: 20 * 1000 });
|
||||
|
||||
const [NODE_MAJOR] = process.versions.node.split('.').map(v => Number(v));
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, test, expect } from 'vitest';
|
||||
import { Headers, Response, Request } from 'node-fetch';
|
||||
import {
|
||||
getUrl,
|
||||
respond,
|
||||
// @ts-ignore - this is a special patch file to allow importing from the template
|
||||
} from '../../../src/edge-functions/edge-handler-template.mjs';
|
||||
} from '../../../src/edge-functions/edge-handler-template.js';
|
||||
|
||||
describe('edge-handler-template', () => {
|
||||
describe('getUrl()', () => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { prepareFilesystem } from '../test-utils';
|
||||
import { build } from '../../../src';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createEdgeWasmPlugin } from '../../../dist/edge-functions/edge-wasm-plugin.mjs';
|
||||
import { test, expect } from 'vitest';
|
||||
import { createEdgeWasmPlugin } from '../../../src/edge-functions/edge-wasm-plugin.mjs';
|
||||
import { prepareFilesystem } from '../test-utils';
|
||||
import { build } from 'esbuild';
|
||||
import { join } from 'path';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, test, expect } from 'vitest';
|
||||
import path from 'path';
|
||||
import assert from 'assert';
|
||||
import { prepareCache } from '../../src';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { getBodyParser } from '../../../src/serverless-functions/helpers';
|
||||
|
||||
describe('serverless-functions/helpers', () => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { entrypointToOutputPath } from '../../src/utils';
|
||||
|
||||
describe('entrypointToOutputPath()', () => {
|
||||
|
||||
26
packages/node/vitest.config.mts
Normal file
26
packages/node/vitest.config.mts
Normal file
@@ -0,0 +1,26 @@
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
// Use of process.chdir prohibits usage of the default "threads". https://vitest.dev/config/#forks
|
||||
pool: 'forks',
|
||||
env: {
|
||||
// Vitest supresses color output when `process.env.CI` is true
|
||||
// so override that behavior
|
||||
// Issue: https://github.com/vitest-dev/vitest/issues/2732
|
||||
// Fix: https://github.com/JoshuaKGoldberg/expect-no-axe-violations/pull/3/files
|
||||
FORCE_COLOR: '1',
|
||||
},
|
||||
exclude: [
|
||||
// default
|
||||
'**/node_modules/**',
|
||||
'**/dist/**',
|
||||
'**/cypress/**',
|
||||
'**/.{idea,git,cache,output,temp}/**',
|
||||
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
|
||||
// some artifacts in the fixtures have spec files that we're not using
|
||||
'**/*.spec.js',
|
||||
],
|
||||
},
|
||||
});
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/python
|
||||
|
||||
## 4.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- support newer python versions ([#11675](https://github.com/vercel/vercel/pull/11675))
|
||||
|
||||
## 4.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/python",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.0",
|
||||
"main": "./dist/index.js",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
||||
@@ -26,7 +26,7 @@
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/which": "3.0.0",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "11.1.1",
|
||||
"jest-junit": "16.0.0",
|
||||
|
||||
@@ -13,6 +13,7 @@ sys.modules["__VC_HANDLER_MODULE_NAME"] = __vc_module
|
||||
__vc_spec.loader.exec_module(__vc_module)
|
||||
__vc_variables = dir(__vc_module)
|
||||
|
||||
_use_legacy_asyncio = sys.version_info < (3, 10)
|
||||
|
||||
def format_headers(headers, decode=False):
|
||||
keyToList = {}
|
||||
@@ -198,16 +199,25 @@ elif 'app' in __vc_variables:
|
||||
ASGI instance using the connection scope.
|
||||
Runs until the response is completely read from the application.
|
||||
"""
|
||||
loop = asyncio.new_event_loop()
|
||||
self.app_queue = asyncio.Queue(loop=loop)
|
||||
if _use_legacy_asyncio:
|
||||
loop = asyncio.new_event_loop()
|
||||
self.app_queue = asyncio.Queue(loop=loop)
|
||||
else:
|
||||
self.app_queue = asyncio.Queue()
|
||||
self.put_message({'type': 'http.request', 'body': body, 'more_body': False})
|
||||
|
||||
asgi_instance = app(self.scope, self.receive, self.send)
|
||||
|
||||
asgi_task = loop.create_task(asgi_instance)
|
||||
loop.run_until_complete(asgi_task)
|
||||
if _use_legacy_asyncio:
|
||||
asgi_task = loop.create_task(asgi_instance)
|
||||
loop.run_until_complete(asgi_task)
|
||||
else:
|
||||
asyncio.run(self.run_asgi_instance(asgi_instance))
|
||||
return self.response
|
||||
|
||||
async def run_asgi_instance(self, asgi_instance):
|
||||
await asgi_instance
|
||||
|
||||
def put_message(self, message):
|
||||
self.app_queue.put_nowait(message)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"@types/aws-lambda": "8.10.19",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "6.0.0",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
"scripts": {
|
||||
"build": "node ../../utils/build-builder.mjs",
|
||||
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail --runInBand",
|
||||
"test-unit": "pnpm test test/unit.*test.*",
|
||||
"test-e2e": "pnpm test test/integration-*.test.ts",
|
||||
"vitest-run": "vitest",
|
||||
"vitest-unit": "glob --absolute 'test/unit/**/*.test.ts'",
|
||||
"vitest-e2e": "glob --absolute test/integration-*.test.ts",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"files": [
|
||||
@@ -32,9 +33,11 @@
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.13",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"glob": "10.3.16",
|
||||
"jest-junit": "16.0.0",
|
||||
"path-to-regexp": "6.2.1",
|
||||
"semver": "7.5.2"
|
||||
"semver": "7.5.2",
|
||||
"vitest": "1.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
const fs = require('fs');
|
||||
const { join } = require('path');
|
||||
import { vi, it, expect } from 'vitest';
|
||||
|
||||
const {
|
||||
testDeployment,
|
||||
} = require('../../../test/lib/deployment/test-deployment.js');
|
||||
|
||||
jest.setTimeout(12 * 60 * 1000);
|
||||
vi.setConfig({ testTimeout: 12 * 60 * 1000 });
|
||||
|
||||
const fixturesPath = join(__dirname, 'fixtures-legacy');
|
||||
|
||||
|
||||
3
packages/remix/test/integration-vite.test.ts
vendored
3
packages/remix/test/integration-vite.test.ts
vendored
@@ -1,11 +1,12 @@
|
||||
const fs = require('fs');
|
||||
const { join } = require('path');
|
||||
import { vi, it, expect } from 'vitest';
|
||||
|
||||
const {
|
||||
testDeployment,
|
||||
} = require('../../../test/lib/deployment/test-deployment.js');
|
||||
|
||||
jest.setTimeout(12 * 60 * 1000);
|
||||
vi.setConfig({ testTimeout: 12 * 60 * 1000 });
|
||||
|
||||
const fixturesPath = join(__dirname, 'fixtures-vite');
|
||||
const exampleAbsolute = (name: string) =>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { join } from 'path';
|
||||
import { promises as fs } from 'fs';
|
||||
import { ensureResolvable } from '../src/utils';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
const FIXTURES_DIR = join(__dirname, 'fixtures-legacy');
|
||||
|
||||
|
||||
1
packages/remix/test/unit.find-config.test.ts
vendored
1
packages/remix/test/unit.find-config.test.ts
vendored
@@ -1,5 +1,6 @@
|
||||
import { join } from 'path';
|
||||
import { findConfig } from '../src/utils';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
const fixture = (name: string) => join(__dirname, 'fixtures-legacy', name);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { getPathFromRoute } from '../src/utils';
|
||||
import type { RouteManifest } from '@remix-run/dev/dist/config/routes';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('getPathFromRoute()', () => {
|
||||
const routes: RouteManifest = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { getRegExpFromPath } from '../src/utils';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('getRegExpFromPath()', () => {
|
||||
describe('paths without parameters', () => {
|
||||
|
||||
@@ -4,6 +4,7 @@ import type {
|
||||
RouteManifest,
|
||||
} from '@remix-run/dev/dist/config/routes';
|
||||
import type { BaseFunctionConfig } from '@vercel/static-config';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('getResolvedRouteConfig()', () => {
|
||||
const staticConfigsMap = new Map<ConfigRoute, BaseFunctionConfig | null>([
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { isLayoutRoute } from '../src/utils';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('isLayoutRoute()', () => {
|
||||
const routes = [
|
||||
|
||||
1
packages/remix/test/unit.is-vite.test.ts
vendored
1
packages/remix/test/unit.is-vite.test.ts
vendored
@@ -1,6 +1,7 @@
|
||||
import { join } from 'path';
|
||||
import { readdirSync } from 'fs';
|
||||
import { isVite } from '../src/utils';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('isVite()', () => {
|
||||
it.each([
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { resolveSemverMinMax } from '../src/utils';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('resolveSemverMinMax()', () => {
|
||||
it.each([
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"@types/fs-extra": "8.0.0",
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/which": "3.0.0",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"execa": "2.0.4",
|
||||
"fs-extra": "^7.0.1",
|
||||
"jest-junit": "16.0.0",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/static-build
|
||||
|
||||
## 2.5.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @vercel/gatsby-plugin-vercel-builder@2.0.32
|
||||
|
||||
## 2.5.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/static-build",
|
||||
"version": "2.5.9",
|
||||
"version": "2.5.10",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/build-step",
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
||||
"@vercel/gatsby-plugin-vercel-builder": "2.0.31",
|
||||
"@vercel/gatsby-plugin-vercel-builder": "2.0.32",
|
||||
"@vercel/static-config": "3.0.0",
|
||||
"ts-morph": "12.0.0"
|
||||
},
|
||||
@@ -35,7 +35,7 @@
|
||||
"@types/node-fetch": "2.5.4",
|
||||
"@types/promise-timeout": "1.3.0",
|
||||
"@types/semver": "7.3.13",
|
||||
"@vercel/build-utils": "8.2.0",
|
||||
"@vercel/build-utils": "8.2.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/frameworks": "3.0.2",
|
||||
"@vercel/fs-detectors": "5.2.3",
|
||||
|
||||
170
pnpm-lock.yaml
generated
170
pnpm-lock.yaml
generated
@@ -132,7 +132,7 @@ importers:
|
||||
specifier: 27.4.1
|
||||
version: 27.4.1
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../packages/build-utils
|
||||
'@vercel/frameworks':
|
||||
specifier: 3.0.2
|
||||
@@ -189,7 +189,7 @@ importers:
|
||||
specifier: 1.0.4
|
||||
version: link:../constants
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../../packages/build-utils
|
||||
'@vercel/routing-utils':
|
||||
specifier: 3.1.0
|
||||
@@ -313,7 +313,7 @@ importers:
|
||||
packages/cli:
|
||||
dependencies:
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
'@vercel/fun':
|
||||
specifier: 1.1.0
|
||||
@@ -325,13 +325,13 @@ importers:
|
||||
specifier: 1.0.2
|
||||
version: link:../hydrogen
|
||||
'@vercel/next':
|
||||
specifier: 4.2.13
|
||||
specifier: 4.2.14
|
||||
version: link:../next
|
||||
'@vercel/node':
|
||||
specifier: 3.1.5
|
||||
specifier: 3.1.6
|
||||
version: link:../node
|
||||
'@vercel/python':
|
||||
specifier: 4.2.0
|
||||
specifier: 4.3.0
|
||||
version: link:../python
|
||||
'@vercel/redwood':
|
||||
specifier: 2.0.9
|
||||
@@ -343,7 +343,7 @@ importers:
|
||||
specifier: 2.1.0
|
||||
version: link:../ruby
|
||||
'@vercel/static-build':
|
||||
specifier: 2.5.9
|
||||
specifier: 2.5.10
|
||||
version: link:../static-build
|
||||
chokidar:
|
||||
specifier: 3.3.1
|
||||
@@ -488,10 +488,10 @@ importers:
|
||||
specifier: 1.0.0
|
||||
version: link:../../internals/get-package-json
|
||||
'@vercel-internals/types':
|
||||
specifier: 1.0.36
|
||||
specifier: 1.0.37
|
||||
version: link:../../internals/types
|
||||
'@vercel/client':
|
||||
specifier: 13.2.7
|
||||
specifier: 13.2.8
|
||||
version: link:../client
|
||||
'@vercel/error-utils':
|
||||
specifier: 2.0.2
|
||||
@@ -720,7 +720,7 @@ importers:
|
||||
version: 5.1.6(@types/node@14.18.33)
|
||||
vitest:
|
||||
specifier: 1.3.1
|
||||
version: 1.3.1(@types/node@14.18.33)
|
||||
version: 1.3.1(@edge-runtime/vm@3.2.0)(@types/node@16.18.11)
|
||||
which:
|
||||
specifier: 3.0.0
|
||||
version: 3.0.0
|
||||
@@ -737,7 +737,7 @@ importers:
|
||||
packages/client:
|
||||
dependencies:
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
'@vercel/error-utils':
|
||||
specifier: 2.0.2
|
||||
@@ -941,7 +941,7 @@ importers:
|
||||
specifier: 7.3.10
|
||||
version: 7.3.10
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
jest-junit:
|
||||
specifier: 16.0.0
|
||||
@@ -954,7 +954,7 @@ importers:
|
||||
devDependencies:
|
||||
vitest:
|
||||
specifier: 1.3.1
|
||||
version: 1.3.1(@types/node@14.18.33)
|
||||
version: 1.3.1(@edge-runtime/vm@3.2.0)(@types/node@16.18.11)
|
||||
|
||||
packages/gatsby-plugin-vercel-analytics:
|
||||
dependencies:
|
||||
@@ -972,7 +972,7 @@ importers:
|
||||
specifier: 0.25.24
|
||||
version: 0.25.24
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
'@vercel/routing-utils':
|
||||
specifier: 3.1.0
|
||||
@@ -1039,7 +1039,7 @@ importers:
|
||||
specifier: 2.1.0
|
||||
version: 2.1.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
async-retry:
|
||||
specifier: 1.3.3
|
||||
@@ -1088,7 +1088,7 @@ importers:
|
||||
specifier: 14.18.33
|
||||
version: 14.18.33
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
execa:
|
||||
specifier: 3.2.0
|
||||
@@ -1149,7 +1149,7 @@ importers:
|
||||
specifier: 3.2.0
|
||||
version: 3.2.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
'@vercel/routing-utils':
|
||||
specifier: 3.1.0
|
||||
@@ -1236,7 +1236,7 @@ importers:
|
||||
specifier: 16.18.11
|
||||
version: 16.18.11
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
'@vercel/error-utils':
|
||||
specifier: 2.0.2
|
||||
@@ -1311,6 +1311,9 @@ importers:
|
||||
'@vercel/functions':
|
||||
specifier: workspace:*
|
||||
version: link:../functions
|
||||
'@vitest/expect':
|
||||
specifier: 1.4.0
|
||||
version: 1.4.0
|
||||
content-type:
|
||||
specifier: 1.0.5
|
||||
version: 1.0.5
|
||||
@@ -1326,6 +1329,9 @@ importers:
|
||||
fs-extra:
|
||||
specifier: 11.1.0
|
||||
version: 11.1.0
|
||||
glob:
|
||||
specifier: 10.3.16
|
||||
version: 10.3.16
|
||||
jest-junit:
|
||||
specifier: 16.0.0
|
||||
version: 16.0.0
|
||||
@@ -1335,6 +1341,12 @@ importers:
|
||||
tree-kill:
|
||||
specifier: 1.2.2
|
||||
version: 1.2.2
|
||||
vite:
|
||||
specifier: 5.1.6
|
||||
version: 5.1.6(@types/node@16.18.11)
|
||||
vitest:
|
||||
specifier: 1.3.1
|
||||
version: 1.3.1(@edge-runtime/vm@3.2.0)(@types/node@16.18.11)
|
||||
|
||||
packages/python:
|
||||
devDependencies:
|
||||
@@ -1354,7 +1366,7 @@ importers:
|
||||
specifier: 3.0.0
|
||||
version: 3.0.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
execa:
|
||||
specifier: ^1.0.0
|
||||
@@ -1391,7 +1403,7 @@ importers:
|
||||
specifier: 6.0.0
|
||||
version: 6.0.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
execa:
|
||||
specifier: 3.2.0
|
||||
@@ -1431,8 +1443,11 @@ importers:
|
||||
specifier: 7.3.13
|
||||
version: 7.3.13
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
glob:
|
||||
specifier: 10.3.16
|
||||
version: 10.3.16
|
||||
jest-junit:
|
||||
specifier: 16.0.0
|
||||
version: 16.0.0
|
||||
@@ -1442,6 +1457,9 @@ importers:
|
||||
semver:
|
||||
specifier: 7.5.2
|
||||
version: 7.5.2
|
||||
vitest:
|
||||
specifier: 1.3.1
|
||||
version: 1.3.1(@edge-runtime/vm@3.2.0)(@types/node@16.18.11)
|
||||
|
||||
packages/routing-utils:
|
||||
dependencies:
|
||||
@@ -1478,7 +1496,7 @@ importers:
|
||||
specifier: 3.0.0
|
||||
version: 3.0.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
execa:
|
||||
specifier: 2.0.4
|
||||
@@ -1502,7 +1520,7 @@ importers:
|
||||
specifier: 1.0.11
|
||||
version: link:../gatsby-plugin-vercel-analytics
|
||||
'@vercel/gatsby-plugin-vercel-builder':
|
||||
specifier: 2.0.31
|
||||
specifier: 2.0.32
|
||||
version: link:../gatsby-plugin-vercel-builder
|
||||
'@vercel/static-config':
|
||||
specifier: 3.0.0
|
||||
@@ -1539,7 +1557,7 @@ importers:
|
||||
specifier: 7.3.13
|
||||
version: 7.3.13
|
||||
'@vercel/build-utils':
|
||||
specifier: 8.2.0
|
||||
specifier: 8.2.1
|
||||
version: link:../build-utils
|
||||
'@vercel/error-utils':
|
||||
specifier: 2.0.2
|
||||
@@ -2330,7 +2348,6 @@ packages:
|
||||
/@edge-runtime/primitives@4.1.0:
|
||||
resolution: {integrity: sha512-Vw0lbJ2lvRUqc7/soqygUX216Xb8T3WBZ987oywz6aJqRxcwSVWwr9e+Nqo2m9bxobA9mdbWNNoRY6S9eko1EQ==}
|
||||
engines: {node: '>=16'}
|
||||
dev: false
|
||||
|
||||
/@edge-runtime/vm@3.1.7:
|
||||
resolution: {integrity: sha512-hUMFbDQ/nZN+1TLMi6iMO1QFz9RSV8yGG8S42WFPFma1d7VSNE0eMdJUmwjmtav22/iQkzHMmu6oTSfAvRGS8g==}
|
||||
@@ -2344,7 +2361,6 @@ packages:
|
||||
engines: {node: '>=16'}
|
||||
dependencies:
|
||||
'@edge-runtime/primitives': 4.1.0
|
||||
dev: false
|
||||
|
||||
/@emotion/hash@0.9.1:
|
||||
resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==}
|
||||
@@ -3504,7 +3520,7 @@ packages:
|
||||
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@npmcli/git': 4.1.0
|
||||
glob: 10.2.3
|
||||
glob: 10.3.16
|
||||
hosted-git-info: 6.1.1
|
||||
json-parse-even-better-errors: 3.0.1
|
||||
normalize-package-data: 5.0.0
|
||||
@@ -6616,7 +6632,7 @@ packages:
|
||||
dependencies:
|
||||
'@npmcli/fs': 3.1.0
|
||||
fs-minipass: 3.0.3
|
||||
glob: 10.2.3
|
||||
glob: 10.3.16
|
||||
lru-cache: 7.18.3
|
||||
minipass: 7.0.4
|
||||
minipass-collect: 1.0.2
|
||||
@@ -7550,11 +7566,6 @@ packages:
|
||||
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
|
||||
dev: true
|
||||
|
||||
/diff-sequences@29.4.3:
|
||||
resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dev: true
|
||||
|
||||
/diff-sequences@29.6.3:
|
||||
resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -9401,6 +9412,18 @@ packages:
|
||||
path-scurry: 1.8.0
|
||||
dev: true
|
||||
|
||||
/glob@10.3.16:
|
||||
resolution: {integrity: sha512-JDKXl1DiuuHJ6fVS2FXjownaavciiHNUU4mOvV/B793RLh05vZL1rcPnCSaOgv1hDT6RDlY7AB7ZUvFYAtPgAw==}
|
||||
engines: {node: '>=16 || 14 >=14.18'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
foreground-child: 3.1.1
|
||||
jackspeak: 3.1.2
|
||||
minimatch: 9.0.4
|
||||
minipass: 7.0.4
|
||||
path-scurry: 1.11.1
|
||||
dev: true
|
||||
|
||||
/glob@7.1.2:
|
||||
resolution: {integrity: sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==}
|
||||
dependencies:
|
||||
@@ -10401,6 +10424,15 @@ packages:
|
||||
'@pkgjs/parseargs': 0.11.0
|
||||
dev: true
|
||||
|
||||
/jackspeak@3.1.2:
|
||||
resolution: {integrity: sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@isaacs/cliui': 8.0.2
|
||||
optionalDependencies:
|
||||
'@pkgjs/parseargs': 0.11.0
|
||||
dev: true
|
||||
|
||||
/jaro-winkler@0.2.8:
|
||||
resolution: {integrity: sha512-yr+mElb6dWxA1mzFu0+26njV5DWAQRNTi5pB6fFMm79zHrfAs3d0qjhe/IpZI4AHIUJkzvu5QXQRWOw2O0GQyw==}
|
||||
dev: true
|
||||
@@ -10643,9 +10675,9 @@ packages:
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
chalk: 4.1.0
|
||||
diff-sequences: 29.4.3
|
||||
diff-sequences: 29.6.3
|
||||
jest-get-type: 29.4.3
|
||||
pretty-format: 29.5.0
|
||||
pretty-format: 29.7.0
|
||||
dev: true
|
||||
|
||||
/jest-diff@29.5.0:
|
||||
@@ -10782,7 +10814,7 @@ packages:
|
||||
chalk: 4.1.0
|
||||
jest-diff: 29.5.0
|
||||
jest-get-type: 29.4.3
|
||||
pretty-format: 29.5.0
|
||||
pretty-format: 29.7.0
|
||||
dev: true
|
||||
|
||||
/jest-message-util@29.5.0:
|
||||
@@ -10795,7 +10827,7 @@ packages:
|
||||
chalk: 4.1.0
|
||||
graceful-fs: 4.2.11
|
||||
micromatch: 4.0.5
|
||||
pretty-format: 29.5.0
|
||||
pretty-format: 29.7.0
|
||||
slash: 3.0.0
|
||||
stack-utils: 2.0.6
|
||||
dev: true
|
||||
@@ -11488,6 +11520,11 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/lru-cache@10.2.2:
|
||||
resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==}
|
||||
engines: {node: 14 || >=16.14}
|
||||
dev: true
|
||||
|
||||
/lru-cache@4.1.5:
|
||||
resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==}
|
||||
dependencies:
|
||||
@@ -12942,6 +12979,14 @@ packages:
|
||||
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
|
||||
dev: true
|
||||
|
||||
/path-scurry@1.11.1:
|
||||
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
|
||||
engines: {node: '>=16 || 14 >=14.18'}
|
||||
dependencies:
|
||||
lru-cache: 10.2.2
|
||||
minipass: 7.0.4
|
||||
dev: true
|
||||
|
||||
/path-scurry@1.8.0:
|
||||
resolution: {integrity: sha512-IjTrKseM404/UAWA8bBbL3Qp6O2wXkanuIE3seCxBH7ctRuvH1QRawy1N3nVDHGkdeZsjOsSe/8AQBL/VQCy2g==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
@@ -13283,7 +13328,7 @@ packages:
|
||||
resolution: {integrity: sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@jest/schemas': 29.4.3
|
||||
'@jest/schemas': 29.6.3
|
||||
ansi-styles: 5.2.0
|
||||
react-is: 18.2.0
|
||||
dev: true
|
||||
@@ -15615,7 +15660,7 @@ packages:
|
||||
vfile-message: 3.1.4
|
||||
dev: true
|
||||
|
||||
/vite-node@1.3.1(@types/node@14.18.33):
|
||||
/vite-node@1.3.1(@types/node@16.18.11):
|
||||
resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
@@ -15624,7 +15669,7 @@ packages:
|
||||
debug: 4.3.4
|
||||
pathe: 1.1.2
|
||||
picocolors: 1.0.0
|
||||
vite: 5.1.6(@types/node@14.18.33)
|
||||
vite: 5.1.6(@types/node@16.18.11)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- less
|
||||
@@ -15693,7 +15738,43 @@ packages:
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
/vitest@1.3.1(@types/node@14.18.33):
|
||||
/vite@5.1.6(@types/node@16.18.11):
|
||||
resolution: {integrity: sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@types/node': ^18.0.0 || >=20.0.0
|
||||
less: '*'
|
||||
lightningcss: ^1.21.0
|
||||
sass: '*'
|
||||
stylus: '*'
|
||||
sugarss: '*'
|
||||
terser: ^5.4.0
|
||||
peerDependenciesMeta:
|
||||
'@types/node':
|
||||
optional: true
|
||||
less:
|
||||
optional: true
|
||||
lightningcss:
|
||||
optional: true
|
||||
sass:
|
||||
optional: true
|
||||
stylus:
|
||||
optional: true
|
||||
sugarss:
|
||||
optional: true
|
||||
terser:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/node': 16.18.11
|
||||
esbuild: 0.19.12
|
||||
postcss: 8.4.38
|
||||
rollup: 4.13.2
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
/vitest@1.3.1(@edge-runtime/vm@3.2.0)(@types/node@16.18.11):
|
||||
resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
@@ -15718,7 +15799,8 @@ packages:
|
||||
jsdom:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/node': 14.18.33
|
||||
'@edge-runtime/vm': 3.2.0
|
||||
'@types/node': 16.18.11
|
||||
'@vitest/expect': 1.3.1
|
||||
'@vitest/runner': 1.3.1
|
||||
'@vitest/snapshot': 1.3.1
|
||||
@@ -15736,8 +15818,8 @@ packages:
|
||||
strip-literal: 2.0.0
|
||||
tinybench: 2.6.0
|
||||
tinypool: 0.8.3
|
||||
vite: 5.1.6(@types/node@14.18.33)
|
||||
vite-node: 1.3.1(@types/node@14.18.33)
|
||||
vite: 5.1.6(@types/node@16.18.11)
|
||||
vite-node: 1.3.1(@types/node@16.18.11)
|
||||
why-is-node-running: 2.2.2
|
||||
transitivePeerDependencies:
|
||||
- less
|
||||
|
||||
@@ -187,15 +187,12 @@ async function fetchWithAuth(url, opts = {}) {
|
||||
opts.headers.Authorization = `Bearer ${await fetchCachedToken()}`;
|
||||
}
|
||||
|
||||
if (opts.skipTeam) {
|
||||
delete opts.skipTeam;
|
||||
} else {
|
||||
const { VERCEL_TEAM_ID } = process.env;
|
||||
const { VERCEL_TEAM_ID } = process.env;
|
||||
|
||||
if (VERCEL_TEAM_ID) {
|
||||
url += `${url.includes('?') ? '&' : '?'}teamId=${VERCEL_TEAM_ID}`;
|
||||
}
|
||||
if (VERCEL_TEAM_ID) {
|
||||
url += `${url.includes('?') ? '&' : '?'}teamId=${VERCEL_TEAM_ID}`;
|
||||
}
|
||||
|
||||
return await fetchApi(url, opts);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
"dependsOn": ["build"],
|
||||
"outputMode": "new-only"
|
||||
},
|
||||
"vitest-unit-run": {
|
||||
"vitest-run": {
|
||||
"dependsOn": ["build"],
|
||||
"outputMode": "new-only"
|
||||
},
|
||||
"vitest-e2e": {
|
||||
"dependsOn": ["build"],
|
||||
"outputMode": "new-only"
|
||||
},
|
||||
|
||||
12
utils/chunk-tests-18.js
vendored
12
utils/chunk-tests-18.js
vendored
@@ -6,8 +6,8 @@ async function main() {
|
||||
runner: 'ubuntu-latest',
|
||||
packagePath: 'packages/node',
|
||||
packageName: '@vercel/node',
|
||||
scriptName: 'test-unit',
|
||||
testScript: 'test',
|
||||
scriptName: 'vitest-unit',
|
||||
testScript: 'vitest-run',
|
||||
testPaths: ['test/unit/dev.test.ts'],
|
||||
chunkNumber: 1,
|
||||
allChunksLength: 1,
|
||||
@@ -16,8 +16,8 @@ async function main() {
|
||||
runner: 'macos-14',
|
||||
packagePath: 'packages/node',
|
||||
packageName: '@vercel/node',
|
||||
scriptName: 'test-unit',
|
||||
testScript: 'test',
|
||||
scriptName: 'vitest-unit',
|
||||
testScript: 'vitest-run',
|
||||
testPaths: ['test/unit/dev.test.ts'],
|
||||
chunkNumber: 1,
|
||||
allChunksLength: 1,
|
||||
@@ -26,8 +26,8 @@ async function main() {
|
||||
runner: 'windows-latest',
|
||||
packagePath: 'packages/node',
|
||||
packageName: '@vercel/node',
|
||||
scriptName: 'test-unit',
|
||||
testScript: 'test',
|
||||
scriptName: 'vitest-unit',
|
||||
testScript: 'vitest-run',
|
||||
testPaths: ['test/unit/dev.test.ts'],
|
||||
chunkNumber: 1,
|
||||
allChunksLength: 1,
|
||||
|
||||
11
utils/chunk-tests.js
vendored
11
utils/chunk-tests.js
vendored
@@ -8,7 +8,16 @@ const runnersMap = new Map([
|
||||
{
|
||||
min: 1,
|
||||
max: 1,
|
||||
testScript: 'vitest-unit-run',
|
||||
testScript: 'vitest-run',
|
||||
runners: ['ubuntu-latest', 'macos-14', 'windows-latest'],
|
||||
},
|
||||
],
|
||||
[
|
||||
'vitest-e2e',
|
||||
{
|
||||
min: 1,
|
||||
max: 1,
|
||||
testScript: 'vitest-run',
|
||||
runners: ['ubuntu-latest', 'macos-14', 'windows-latest'],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user