open-constructs / aws-cdk-library

Community-Driven CDK Construct Library
Apache License 2.0
44 stars 6 forks source link

Desired Node engine version #16

Closed EYssel closed 2 weeks ago

EYssel commented 3 weeks ago

When opening the project and running npm install I noticed the following:

...
...
npm WARN notsup Unsupported engine for jsii-rosetta@1.97.0: wanted: {"node":">= 14.17.0"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: jsii-rosetta@1.97.0
npm WARN notsup Unsupported engine for @jsii/check-node@1.97.0: wanted: {"node":">= 14.17.0"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: @jsii/check-node@1.97.0
npm WARN notsup Unsupported engine for jsii@1.97.0: wanted: {"node":">= 14.17.0"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: jsii@1.97.0
npm WARN notsup Unsupported engine for typescript@5.3.3: wanted: {"node":">=14.17"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: typescript@5.3.3
npm WARN glob-promise@6.0.5 requires a peer of glob@^8.0.3 but none is installed. You must install peer dependencies yourself.

I was coincidentally using an old version of Node. (as you can see...😿)

I would like to suggest that we add an engine version to the .projenrc.ts file.

Some contributors (myself included) may be on older versions for certain projects.

Any thoughts on what version would be appropriate?

EYssel commented 3 weeks ago

The correct property in .projenrc.ts I believe would be:

minNodeVersion

I will be happy to open a PR once a decision is made.

go-to-k commented 3 weeks ago

What do you think? -> maintainers or reviewers Would it be v18 if we were to set it up?

go-to-k commented 3 weeks ago

@EYssel

Comments may come after this time, but I think we can proceed with v18 once we do. If you would like, could you please submit a PR?

go-to-k commented 3 weeks ago

It seems that the v18 has already been specified in the build workflow and README. So we can set the version to minNodeVersion.

https://github.com/open-constructs/aws-cdk-library/blob/ea9715433837ef182d8fa2ce85d8bf92ebc3f1be/README.md#prerequisites

https://github.com/open-constructs/aws-cdk-library/blob/ea9715433837ef182d8fa2ce85d8bf92ebc3f1be/.github/workflows/build.yml#L25