diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index ad9d8aab38a6..4dc4b4bcac22 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@types/graceful-fs": "^4.1.3", + "@types/pnpapi": "^0.0.1", "@types/resolve": "^1.17.0", "jest-haste-map": "^26.5.2" }, diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index c925ae8fe3b0..79f5c13f3714 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -23,15 +23,6 @@ type ResolverOptions = { packageFilter?: ResolveOpts['packageFilter']; }; -declare global { - namespace NodeJS { - export interface ProcessVersions { - // the "pnp" version named isn't in DefinitelyTyped - pnp?: unknown; - } - } -} - export default function defaultResolver( path: Config.Path, options: ResolverOptions, diff --git a/yarn.lock b/yarn.lock index d4883117d95b..a5a37254bf6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3646,6 +3646,13 @@ __metadata: languageName: node linkType: hard +"@types/pnpapi@npm:^0.0.1": + version: 0.0.1 + resolution: "@types/pnpapi@npm:0.0.1" + checksum: dacd29efe47a3e47950b50a08d43e0276863e2b3b56d0fb2e5ff75ddac0c1df954b72d4a21bc30cbd3469d8efb78085a167ed7e25f48e86b43fde022fcb7bb6d + languageName: node + linkType: hard + "@types/prettier@npm:^2.0.0": version: 2.1.1 resolution: "@types/prettier@npm:2.1.1" @@ -11760,6 +11767,7 @@ fsevents@^1.2.7: dependencies: "@jest/types": ^26.5.2 "@types/graceful-fs": ^4.1.3 + "@types/pnpapi": ^0.0.1 "@types/resolve": ^1.17.0 chalk: ^4.0.0 graceful-fs: ^4.2.4