Require Node 20 - #3719
Merged
Merged
Require Node 20#3719
Conversation
Node 18 reached end of life in April 2025, and the ecosystem has moved past it. The immediate reason is concrete: every subpackage of the Firebase v12 SDK declares node >= 20, so @jspsych/extension-pipe -- which reaches it through datapipe-client -- cannot be installed in a repository that still claims Node 18 support. `npm ci` fails with EBADENGINE on the 18 leg of the matrix before a single test runs. Narrowing the dependency does not help: @firebase/app and @firebase/database declare the same floor as the umbrella package. Pinning back to Firebase v11, whose subpackages still allow 18, was the alternative -- rejected in favour of this, since a repository's supported runtime is the more honest place to make the decision than a transitive dependency of one extension. Changes the root and @jspsych/config engines fields, which were the only two declaring one, and moves the test matrix from [18, 20] to [20, 22] so two supported versions are still covered rather than one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgDfss2zhjwMky2mBKbcBX
🦋 Changeset detectedLatest commit: 7a2bee7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📦 Preview build readyBuilt from PR head Changed packages: Quick-start HTML: <script src="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@f81aa9ca3b738012412f4a8cbd91e17b4a26c987/packages/jspsych/dist/index.browser.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@f81aa9ca3b738012412f4a8cbd91e17b4a26c987/packages/jspsych/css/jspsych.css">
<script src="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@f81aa9ca3b738012412f4a8cbd91e17b4a26c987/packages/plugin-html-keyboard-response/dist/index.browser.min.js"></script>All package URLs
Last updated 2026-09-15 20:10 UTC for PR head |
Merged
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.
Node 18 reached end of life in April 2025. This raises jsPsych's floor to Node 20 and moves the test matrix from
[18, 20]to[20, 22].Why now
The immediate reason is concrete rather than housekeeping. Every subpackage of the Firebase v12 SDK declares
node >= 20, so@jspsych/extension-pipe— which reaches Firebase throughdatapipe-client— cannot be installed in a repository that still claims Node 18 support. The 18 leg of the matrix fails at install:Narrowing the dependency does not avoid it —
@firebase/appand@firebase/databasedeclare the same floor as the umbrella package, so importing only the two modules the client uses makes no difference.The alternative, and why not
Pinning
datapipe-clientback to Firebase v11, whose subpackages still allow Node 18, works — I verified it: 48 tests pass and the bundle grows by 2 KB. It was rejected because a repository's supported runtime is a more honest place to make this decision than a transitive dependency of one extension, and because the pin would have to be carried until jsPsych raised its floor anyway.What changes
package.json:node >=18.0.0→>=20.0.0,npm >=9.0.0→>=10.0.0(npm 10 is what Node 20 ships).packages/config/package.json: same. These were the only two packages declaringengines..github/workflows/build.yml:node: [18, 20]→[20, 22]. Dropping 18 without adding 22 would leave a single version under test; every other workflow already pins 20.Two judgement calls worth a look
The changeset is
minor, notmajor. Raising a runtime floor is breaking in the strict sense, but@jspsych/configis a build-time dependency of jsPsych's own packages that never reaches an experiment, and a major would churn every package in the monorepo for an advisory field. Say the word if you would rather it be major.Adding 22 to the matrix is my initiative, not strictly "drop 18". If it surfaces unrelated failures I am happy to make it
[20]alone.Unrelated but noticed: root
packageManageris pinned tonpm@8.3.1, which contradicts thenpm >=9that was already declared. Left alone.🤖 Generated with Claude Code
https://claude.ai/code/session_01SgDfss2zhjwMky2mBKbcBX