Skip to content

Commit

Permalink
fix(jest-resolve): remove jest-pnp-resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Nov 18, 2020
1 parent a66eec7 commit 9570734
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -20,6 +20,7 @@
- `[jest-transform]` Show enhanced `SyntaxError` message for all `SyntaxError`s ([#10749](https://github.com/facebook/jest/pull/10749))
- `[jest-transform]` [**BREAKING**] Refactor API to pass an options bag around rather than multiple boolean options ([#10753](https://github.com/facebook/jest/pull/10753))
- `[jest-transform]` [**BREAKING**] Refactor API of transformers to pass an options bag rather than separate `config` and other options
- `[jest-resolve]` Remove unnecessary dependency `jest-pnp-resolver`

### Chore & Maintenance

Expand Down
1 change: 0 additions & 1 deletion packages/jest-resolve/package.json
Expand Up @@ -18,7 +18,6 @@
"chalk": "^4.0.0",
"escalade": "^3.1.1",
"graceful-fs": "^4.2.4",
"jest-pnp-resolver": "^1.2.2",
"jest-util": "^26.6.2",
"resolve": "^1.18.1",
"slash": "^3.0.0"
Expand Down
6 changes: 0 additions & 6 deletions packages/jest-resolve/src/defaultResolver.ts
Expand Up @@ -6,13 +6,11 @@
*/

import * as fs from 'graceful-fs';
import pnpResolver from 'jest-pnp-resolver';
import {Opts as ResolveOpts, sync as resolveSync} from 'resolve';
import type {Config} from '@jest/types';
import {tryRealpath} from 'jest-util';

type ResolverOptions = {
allowPnp?: boolean;
basedir: Config.Path;
browser?: boolean;
defaultResolver: typeof defaultResolver;
Expand All @@ -36,10 +34,6 @@ export default function defaultResolver(
path: Config.Path,
options: ResolverOptions,
): Config.Path {
if (process.versions.pnp && options.allowPnp !== false) {
return pnpResolver(path, options);
}

const result = resolveSync(path, {
basedir: options.basedir,
extensions: options.extensions,
Expand Down
13 changes: 0 additions & 13 deletions yarn.lock
Expand Up @@ -12051,18 +12051,6 @@ fsevents@~2.1.2:
languageName: unknown
linkType: soft

"jest-pnp-resolver@npm:^1.2.2":
version: 1.2.2
resolution: "jest-pnp-resolver@npm:1.2.2"
peerDependencies:
jest-resolve: "*"
peerDependenciesMeta:
jest-resolve:
optional: true
checksum: d91c86e3899f35ac1a6d40fa29e94212fc9b8e5e70d31d77ff281413441c844ec44a3673a3860f9b2155fed6738548f52eee9e63845e8d5f8550a890533c78cc
languageName: node
linkType: hard

"jest-regex-util@^26.0.0, jest-regex-util@workspace:packages/jest-regex-util":
version: 0.0.0-use.local
resolution: "jest-regex-util@workspace:packages/jest-regex-util"
Expand Down Expand Up @@ -12119,7 +12107,6 @@ fsevents@~2.1.2:
escalade: ^3.1.1
graceful-fs: ^4.2.4
jest-haste-map: ^26.6.2
jest-pnp-resolver: ^1.2.2
jest-util: ^26.6.2
resolve: ^1.18.1
slash: ^3.0.0
Expand Down

0 comments on commit 9570734

Please sign in to comment.