Repository navigation
fix: Rollback jsdom from 27.0.0 to 26.1.0 - #1343
Conversation
jsdom 27.0.0 introduced a breaking change where sendTo() was renamed to forwardTo() in VirtualConsole. This breaks scala-js-env-jsdom-nodejs 1.1.0 which still uses the old sendTo() API, causing TypeError during Scala.js test execution. The fix has been merged in scala-js/scala-js-env-jsdom-nodejs#58 but not yet released. Rollback jsdom to 26.1.0 until a new version of scala-js-env-jsdom-nodejs is released with jsdom 27 support. Fixes #1316 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary of ChangesHello @xerial, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a critical dependency rollback to address immediate test failures within the Scala.js environment. By reverting the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly rolls back jsdom to version 26.1.0 to fix a breaking change introduced in v27.0.0 that was causing Scala.js tests to fail. The change is well-justified and clearly explained. I've added one suggestion to pin the dependency to the exact version for better stability and to prevent any unexpected issues from future patch releases. Overall, this is a solid fix.
| "@rollup/plugin-replace": "^6.0.2", | ||
| "autoprefixer": "^10.4.21", | ||
| "jsdom": "^27.0.0", | ||
| "jsdom": "^26.1.0", |
There was a problem hiding this comment.
This is a good fix for the compatibility issue. To ensure future stability and prevent unexpected breakages from minor or patch updates within the 26.x series, it's a good practice to pin the dependency to the exact version that is known to work. This makes dependency resolution more deterministic.
| "jsdom": "^26.1.0", | |
| "jsdom": "26.1.0", |
Add package.json and package-lock.json to CI workflow filters to ensure Scala.js tests run when npm dependencies are updated. This prevents breaking changes like the jsdom 27.0.0 upgrade from being merged without proper testing. This ensures that dependency upgrades affecting the Scala.js test environment (like jsdom used by scala-js-env-jsdom-nodejs) are properly validated by CI before merging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Pin jsdom to exact version 26.1.0 instead of ^26.1.0 to ensure deterministic dependency resolution and prevent unexpected breakages from minor or patch updates within the 26.x series. This addresses Gemini's review feedback for more stable dependency management. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Problem
PR #1316 upgraded jsdom from 26.1.0 to 27.0.0, which introduced a breaking change:
VirtualConsole.sendTo()was renamed toforwardTo()TypeError: (intermediate value).sendTo is not a functionduring Scala.js test executionSolution
Rollback jsdom to 26.1.0 until scala-js-env-jsdom-nodejs releases a new version with jsdom 27 support.
The fix has been merged in scala-js/scala-js-env-jsdom-nodejs#58 but not yet released.
Test plan
./sbt "langJS/test"- all 486 tests passRelated Issues
Fixes #1316
🤖 Generated with Claude Code