Compare commits

..

3 Commits

Author SHA1 Message Date
Steven
5eb8b16cbd Publish Stable
- @vercel/build-utils@5.1.1
 - vercel@27.3.6
 - @vercel/client@12.1.9
 - @vercel/edge@0.0.2
 - @vercel/frameworks@1.1.2
 - @vercel/fs-detectors@2.0.4
 - @vercel/go@2.0.14
 - @vercel/hydrogen@0.0.11
 - @vercel/next@3.1.14
 - @vercel/node@2.5.5
 - @vercel/python@3.1.6
 - @vercel/redwood@1.0.15
 - @vercel/remix@1.0.16
 - @vercel/routing-utils@2.0.1
 - @vercel/ruby@1.3.22
 - @vercel/static-build@1.0.15
 - @vercel/static-config@2.0.2
2022-08-04 11:39:58 -04:00
JJ Kasper
226bf02be2 [next] Remove middleware regexp modifying (#8321)
x-ref: [slack thread](https://vercel.slack.com/archives/C03SF65BYSG/p1659626639087909)
2022-08-04 11:39:21 -04:00
Steven
8505872f55 [tests] Update package.json scripts (#8318)
This PR consolidates all the `test` scripts to be the same and removes the `prepublishOnly` script since we always run `build` before publishing to npm.
2022-08-04 11:02:56 -04:00
21 changed files with 66 additions and 119 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/build-utils",
"version": "5.1.0",
"version": "5.1.1",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.js",
@@ -14,8 +14,7 @@
"build": "node build",
"test": "jest --env node --verbose --runInBand --bail",
"test-unit": "yarn test test/unit.*test.*",
"test-integration-once": "yarn test test/integration.test.ts",
"prepublishOnly": "node build"
"test-integration-once": "yarn test test/integration.test.ts"
},
"devDependencies": {
"@iarna/toml": "2.2.3",

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "27.3.5",
"version": "27.3.6",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -16,7 +16,6 @@
"test-unit": "yarn test test/unit/",
"test-integration-cli": "rimraf test/fixtures/integration && ava test/integration.js --serial --fail-fast --verbose",
"test-integration-dev": "yarn test test/dev/",
"prepublishOnly": "yarn build",
"coverage": "codecov",
"build": "ts-node ./scripts/build.ts",
"dev": "ts-node ./src/index.ts"
@@ -42,16 +41,16 @@
"node": ">= 14"
},
"dependencies": {
"@vercel/build-utils": "5.1.0",
"@vercel/go": "2.0.13",
"@vercel/hydrogen": "0.0.10",
"@vercel/next": "3.1.13",
"@vercel/node": "2.5.4",
"@vercel/python": "3.1.5",
"@vercel/redwood": "1.0.14",
"@vercel/remix": "1.0.15",
"@vercel/ruby": "1.3.21",
"@vercel/static-build": "1.0.14",
"@vercel/build-utils": "5.1.1",
"@vercel/go": "2.0.14",
"@vercel/hydrogen": "0.0.11",
"@vercel/next": "3.1.14",
"@vercel/node": "2.5.5",
"@vercel/python": "3.1.6",
"@vercel/redwood": "1.0.15",
"@vercel/remix": "1.0.16",
"@vercel/ruby": "1.3.22",
"@vercel/static-build": "1.0.15",
"update-notifier": "5.1.0"
},
"devDependencies": {
@@ -97,9 +96,9 @@
"@types/which": "1.3.2",
"@types/write-json-file": "2.2.1",
"@types/yauzl-promise": "2.1.0",
"@vercel/client": "12.1.8",
"@vercel/frameworks": "1.1.1",
"@vercel/fs-detectors": "2.0.3",
"@vercel/client": "12.1.9",
"@vercel/frameworks": "1.1.2",
"@vercel/fs-detectors": "2.0.4",
"@vercel/fun": "1.0.4",
"@vercel/ncc": "0.24.0",
"@zeit/source-map-support": "0.6.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "12.1.8",
"version": "12.1.9",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -42,8 +42,8 @@
]
},
"dependencies": {
"@vercel/build-utils": "5.1.0",
"@vercel/routing-utils": "2.0.0",
"@vercel/build-utils": "5.1.1",
"@vercel/routing-utils": "2.0.1",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",
"async-sema": "3.0.0",

View File

@@ -1,14 +1,14 @@
{
"name": "@vercel/edge",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --dts --format esm,cjs",
"test-unit": "jest",
"prepublishOnly": "yarn build"
"test": "jest --env node --verbose --runInBand --bail",
"test-unit": "yarn test"
},
"devDependencies": {
"@edge-runtime/jest-environment": "1.1.0-beta.7",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/frameworks",
"version": "1.1.1",
"version": "1.1.2",
"main": "./dist/frameworks.js",
"types": "./dist/frameworks.d.ts",
"files": [
@@ -21,7 +21,7 @@
"@types/js-yaml": "3.12.1",
"@types/node": "12.0.4",
"@types/node-fetch": "2.5.8",
"@vercel/routing-utils": "2.0.0",
"@vercel/routing-utils": "2.0.1",
"ajv": "6.12.2",
"typescript": "4.3.4"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/fs-detectors",
"version": "2.0.3",
"version": "2.0.4",
"description": "Vercel filesystem detectors",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -14,14 +14,13 @@
},
"license": "MIT",
"scripts": {
"prepublishOnly": "tsc",
"build": "tsc",
"test": "yarn jest --env node --verbose --runInBand --bail test/unit.*test.*",
"test": "jest --env node --verbose --runInBand --bail test/unit.*test.*",
"test-unit": "yarn test"
},
"dependencies": {
"@vercel/frameworks": "1.1.1",
"@vercel/routing-utils": "2.0.0",
"@vercel/frameworks": "1.1.2",
"@vercel/routing-utils": "2.0.1",
"glob": "8.0.3",
"js-yaml": "4.1.0",
"minimatch": "3.0.4",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/go",
"version": "2.0.13",
"version": "2.0.14",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -11,9 +11,8 @@
},
"scripts": {
"build": "node build",
"test": "yarn jest --env node --verbose --runInBand --bail",
"test-integration-once": "yarn test",
"prepublishOnly": "node build"
"test": "jest --env node --verbose --runInBand --bail",
"test-integration-once": "yarn test"
},
"files": [
"dist"
@@ -25,7 +24,7 @@
"@types/fs-extra": "^5.0.5",
"@types/node-fetch": "^2.3.0",
"@types/tar": "^4.0.0",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"@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.10",
"version": "0.0.11",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -12,8 +12,7 @@
"scripts": {
"build": "node build.js",
"test-integration-once": "yarn test test/test.js",
"test": "jest --env node --verbose --bail --runInBand",
"prepublishOnly": "node build.js"
"test": "jest --env node --verbose --bail --runInBand"
},
"files": [
"dist",
@@ -22,7 +21,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "*",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"typescript": "4.6.4"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.1.13",
"version": "3.1.14",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -11,8 +11,7 @@
"test-unit": "yarn test test/build.test.ts test/unit/",
"test-next-local": "jest --env node --verbose --bail --forceExit --testTimeout=360000 test/integration/*.test.js test/integration/*.test.ts",
"test-next-local:middleware": "jest --env node --verbose --bail --useStderr --testTimeout=360000 test/integration/middleware.test.ts",
"test-integration-once": "rm test/builder-info.json; jest --env node --verbose --runInBand --bail test/fixtures/**/*.test.js",
"prepublishOnly": "yarn build"
"test-integration-once": "rm test/builder-info.json; jest --env node --verbose --runInBand --bail test/fixtures/**/*.test.js"
},
"repository": {
"type": "git",
@@ -45,9 +44,9 @@
"@types/semver": "6.0.0",
"@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"@vercel/nft": "0.21.0",
"@vercel/routing-utils": "2.0.0",
"@vercel/routing-utils": "2.0.1",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",
"cheerio": "1.0.0-rc.10",

View File

@@ -58,7 +58,6 @@ const CORRECT_MIDDLEWARE_ORDER_VERSION = 'v12.1.7-canary.29';
const NEXT_DATA_MIDDLEWARE_RESOLVING_VERSION = 'v12.1.7-canary.33';
const EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION = 'v12.2.0';
const CORRECTED_MANIFESTS_VERSION = 'v12.2.0';
const NON_NESTED_MIDDLEWARE_VERSION = 'v12.1.7-canary.9';
export async function serverBuild({
dynamicPages,
@@ -152,10 +151,7 @@ export async function serverBuild({
nextVersion,
CORRECTED_MANIFESTS_VERSION
);
const isNonNestedMiddleware = semver.gte(
nextVersion,
NON_NESTED_MIDDLEWARE_VERSION
);
let hasStatic500 = !!staticPages[path.join(entryDirectory, '500')];
if (lambdaPageKeys.length === 0) {
@@ -1059,23 +1055,6 @@ export async function serverBuild({
});
}
// We stopped duplicating matchers for _next/data routes when we added
// x-nextjs-data header resolving but we should still resolve middleware
// when the header isn't present so we augment the source to include that.
// We don't apply this modification for nested middleware > 1 staticRoute
if (isNonNestedMiddleware) {
middleware.staticRoutes.forEach(route => {
if (!route.src?.match(/_next[\\/]{1,}data/)) {
route.src =
`^(\\/_next\\/data\\/${escapedBuildId})?(` +
route.src
?.replace(/\|\^/g, '|')
.replace(/\$$/, ')$')
.replace(/\$/g, '(\\.json)?$');
}
});
}
return {
wildcard: wildcardConfig,
images:

View File

@@ -7,13 +7,6 @@
}
],
"probes": [
{
"path": "/_next/data/testing-build-id/en/about.json",
"status": 200,
"responseHeaders": {
"x-matched-path": "/en/about"
}
},
{
"path": "/_next/data/testing-build-id/en/dynamic/static.json",
"status": 200,

View File

@@ -7,13 +7,6 @@
}
],
"probes": [
{
"path": "/_next/data/testing-build-id/about.json",
"status": 200,
"responseHeaders": {
"x-matched-path": "/about"
}
},
{
"path": "/_next/data/testing-build-id/dynamic/static.json",
"status": 200,

View File

@@ -47,9 +47,6 @@ describe('Middleware simple project', () => {
expect(redirectIndex).toBeLessThan(beforeFilesIndex);
expect(middlewareIndex).toBeLessThan(beforeFilesIndex);
expect(middlewareIndex).toBeLessThan(handleFileSystemIndex);
expect(ctx.buildResult.routes[middlewareIndex].src).toMatch(
/_next[\\/]{1,}data/
);
});
it('generates deterministic code', async () => {

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "2.5.4",
"version": "2.5.5",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -13,8 +13,7 @@
"build": "node build",
"test": "jest --env node --verbose --bail --runInBand",
"test-unit": "yarn test test/prepare-cache.test.ts test/utils.test.ts",
"test-integration-once": "yarn test test/integration-*.test.js",
"prepublishOnly": "node build"
"test-integration-once": "yarn test test/integration-*.test.js"
},
"files": [
"dist"
@@ -32,9 +31,9 @@
"dependencies": {
"@edge-runtime/vm": "1.1.0-beta.23",
"@types/node": "*",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"@vercel/node-bridge": "3.0.0",
"@vercel/static-config": "2.0.1",
"@vercel/static-config": "2.0.2",
"edge-runtime": "1.1.0-beta.23",
"esbuild": "0.14.47",
"exit-hook": "2.2.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/python",
"version": "3.1.5",
"version": "3.1.6",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -17,13 +17,12 @@
"build": "node build",
"test": "jest --env node --verbose --runInBand --bail",
"test-unit": "yarn test test/unit.test.ts",
"test-integration-once": "yarn test test/integration.test.ts",
"prepublishOnly": "node build"
"test-integration-once": "yarn test test/integration.test.ts"
},
"devDependencies": {
"@types/execa": "^0.9.0",
"@types/jest": "27.4.1",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"@vercel/ncc": "0.24.0",
"execa": "^1.0.0",
"typescript": "4.3.4"

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/redwood",
"version": "1.0.14",
"version": "1.0.15",
"main": "./dist/index.js",
"license": "MIT",
"homepage": "https://vercel.com/docs",
@@ -16,18 +16,17 @@
"build": "node build.js",
"test-integration-once": "yarn test test/test.js",
"test": "jest --env node --verbose --bail --runInBand",
"test-unit": "yarn test test/prepare-cache.test.js",
"prepublishOnly": "node build.js"
"test-unit": "yarn test test/prepare-cache.test.js"
},
"dependencies": {
"@vercel/nft": "0.21.0",
"@vercel/routing-utils": "2.0.0",
"@vercel/routing-utils": "2.0.1",
"semver": "6.1.1"
},
"devDependencies": {
"@types/aws-lambda": "8.10.19",
"@types/node": "*",
"@types/semver": "6.0.0",
"@vercel/build-utils": "5.1.0"
"@vercel/build-utils": "5.1.1"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix",
"version": "1.0.15",
"version": "1.0.16",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -13,8 +13,7 @@
"build": "node build.js",
"test-integration-once": "yarn test test/test.js",
"test": "jest --env node --verbose --bail --runInBand",
"test-unit": "yarn test test/build.test.ts",
"prepublishOnly": "node build.js"
"test-unit": "yarn test test/build.test.ts"
},
"files": [
"dist",
@@ -26,7 +25,7 @@
"devDependencies": {
"@types/jest": "27.5.1",
"@types/node": "*",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"typescript": "4.6.4"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/routing-utils",
"version": "2.0.0",
"version": "2.0.1",
"description": "Vercel routing utilities",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -14,9 +14,7 @@
},
"license": "MIT",
"scripts": {
"prepublishOnly": "tsc",
"build": "tsc",
"watch": "tsc --watch",
"test": "jest --env node --verbose --runInBand --bail",
"test-unit": "yarn test"
},

View File

@@ -1,7 +1,7 @@
{
"name": "@vercel/ruby",
"author": "Nathan Cahill <nathan@nathancahill.com>",
"version": "1.3.21",
"version": "1.3.22",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
@@ -17,13 +17,12 @@
"scripts": {
"build": "node build",
"test": "jest --env node --verbose --runInBand --bail",
"test-integration-once": "yarn test",
"prepublishOnly": "node build"
"test-integration-once": "yarn test"
},
"devDependencies": {
"@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0",
"@vercel/build-utils": "5.1.0",
"@vercel/build-utils": "5.1.1",
"@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.0.14",
"version": "1.0.15",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -16,8 +16,7 @@
"build": "node build",
"test": "jest --env node --verbose --bail --runInBand",
"test-unit": "yarn test test/build.test.ts test/prepare-cache.test.ts",
"test-integration-once": "yarn test test/integration-*.test.js",
"prepublishOnly": "node build"
"test-integration-once": "yarn test test/integration-*.test.js"
},
"jest": {
"preset": "ts-jest/presets/default",
@@ -37,10 +36,10 @@
"@types/ms": "0.7.31",
"@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0",
"@vercel/build-utils": "5.1.0",
"@vercel/frameworks": "1.1.1",
"@vercel/build-utils": "5.1.1",
"@vercel/frameworks": "1.1.2",
"@vercel/ncc": "0.24.0",
"@vercel/routing-utils": "2.0.0",
"@vercel/routing-utils": "2.0.1",
"fs-extra": "10.0.0",
"get-port": "5.0.0",
"is-port-reachable": "2.0.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-config",
"version": "2.0.1",
"version": "2.0.2",
"license": "MIT",
"main": "./dist/index",
"repository": {
@@ -10,9 +10,8 @@
},
"scripts": {
"build": "tsc",
"test-unit": "jest",
"test": "jest",
"prepublishOnly": "tsc"
"test-unit": "yarn test",
"test": "jest --env node --verbose --runInBand --bail"
},
"files": [
"dist"