Skip to content

Commit

Permalink
feat(check-node): export NodeRelease class (#3959)
Browse files Browse the repository at this point in the history
This can be useful, for example in projen templates, to automatically test fo all "supported" Node releases without having ot modify every single repository. This can serve as a central point of truth for what releases of node are supported by the Constructs ecosystem via jsii.



---

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
  • Loading branch information
RomainMuller authored Feb 13, 2023
1 parent 800ed0a commit 7e18e57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@jsii/check-node/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class NodeRelease {
supportedRange: '^12.7.0',
}),

// Currently active releases
// Currently active releases (as of last edit to this file...)
new NodeRelease(14, {
endOfLife: new Date('2023-04-30'),
supportedRange: '^14.6.0',
Expand All @@ -46,9 +46,9 @@ export class NodeRelease {
supportedRange: '^17.3.0',
}),
new NodeRelease(18, { endOfLife: new Date('2025-04-30') }),
new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),

// Future (planned releases)
new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),
new NodeRelease(20, { endOfLife: new Date('2026-04-30'), untested: true }),
];

Expand Down
2 changes: 2 additions & 0 deletions packages/@jsii/check-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { version } from 'process';

import { NodeRelease } from './constants';

export { NodeRelease } from './constants';

/**
* Checks the current process' node runtime version against the release support
* matrix, and issues a warning to STDERR if the current version is not fully
Expand Down

0 comments on commit 7e18e57

Please sign in to comment.