Skip to content

chore: bump unrs-resolver to 1.11.0, remove jest-pnp-resolver and unnecessary checks #15721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JounQin
Copy link
Collaborator

@JounQin JounQin commented Jul 6, 2025

Summary

Remove jest-pnp-resolver

Test plan

Copy link

netlify bot commented Jul 6, 2025

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit de1f930
🔍 Latest deploy log https://app.netlify.com/projects/jestjs/deploys/686ab58e89104a0008317520
😎 Deploy Preview https://deploy-preview-15721--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

pkg-pr-new bot commented Jul 6, 2025

Open in StackBlitz

babel-jest

npm i https://pkg.pr.new/babel-jest@15721

babel-plugin-jest-hoist

npm i https://pkg.pr.new/babel-plugin-jest-hoist@15721

babel-preset-jest

npm i https://pkg.pr.new/babel-preset-jest@15721

create-jest

npm i https://pkg.pr.new/create-jest@15721

@jest/diff-sequences

npm i https://pkg.pr.new/@jest/diff-sequences@15721

expect

npm i https://pkg.pr.new/expect@15721

@jest/expect-utils

npm i https://pkg.pr.new/@jest/expect-utils@15721

jest

npm i https://pkg.pr.new/jest@15721

jest-changed-files

npm i https://pkg.pr.new/jest-changed-files@15721

jest-circus

npm i https://pkg.pr.new/jest-circus@15721

jest-cli

npm i https://pkg.pr.new/jest-cli@15721

jest-config

npm i https://pkg.pr.new/jest-config@15721

@jest/console

npm i https://pkg.pr.new/@jest/console@15721

@jest/core

npm i https://pkg.pr.new/@jest/core@15721

@jest/create-cache-key-function

npm i https://pkg.pr.new/@jest/create-cache-key-function@15721

jest-diff

npm i https://pkg.pr.new/jest-diff@15721

jest-docblock

npm i https://pkg.pr.new/jest-docblock@15721

jest-each

npm i https://pkg.pr.new/jest-each@15721

@jest/environment

npm i https://pkg.pr.new/@jest/environment@15721

jest-environment-jsdom

npm i https://pkg.pr.new/jest-environment-jsdom@15721

@jest/environment-jsdom-abstract

npm i https://pkg.pr.new/@jest/environment-jsdom-abstract@15721

jest-environment-node

npm i https://pkg.pr.new/jest-environment-node@15721

@jest/expect

npm i https://pkg.pr.new/@jest/expect@15721

@jest/fake-timers

npm i https://pkg.pr.new/@jest/fake-timers@15721

@jest/get-type

npm i https://pkg.pr.new/@jest/get-type@15721

@jest/globals

npm i https://pkg.pr.new/@jest/globals@15721

jest-haste-map

npm i https://pkg.pr.new/jest-haste-map@15721

jest-jasmine2

npm i https://pkg.pr.new/jest-jasmine2@15721

jest-leak-detector

npm i https://pkg.pr.new/jest-leak-detector@15721

jest-matcher-utils

npm i https://pkg.pr.new/jest-matcher-utils@15721

jest-message-util

npm i https://pkg.pr.new/jest-message-util@15721

jest-mock

npm i https://pkg.pr.new/jest-mock@15721

@jest/pattern

npm i https://pkg.pr.new/@jest/pattern@15721

jest-phabricator

npm i https://pkg.pr.new/jest-phabricator@15721

jest-regex-util

npm i https://pkg.pr.new/jest-regex-util@15721

@jest/reporters

npm i https://pkg.pr.new/@jest/reporters@15721

jest-resolve

npm i https://pkg.pr.new/jest-resolve@15721

jest-resolve-dependencies

npm i https://pkg.pr.new/jest-resolve-dependencies@15721

jest-runner

npm i https://pkg.pr.new/jest-runner@15721

jest-runtime

npm i https://pkg.pr.new/jest-runtime@15721

@jest/schemas

npm i https://pkg.pr.new/@jest/schemas@15721

jest-snapshot

npm i https://pkg.pr.new/jest-snapshot@15721

@jest/snapshot-utils

npm i https://pkg.pr.new/@jest/snapshot-utils@15721

@jest/source-map

npm i https://pkg.pr.new/@jest/source-map@15721

@jest/test-result

npm i https://pkg.pr.new/@jest/test-result@15721

@jest/test-sequencer

npm i https://pkg.pr.new/@jest/test-sequencer@15721

@jest/transform

npm i https://pkg.pr.new/@jest/transform@15721

@jest/types

npm i https://pkg.pr.new/@jest/types@15721

jest-util

npm i https://pkg.pr.new/jest-util@15721

jest-validate

npm i https://pkg.pr.new/jest-validate@15721

jest-watcher

npm i https://pkg.pr.new/jest-watcher@15721

jest-worker

npm i https://pkg.pr.new/jest-worker@15721

pretty-format

npm i https://pkg.pr.new/pretty-format@15721

commit: de1f930

@JounQin JounQin marked this pull request as draft July 6, 2025 17:18
@JounQin JounQin force-pushed the chore/bump_unrs-resolver branch from b1d5c47 to 8359d08 Compare July 6, 2025 17:26
@@ -2,6 +2,8 @@ compressionLevel: mixed

enableGlobalCache: true

enableTelemetry: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It slows every yarn related command.

@JounQin JounQin changed the title chore: bump unrs-resolver to 1.11.0, remove unnecessary checks chore: bump unrs-resolver to 1.11.0, remove jest-pnp-resolver and unnecessary checks Jul 6, 2025
@JounQin JounQin marked this pull request as ready for review July 6, 2025 17:42
@JounQin JounQin requested review from Copilot, SimenB and cpojer July 6, 2025 17:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the legacy PnP resolver, bumps unrs-resolver to v1.11.0, and cleans up associated code and configurations.

  • Remove jest-pnp-resolver import, PnP branch, and file:// URL handling in defaultResolver.ts
  • Bump dependency unrs-resolver to ^1.11.0 and drop jest-pnp-resolver in package.json
  • Update e2e test expectations, snapshots, changelog, and disable telemetry in .yarnrc.yml

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/jest-resolve/src/defaultResolver.ts Dropped PnP and file URL handling, updated builtins comment
packages/jest-resolve/package.json Removed jest-pnp-resolver, bumped unrs-resolver to 1.11.0
e2e/pnp/tests/undeclared-dependency.test.js Changed thrown message expectation
e2e/tests snapshots Updated line numbers in snapshots due to code removal
CHANGELOG.md Added feature entry for resolver bump
.yarnrc.yml Set enableTelemetry: false
Comments suppressed due to low confidence (1)

@JounQin
Copy link
Collaborator Author

JounQin commented Jul 6, 2025

@cpojer @SimenB Is that possible to give me write permission on this repo or org so that I don't need to fork the repository anymore?

@cpojer
Copy link
Member

cpojer commented Jul 9, 2025

I gave you access, but please still use a fork for PRs as is common.

@JounQin
Copy link
Collaborator Author

JounQin commented Jul 10, 2025

OK, that's fine.

@@ -9,5 +9,5 @@
it('should surface pnp errors', () => {
expect(() => {
require('undeclared');
}).toThrow(expect.objectContaining({code: 'MODULE_NOT_FOUND'}));
}).toThrow("Cannot find module 'unesitent_module__'");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no longer error code? And where does unesitent_module__ (typo and all) come from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const nope = require('unesitent_module__');

The error message comes from unrs-resolver if this PR merged, and it comes from jest-pnp-resolver before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants