Compare commits

..

3 Commits

Author SHA1 Message Date
Steven
46c8cb1a68 Publish Stable
- @now/build-utils@1.3.2
 - @now/next@2.3.7
 - @now/node@1.3.3
 - @now/static-build@0.14.3
2020-01-06 18:44:26 -05:00
Steven
faeb053ea6 Publish Canary
- @now/build-utils@1.3.2-canary.1
 - now@16.7.2-canary.3
 - @now/next@2.3.7-canary.1
 - @now/node@1.3.3-canary.1
 - @now/static-build@0.14.3-canary.1
2020-01-06 18:30:34 -05:00
Steven
708a09b86a [now-build-utils] Add usage of package.json engines (#3512)
Add a better upgrade message that shows usage of `engines` in the `package.json` file.
2020-01-06 18:29:08 -05:00
6 changed files with 13 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@now/build-utils",
"version": "1.3.2-canary.0",
"version": "1.3.2",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.js",

View File

@@ -15,9 +15,11 @@ const allOptions: NodeVersion[] = [
},
];
const supportedOptions = allOptions.filter(o => !isDiscontinued(o));
const pleaseUse =
'Please use one of the following supported ranges in your `package.json`: ';
const pleaseSet =
'Please set "engines": { "node": "' +
getLatestNodeVersion().range +
'" } in your `package.json` file to upgrade to Node.js ' +
getLatestNodeVersion().major;
const upstreamProvider =
'This change is the result of a decision made by an upstream infrastructure provider (AWS).' +
'\nRead more: https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html';
@@ -51,11 +53,7 @@ export async function getSupportedNodeVersion(
engineRange;
throw new NowBuildError({
code: 'NOW_BUILD_UTILS_NODE_VERSION_INVALID',
message:
intro +
'\n' +
pleaseUse +
JSON.stringify(supportedOptions.map(o => o.range)),
message: intro + '\n' + pleaseSet,
});
}
}
@@ -68,13 +66,7 @@ export async function getSupportedNodeVersion(
engineRange;
throw new NowBuildError({
code: 'NOW_BUILD_UTILS_NODE_VERSION_DISCONTINUED',
message:
intro +
'\n' +
pleaseUse +
JSON.stringify(supportedOptions.map(o => o.range)) +
'\n' +
upstreamProvider,
message: intro + '\n' + pleaseSet + '\n' + upstreamProvider,
});
}
@@ -88,9 +80,6 @@ export async function getSupportedNodeVersion(
if (selection.discontinueDate) {
const d = selection.discontinueDate.toISOString().split('T')[0];
const validRanges = supportedOptions
.filter(o => !o.discontinueDate)
.map(o => o.range);
console.warn(
boxen(
'NOTICE' +
@@ -98,8 +87,7 @@ export async function getSupportedNodeVersion(
`\nNode.js version ${selection.range} has reached end-of-life.` +
`\nAs a result, deployments created on or after ${d} will fail to build.` +
'\n' +
pleaseUse +
JSON.stringify(validRanges) +
pleaseSet +
'\n' +
upstreamProvider,
{ padding: 1 }

View File

@@ -1,6 +1,6 @@
{
"name": "now",
"version": "16.7.2-canary.2",
"version": "16.7.2-canary.3",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Now",

View File

@@ -1,6 +1,6 @@
{
"name": "@now/next",
"version": "2.3.7-canary.0",
"version": "2.3.7",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/runtimes#official-runtimes/next-js",

View File

@@ -1,6 +1,6 @@
{
"name": "@now/node",
"version": "1.3.3-canary.0",
"version": "1.3.3",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/runtimes#official-runtimes/node-js",

View File

@@ -1,6 +1,6 @@
{
"name": "@now/static-build",
"version": "0.14.3-canary.0",
"version": "0.14.3",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://zeit.co/docs/runtimes#official-runtimes/static-builds",