-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update nodejs to 22.12.0 #7592
Update nodejs to 22.12.0 #7592
Conversation
data-hub-frontend
|
Project |
data-hub-frontend
|
Branch Review |
chore/CPS-685-upgrade-node-to-22.14
|
Run status |
|
Run duration | 01m 39s |
Commit |
|
Committer | Dean Elliott |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
15
|
View all changes introduced in this branch ↗︎ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7592 +/- ##
=======================================
Coverage 89.97% 89.97%
=======================================
Files 1133 1133
Lines 17546 17546
Branches 5082 5082
=======================================
Hits 15787 15787
Misses 1759 1759 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ab2b165
to
6920951
Compare
Co-authored-by: Christopher Sunkel <christopher.sunkel@digital.trade.gov.uk>
The latest paketo buildpack supported by platform team only supports node 22.12.0.
6920951
to
44ce4b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor issue with bullet point numbering, but otherwise looks good. Nice work Dean!
Description of change
This will be easier to review per commit as the import attribute change required changing 40+ files.
Code changes
Import attributes
JSON file import attribute changes for Node.js v22:
Old:
import blah from './some_json_file.json' assert { type: 'json' }
New:
import blah from './some_json_file.json' with { type: 'json' }
Babel config also needed to be modified to allow it to parse this syntax otherwise the functional tests were failing.
https://babeljs.io/docs/babel-plugin-syntax-import-attributes
Proxyquire
Updated import to use require like the other existing unit tests as it was conflicting between commonJS and ESM.
Build/Docker changes
Docker
Docker has an image for node 22.14 but not 22.12, this conflicts with paketo build pack which only supports up to 22.12 at the moment.
Paketo build packs
The latest buildpack supported by the platform team is found here: https://github.com/uktrade/ci-image-builder/blob/main/image_builder/configuration/builder_configuration.yml
This is behind the latest buildpack available and only supports up to node v22.12. Currently the latest buildpack supports node v.22.13. The official node docker images use node v22.14. This may not cause any issues but will be good to update the build packs as soon as they release with node 22.14.
Lates buildpack uses node-engine v5.2.5: https://github.com/paketo-buildpacks/builder-jammy-full/releases/tag/v0.3.463
Buildpack node-engine supports node 22.13, not 22.14: https://github.com/paketo-buildpacks/node-engine/releases/tag/v5.2.5
Test instructions
What should I see?
No changes, everything working as before.
Checklist