Compare commits

..

6 Commits

Author SHA1 Message Date
Nathan Rajlich
5b61b16bd1 Publish Stable
- @vercel/build-utils@2.12.2
 - vercel@23.1.2
 - @vercel/client@10.2.2
 - @vercel/node@1.12.1
2021-08-09 11:21:40 -07:00
Nathan Rajlich
41c61f8f8b Publish Canary
- vercel@23.1.2-canary.1
2021-08-09 10:00:43 -07:00
Nathan Rajlich
6c52e1fad7 [cli] Add "outDir" to tsconfig.json (#6566)
Fixes TypeScript errors.
2021-08-09 09:58:30 -07:00
Nathan Rajlich
d2e82fdc3a [cli] Fix in-flight re-login when there are no existing credentials (#6565) 2021-08-08 00:57:23 -07:00
Nathan Rajlich
a60b1b225b Publish Canary
- @vercel/build-utils@2.12.2-canary.0
 - vercel@23.1.2-canary.0
 - @vercel/client@10.2.2-canary.0
 - @vercel/node@1.12.1-canary.0
2021-08-06 17:15:13 -07:00
Kaitlyn
18bec983ae [build-utils] check to see that the node version is less then 16 befo… (#6553)
### Related Issues

Check the project's nodeVersion setting for when we release Node 16 and later

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
2021-08-07 00:14:21 +00:00
8 changed files with 33 additions and 26 deletions

View File

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

View File

@@ -313,7 +313,8 @@ export async function runNpmInstall(
destPath: string,
args: string[] = [],
spawnOpts?: SpawnOptions,
meta?: Meta
meta?: Meta,
nodeVersion?: NodeVersion
) {
if (meta?.isDev) {
debug('Skipping dependency installation because dev mode is enabled');
@@ -337,7 +338,12 @@ export async function runNpmInstall(
.filter(a => a !== '--prefer-offline')
.concat(['install', '--no-audit', '--unsafe-perm']);
if (typeof lockfileVersion === 'number' && lockfileVersion >= 2) {
// If the lockfile version is 2 or greater and the node version is less than 16 than we will force npm7 to be used
if (
typeof lockfileVersion === 'number' &&
lockfileVersion >= 2 &&
(nodeVersion?.major || 0) < 16
) {
// Ensure that npm 7 is at the beginning of the `$PATH`
env.PATH = `/node16/bin-npm7:${env.PATH}`;
console.log('Detected `package-lock.json` generated by npm 7...');

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "23.1.1",
"version": "23.1.2",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -61,9 +61,9 @@
"node": ">= 12"
},
"dependencies": {
"@vercel/build-utils": "2.12.1",
"@vercel/build-utils": "2.12.2",
"@vercel/go": "1.2.3",
"@vercel/node": "1.12.0",
"@vercel/node": "1.12.1",
"@vercel/python": "2.0.5",
"@vercel/ruby": "1.2.7",
"update-notifier": "4.1.0"

View File

@@ -430,12 +430,16 @@ const main = async () => {
return result;
}
if (result.teamId) {
// SSO login, so set the current scope to the appropriate Team
client.config.currentTeam = result.teamId;
} else {
delete client.config.currentTeam;
}
// When `result` is a string it's the user's authentication token.
// It needs to be saved to the configuration file.
client.authConfig.token = result;
// New user, so we can't keep the team
delete client.config.currentTeam;
client.authConfig.token = result.token;
configFiles.writeToAuthConfigFile(client.authConfig);
configFiles.writeToConfigFile(client.config);

View File

@@ -11,6 +11,7 @@
"lib": ["esnext"],
"resolveJsonModule": true,
"sourceMap": true,
"outDir": "./dist",
"typeRoots": ["./@types", "./node_modules/@types"]
},
"include": ["src/**/*"]

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "10.2.1",
"version": "10.2.2",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -40,7 +40,7 @@
]
},
"dependencies": {
"@vercel/build-utils": "2.12.1",
"@vercel/build-utils": "2.12.2",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",
"async-sema": "3.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/node",
"version": "1.12.0",
"version": "1.12.1",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",

View File

@@ -112,7 +112,7 @@ async function downloadInstallAndBundle({
} else {
const installTime = Date.now();
console.log('Installing dependencies...');
await runNpmInstall(entrypointFsDirname, [], spawnOpts, meta);
await runNpmInstall(entrypointFsDirname, [], spawnOpts, meta, nodeVersion);
debug(`Install complete [${Date.now() - installTime}ms]`);
}
@@ -360,18 +360,14 @@ export async function build({
const baseDir = repoRootPath || workPath;
const awsLambdaHandler = getAWSLambdaHandler(entrypoint, config);
const {
entrypointPath,
entrypointFsDirname,
nodeVersion,
spawnOpts,
} = await downloadInstallAndBundle({
files,
entrypoint,
workPath,
config,
meta,
});
const { entrypointPath, entrypointFsDirname, nodeVersion, spawnOpts } =
await downloadInstallAndBundle({
files,
entrypoint,
workPath,
config,
meta,
});
await runPackageJsonScript(
entrypointFsDirname,