Repository navigation
fix(expect): revert node: protocol imports to restore webpack/browser compatibility - #16167
Conversation
β Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
First time contributing let me know if I did not follow anything to your standards, signed the CLA waiting for it to update |
babel-jest
babel-plugin-jest-hoist
babel-preset-jest
create-jest
@jest/diff-sequences
expect
@jest/expect-utils
jest
jest-changed-files
jest-circus
jest-cli
jest-config
@jest/console
@jest/core
@jest/create-cache-key-function
jest-diff
jest-docblock
jest-each
@jest/environment
jest-environment-jsdom
@jest/environment-jsdom-abstract
jest-environment-node
@jest/expect
@jest/fake-timers
@jest/get-type
@jest/globals
jest-haste-map
jest-jasmine2
jest-leak-detector
jest-matcher-utils
jest-message-util
jest-mock
@jest/pattern
jest-phabricator
jest-regex-util
@jest/reporters
jest-resolve
jest-resolve-dependencies
jest-runner
jest-runtime
@jest/schemas
jest-snapshot
@jest/snapshot-utils
@jest/source-map
@jest/test-result
@jest/test-sequencer
@jest/transform
@jest/types
jest-util
jest-validate
jest-watcher
jest-worker
pretty-format
commit: |
SimenB
left a comment
There was a problem hiding this comment.
I wonder if we should have a lint rule banning it in the packages we wanna keep universal?
This is fine for now, tho π Thanks!
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
PR #16077 introduced the
unicorn/prefer-node-protocolrule which changed bare specifiers (e.g.'path') to use thenode:prefix (e.g.'node:path') across the codebase. While functionally identical in Node.js, thenode:URI scheme is not recognized by webpack, breaking theexpectpackage when used in browser-bundled environments like Cypress or Playwright.This reverts the
node:prefix in the packages that are transitive runtime dependencies ofexpect(jest-util,jest-message-util,jest-pattern,jest-regex-util), and disables theunicorn/prefer-node-protocolESLint rule for those packages to prevent the regression from being reintroduced.Fixes #16161
Test plan
node:prefix remains in built output:grep -r "node:" packages/jest-util/build/ packages/jest-message-util/build/ packages/jest-pattern/build/ packages/jest-regex-util/build/ (no output)