Skip to content

Commit 06c9602

Browse files
authored
chore: allow current Node version to be EOL (#4853)
Node 18 is EOL, but CDK is still supporting it. Since CDK is still supporting it, we can't have jsii not support it. But the jsii build will fail when running on Node 18, which is not really acceptable. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent c4018df commit 06c9602

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/@jsii/check-node/src/index.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { NodeRelease } from './constants';
22

3+
// Fail the build when our current Node version has been EOL too long.
4+
//
5+
// Right now CDK is still on an EOL version of Node (18), and we can't
6+
// fail the build yet. So the deadline is just over half a year now.
7+
const DAYS_THAT_NODEJS_CAN_BE_EOL = 200;
8+
39
// This test is there to ensure house-keeping happens when it should. If we are
410
// testing a given node release, it must be registered in constants.ts, and it
511
// must not be a "known broken" release.
@@ -11,9 +17,9 @@ test('tested node releases are correctly registered & supported', () => {
1117

1218
// This test is there to ensure house-keeping happens when it should. If we are
1319
// testing a given node release, it must not have been EOL for over 60 days.
14-
test(`tested node release (${process.version}) has not been EOL for more than 60 days`, () => {
20+
test(`tested node release (${process.version}) has not been EOL for more than ${DAYS_THAT_NODEJS_CAN_BE_EOL} days`, () => {
1521
const { nodeRelease } = NodeRelease.forThisRuntime();
1622
expect(nodeRelease?.endOfLifeDate?.getTime()).toBeGreaterThan(
17-
Date.now() - 60 * 86_400_000,
23+
Date.now() - DAYS_THAT_NODEJS_CAN_BE_EOL * 86_400_000,
1824
);
1925
});

packages/@jsii/java-runtime-test/pom.xml.t.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ process.stdout.write(`<?xml version="1.0" encoding="UTF-8"?>
3636
<dependency>
3737
<groupId>org.junit.jupiter</groupId>
3838
<artifactId>junit-jupiter-engine</artifactId>
39-
<version>[5.6.2,6)</version>
39+
<version>[5.6.2,5.999)</version>
4040
<scope>test</scope>
4141
</dependency>
4242

0 commit comments

Comments
 (0)