Fix: Raise minimum Node version to 22 (fixes #3821) - #3822
Merged
Conversation
Member
|
EDIT: Seems like the AAT works fine with the newer node version (from my brief testing of features and builds). Could be some other side effect with in the FW though? |
Contributor
Author
@oliverfoster @taylortom Any thoughts here? |
simondate
self-requested a review
August 4, 2026 16:51
simondate
approved these changes
Aug 4, 2026
oliverfoster
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3821
Fix
engines.nodeto>=22, so the declared minimum matches a Node version whereglobalThis.cryptoexists andgrunt buildactually completes. Since v5.56.0 the declared minimum of>=18named a version the build cannot run on at all —@rollup/plugin-terser@1.0.0pullsserialize-javascript@7, which calls the globalcrypto.getRandomValues()at module scope, and grunt/tasks/javascript.js requires the plugin at task-load time. Both of those packages already declare>=20.0.0themselves.Testing
npm ci && npx -y -p adapt-cli adapt install && npx grunt buildcompletes and produces adapt.min.js.npm installnow reports the engine mismatch for the framework itself (npm warn EBADENGINE) rather than only for its dependencies, so the incompatibility is visible at install time instead of surfacing asWarning: crypto is not definedat build time.Notes for reviewers
serialize-javascript6.0.2 carries GHSA-5c6j-r48x-rmvq (high, remote code execution, patched in 7.0.3) and GHSA-qj8w-gfj5-8c6v (moderate, denial of service, patched in 7.0.5). Pinning back reintroduces both and Dependabot would reopen the PR. There is also no in-repo shim:@rollup/plugin-terser@1.0.0runs terser in a worker thread pool and each worker requiresserialize-javascriptagain in its own global context, so settingglobalThis.cryptoin Gruntfile.js does not reach the workers — only a process-levelNODE_OPTIONS=--requirepreload propagates.>=20would pin to a line that no longer receives security patches. 22 and 24 are the current LTS lines.Fixon the grounds that nothing works today that stops working — builds on Node 18 and 20 already fail. If you would rather the support-floor change drive a major version, the squash-merge subject needs to beBreakinginstead.adapt_authoring0.11.5 declaresengines: { node: "16 || 18" }, so it sits entirely below this floor; its declared range is advisory rather than enforced, and a fresh install has been verified to run and publish successfully on Node 22.node-version: 'lts/*', so the declared floor is never the version actually exercised — that is what let a minimum of 18 go untested for nearly four months. AndFramework.getSchemas()does not forwardwarn, so plugin warnings fall back toconsole.warnon stderr, which is why an unrelated warning was mistaken for the failure in this bug's reports.Posted via collaboration with Claude Code