Farabi/fix-depandabot-issues#1223
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Filespackage-lock.json
package.json
|
|
Claude finished @farabi-deriv's task in 2m 17s —— View job PR Review: Dependency bumps
🔴 Blocker —
|
| Priority | Item |
|---|---|
| 🔴 High | serialize-javascript@7.0.5 requires Node ≥20 (global crypto) but project/CI is Node 18 → build fails with ReferenceError: crypto is not defined. Revert to 6.0.2. |
| 🟢 Low | node-gettext 3.0.0 → 3.0.1 — safe patch bump (only used in scripts/gettext.js at build time). No concerns. |
| 🟢 Low | Lockfile changes are internally consistent given the override semantics; they'll need regenerating after the revert. |
No XSS/auth/secret or render-performance concerns — this is a dev-dependency/build-tooling change only.
|
Claude finished @farabi-deriv's task in 6m 37s —— View job PR Review: Dependency bumps + Node 20 upgrade
✅ The original blocker is fixedThe previous review flagged that That works. The
So the approach is sound and the dependency bumps themselves ( 🟡
|
| Job | npm_install action |
grunt load result |
|---|---|---|
DSmartTrader Test |
./.github/actions/npm_install → npm ci (honours lockfile) |
✅ works |
Generate preview link |
deriv-com/shared-actions/.../npm_install@master (external) |
❌ Schema.extend error |
Root cause: the overrides force js-yaml@4.1.1 (package.json:129 + the nested load-grunt-config override at :160), but load-grunt-config@4.0.1 and its transitive js-yaml-js-types@1.0.0 are written/tested against js-yaml@4.1.0. js-yaml 4.1.1 changed Schema.extend/Type validation, so the !!js/regexp type that js-yaml-js-types registers is rejected as "not a Type". Under npm ci the tree dedupes cleanly and this doesn't surface; the external npm_install@master resolves it into the broken state.
Note: this js-yaml@4.1.1 override already exists on master and is not touched by this PR — fixing the crypto error simply unmasked it (previously the build aborted earlier). So it's a pre-existing latent issue rather than something you introduced.
Recommended (pick one):
- Pin the override back to the version the toolchain expects — removes the fragility regardless of installer:
then regenerate the lockfile with
// package.json overrides — change BOTH occurrences "js-yaml": "4.1.0", "load-grunt-config": { "js-yaml": "4.1.0" }
npm install. (If4.1.1was a required security bump, instead keep it at top level and only pin the nestedload-grunt-configone to4.1.0.) - Align the shared
npm_install@masteraction to usenpm ciso it matches the lockfile (this is the actual divergence). Note: I can't edit.github/workflowsfiles myself due to GitHub App permissions.
First, please confirm whether Generate preview link is already red on master — if so, this shouldn't block the dependency bump and can be tracked separately.
🟢 Low — doc/config follow-ups
Some Node-18 references were left behind (docs only, non-blocking):
CLAUDE.md:9— "…jQuery, Node 18.x"CLAUDE.md:342— "Node Version: Use Node 18.x …nvm use 18"README.md:58,62— "Ensure you are running node version 14" / "To install node 18nvm install 18"
Updating these to Node 20 keeps onboarding consistent with the new engines. There's no .nvmrc in the repo, so nothing to change there. Minor: engines.node: ">=20" is a bit loose vs. the pinned CI node-version: 20 — consider "20.x" if you want to keep them in lockstep.
Summary
| Priority | Item |
|---|---|
| ✅ Resolved | Node 20 upgrade fixes the prior serialize-javascript@7 / crypto is not defined blocker. DSmartTrader Test + PR #1223 now pass. |
| 🟡 Medium | Generate preview link still fails — pre-existing js-yaml@4.1.1 vs js-yaml-js-types@1.0.0 incompatibility, exposed only under the external npm_install@master (passes under npm ci). Not caused by these bumps. Pin js-yaml override to 4.1.0 or align the install action. |
| 🟢 Low | Stale Node-18 references in CLAUDE.md / README.md; slightly loose engines: ">=20". |
No XSS/auth/secret or render-performance concerns — this is a build-tooling / dev-dependency change only.
|
This pull request updates the Node.js version used throughout the project from 18.x to 20, ensuring consistency across development, testing, and deployment workflows. It also upgrades a few dependencies in
package.jsonto their latest versions for improved security and compatibility.Node.js version upgrades:
generate_preview_link.yml,release_production.yml,release_staging.yml,test.yml) to use version 20 instead of 18.x.engines.nodefield inpackage.jsonto require Node.js version >=20.Dependency updates:
node-gettextfrom version 3.0.0 to 3.0.1 inpackage.json.serialize-javascriptfrom version 6.0.2 to 7.0.5 inpackage.json.