From f5f07c5d1597b7f9b9c00d3aa330d56b77de2969 Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 8 Mar 2021 10:08:09 -0500 Subject: [PATCH] [all] Remove more "now" references (#5944) Follow up to #5928 to remove a few more "now" references and replace with "vercel" where appropriate. --- api/_lib/util/with-api-handler.ts | 6 +- api/examples/download/[segment].ts | 8 +- api/examples/info.ts | 6 +- api/examples/list-all.ts | 6 +- api/examples/list.ts | 6 +- api/frameworks.ts | 6 +- api/package.json | 2 +- api/yarn.lock | 8 +- examples/gatsby/.nowignore | 2 - examples/gatsby/api/date.ts | 4 +- examples/gatsby/package.json | 2 +- examples/gatsby/yarn.lock | 8 +- .../fixtures/16-node-env-install/build.js | 2 +- .../18-install-only-production/npm/build.js | 2 +- .../18-install-only-production/yarn/build.js | 2 +- packages/cgi/index.js | 2 +- packages/cgi/main.go | 2 +- .../cli/src/util/deploy/process-deployment.ts | 6 +- packages/cli/test/dev-builder.unit.js | 44 +- .../{now.json => vercel.json} | 4 +- .../unit/now-dev-directory-listing/now.json | 7 - .../now-dev-directory-listing/vercel.json | 7 + .../fixtures/unit/now-dev-headers/now.json | 8 - .../fixtures/unit/now-dev-headers/vercel.json | 8 + .../now-dev-next/{now.json => vercel.json} | 2 +- .../{now.json => vercel.json} | 4 +- .../{now.json => vercel.json} | 4 +- .../now-dev-static-build-routing/.nowignore | 2 - .../{now.json => vercel.json} | 4 +- .../unit/now-dev-static-routes/now.json | 9 - .../unit/now-dev-static-routes/vercel.json | 5 + packages/cli/test/fixtures/unit/now-json/a.js | 1 - packages/cli/test/fixtures/unit/now-json/b.js | 1 - .../cli/test/fixtures/unit/now-json/now.json | 5 - .../test/fixtures/unit/now-json/package.json | 9 - packages/cli/test/helpers/prepare.js | 16 +- packages/client/README.md | 5 +- .../client/src/check-deployment-status.ts | 4 +- packages/client/src/create-deployment.ts | 4 +- packages/client/src/deploy.ts | 8 +- packages/client/src/types.ts | 34 +- packages/client/src/upload.ts | 4 +- packages/client/src/utils/index.ts | 9 +- packages/client/src/utils/query-string.ts | 6 +- packages/node-bridge/src/launcher.ts | 2 +- packages/node/bench/run.js | 12 +- packages/node/src/example-import.ts | 12 +- packages/node/src/helpers.ts | 60 ++- packages/node/src/index.ts | 13 +- packages/node/src/types.ts | 12 +- .../fixtures/15-helpers/ts-legacy/index.ts | 4 +- .../test/fixtures/18-nested-tsconfig/index.ts | 4 +- .../fixtures/18-nested-tsconfig/package.json | 2 +- .../{now.json => vercel.json} | 0 .../60-timezone-utc/{now.json => vercel.json} | 2 +- packages/node/test/helpers.test.js | 2 +- packages/routing-utils/README.md | 8 +- packages/routing-utils/src/index.ts | 4 +- packages/routing-utils/src/superstatic.ts | 10 +- packages/routing-utils/src/types.ts | 35 +- packages/routing-utils/test/merge.spec.js | 36 +- test/integration/now-node/airtable/index.js | 6 - test/integration/now-node/airtable/now.json | 4 - .../now-node/airtable/package.json | 9 - test/integration/now-node/airtable/yarn.lock | 416 ------------------ test/integration/now-node/aws-sdk/index.js | 6 - test/integration/now-node/aws-sdk/now.json | 4 - .../integration/now-node/aws-sdk/package.json | 9 - test/integration/now-node/aws-sdk/yarn.lock | 103 ----- test/integration/now-node/axios/index.js | 6 - test/integration/now-node/axios/now.json | 4 - test/integration/now-node/axios/package.json | 9 - test/integration/now-node/axios/yarn.lock | 35 -- test/integration/now-node/index.test.js | 44 -- test/integration/now-node/mongoose/index.js | 6 - test/integration/now-node/mongoose/now.json | 4 - .../now-node/mongoose/package.json | 9 - test/integration/now-node/mongoose/yarn.lock | 158 ------- 78 files changed, 264 insertions(+), 1080 deletions(-) delete mode 100644 examples/gatsby/.nowignore rename packages/cli/test/fixtures/unit/now-dev-custom-404/{now.json => vercel.json} (66%) delete mode 100644 packages/cli/test/fixtures/unit/now-dev-directory-listing/now.json create mode 100644 packages/cli/test/fixtures/unit/now-dev-directory-listing/vercel.json delete mode 100644 packages/cli/test/fixtures/unit/now-dev-headers/now.json create mode 100644 packages/cli/test/fixtures/unit/now-dev-headers/vercel.json rename packages/cli/test/fixtures/unit/now-dev-next/{now.json => vercel.json} (65%) rename packages/cli/test/fixtures/unit/now-dev-query-invoke/{now.json => vercel.json} (68%) rename packages/cli/test/fixtures/unit/now-dev-query-proxy/{now.json => vercel.json} (64%) delete mode 100644 packages/cli/test/fixtures/unit/now-dev-static-build-routing/.nowignore rename packages/cli/test/fixtures/unit/now-dev-static-build-routing/{now.json => vercel.json} (76%) delete mode 100644 packages/cli/test/fixtures/unit/now-dev-static-routes/now.json create mode 100644 packages/cli/test/fixtures/unit/now-dev-static-routes/vercel.json delete mode 100755 packages/cli/test/fixtures/unit/now-json/a.js delete mode 100755 packages/cli/test/fixtures/unit/now-json/b.js delete mode 100755 packages/cli/test/fixtures/unit/now-json/now.json delete mode 100755 packages/cli/test/fixtures/unit/now-json/package.json rename packages/node/test/fixtures/18-nested-tsconfig/{now.json => vercel.json} (100%) rename packages/node/test/fixtures/60-timezone-utc/{now.json => vercel.json} (68%) delete mode 100644 test/integration/now-node/airtable/index.js delete mode 100644 test/integration/now-node/airtable/now.json delete mode 100644 test/integration/now-node/airtable/package.json delete mode 100644 test/integration/now-node/airtable/yarn.lock delete mode 100644 test/integration/now-node/aws-sdk/index.js delete mode 100644 test/integration/now-node/aws-sdk/now.json delete mode 100644 test/integration/now-node/aws-sdk/package.json delete mode 100644 test/integration/now-node/aws-sdk/yarn.lock delete mode 100644 test/integration/now-node/axios/index.js delete mode 100644 test/integration/now-node/axios/now.json delete mode 100644 test/integration/now-node/axios/package.json delete mode 100644 test/integration/now-node/axios/yarn.lock delete mode 100644 test/integration/now-node/index.test.js delete mode 100644 test/integration/now-node/mongoose/index.js delete mode 100644 test/integration/now-node/mongoose/now.json delete mode 100644 test/integration/now-node/mongoose/package.json delete mode 100644 test/integration/now-node/mongoose/yarn.lock diff --git a/api/_lib/util/with-api-handler.ts b/api/_lib/util/with-api-handler.ts index e3936f613eef..9fe34c2e87c4 100644 --- a/api/_lib/util/with-api-handler.ts +++ b/api/_lib/util/with-api-handler.ts @@ -1,10 +1,10 @@ -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { errorHandler } from './error-handler'; -type Handler = (req: NowRequest, res: NowResponse) => Promise; +type Handler = (req: VercelRequest, res: VercelResponse) => Promise; export function withApiHandler(handler: Handler): Handler { - return async (req: NowRequest, res: NowResponse) => { + return async (req: VercelRequest, res: VercelResponse) => { res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET'); res.setHeader( diff --git a/api/examples/download/[segment].ts b/api/examples/download/[segment].ts index 75d63225942f..2269a9eb4745 100644 --- a/api/examples/download/[segment].ts +++ b/api/examples/download/[segment].ts @@ -2,7 +2,7 @@ import fs from 'fs'; // @ts-ignore import tar from 'tar-fs'; import { extract } from '../../_lib/examples/extract'; -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { withApiHandler } from '../../_lib/util/with-api-handler'; const TMP_DIR = '/tmp'; @@ -11,7 +11,7 @@ function isDirectory(path: string) { return fs.existsSync(path) && fs.lstatSync(path).isDirectory(); } -function notFound(res: NowResponse, message: string) { +function notFound(res: VercelResponse, message: string) { return res.status(404).send({ error: { code: 'not_found', @@ -36,8 +36,8 @@ function streamToBuffer(stream: any) { } export default withApiHandler(async function ( - req: NowRequest, - res: NowResponse + req: VercelRequest, + res: VercelResponse ) { const ext = '.tar.gz'; const { segment = '' } = req.query; diff --git a/api/examples/info.ts b/api/examples/info.ts index 3a16b76b8ff7..67590140b01e 100644 --- a/api/examples/info.ts +++ b/api/examples/info.ts @@ -3,14 +3,14 @@ // @ts-ignore import parseGitUrl from 'parse-github-url'; -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { withApiHandler } from '../_lib/util/with-api-handler'; import { getGitHubRepoInfo } from '../_lib/examples/github-repo-info'; import { getGitLabRepoInfo } from '../_lib/examples/gitlab-repo-info'; export default withApiHandler(async function ( - req: NowRequest, - res: NowResponse + req: VercelRequest, + res: VercelResponse ) { const repoPath = decodeURIComponent((req.query.repo as string) || ''); diff --git a/api/examples/list-all.ts b/api/examples/list-all.ts index 7d22aa3d9169..6b81a1fbdd30 100644 --- a/api/examples/list-all.ts +++ b/api/examples/list-all.ts @@ -1,10 +1,10 @@ -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { getExampleList } from '../_lib/examples/example-list'; import { withApiHandler } from '../_lib/util/with-api-handler'; export default withApiHandler(async function ( - req: NowRequest, - res: NowResponse + req: VercelRequest, + res: VercelResponse ) { res.status(200).json(await getExampleList()); }); diff --git a/api/examples/list.ts b/api/examples/list.ts index 8634df6fc36a..e0ea418f2f48 100644 --- a/api/examples/list.ts +++ b/api/examples/list.ts @@ -1,12 +1,12 @@ import { extract } from '../_lib/examples/extract'; import { summary } from '../_lib/examples/summary'; -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { mapOldToNew } from '../_lib/examples/map-old-to-new'; import { withApiHandler } from '../_lib/util/with-api-handler'; export default withApiHandler(async function ( - req: NowRequest, - res: NowResponse + req: VercelRequest, + res: VercelResponse ) { await extract('https://github.com/vercel/vercel/archive/master.zip', '/tmp'); const exampleList = summary('/tmp/vercel-master/examples'); diff --git a/api/frameworks.ts b/api/frameworks.ts index a9fb753c8f3d..22ab58dbe87e 100644 --- a/api/frameworks.ts +++ b/api/frameworks.ts @@ -1,4 +1,4 @@ -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { withApiHandler } from './_lib/util/with-api-handler'; import _frameworks, { Framework } from '../packages/frameworks'; @@ -27,8 +27,8 @@ const frameworks = (_frameworks as Framework[]) }); export default withApiHandler(async function ( - req: NowRequest, - res: NowResponse + req: VercelRequest, + res: VercelResponse ) { res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET'); diff --git a/api/package.json b/api/package.json index 9c094677105d..2091f3e02857 100644 --- a/api/package.json +++ b/api/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@types/node": "13.1.4", "@types/node-fetch": "2.5.4", - "@vercel/node": "1.7.2", + "@vercel/node": "1.9.0", "typescript": "3.9.6" } } diff --git a/api/yarn.lock b/api/yarn.lock index f6db72dfe488..efcf114624c0 100644 --- a/api/yarn.lock +++ b/api/yarn.lock @@ -134,10 +134,10 @@ dependencies: "@types/node" "*" -"@vercel/node@1.7.2": - version "1.7.2" - resolved "https://registry.yarnpkg.com/@vercel/node/-/node-1.7.2.tgz#85cb8aac661c02dfef6fe752740f5b162e90767b" - integrity sha512-XV5lrLC+K/cxsaFj8H2OoGu1zliOqnxcrOnPInI8HmQjR/Tztt+0nzgpt+7sx8wXcrib0Nu7lK303jP7VjSETw== +"@vercel/node@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@vercel/node/-/node-1.9.0.tgz#6b64f3b9a962ddb1089276fad00f441a1f4b9cf0" + integrity sha512-Vk/ZpuY4Cdc8oUwBi/kf8qETRaJb/KYdFddVkLuS10QwA0yJx+RQ11trhZ1KFUdc27aBr5S2k8/dDxK8sLr+IA== dependencies: "@types/node" "*" ts-node "8.9.1" diff --git a/examples/gatsby/.nowignore b/examples/gatsby/.nowignore deleted file mode 100644 index 5535ea92cf0a..000000000000 --- a/examples/gatsby/.nowignore +++ /dev/null @@ -1,2 +0,0 @@ -yarn.lock -README.md \ No newline at end of file diff --git a/examples/gatsby/api/date.ts b/examples/gatsby/api/date.ts index 3d280fab66b3..497311d52304 100644 --- a/examples/gatsby/api/date.ts +++ b/examples/gatsby/api/date.ts @@ -1,6 +1,6 @@ -import { NowRequest, NowResponse } from '@vercel/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; -export default (_req: NowRequest, res: NowResponse) => { +export default (_req: VercelRequest, res: VercelResponse) => { const date = new Date().toString(); res.status(200).send(date); }; diff --git a/examples/gatsby/package.json b/examples/gatsby/package.json index a34aff625b2c..0bb3fb9a082f 100644 --- a/examples/gatsby/package.json +++ b/examples/gatsby/package.json @@ -12,7 +12,7 @@ "react-helmet": "^5.2.0" }, "devDependencies": { - "@vercel/node": "1.8.5" + "@vercel/node": "1.9.0" }, "scripts": { "dev": "gatsby develop", diff --git a/examples/gatsby/yarn.lock b/examples/gatsby/yarn.lock index 18e622788997..42d4de39d5c4 100644 --- a/examples/gatsby/yarn.lock +++ b/examples/gatsby/yarn.lock @@ -1400,10 +1400,10 @@ dependencies: wonka "^4.0.14" -"@vercel/node@1.8.5": - version "1.8.5" - resolved "https://registry.yarnpkg.com/@vercel/node/-/node-1.8.5.tgz#2c8b9532f1bb25734a9964c52973386ed78022d4" - integrity sha512-1iw7FSR8Oau6vZB1MWfBnA5q2a/IqRHiSZSbt8lz0dyTF599q8pc5GcSv/TvmrYaEGzh3+N0S4cbmuMCqVlwJg== +"@vercel/node@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@vercel/node/-/node-1.9.0.tgz#6b64f3b9a962ddb1089276fad00f441a1f4b9cf0" + integrity sha512-Vk/ZpuY4Cdc8oUwBi/kf8qETRaJb/KYdFddVkLuS10QwA0yJx+RQ11trhZ1KFUdc27aBr5S2k8/dDxK8sLr+IA== dependencies: "@types/node" "*" ts-node "8.9.1" diff --git a/packages/build-utils/test/fixtures/16-node-env-install/build.js b/packages/build-utils/test/fixtures/16-node-env-install/build.js index 944c5028937c..cf3551484de2 100644 --- a/packages/build-utils/test/fixtures/16-node-env-install/build.js +++ b/packages/build-utils/test/fixtures/16-node-env-install/build.js @@ -15,7 +15,7 @@ function checkPkgOrThrow(pkgname) { checkPkgOrThrow('tls-check'); checkPkgOrThrow('exeggcute'); -// This is to satisfy `@now/static-build` which needs a `dist` directory. +// This is to satisfy `@vercel/static-build` which needs a `dist` directory. const { exec } = require('exeggcute'); exec('mkdir dist', __dirname); exec('echo "node-env:RANDOMNESS_PLACEHOLDER" > dist/index.html', __dirname); diff --git a/packages/build-utils/test/fixtures/18-install-only-production/npm/build.js b/packages/build-utils/test/fixtures/18-install-only-production/npm/build.js index 72eec46044ab..bf24fae1bcd4 100644 --- a/packages/build-utils/test/fixtures/18-install-only-production/npm/build.js +++ b/packages/build-utils/test/fixtures/18-install-only-production/npm/build.js @@ -18,7 +18,7 @@ if (development) { throw new Error('Expected development dependencies to _NOT_ be installed.'); } -// This is to satisfy `@now/static-build` which needs a `dist` directory. +// This is to satisfy `@vercel/static-build` which needs a `dist` directory. const { execSync } = require('child_process'); execSync('mkdir dist'); execSync('echo "npm-prod:RANDOMNESS_PLACEHOLDER" > dist/index.html'); diff --git a/packages/build-utils/test/fixtures/18-install-only-production/yarn/build.js b/packages/build-utils/test/fixtures/18-install-only-production/yarn/build.js index 578073ebb28c..e0c9370605e8 100644 --- a/packages/build-utils/test/fixtures/18-install-only-production/yarn/build.js +++ b/packages/build-utils/test/fixtures/18-install-only-production/yarn/build.js @@ -18,7 +18,7 @@ if (development) { throw new Error('Expected development dependencies to _NOT_ be installed.'); } -// This is to satisfy `@now/static-build` which needs a `dist` directory. +// This is to satisfy `@vercel/static-build` which needs a `dist` directory. const { execSync } = require('child_process'); execSync('mkdir dist'); execSync('echo "yarn-prod:RANDOMNESS_PLACEHOLDER" > dist/index.html'); diff --git a/packages/cgi/index.js b/packages/cgi/index.js index cd320d32e7c4..9a630ea8575a 100644 --- a/packages/cgi/index.js +++ b/packages/cgi/index.js @@ -7,7 +7,7 @@ const { shouldServe, createLambda, getWritableDirectory, -} = require('@now/build-utils'); +} = require('@vercel/build-utils'); exports.analyze = ({ files, entrypoint }) => files[entrypoint].digest; diff --git a/packages/cgi/main.go b/packages/cgi/main.go index c33deffd8209..59d24ae25f39 100644 --- a/packages/cgi/main.go +++ b/packages/cgi/main.go @@ -22,7 +22,7 @@ func (h *CgiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { Env: []string{ "HTTPS=on", "SERVER_PORT=443", - "SERVER_SOFTWARE=@now/cgi", + "SERVER_SOFTWARE=@vercel/cgi", }, } handler.ServeHTTP(w, r) diff --git a/packages/cli/src/util/deploy/process-deployment.ts b/packages/cli/src/util/deploy/process-deployment.ts index a7572ce7b9d7..68da754878ab 100644 --- a/packages/cli/src/util/deploy/process-deployment.ts +++ b/packages/cli/src/util/deploy/process-deployment.ts @@ -4,7 +4,7 @@ import chalk from 'chalk'; import { createDeployment, DeploymentOptions, - NowClientOptions, + VercelClientOptions, } from '@vercel/client'; import { Output } from '../output'; // @ts-ignore @@ -71,7 +71,7 @@ export default async function processDeployment({ const { env = {} } = requestBody; - const nowClientOptions: NowClientOptions = { + const clientOptions: VercelClientOptions = { teamId: org.type === 'team' ? org.id : undefined, apiUrl: now._apiUrl, token: now._token, @@ -96,7 +96,7 @@ export default async function processDeployment({ try { for await (const event of createDeployment( - nowClientOptions, + clientOptions, requestBody, nowConfig )) { diff --git a/packages/cli/test/dev-builder.unit.js b/packages/cli/test/dev-builder.unit.js index 2e0a48fcadfc..4ea58ef90d5d 100644 --- a/packages/cli/test/dev-builder.unit.js +++ b/packages/cli/test/dev-builder.unit.js @@ -178,87 +178,87 @@ test('[dev-builder] filter install not bundled tagged, cached tagged', t => { }); test('[dev-builder] isBundledBuilder() - stable', t => { - const nowCliPkg = { + const cliPkg = { dependencies: { - '@now/node': '1.5.2', + '@vercel/node': '1.6.1', }, }; // "canary" tag { - const parsed = npa('@now/node@canary'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node@canary'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, false); } // "latest" tag { - const parsed = npa('@now/node'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, true); } // specific matching version { - const parsed = npa('@now/node@1.5.2'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node@1.6.1'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, true); } // specific non-matching version { - const parsed = npa('@now/node@1.5.1'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node@1.6.0'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, false); } // URL { const parsed = npa('https://example.com'); - const result = isBundledBuilder(parsed, nowCliPkg); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, false); } }); test('[dev-builder] isBundledBuilder() - canary', t => { - const nowCliPkg = { + const cliPkg = { dependencies: { - '@now/node': '1.5.2-canary.3', + '@vercel/node': '1.6.1-canary.0', }, }; // "canary" tag { - const parsed = npa('@now/node@canary'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node@canary'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, true); } // "latest" tag { - const parsed = npa('@now/node'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, false); } // specific matching version { - const parsed = npa('@now/node@1.5.2-canary.3'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node@1.6.1-canary.0'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, true); } // specific non-matching version { - const parsed = npa('@now/node@1.5.2-canary.2'); - const result = isBundledBuilder(parsed, nowCliPkg); + const parsed = npa('@vercel/node@1.5.2-canary.9'); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, false); } // URL { const parsed = npa('https://example.com'); - const result = isBundledBuilder(parsed, nowCliPkg); + const result = isBundledBuilder(parsed, cliPkg); t.is(result, false); } }); diff --git a/packages/cli/test/fixtures/unit/now-dev-custom-404/now.json b/packages/cli/test/fixtures/unit/now-dev-custom-404/vercel.json similarity index 66% rename from packages/cli/test/fixtures/unit/now-dev-custom-404/now.json rename to packages/cli/test/fixtures/unit/now-dev-custom-404/vercel.json index b403eb631573..dc6827817d9f 100644 --- a/packages/cli/test/fixtures/unit/now-dev-custom-404/now.json +++ b/packages/cli/test/fixtures/unit/now-dev-custom-404/vercel.json @@ -1,8 +1,8 @@ { "version": 2, "builds": [ - { "src": "*.js", "use": "@now/node" }, - { "src": "*.html", "use": "@now/static" } + { "src": "*.js", "use": "@vercel/node" }, + { "src": "*.html", "use": "@vercel/static" } ], "routes": [ { "src": "/error.js", "dest": "/error.js", "status": 404 }, diff --git a/packages/cli/test/fixtures/unit/now-dev-directory-listing/now.json b/packages/cli/test/fixtures/unit/now-dev-directory-listing/now.json deleted file mode 100644 index 1bf9cd91e84b..000000000000 --- a/packages/cli/test/fixtures/unit/now-dev-directory-listing/now.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 2, - "builds": [ - { "src": "*.js", "use": "@now/node" }, - { "src": "*.txt", "use": "@now/static" } - ] -} diff --git a/packages/cli/test/fixtures/unit/now-dev-directory-listing/vercel.json b/packages/cli/test/fixtures/unit/now-dev-directory-listing/vercel.json new file mode 100644 index 000000000000..f58dd7270e21 --- /dev/null +++ b/packages/cli/test/fixtures/unit/now-dev-directory-listing/vercel.json @@ -0,0 +1,7 @@ +{ + "version": 2, + "builds": [ + { "src": "*.js", "use": "@vercel/node" }, + { "src": "*.txt", "use": "@vercel/static" } + ] +} diff --git a/packages/cli/test/fixtures/unit/now-dev-headers/now.json b/packages/cli/test/fixtures/unit/now-dev-headers/now.json deleted file mode 100644 index 58c8c5778495..000000000000 --- a/packages/cli/test/fixtures/unit/now-dev-headers/now.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "version": 2, - "name": "now-dev-headers", - "builds": [ - { "src": "index.js", "use": "@now/node" }, - { "src": "foo.txt", "use": "@now/static" } - ] -} diff --git a/packages/cli/test/fixtures/unit/now-dev-headers/vercel.json b/packages/cli/test/fixtures/unit/now-dev-headers/vercel.json new file mode 100644 index 000000000000..56a133e8cdc6 --- /dev/null +++ b/packages/cli/test/fixtures/unit/now-dev-headers/vercel.json @@ -0,0 +1,8 @@ +{ + "version": 2, + "name": "now-dev-headers", + "builds": [ + { "src": "index.js", "use": "@vercel/node" }, + { "src": "foo.txt", "use": "@vercel/static" } + ] +} diff --git a/packages/cli/test/fixtures/unit/now-dev-next/now.json b/packages/cli/test/fixtures/unit/now-dev-next/vercel.json similarity index 65% rename from packages/cli/test/fixtures/unit/now-dev-next/now.json rename to packages/cli/test/fixtures/unit/now-dev-next/vercel.json index 6bd12ad91de6..3af66588c6de 100644 --- a/packages/cli/test/fixtures/unit/now-dev-next/now.json +++ b/packages/cli/test/fixtures/unit/now-dev-next/vercel.json @@ -1,7 +1,7 @@ { "version": 2, "name": "now-dev-next", - "builds": [{ "src": "package.json", "use": "@now/next@canary" }], + "builds": [{ "src": "package.json", "use": "@vercel/next@canary" }], "routes": [ { "src": "/(.*)", diff --git a/packages/cli/test/fixtures/unit/now-dev-query-invoke/now.json b/packages/cli/test/fixtures/unit/now-dev-query-invoke/vercel.json similarity index 68% rename from packages/cli/test/fixtures/unit/now-dev-query-invoke/now.json rename to packages/cli/test/fixtures/unit/now-dev-query-invoke/vercel.json index ea001bf1a4b8..2b02c6fadb12 100644 --- a/packages/cli/test/fixtures/unit/now-dev-query-invoke/now.json +++ b/packages/cli/test/fixtures/unit/now-dev-query-invoke/vercel.json @@ -1,9 +1,7 @@ { "version": 2, "name": "now-dev-query-test", - "builds": [ - { "src": "index.js", "use": "@now/node" } - ], + "builds": [{ "src": "index.js", "use": "@vercel/node" }], "routes": [ { "src": "/(.*)", diff --git a/packages/cli/test/fixtures/unit/now-dev-query-proxy/now.json b/packages/cli/test/fixtures/unit/now-dev-query-proxy/vercel.json similarity index 64% rename from packages/cli/test/fixtures/unit/now-dev-query-proxy/now.json rename to packages/cli/test/fixtures/unit/now-dev-query-proxy/vercel.json index c2aacca9e85f..74f88423bdfb 100644 --- a/packages/cli/test/fixtures/unit/now-dev-query-proxy/now.json +++ b/packages/cli/test/fixtures/unit/now-dev-query-proxy/vercel.json @@ -1,8 +1,6 @@ { "version": 2, - "builds": [ - { "src": "index.js", "use": "@now/node" } - ], + "builds": [{ "src": "index.js", "use": "@vercel/node" }], "routes": [ { "src": "/(.*)", "dest": "http://localhost:$1/something?route-param=b" } ] diff --git a/packages/cli/test/fixtures/unit/now-dev-static-build-routing/.nowignore b/packages/cli/test/fixtures/unit/now-dev-static-build-routing/.nowignore deleted file mode 100644 index 5535ea92cf0a..000000000000 --- a/packages/cli/test/fixtures/unit/now-dev-static-build-routing/.nowignore +++ /dev/null @@ -1,2 +0,0 @@ -yarn.lock -README.md \ No newline at end of file diff --git a/packages/cli/test/fixtures/unit/now-dev-static-build-routing/now.json b/packages/cli/test/fixtures/unit/now-dev-static-build-routing/vercel.json similarity index 76% rename from packages/cli/test/fixtures/unit/now-dev-static-build-routing/now.json rename to packages/cli/test/fixtures/unit/now-dev-static-build-routing/vercel.json index 6e9f26a2caf7..3156b2f746b5 100644 --- a/packages/cli/test/fixtures/unit/now-dev-static-build-routing/now.json +++ b/packages/cli/test/fixtures/unit/now-dev-static-build-routing/vercel.json @@ -3,14 +3,14 @@ "builds": [ { "src": "package.json", - "use": "@now/static-build@canary", + "use": "@vercel/static-build@canary", "config": { "distDir": "public" } }, { "src": "api/**/*.js", - "use": "@now/node" + "use": "@vercel/node" } ], "routes": [{ "src": "^/api/date$", "dest": "api/date.js" }] diff --git a/packages/cli/test/fixtures/unit/now-dev-static-routes/now.json b/packages/cli/test/fixtures/unit/now-dev-static-routes/now.json deleted file mode 100644 index f73264cbec35..000000000000 --- a/packages/cli/test/fixtures/unit/now-dev-static-routes/now.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "version": 2, - "builds": [ - { "src": "www/**/*", "use": "@now/static" } - ], - "routes": [ - { "src": "(.*)", "dest": "www$1" } - ] -} diff --git a/packages/cli/test/fixtures/unit/now-dev-static-routes/vercel.json b/packages/cli/test/fixtures/unit/now-dev-static-routes/vercel.json new file mode 100644 index 000000000000..aea2a396c1e1 --- /dev/null +++ b/packages/cli/test/fixtures/unit/now-dev-static-routes/vercel.json @@ -0,0 +1,5 @@ +{ + "version": 2, + "builds": [{ "src": "www/**/*", "use": "@vercel/static" }], + "routes": [{ "src": "(.*)", "dest": "www$1" }] +} diff --git a/packages/cli/test/fixtures/unit/now-json/a.js b/packages/cli/test/fixtures/unit/now-json/a.js deleted file mode 100755 index 95c1988dd647..000000000000 --- a/packages/cli/test/fixtures/unit/now-json/a.js +++ /dev/null @@ -1 +0,0 @@ -// should not be included diff --git a/packages/cli/test/fixtures/unit/now-json/b.js b/packages/cli/test/fixtures/unit/now-json/b.js deleted file mode 100755 index dcdb2da2e10e..000000000000 --- a/packages/cli/test/fixtures/unit/now-json/b.js +++ /dev/null @@ -1 +0,0 @@ -// should be included diff --git a/packages/cli/test/fixtures/unit/now-json/now.json b/packages/cli/test/fixtures/unit/now-json/now.json deleted file mode 100755 index 5acf2cbdecb7..000000000000 --- a/packages/cli/test/fixtures/unit/now-json/now.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files": [ - "b.js" - ] -} diff --git a/packages/cli/test/fixtures/unit/now-json/package.json b/packages/cli/test/fixtures/unit/now-json/package.json deleted file mode 100755 index c679e7fbd9d8..000000000000 --- a/packages/cli/test/fixtures/unit/now-json/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "woot", - "version": "0.0.1", - "description": "", - "dependencies": {}, - "files": [ - "a.js" - ] -} diff --git a/packages/cli/test/helpers/prepare.js b/packages/cli/test/helpers/prepare.js index f24f753f58f8..bb8444f49d77 100644 --- a/packages/cli/test/helpers/prepare.js +++ b/packages/cli/test/helpers/prepare.js @@ -14,7 +14,7 @@ const getRevertAliasConfigFile = () => { builds: [ { src: '*.json', - use: '@now/static', + use: '@vercel/static', }, ], }); @@ -30,11 +30,11 @@ module.exports = async function prepare(session) { }, 'empty-directory': {}, 'config-scope-property-email': { - 'now.json': `{ "scope": "${session}@zeit.pub", "builds": [ { "src": "*.html", "use": "@now/static" } ] }`, + 'now.json': `{ "scope": "${session}@zeit.pub", "builds": [ { "src": "*.html", "use": "@vercel/static" } ] }`, 'index.html': 'test scope emailtest scope usernamehello test', 'now.json': JSON.stringify({ name: 'original', - builds: [{ src: `main-${session}.html`, use: '@now/static' }], + builds: [{ src: `main-${session}.html`, use: '@vercel/static' }], routes: [{ src: '/another-main', dest: `/main-${session}.html` }], }), 'now-test.json': JSON.stringify({ name: 'secondary', - builds: [{ src: `test-${session}.html`, use: '@now/static' }], + builds: [{ src: `test-${session}.html`, use: '@vercel/static' }], routes: [{ src: '/another-test', dest: `/test-${session}.html` }], }), }, @@ -372,10 +372,10 @@ module.exports = async function prepare(session) { 'conflicting-now-json-vercel-json': { 'index.html': '

I am a website.

', 'vercel.json': JSON.stringify({ - builds: [{ src: '*.html', use: '@now/static' }], + builds: [{ src: '*.html', use: '@vercel/static' }], }), 'now.json': JSON.stringify({ - builds: [{ src: '*.html', use: '@now/static' }], + builds: [{ src: '*.html', use: '@vercel/static' }], }), }, 'unauthorized-vercel-config': { diff --git a/packages/client/README.md b/packages/client/README.md index 7d792d693ba7..b3dc0150ab2c 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -17,10 +17,7 @@ yarn add @vercel/client Next, load it: ```js -// v2 const { createDeployment } = require('@vercel/client'); -// v1 -const { createLegacyDeployment } = require('@vercel/client'); ``` Then call inside a `for...of` loop to follow the progress with the following arguments: @@ -34,7 +31,7 @@ async function deploy() { for await (const event of createDeployment({ token: process.env.TOKEN, - path: '/Users/vercel-user/projects/front', + path: '/Users/me/Code/myproject', })) { if (event.type === 'ready') { deployment = event.payload; diff --git a/packages/client/src/check-deployment-status.ts b/packages/client/src/check-deployment-status.ts index 52d67ec29e62..da4574c7c0f0 100644 --- a/packages/client/src/check-deployment-status.ts +++ b/packages/client/src/check-deployment-status.ts @@ -11,7 +11,7 @@ import { import { createDebug } from './utils'; import { Deployment, - NowClientOptions, + VercelClientOptions, DeploymentBuild, DeploymentEventType, } from './types'; @@ -24,7 +24,7 @@ interface DeploymentStatus { /* eslint-disable */ export async function* checkDeploymentStatus( deployment: Deployment, - clientOptions: NowClientOptions + clientOptions: VercelClientOptions ): AsyncIterableIterator { const { token, teamId, apiUrl, userAgent } = clientOptions; const debug = createDebug(clientOptions.debug); diff --git a/packages/client/src/create-deployment.ts b/packages/client/src/create-deployment.ts index 9795c8dc0553..ed4140f2054a 100644 --- a/packages/client/src/create-deployment.ts +++ b/packages/client/src/create-deployment.ts @@ -7,14 +7,14 @@ import { buildFileTree, createDebug, parseVercelConfig } from './utils'; import { DeploymentError } from './errors'; import { NowConfig, - NowClientOptions, + VercelClientOptions, DeploymentOptions, DeploymentEventType, } from './types'; export default function buildCreateDeployment() { return async function* createDeployment( - clientOptions: NowClientOptions, + clientOptions: VercelClientOptions, deploymentOptions: DeploymentOptions = {}, nowConfig: NowConfig = {} ): AsyncIterableIterator<{ type: DeploymentEventType; payload: any }> { diff --git a/packages/client/src/deploy.ts b/packages/client/src/deploy.ts index 9367a94002fd..14acbbf5b0f2 100644 --- a/packages/client/src/deploy.ts +++ b/packages/client/src/deploy.ts @@ -11,13 +11,13 @@ import { import { Deployment, DeploymentOptions, - NowClientOptions, + VercelClientOptions, DeploymentEventType, } from './types'; async function* postDeployment( files: Map, - clientOptions: NowClientOptions, + clientOptions: VercelClientOptions, deploymentOptions: DeploymentOptions ): AsyncIterableIterator<{ type: DeploymentEventType; @@ -91,7 +91,7 @@ async function* postDeployment( function getDefaultName( files: Map, - clientOptions: NowClientOptions + clientOptions: VercelClientOptions ): string { const debug = createDebug(clientOptions.debug); const { isDirectory, path } = clientOptions; @@ -110,7 +110,7 @@ function getDefaultName( export async function* deploy( files: Map, - clientOptions: NowClientOptions, + clientOptions: VercelClientOptions, deploymentOptions: DeploymentOptions ): AsyncIterableIterator<{ type: string; payload: any }> { const debug = createDebug(clientOptions.debug); diff --git a/packages/client/src/types.ts b/packages/client/src/types.ts index dbc3ed82b826..0e825658e0fd 100644 --- a/packages/client/src/types.ts +++ b/packages/client/src/types.ts @@ -1,10 +1,5 @@ import { Builder, BuilderFunctions } from '@vercel/build-utils'; -import { - NowHeader, - Route, - NowRedirect, - NowRewrite, -} from '@vercel/routing-utils'; +import { Header, Route, Redirect, Rewrite } from '@vercel/routing-utils'; export { DeploymentEventType } from './utils'; @@ -12,12 +7,7 @@ export interface Dictionary { [key: string]: T; } -/** - * Options for `now-client` or - * properties that should not - * be part of the payload. - */ -export interface NowClientOptions { +export interface VercelClientOptions { token: string; path: string | string[]; debug?: boolean; @@ -31,6 +21,12 @@ export interface NowClientOptions { skipAutoDetectionConfirmation?: boolean; } +/** @deprecated Use VercelClientOptions instead. */ +export type NowClientOptions = VercelClientOptions; + +/** @deprecated Use VercelConfig instead. */ +export type NowConfig = VercelConfig; + export interface Deployment { id: string; deploymentId?: string; @@ -103,7 +99,7 @@ export interface DeploymentGithubData { export const fileNameSymbol = Symbol('fileName'); -export interface NowConfig { +export interface VercelConfig { [fileNameSymbol]?: string; name?: string; version?: number; @@ -116,9 +112,9 @@ export interface NowConfig { routes?: Route[]; files?: string[]; cleanUrls?: boolean; - rewrites?: NowRewrite[]; - redirects?: NowRedirect[]; - headers?: NowHeader[]; + rewrites?: Rewrite[]; + redirects?: Redirect[]; + headers?: Header[]; trailingSlash?: boolean; functions?: BuilderFunctions; github?: DeploymentGithubData; @@ -141,9 +137,9 @@ export interface DeploymentOptions { regions?: string[]; routes?: Route[]; cleanUrls?: boolean; - rewrites?: NowRewrite[]; - redirects?: NowRedirect[]; - headers?: NowHeader[]; + rewrites?: Rewrite[]; + redirects?: Redirect[]; + headers?: Header[]; trailingSlash?: boolean; builds?: Builder[]; functions?: BuilderFunctions; diff --git a/packages/client/src/upload.ts b/packages/client/src/upload.ts index 61a0e69f8244..61e26e06ff40 100644 --- a/packages/client/src/upload.ts +++ b/packages/client/src/upload.ts @@ -6,7 +6,7 @@ import { DeploymentFile } from './utils/hashes'; import { fetch, API_FILES, createDebug } from './utils'; import { DeploymentError } from './errors'; import { deploy } from './deploy'; -import { NowClientOptions, DeploymentOptions } from './types'; +import { VercelClientOptions, DeploymentOptions } from './types'; const isClientNetworkError = (err: Error | DeploymentError) => { if (err.message) { @@ -27,7 +27,7 @@ const isClientNetworkError = (err: Error | DeploymentError) => { export async function* upload( files: Map, - clientOptions: NowClientOptions, + clientOptions: VercelClientOptions, deploymentOptions: DeploymentOptions ): AsyncIterableIterator { const { token, teamId, apiUrl, userAgent } = clientOptions; diff --git a/packages/client/src/utils/index.ts b/packages/client/src/utils/index.ts index 601cd06a4cd5..402a83a30bad 100644 --- a/packages/client/src/utils/index.ts +++ b/packages/client/src/utils/index.ts @@ -7,7 +7,7 @@ import ignore from 'ignore'; type Ignore = ReturnType; import { pkgVersion } from '../pkg'; import { NowBuildError } from '@vercel/build-utils'; -import { NowClientOptions, DeploymentOptions, NowConfig } from '../types'; +import { VercelClientOptions, DeploymentOptions, NowConfig } from '../types'; import { Sema } from 'async-sema'; import { readFile } from 'fs-extra'; import readdir from 'recursive-readdir'; @@ -205,7 +205,7 @@ export const fetch = async ( delete opts.teamId; } - const userAgent = opts.userAgent || `now-client-v${pkgVersion}`; + const userAgent = opts.userAgent || `client-v${pkgVersion}`; delete opts.userAgent; opts.headers = { @@ -237,7 +237,7 @@ const isWin = process.platform.includes('win'); export const prepareFiles = ( files: Map, - clientOptions: NowClientOptions + clientOptions: VercelClientOptions ): PreparedFile[] => { const preparedFiles = [...files.keys()].reduce( (acc: PreparedFile[], sha: string): PreparedFile[] => { @@ -280,8 +280,7 @@ export function createDebug(debug?: boolean) { if (debug) { return (...logs: string[]) => { process.stderr.write( - [`[now-client-debug] ${new Date().toISOString()}`, ...logs].join(' ') + - '\n' + [`[client-debug] ${new Date().toISOString()}`, ...logs].join(' ') + '\n' ); }; } diff --git a/packages/client/src/utils/query-string.ts b/packages/client/src/utils/query-string.ts index c42e4896d8da..95dbebe4f493 100644 --- a/packages/client/src/utils/query-string.ts +++ b/packages/client/src/utils/query-string.ts @@ -1,7 +1,9 @@ import { URLSearchParams } from 'url'; -import { NowClientOptions } from '../types'; +import { VercelClientOptions } from '../types'; -export function generateQueryString(clientOptions: NowClientOptions): string { +export function generateQueryString( + clientOptions: VercelClientOptions +): string { const options = new URLSearchParams(); if (clientOptions.teamId) { diff --git a/packages/node-bridge/src/launcher.ts b/packages/node-bridge/src/launcher.ts index 338483c975a0..179418cb12f2 100644 --- a/packages/node-bridge/src/launcher.ts +++ b/packages/node-bridge/src/launcher.ts @@ -12,7 +12,7 @@ type LauncherConfiguration = { awsLambdaHandler?: string; }; -export function makeNowLauncher(config: LauncherConfiguration): string { +export function makeVercelLauncher(config: LauncherConfiguration): string { const { entrypointPath, bridgePath, diff --git a/packages/node/bench/run.js b/packages/node/bench/run.js index 4bbc2f885381..eb344201df95 100644 --- a/packages/node/bench/run.js +++ b/packages/node/bench/run.js @@ -8,15 +8,15 @@ const setupFiles = async (entrypoint, shouldAddHelpers) => { await fs.copyFile( join(__dirname, '../dist/helpers.js'), - join(__dirname, 'lambda/helpers.js'), + join(__dirname, 'lambda/helpers.js') ); await fs.copyFile( - require.resolve('@now/node-bridge/bridge'), - join(__dirname, 'lambda/bridge.js'), + require.resolve('@vercel/node-bridge/bridge'), + join(__dirname, 'lambda/bridge.js') ); await fs.copyFile( join(process.cwd(), entrypoint), - join(__dirname, 'lambda/entrypoint.js'), + join(__dirname, 'lambda/entrypoint.js') ); let launcher = makeLauncher('./entrypoint', shouldAddHelpers); @@ -47,7 +47,7 @@ const runTests = async (entrypoint, shouldAddHelpers = true, nb) => { console.log( `setting up files with entrypoint ${entrypoint} and ${ shouldAddHelpers ? 'helpers' : 'no helpers' - }`, + }` ); await setupFiles(entrypoint, shouldAddHelpers); @@ -76,7 +76,7 @@ const runTests = async (entrypoint, shouldAddHelpers = true, nb) => { const main = async () => { if (process.argv.length !== 5) { console.log( - 'usage : node run.js ', + 'usage : node run.js ' ); return; } diff --git a/packages/node/src/example-import.ts b/packages/node/src/example-import.ts index a2c269b813b8..133805a9f73b 100644 --- a/packages/node/src/example-import.ts +++ b/packages/node/src/example-import.ts @@ -2,5 +2,13 @@ // which will fail at compile time if exports // are not found in the index file -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { NowRequest, NowResponse } from './index'; +import { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + NowRequest, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + NowResponse, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + VercelRequest, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + VercelResponse, +} from './index'; diff --git a/packages/node/src/helpers.ts b/packages/node/src/helpers.ts index 7d9a544f031a..0e310342170f 100644 --- a/packages/node/src/helpers.ts +++ b/packages/node/src/helpers.ts @@ -1,15 +1,15 @@ import { - NowRequest, - NowResponse, - NowRequestCookies, - NowRequestQuery, - NowRequestBody, + VercelRequest, + VercelResponse, + VercelRequestCookies, + VercelRequestQuery, + VercelRequestBody, } from './types'; import { Server } from 'http'; import { Bridge } from './bridge'; -function getBodyParser(req: NowRequest, body: Buffer) { - return function parseBody(): NowRequestBody { +function getBodyParser(req: VercelRequest, body: Buffer) { + return function parseBody(): VercelRequestBody { if (!req.headers['content-type']) { return undefined; } @@ -46,16 +46,16 @@ function getBodyParser(req: NowRequest, body: Buffer) { }; } -function getQueryParser({ url = '/' }: NowRequest) { - return function parseQuery(): NowRequestQuery { +function getQueryParser({ url = '/' }: VercelRequest) { + return function parseQuery(): VercelRequestQuery { // eslint-disable-next-line @typescript-eslint/no-var-requires const { parse: parseURL } = require('url'); return parseURL(url, true).query; }; } -function getCookieParser(req: NowRequest) { - return function parseCookie(): NowRequestCookies { +function getCookieParser(req: VercelRequest) { + return function parseCookie(): VercelRequestCookies { const header: undefined | string | string[] = req.headers.cookie; if (!header) { @@ -68,16 +68,16 @@ function getCookieParser(req: NowRequest) { }; } -function status(res: NowResponse, statusCode: number): NowResponse { +function status(res: VercelResponse, statusCode: number): VercelResponse { res.statusCode = statusCode; return res; } function redirect( - res: NowResponse, + res: VercelResponse, statusOrUrl: string | number, url?: string -): NowResponse { +): VercelResponse { if (typeof statusOrUrl === 'string') { url = statusOrUrl; statusOrUrl = 307; @@ -108,7 +108,11 @@ function createETag(body: any, encoding: 'utf8' | undefined) { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -function send(req: NowRequest, res: NowResponse, body: any): NowResponse { +function send( + req: VercelRequest, + res: VercelResponse, + body: any +): VercelResponse { let chunk: unknown = body; let encoding: 'utf8' | undefined; @@ -206,7 +210,11 @@ function send(req: NowRequest, res: NowResponse, body: any): NowResponse { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -function json(req: NowRequest, res: NowResponse, jsonBody: any): NowResponse { +function json( + req: VercelRequest, + res: VercelResponse, + jsonBody: any +): VercelResponse { const body = JSON.stringify(jsonBody); // content-type @@ -227,7 +235,7 @@ export class ApiError extends Error { } export function sendError( - res: NowResponse, + res: VercelResponse, statusCode: number, message: string ) { @@ -236,7 +244,7 @@ export function sendError( res.end(); } -function setLazyProp(req: NowRequest, prop: string, getter: () => T) { +function setLazyProp(req: VercelRequest, prop: string, getter: () => T) { const opts = { configurable: true, enumerable: true }; const optsReset = { ...opts, writable: true }; @@ -255,12 +263,12 @@ function setLazyProp(req: NowRequest, prop: string, getter: () => T) { } export function createServerWithHelpers( - handler: (req: NowRequest, res: NowResponse) => void | Promise, + handler: (req: VercelRequest, res: VercelResponse) => void | Promise, bridge: Bridge ) { const server = new Server(async (_req, _res) => { - const req = _req as NowRequest; - const res = _res as NowResponse; + const req = _req as VercelRequest; + const res = _res as VercelResponse; try { const reqId = req.headers['x-now-bridge-request-id']; @@ -274,9 +282,13 @@ export function createServerWithHelpers( const event = bridge.consumeEvent(reqId); - setLazyProp(req, 'cookies', getCookieParser(req)); - setLazyProp(req, 'query', getQueryParser(req)); - setLazyProp(req, 'body', getBodyParser(req, event.body)); + setLazyProp(req, 'cookies', getCookieParser(req)); + setLazyProp(req, 'query', getQueryParser(req)); + setLazyProp( + req, + 'body', + getBodyParser(req, event.body) + ); res.status = statusCode => status(res, statusCode); res.redirect = (statusOrUrl, url) => redirect(res, statusOrUrl, url); diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index e385e9f8e4f9..dbfb5d6da4f3 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -46,11 +46,16 @@ const { isSymbolicLink, walkParentDirs, } = buildUtils; -import { makeNowLauncher, makeAwsLauncher } from './launcher'; +import { makeVercelLauncher, makeAwsLauncher } from './launcher'; import { Register, register } from './typescript'; export { shouldServe }; -export { NowRequest, NowResponse } from './types'; +export { + NowRequest, + NowResponse, + VercelRequest, + VercelResponse, +} from './types'; interface DownloadOptions { files: Files; @@ -373,11 +378,11 @@ export async function build({ ); debug(`Trace complete [${Date.now() - traceTime}ms]`); - const makeLauncher = awsLambdaHandler ? makeAwsLauncher : makeNowLauncher; + const launcher = awsLambdaHandler ? makeAwsLauncher : makeVercelLauncher; const launcherFiles: Files = { [`${LAUNCHER_FILENAME}.js`]: new FileBlob({ - data: makeLauncher({ + data: launcher({ entrypointPath: `./${relative(baseDir, entrypointPath)}`, bridgePath: `./${BRIDGE_FILENAME}`, helpersPath: `./${HELPERS_FILENAME}`, diff --git a/packages/node/src/types.ts b/packages/node/src/types.ts index 210a284c140c..7976c700c374 100644 --- a/packages/node/src/types.ts +++ b/packages/node/src/types.ts @@ -22,10 +22,20 @@ export type VercelApiHandler = ( res: VercelResponse ) => void; -// Backwards-compat +/** @deprecated Use VercelRequestCookies instead. */ export type NowRequestCookies = VercelRequestCookies; + +/** @deprecated Use VercelRequestQuery instead. */ export type NowRequestQuery = VercelRequestQuery; + +/** @deprecated Use `any` instead. */ export type NowRequestBody = any; + +/** @deprecated Use VercelRequest instead. */ export type NowRequest = VercelRequest; + +/** @deprecated Use VercelResponse instead. */ export type NowResponse = VercelResponse; + +/** @deprecated Use VercelApiHandler instead. */ export type NowApiHandler = VercelApiHandler; diff --git a/packages/node/test/fixtures/15-helpers/ts-legacy/index.ts b/packages/node/test/fixtures/15-helpers/ts-legacy/index.ts index 9599ca68570e..2ebc310de52f 100644 --- a/packages/node/test/fixtures/15-helpers/ts-legacy/index.ts +++ b/packages/node/test/fixtures/15-helpers/ts-legacy/index.ts @@ -1,6 +1,6 @@ -import { NowRequest, NowResponse } from './types'; +import { VercelRequest, VercelResponse } from './types'; -export default function listener(req: NowRequest, res: NowResponse) { +export default function listener(req: VercelRequest, res: VercelResponse) { res.status(200); res.send('hello legacy:RANDOMNESS_PLACEHOLDER'); } diff --git a/packages/node/test/fixtures/18-nested-tsconfig/index.ts b/packages/node/test/fixtures/18-nested-tsconfig/index.ts index 71fc301e0d9f..90385ab3d2f1 100644 --- a/packages/node/test/fixtures/18-nested-tsconfig/index.ts +++ b/packages/node/test/fixtures/18-nested-tsconfig/index.ts @@ -1,7 +1,7 @@ -import { NowRequest, NowResponse } from '@now/node'; +import { VercelRequest, VercelResponse } from '@vercel/node'; import { hello } from './dep'; -export default function (req: NowRequest, res: NowResponse) { +export default function (req: VercelRequest, res: VercelResponse) { if (req) { res.end(hello.toString()); } else { diff --git a/packages/node/test/fixtures/18-nested-tsconfig/package.json b/packages/node/test/fixtures/18-nested-tsconfig/package.json index 10b041b15226..79c4ed478f31 100644 --- a/packages/node/test/fixtures/18-nested-tsconfig/package.json +++ b/packages/node/test/fixtures/18-nested-tsconfig/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "main": "index.js", "devDependencies": { - "@now/node": "*", + "@vercel/node": "*", "typescript": "3.5.3" } } diff --git a/packages/node/test/fixtures/18-nested-tsconfig/now.json b/packages/node/test/fixtures/18-nested-tsconfig/vercel.json similarity index 100% rename from packages/node/test/fixtures/18-nested-tsconfig/now.json rename to packages/node/test/fixtures/18-nested-tsconfig/vercel.json diff --git a/packages/node/test/fixtures/60-timezone-utc/now.json b/packages/node/test/fixtures/60-timezone-utc/vercel.json similarity index 68% rename from packages/node/test/fixtures/60-timezone-utc/now.json rename to packages/node/test/fixtures/60-timezone-utc/vercel.json index 2719e12bcd5c..26db305d6565 100644 --- a/packages/node/test/fixtures/60-timezone-utc/now.json +++ b/packages/node/test/fixtures/60-timezone-utc/vercel.json @@ -1,6 +1,6 @@ { "version": 2, - "builds": [{ "src": "api/**/*.js", "use": "@now/node" }], + "builds": [{ "src": "api/**/*.js", "use": "@vercel/node" }], "probes": [ { "path": "/api/offset.js", diff --git a/packages/node/test/helpers.test.js b/packages/node/test/helpers.test.js index 3c704dd6b96e..eef6694a86e7 100644 --- a/packages/node/test/helpers.test.js +++ b/packages/node/test/helpers.test.js @@ -42,7 +42,7 @@ afterEach(async () => { await server.close(); }); -describe('contract with @now/node-bridge', () => { +describe('contract with @vercel/node-bridge', () => { test('should call consumeEvent with the correct reqId', async () => { await fetchWithProxyReq(`${url}/`); diff --git a/packages/routing-utils/README.md b/packages/routing-utils/README.md index 9190e007a6ac..5d5f30c3d942 100644 --- a/packages/routing-utils/README.md +++ b/packages/routing-utils/README.md @@ -1,13 +1,13 @@ -# @now/routing-utils +# @vercel/routing-utils Route validation utilities ## Usage -`yarn add @now/routing-utils` +`yarn add @vercel/routing-utils` ```ts -import { normalizeRoutes } from '@now/routing-utils'; +import { normalizeRoutes } from '@vercel/routing-utils'; const { routes, error } = normalizeRoutes(inputRoutes); @@ -17,7 +17,7 @@ if (error) { ``` ```ts -import { routesSchema } from '@now/routing-utils'; +import { routesSchema } from '@vercel/routing-utils'; const ajv = new Ajv(); const validate = ajv.compile(routesSchema); diff --git a/packages/routing-utils/src/index.ts b/packages/routing-utils/src/index.ts index 6ee1761858ac..a19dd26ab0ad 100644 --- a/packages/routing-utils/src/index.ts +++ b/packages/routing-utils/src/index.ts @@ -7,7 +7,7 @@ import { NormalizedRoutes, GetRoutesProps, RouteApiError, - NowRedirect, + Redirect, } from './types'; import { convertCleanUrls, @@ -211,7 +211,7 @@ function checkPatternSyntax( return null; } -function checkRedirect(r: NowRedirect, index: number) { +function checkRedirect(r: Redirect, index: number) { if ( typeof r.permanent !== 'undefined' && typeof r.statusCode !== 'undefined' diff --git a/packages/routing-utils/src/superstatic.ts b/packages/routing-utils/src/superstatic.ts index e2995367ac85..314b086763e8 100644 --- a/packages/routing-utils/src/superstatic.ts +++ b/packages/routing-utils/src/superstatic.ts @@ -4,7 +4,7 @@ */ import { parse as parseUrl, format as formatUrl } from 'url'; import { pathToRegexp, compile, Key } from 'path-to-regexp'; -import { Route, NowRedirect, NowRewrite, NowHeader } from './types'; +import { Route, Redirect, Rewrite, Header } from './types'; const UN_NAMED_SEGMENT = '__UN_NAMED_SEGMENT__'; @@ -45,7 +45,7 @@ export function convertCleanUrls( } export function convertRedirects( - redirects: NowRedirect[], + redirects: Redirect[], defaultStatus = 308 ): Route[] { return redirects.map(r => { @@ -72,7 +72,7 @@ export function convertRedirects( }); } -export function convertRewrites(rewrites: NowRewrite[]): Route[] { +export function convertRewrites(rewrites: Rewrite[]): Route[] { return rewrites.map(r => { const { src, segments } = sourceToRegex(r.source); try { @@ -85,7 +85,7 @@ export function convertRewrites(rewrites: NowRewrite[]): Route[] { }); } -export function convertHeaders(headers: NowHeader[]): Route[] { +export function convertHeaders(headers: Header[]): Route[] { return headers.map(h => { const obj: { [key: string]: string } = {}; const { src, segments } = sourceToRegex(h.source); @@ -120,7 +120,7 @@ export function convertTrailingSlash(enable: boolean, status = 308): Route[] { const routes: Route[] = []; if (enable) { routes.push({ - src: '^/\\.well-known(?:/.*)?$' + src: '^/\\.well-known(?:/.*)?$', }); routes.push({ src: '^/((?:[^/]+/)*[^/\\.]+)$', diff --git a/packages/routing-utils/src/types.ts b/packages/routing-utils/src/types.ts index fac67931ae27..b69156053ba0 100644 --- a/packages/routing-utils/src/types.ts +++ b/packages/routing-utils/src/types.ts @@ -39,7 +39,7 @@ export type NormalizedRoutes = { }; export interface GetRoutesProps { - nowConfig: NowConfig; + nowConfig: VercelConfig; } export interface MergeRoutesProps { @@ -53,35 +53,35 @@ export interface Build { routes?: Route[]; } -export interface NowConfig { +export interface VercelConfig { name?: string; version?: number; routes?: Route[]; cleanUrls?: boolean; - rewrites?: NowRewrite[]; - redirects?: NowRedirect[]; - headers?: NowHeader[]; + rewrites?: Rewrite[]; + redirects?: Redirect[]; + headers?: Header[]; trailingSlash?: boolean; } -export interface NowRewrite { +export interface Rewrite { source: string; destination: string; } -export interface NowRedirect { +export interface Redirect { source: string; destination: string; permanent?: boolean; statusCode?: number; } -export interface NowHeader { +export interface Header { source: string; - headers: NowHeaderKeyValue[]; + headers: HeaderKeyValue[]; } -export interface NowHeaderKeyValue { +export interface HeaderKeyValue { key: string; value: string; } @@ -100,3 +100,18 @@ export interface AppendRoutesToPhaseProps { */ phase: HandleValue; } + +/** @deprecated Use VercelConfig instead. */ +export type NowConfig = VercelConfig; + +/** @deprecated Use Rewrite instead. */ +export type NowRewrite = Rewrite; + +/** @deprecated Use Redirect instead. */ +export type NowRedirect = Redirect; + +/** @deprecated Use Header instead. */ +export type NowHeader = Header; + +/** @deprecated Use HeaderKeyValue instead. */ +export type NowHeaderKeyValue = HeaderKeyValue; diff --git a/packages/routing-utils/test/merge.spec.js b/packages/routing-utils/test/merge.spec.js index e044ef90bbc6..f3a4bd9b8e9a 100644 --- a/packages/routing-utils/test/merge.spec.js +++ b/packages/routing-utils/test/merge.spec.js @@ -8,7 +8,7 @@ test('mergeRoutes simple', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1' }, @@ -16,7 +16,7 @@ test('mergeRoutes simple', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1' }, @@ -44,7 +44,7 @@ test('mergeRoutes handle filesystem user routes', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1' }, @@ -52,7 +52,7 @@ test('mergeRoutes handle filesystem user routes', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1' }, @@ -80,7 +80,7 @@ test('mergeRoutes handle filesystem build routes', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1' }, @@ -89,7 +89,7 @@ test('mergeRoutes handle filesystem build routes', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1' }, @@ -119,7 +119,7 @@ test('mergeRoutes handle filesystem both user and builds', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1' }, @@ -128,7 +128,7 @@ test('mergeRoutes handle filesystem both user and builds', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1' }, @@ -158,7 +158,7 @@ test('mergeRoutes continue true', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1' }, @@ -167,7 +167,7 @@ test('mergeRoutes continue true', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1' }, @@ -199,7 +199,7 @@ test('mergeRoutes check true', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1' }, @@ -208,7 +208,7 @@ test('mergeRoutes check true', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1' }, @@ -241,7 +241,7 @@ test('mergeRoutes check true, continue true, handle filesystem middle', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { src: '/node1', dest: '/n1', continue: true }, @@ -251,7 +251,7 @@ test('mergeRoutes check true, continue true, handle filesystem middle', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { src: '/python1', dest: '/py1', check: true }, @@ -281,7 +281,7 @@ test('mergeRoutes check true, continue true, handle filesystem top', () => { const userRoutes = [{ handle: 'filesystem' }, { src: '/user1', dest: '/u1' }]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { handle: 'filesystem' }, @@ -291,7 +291,7 @@ test('mergeRoutes check true, continue true, handle filesystem top', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { handle: 'filesystem' }, @@ -326,7 +326,7 @@ test('mergeRoutes multiple handle values', () => { ]; const builds = [ { - use: '@now/node', + use: '@vercel/node', entrypoint: 'api/home.js', routes: [ { handle: 'filesystem' }, @@ -338,7 +338,7 @@ test('mergeRoutes multiple handle values', () => { ], }, { - use: '@now/python', + use: '@vercel/python', entrypoint: 'api/users.py', routes: [ { handle: 'filesystem' }, diff --git a/test/integration/now-node/airtable/index.js b/test/integration/now-node/airtable/index.js deleted file mode 100644 index 6c8bf2f2f928..000000000000 --- a/test/integration/now-node/airtable/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const airtable = require('airtable'); - -module.exports = (req, res) => { - res.end('Hello world'); -}; diff --git a/test/integration/now-node/airtable/now.json b/test/integration/now-node/airtable/now.json deleted file mode 100644 index 3afb974948cd..000000000000 --- a/test/integration/now-node/airtable/now.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "index.js", "use": "@now/node" }] -} diff --git a/test/integration/now-node/airtable/package.json b/test/integration/now-node/airtable/package.json deleted file mode 100644 index 460352231293..000000000000 --- a/test/integration/now-node/airtable/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "airtable", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "airtable": "^0.5.7" - } -} diff --git a/test/integration/now-node/airtable/yarn.lock b/test/integration/now-node/airtable/yarn.lock deleted file mode 100644 index d0fe17d7050a..000000000000 --- a/test/integration/now-node/airtable/yarn.lock +++ /dev/null @@ -1,416 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -airtable@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/airtable/-/airtable-0.5.7.tgz#19df9893564166fc2719f8e43118dbc4d7b776f6" - integrity sha512-xJiayyBTPgE0grEttU7ABdNzgvLAcmSz1l91aEea2bjqkxrVOViMPOyXilRZdVSUltPssgLMeeE+HOVVbh+Fwg== - dependencies: - async "1.5.2" - lodash "4.17.10" - request "2.88.0" - xhr "2.3.3" - -ajv@^6.5.5: - version "6.5.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.5.tgz#cf97cdade71c6399a92c6d6c4177381291b781a1" - integrity sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -async@1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== - dependencies: - delayed-stream "~1.0.0" - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -for-each@^0.3.2: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= - dependencies: - min-document "^2.19.0" - process "~0.5.1" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -is-callable@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - integrity sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU= - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -lodash@4.17.10: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== - -mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== - dependencies: - mime-db "~1.37.0" - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -parse-headers@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.1.tgz#6ae83a7aa25a9d9b700acc28698cd1f1ed7e9536" - integrity sha1-aug6eqJanZtwCswoaYzR8e1+lTY= - dependencies: - for-each "^0.3.2" - trim "0.0.1" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= - -psl@^1.1.24: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" - integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== - -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -request@2.88.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sshpk@^1.7.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" - integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -xhr@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.3.3.tgz#ad6b810e0917ce72b5ec704f5d41f1503b8e7524" - integrity sha1-rWuBDgkXznK17HBPXUHxUDuOdSQ= - dependencies: - global "~4.3.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= diff --git a/test/integration/now-node/aws-sdk/index.js b/test/integration/now-node/aws-sdk/index.js deleted file mode 100644 index 74ae9210b592..000000000000 --- a/test/integration/now-node/aws-sdk/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const aws = require('aws-sdk'); - -module.exports = (req, res) => { - res.end('Hello world'); -}; diff --git a/test/integration/now-node/aws-sdk/now.json b/test/integration/now-node/aws-sdk/now.json deleted file mode 100644 index 3afb974948cd..000000000000 --- a/test/integration/now-node/aws-sdk/now.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "index.js", "use": "@now/node" }] -} diff --git a/test/integration/now-node/aws-sdk/package.json b/test/integration/now-node/aws-sdk/package.json deleted file mode 100644 index 95c2076f9a36..000000000000 --- a/test/integration/now-node/aws-sdk/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "aws-sdk", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "aws-sdk": "^2.353.0" - } -} diff --git a/test/integration/now-node/aws-sdk/yarn.lock b/test/integration/now-node/aws-sdk/yarn.lock deleted file mode 100644 index a67f8edcd79c..000000000000 --- a/test/integration/now-node/aws-sdk/yarn.lock +++ /dev/null @@ -1,103 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -aws-sdk@^2.353.0: - version "2.353.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.353.0.tgz#3c809d2b02834d892a3f5c3f1171273b336e5692" - integrity sha512-c5MwJhfcHwA2lC1Wq9csQvP9gz8dVGpZ64s5j9f/sWY6eZiDCQ6OWjxj+VJfpnCmfxyC/pdZO7JDGwems7dqIQ== - dependencies: - buffer "4.9.1" - events "1.1.1" - ieee754 "1.1.8" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.1.0" - xml2js "0.4.19" - -base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - -buffer@4.9.1: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -events@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= - -ieee754@1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - integrity sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q= - -ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== - -isarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -jmespath@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" - integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -sax@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" - integrity sha1-e45lYZCyKOgaZq6nSEgNgozS03o= - -sax@>=0.6.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -url@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" - integrity sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -uuid@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - integrity sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g== - -xml2js@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= diff --git a/test/integration/now-node/axios/index.js b/test/integration/now-node/axios/index.js deleted file mode 100644 index 5b0b16d2ffbe..000000000000 --- a/test/integration/now-node/axios/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const axios = require('axios'); - -module.exports = (req, res) => { - res.end('Hello world'); -}; diff --git a/test/integration/now-node/axios/now.json b/test/integration/now-node/axios/now.json deleted file mode 100644 index 3afb974948cd..000000000000 --- a/test/integration/now-node/axios/now.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "index.js", "use": "@now/node" }] -} diff --git a/test/integration/now-node/axios/package.json b/test/integration/now-node/axios/package.json deleted file mode 100644 index 87dcf02529b0..000000000000 --- a/test/integration/now-node/axios/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "axios", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "axios": "^0.18.0" - } -} diff --git a/test/integration/now-node/axios/yarn.lock b/test/integration/now-node/axios/yarn.lock deleted file mode 100644 index a1f5efc31b10..000000000000 --- a/test/integration/now-node/axios/yarn.lock +++ /dev/null @@ -1,35 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -axios@^0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102" - integrity sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI= - dependencies: - follow-redirects "^1.3.0" - is-buffer "^1.1.5" - -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -follow-redirects@^1.3.0: - version "1.5.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.9.tgz#c9ed9d748b814a39535716e531b9196a845d89c6" - integrity sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w== - dependencies: - debug "=3.1.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= diff --git a/test/integration/now-node/index.test.js b/test/integration/now-node/index.test.js deleted file mode 100644 index 36b42e115a9a..000000000000 --- a/test/integration/now-node/index.test.js +++ /dev/null @@ -1,44 +0,0 @@ -const path = require('path'); -const runBuildLambda = require('../../lib/run-build-lambda'); - -const TWO_MINUTES = 120000; - -function runBuildForFolder(folder) { - return runBuildLambda(path.join(__dirname, folder)); -} - -it( - 'Should build the airtable folder', - async () => { - const { buildResult } = await runBuildForFolder('airtable'); - expect(buildResult.output['index.js']).toBeDefined(); - }, - TWO_MINUTES -); - -it( - 'Should build the aws-sdk folder', - async () => { - const { buildResult } = await runBuildForFolder('aws-sdk'); - expect(buildResult.output['index.js']).toBeDefined(); - }, - TWO_MINUTES -); - -it( - 'Should build the axios folder', - async () => { - const { buildResult } = await runBuildForFolder('axios'); - expect(buildResult.output['index.js']).toBeDefined(); - }, - TWO_MINUTES -); - -it( - 'Should build the mongoose folder', - async () => { - const { buildResult } = await runBuildForFolder('mongoose'); - expect(buildResult.output['index.js']).toBeDefined(); - }, - TWO_MINUTES -); diff --git a/test/integration/now-node/mongoose/index.js b/test/integration/now-node/mongoose/index.js deleted file mode 100644 index 0dcb695a684a..000000000000 --- a/test/integration/now-node/mongoose/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const mongoose = require('mongoose'); - -module.exports = (req, res) => { - res.end('Hello world'); -}; diff --git a/test/integration/now-node/mongoose/now.json b/test/integration/now-node/mongoose/now.json deleted file mode 100644 index 3afb974948cd..000000000000 --- a/test/integration/now-node/mongoose/now.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "index.js", "use": "@now/node" }] -} diff --git a/test/integration/now-node/mongoose/package.json b/test/integration/now-node/mongoose/package.json deleted file mode 100644 index 4af13b30cbe8..000000000000 --- a/test/integration/now-node/mongoose/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "mongoose", - "version": "1.0.0", - "main": "index.js", - "license": "MIT", - "dependencies": { - "mongoose": "^5.3.11" - } -} diff --git a/test/integration/now-node/mongoose/yarn.lock b/test/integration/now-node/mongoose/yarn.lock deleted file mode 100644 index 4e1e9e4c41e8..000000000000 --- a/test/integration/now-node/mongoose/yarn.lock +++ /dev/null @@ -1,158 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -async@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -bluebird@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== - -bson@^1.1.0, bson@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.0.tgz#bee57d1fb6a87713471af4e32bcae36de814b5b0" - integrity sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA== - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -kareem@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.0.tgz#ef33c42e9024dce511eeaf440cd684f3af1fc769" - integrity sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg== - -lodash.get@4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - -lodash@^4.17.10: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" - integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== - -memory-pager@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.1.0.tgz#9308915e0e972849fefbae6f8bc95d6b350e7344" - integrity sha512-Mf9OHV/Y7h6YWDxTzX/b4ZZ4oh9NSXblQL8dtPCOomOtZciEHxePR78+uHFLLlsk01A6jVHhHsQZZ/WcIPpnzg== - -mongodb-core@3.1.7: - version "3.1.7" - resolved "https://registry.yarnpkg.com/mongodb-core/-/mongodb-core-3.1.7.tgz#fe61853a6a6acbd2046c91794e5325ecad85428a" - integrity sha512-YffpSrLmgFNmrvkGx+yX00KyBNk64C0BalfEn6vHHkXtcMUGXw8nxrMmhq5eXPLLlYeBpD/CsgNxE2Chf0o4zQ== - dependencies: - bson "^1.1.0" - require_optional "^1.0.1" - safe-buffer "^5.1.2" - optionalDependencies: - saslprep "^1.0.0" - -mongodb@3.1.8: - version "3.1.8" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.1.8.tgz#df8084fda2efdbaddd05dfd6a269891fc4cc72df" - integrity sha512-yNKwYxQ6m00NV6+pMoWoheFTHSQVv1KkSrfOhRDYMILGWDYtUtQRqHrFqU75rmPIY8hMozVft8zdC4KYMWaM3Q== - dependencies: - mongodb-core "3.1.7" - safe-buffer "^5.1.2" - -mongoose-legacy-pluralize@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4" - integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ== - -mongoose@^5.3.11: - version "5.3.11" - resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.3.11.tgz#ab71e070dabcb8b2aebff4702a09198a3f8a9401" - integrity sha512-LrsatxtUfZAerAxyFiaw/8T8M4T9Ff9+6wFkJwfTVDz9skX+HVOs70QOzTDawz0k0Q0I6qt9xv/ZYQi2Paykgw== - dependencies: - async "2.6.1" - bson "~1.1.0" - kareem "2.3.0" - lodash.get "4.4.2" - mongodb "3.1.8" - mongodb-core "3.1.7" - mongoose-legacy-pluralize "1.0.2" - mpath "0.5.1" - mquery "3.2.0" - ms "2.0.0" - regexp-clone "0.0.1" - safe-buffer "5.1.2" - sliced "1.0.1" - -mpath@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.5.1.tgz#17131501f1ff9e6e4fbc8ffa875aa7065b5775ab" - integrity sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg== - -mquery@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.0.tgz#e276472abd5109686a15eb2a8e0761db813c81cc" - integrity sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg== - dependencies: - bluebird "3.5.1" - debug "3.1.0" - regexp-clone "0.0.1" - safe-buffer "5.1.2" - sliced "1.0.1" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -regexp-clone@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-0.0.1.tgz#a7c2e09891fdbf38fbb10d376fb73003e68ac589" - integrity sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk= - -require_optional@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e" - integrity sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g== - dependencies: - resolve-from "^2.0.0" - semver "^5.1.0" - -resolve-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" - integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= - -safe-buffer@5.1.2, safe-buffer@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -saslprep@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.2.tgz#da5ab936e6ea0bbae911ffec77534be370c9f52d" - integrity sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw== - dependencies: - sparse-bitfield "^3.0.3" - -semver@^5.1.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -sliced@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" - integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E= - -sparse-bitfield@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" - integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE= - dependencies: - memory-pager "^1.0.2"