Skip to content

Commit 7bafbbf

Browse files
authored
Merge pull request #18 from rwjblue/move-jest-to-project-dependency
Move jest to project dependency.
2 parents 2bdbefb + a8fc7d3 commit 7bafbbf

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

commands/global/new.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module.exports.handler = function handler(options) {
2727
keywords: ['codemod-cli'],
2828
devDependencies: {
2929
'codemod-cli': `^${pkg.version}`,
30+
jest: pkg.devDependencies.jest,
3031
},
3132
},
3233
{

commands/local/test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ module.exports.builder = function builder(yargs) {
1919
};
2020

2121
module.exports.handler = function handler() {
22-
require('jest').run();
22+
const importCwd = require('import-cwd');
23+
24+
importCwd('jest').run();
2325
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"dependencies": {
1414
"common-tags": "^1.8.0",
1515
"fs-extra": "^6.0.1",
16+
"import-cwd": "^2.1.0",
1617
"import-local": "^1.0.0",
17-
"jest": "^23.1.0",
1818
"jscodeshift": "^0.5.1",
1919
"pkg-up": "^2.0.0",
2020
"yargs": "^11.0.0"
@@ -27,6 +27,7 @@
2727
"eslint-plugin-node": "^6.0.1",
2828
"eslint-plugin-prettier": "^2.6.0",
2929
"execa": "^0.10.0",
30+
"jest": "^23.1.0",
3031
"lerna-changelog": "^0.8.0",
3132
"prettier": "^1.13.5",
3233
"qunit": "^2.6.1",

yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,6 +2323,18 @@ ignore@^3.3.3, ignore@^3.3.6:
23232323
version "3.3.10"
23242324
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
23252325

2326+
import-cwd@^2.1.0:
2327+
version "2.1.0"
2328+
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
2329+
dependencies:
2330+
import-from "^2.1.0"
2331+
2332+
import-from@^2.1.0:
2333+
version "2.1.0"
2334+
resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
2335+
dependencies:
2336+
resolve-from "^3.0.0"
2337+
23262338
import-local@^1.0.0:
23272339
version "1.0.0"
23282340
resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"

0 commit comments

Comments
 (0)