chore: Update Node, Projen, and Lambda Runtimes#194
chore: Update Node, Projen, and Lambda Runtimes#194dcousineau wants to merge 2 commits intombonig:mainfrom
Conversation
- aws-cdk min version bumped to 2.93.0 preemptively - v2.93.0 is first time that NODEJS_LATEST runtime is introduced - See: aws/aws-cdk@2aa4733 - Updates related projen dependencies, also updates TypeScript - Removes now-unnecessary build configuration overrides - Adds .nvmrc file for local dev
| 'eslint', | ||
| 'esbuild', | ||
| ], | ||
| jsiiVersion: '~5.5.0', |
There was a problem hiding this comment.
Updated jsii to latest supported version and using ~5.5.0 to match new projen generated projects.
| // devDeps: [ | ||
| // 'eslint', | ||
| // 'esbuild', | ||
| // ], |
There was a problem hiding this comment.
This does not seem necessary in newer Projen versions... I can remove for cleanliness, but I am planning on testing a quick publish of my fork first.
| // project.gitignore.exclude('cdk.context.json', '.cdk.staging/', '.idea/', 'cdk.out/', 'npm-cache/'); | ||
| // project.npmignore.exclude('cdk.context.json', '.cdk.staging/', '.idea/', 'cdk.out/'); | ||
|
|
||
| // project.npmignore.include('./lib/handlers/*'); | ||
|
|
||
| project.compileTask.exec('jsii --silence-warnings=reserved-word --no-fix-peer-dependencies && jsii-docgen && cp src/handlers/*.ts lib/handlers/ && cp src/handlers/cfn-response.js lib/handlers/ && cp -R src/layer lib/layer && cp src/handlers/package* lib/handlers/'); | ||
| // project.compileTask.exec('cp src/handlers/*.ts lib/handlers/ && cp src/handlers/cfn-response.js lib/handlers/ && cp -R src/layer lib/layer && cp src/handlers/package* lib/handlers/'); |
There was a problem hiding this comment.
This does not seem necessary in newer Projen versions... I can remove for cleanliness, but I am planning on testing a quick publish of my fork first.
There was a problem hiding this comment.
It looks like the asset bundle's package.json isn't being provided in the packaged outputs, probably an issue here. Poking around!
There was a problem hiding this comment.
Okay couple of other issues, pulling into draft mode now so I can fix them.
There was a problem hiding this comment.
Moving to using projen's auto-discovered lambdas should make this special compile task unnecessary and removable.
|
Thanks for contributing this. The package was never used heavily so it's definitely grown some weeds and I appreciate the work you're doing to bring it up to date. @me when you're ready for me to review! |
|
Of course! I should have something soon. Lot of hidden potholes that have grown up over time. I've got it mostly working right now, now up to runtime issues. Yay! |
|
@dcousineau Is this close to ready to be reviewed/merged? I'm running into some pain myself with nodejs16 runtimes and would be willing to help. |
The primary purpose of this PR was to utilize the
NODEJS_LATESTruntime for Lambda introduced in aws/aws-cdk@2aa4733 (v2.93.0). The driving factor is recently AWS dropped support for node@16 as a Lambda runtime, and theNODEJS_LATESTCDK runtime variable points to the current LTS which should remain relatively stable even when it is eventually bumped to node@20.However
NODEJS_LATESTwas introduced when the latest supported version was node@18 which required a full upgrade of projen and its related dependencies, as well as dependencies like Typescript.During the upgrade process it appears that certain manual configurations like the jsii compile tasks that were manually inserted are no longer needed (and in fact break in newer versions of projen), so I commented those lines out and confirmed tests pass.
I will report back on the success of this as I will create another branch and publish my fork to npm to confirm these changes work just fine, specifically the removal of manual build configurations.
EDIT Found the first issue, package.json isn't being provided with the assets