From 23ff58d11159d698889546cd46ab889830555098 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 11 Oct 2020 12:46:10 +0200 Subject: [PATCH] chore: remove custom `proocess.versions.pnp` type --- packages/jest-resolve/package.json | 1 + packages/jest-resolve/src/defaultResolver.ts | 9 --------- yarn.lock | 8 ++++++++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 2a4dbda97e55..bb4dd0803bdc 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -29,6 +29,7 @@ }, "devDependencies": { "@types/graceful-fs": "^4.1.3", + "@types/pnpapi": "~0.0.1", "@types/resolve": "^1.20.0" }, "engines": { diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index f20921cb6ff6..7c5dd908b8a5 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -46,15 +46,6 @@ export type AsyncResolver = ( export type Resolver = SyncResolver | AsyncResolver; -// https://github.com/facebook/jest/pull/10617 -declare global { - namespace NodeJS { - export interface ProcessVersions { - pnp?: any; - } - } -} - const defaultResolver: SyncResolver = (path, options) => { // Yarn 2 adds support to `resolve` automatically so the pnpResolver is only // needed for Yarn 1 which implements version 1 of the pnp spec diff --git a/yarn.lock b/yarn.lock index e19851ef454e..f72b9ce17092 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5180,6 +5180,13 @@ __metadata: languageName: node linkType: hard +"@types/pnpapi@npm:~0.0.1": + version: 0.0.2 + resolution: "@types/pnpapi@npm:0.0.2" + checksum: b58ec37cfaebe99ca7d1fa3200c57d8f8d51da58f6152c1b8ef6d03e00fa8595a937ae36234a0ff6f52306740bf4ddfd2633d62d5693eb9af41edb6181ef3d02 + languageName: node + linkType: hard + "@types/prettier@npm:*, @types/prettier@npm:^2.0.0, @types/prettier@npm:^2.1.5": version: 2.4.4 resolution: "@types/prettier@npm:2.4.4" @@ -13301,6 +13308,7 @@ __metadata: resolution: "jest-resolve@workspace:packages/jest-resolve" dependencies: "@types/graceful-fs": ^4.1.3 + "@types/pnpapi": ~0.0.1 "@types/resolve": ^1.20.0 chalk: ^4.0.0 graceful-fs: ^4.2.9