forked from LIGHTASCENSIONS/vercel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[all] Remove more "now" references (vercel#5944)
Follow up to vercel#5928 to remove a few more "now" references and replace with "vercel" where appropriate.
- Loading branch information
Showing
78 changed files
with
264 additions
and
1,080 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected].2'); | ||
const result = isBundledBuilder(parsed, nowCliPkg); | ||
const parsed = npa('@vercel/[email protected].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); | ||
} | ||
}); |
4 changes: 2 additions & 2 deletions
4
...fixtures/unit/now-dev-custom-404/now.json → ...tures/unit/now-dev-custom-404/vercel.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
packages/cli/test/fixtures/unit/now-dev-directory-listing/now.json
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
packages/cli/test/fixtures/unit/now-dev-directory-listing/vercel.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version": 2, | ||
"builds": [ | ||
{ "src": "*.js", "use": "@vercel/node" }, | ||
{ "src": "*.txt", "use": "@vercel/static" } | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"version": 2, | ||
"name": "now-dev-headers", | ||
"builds": [ | ||
{ "src": "index.js", "use": "@vercel/node" }, | ||
{ "src": "foo.txt", "use": "@vercel/static" } | ||
] | ||
} |
Oops, something went wrong.