@jsii/check-node 1.91.0 → 1.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/constants.js CHANGED
@@ -78,8 +78,6 @@ NodeRelease.ALL_RELEASES = [
78
78
  endOfLife: new Date('2022-04-30'),
79
79
  supportedRange: '^12.7.0',
80
80
  }),
81
- new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),
82
- // Currently active releases (as of last edit to this file...)
83
81
  new NodeRelease(16, {
84
82
  endOfLife: new Date('2023-09-11'),
85
83
  supportedRange: '^16.3.0',
@@ -88,8 +86,11 @@ NodeRelease.ALL_RELEASES = [
88
86
  endOfLife: new Date('2022-06-01'),
89
87
  supportedRange: '^17.3.0',
90
88
  }),
89
+ new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),
90
+ // Currently active releases (as of last edit to this file...)
91
91
  new NodeRelease(18, { endOfLife: new Date('2025-04-30') }),
92
92
  new NodeRelease(20, { endOfLife: new Date('2026-04-30') }),
93
+ new NodeRelease(21, { endOfLife: new Date('2024-06-01') }),
93
94
  // Future (planned releases)
94
95
  ];
95
96
  //# sourceMappingURL=constants.js.map
package/lib/index.js CHANGED
@@ -16,15 +16,18 @@ Object.defineProperty(exports, "NodeRelease", { enumerable: true, get: function
16
16
  * used to silence version check warnings.
17
17
  */
18
18
  function checkNode(envPrefix = 'JSII') {
19
+ var _a;
19
20
  const { nodeRelease, knownBroken } = constants_1.NodeRelease.forThisRuntime();
20
21
  const defaultCallToAction = 'Should you encounter odd runtime issues, please try using one of the supported release before filing a bug report.';
21
22
  if (nodeRelease === null || nodeRelease === void 0 ? void 0 : nodeRelease.endOfLife) {
22
23
  const silenceVariable = `${envPrefix}_SILENCE_WARNING_END_OF_LIFE_NODE_VERSION`;
23
- const acknowledgeNodeEol = 'Node14 is now end of life (EOL) as of April 30, 2023. Support of EOL runtimes are only guaranteed for 30 days after EOL. By silencing this warning you acknowledge that you are using an EOL version of Node and will upgrade to a supported version as soon as possible.';
24
+ const silencedVersions = ((_a = process.env[silenceVariable]) !== null && _a !== void 0 ? _a : '')
25
+ .split(',')
26
+ .map((v) => v.trim());
24
27
  const qualifier = nodeRelease.endOfLifeDate
25
28
  ? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}`
26
29
  : '';
27
- if (!(process.env[silenceVariable] === acknowledgeNodeEol))
30
+ if (!silencedVersions.includes(nodeRelease.majorVersion.toString()))
28
31
  veryVisibleMessage(chalk_1.bgRed.white.bold, `Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`, `Please upgrade to a supported node version as soon as possible.`);
29
32
  }
30
33
  else if (knownBroken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsii/check-node",
3
- "version": "1.91.0",
3
+ "version": "1.92.0",
4
4
  "description": "Checks for supported node versions",
5
5
  "license": "Apache-2.0",
6
6
  "author": {