Skip to content

Commit

Permalink
Hoist jest-resolve types to types/Resolve. (jestjs#2792)
Browse files Browse the repository at this point in the history
* Hoist `Resolver` and `ResolveModuleConfig` from `jest-resolve` to `types/Resolve`, remove `jest-resolve` from `jest-cli` and `jest-resolve-dependencies`.

* `Resolver` is not a default export.
  • Loading branch information
wtgtybhertgeghgtwtg authored and cpojer committed Feb 5, 2017
1 parent 61b665e commit a58661a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"jest-environment-jsdom": "^18.1.0",
"jest-haste-map": "^18.1.0",
"jest-jasmine2": "^18.1.0",
"jest-resolve": "^18.1.0",
"jest-resolve-dependencies": "^18.1.0",
"jest-runtime": "^18.1.0",
"jest-snapshot": "^18.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/SearchSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import type {Config} from 'types/Config';
import type {HasteContext} from 'types/HasteMap';
import type {Glob, Path} from 'types/Config';
import type {ResolveModuleConfig} from 'jest-resolve';
import type {ResolveModuleConfig} from 'types/Resolve';

const micromatch = require('micromatch');

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/runTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import type {Path, Config} from 'types/Config';
import type {TestResult} from 'types/TestResult';
import type Resolver from 'jest-resolve';
import type {Resolver} from 'types/Resolve';

const BufferedConsole = require('./lib/BufferedConsole');
const {
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-resolve-dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"license": "BSD-3-Clause",
"main": "build/index.js",
"dependencies": {
"jest-file-exists": "^17.0.0",
"jest-resolve": "^18.1.0"
"jest-file-exists": "^17.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/jest-resolve-dependencies/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import type {HasteFS} from 'types/HasteMap';
import type {Path} from 'types/Config';
import type Resolver, {ResolveModuleConfig} from 'jest-resolve';
import type {Resolver, ResolveModuleConfig} from 'types/Resolve';

const fileExists = require('jest-file-exists');

Expand Down
15 changes: 15 additions & 0 deletions types/Resolve.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/
'use strict';

import type _Resolver, { ResolveModuleConfig as _ResolveModuleConfig } from 'jest-resolve';

export type Resolver = _Resolver;
export type ResolveModuleConfig = _ResolveModuleConfig;

0 comments on commit a58661a

Please sign in to comment.