Skip to content

Commit

Permalink
feat(node): add warning of future node support (#3271)
Browse files Browse the repository at this point in the history
this commit adds a warning to the console stating that support for node
v14.5.0 and under will be removed in a future major version update of
stencil. this commit only adds the notice to the `bin` entrypoint of
stencil, and does not add any notice to using compiler api's directly
(we expect the latter to be handled by `package.json#engines`).
  • Loading branch information
rwaskiewicz committed Mar 9, 2022
1 parent d078c3c commit 11e174e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/stencil
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
'use strict';

var minimumVersion = '12.10';
var futureDeprecationMinVersion = '14.0';
var recommendedVersion = '14.5';
var currentVersion = process.versions.node;

Expand All @@ -22,7 +23,13 @@ if (isNodeLT(minimumVersion)) {
process.exit(1);
}

if (isNodeLT(recommendedVersion)) {
if (isNodeLT(futureDeprecationMinVersion)) {
console.warn(
'\nIn an upcoming major release of Stencil, Node v' +
recommendedVersion +
'.0 or higher will be required.\n'
);
} else if (isNodeLT(recommendedVersion)) {
console.warn(
'\nYour current version of Node is v' +
currentVersion +
Expand Down

0 comments on commit 11e174e

Please sign in to comment.