Skip to content

Commit cf9ba9e

Browse files
committed
fix: okey, do not bundle jest runners
Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
1 parent c21fedb commit cf9ba9e

File tree

11 files changed

+49
-53
lines changed

11 files changed

+49
-53
lines changed

@tunnckocore/create-jest-runner/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
"dist"
1717
],
1818
"scripts": {},
19-
"dependencies": {},
20-
"devDependencies": {
19+
"dependencies": {
2120
"chalk": "^2.4.2",
2221
"jest-worker": "^24.0.0",
23-
"throat": "^4.1.0",
22+
"throat": "^4.1.0"
23+
},
24+
"devDependencies": {
2425
"ansi-colors": "^4.1.1",
2526
"execa": "^1.0.0",
2627
"jest": "^24.0.0"

@tunnckocore/jest-runner-babel/package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"engines": {
1010
"node": ">=8.11"
1111
},
12-
"main": "dist/cjs/index.js",
13-
"module": "dist/esm/index.js",
14-
"typings": "dist/types/index.d.ts",
12+
"main": "src/index.js",
13+
"module": "src/index.js",
14+
"typings": "src/index.d.ts",
1515
"files": [
16-
"dist"
16+
"src"
1717
],
1818
"keywords": [
1919
"bin",
@@ -44,12 +44,10 @@
4444
"@babel/core": "^7.6.0"
4545
},
4646
"dependencies": {
47-
"@tunnckocore/create-jest-runner": "^0.7.2"
48-
},
49-
"devDependencies": {
50-
"@babel/core": "^7.6.0",
47+
"@tunnckocore/create-jest-runner": "^0.7.2",
5148
"cosmiconfig": "^5.2.1"
5249
},
50+
"devDependencies": {},
5351
"publishConfig": {
5452
"access": "public",
5553
"tag": "latest"

@tunnckocore/jest-runner-babel/src/runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const explorer = cosmiconfig('jest-runner');
1010
const isWin32 = os.platform() === 'win32';
1111

1212
/* eslint max-statements: ["error", 25] */
13-
module.exports = async function jetRunnerBabel({ testPath, config }) {
13+
module.exports = async function jestRunnerBabel({ testPath, config }) {
1414
const start = new Date();
1515
let options = normalizeRunnerConfig(explorer.searchSync());
1616
const cfgs = [].concat(options.babel).filter(Boolean);

@tunnckocore/jest-runner-eslint/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"engines": {
1010
"node": ">=8.11"
1111
},
12-
"main": "dist/cjs/index.js",
13-
"module": "dist/esm/index.js",
14-
"typings": "dist/types/index.d.ts",
12+
"main": "src/index.js",
13+
"module": "src/index.js",
14+
"typings": "src/index.d.ts",
1515
"files": [
16-
"dist"
16+
"src"
1717
],
1818
"keywords": [
1919
"bin",
@@ -44,12 +44,11 @@
4444
"eslint": "^6.4.0"
4545
},
4646
"dependencies": {
47-
"@tunnckocore/create-jest-runner": "^0.7.2"
48-
},
49-
"devDependencies": {
47+
"@tunnckocore/create-jest-runner": "^0.7.2",
5048
"@tunnckocore/utils": "^0.9.2",
5149
"cosmiconfig": "^5.2.1"
5250
},
51+
"devDependencies": {},
5352
"publishConfig": {
5453
"access": "public",
5554
"tag": "latest"

jest/build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ const { exts, workspaces } = utils.createAliases(ROOT);
77
module.exports = {
88
rootDir: ROOT,
99
displayName: 'build',
10-
testMatch: workspaces.map((ws) => `<rootDir>/${ws}/*/src/**/*`),
10+
testMatch: workspaces.map(
11+
(ws) => `<rootDir>/${ws}/!(*jest-runner*)/src/**/*`,
12+
),
1113
testPathIgnorePatterns: [
1214
/node_modules/.toString(),
1315
/(?:__)?(?:fixtures?|supports?|shared)(?:__)?/.toString(),
1416
/.+\/@tunnckocore\/utils\/.+/.toString(),
17+
/.+\/@tunnckocore\/execa\/.+/.toString(),
1518
/.+(?:-config|babel-preset).+/.toString(),
1619
],
1720
// moduleNameMapper: alias,

jest/bundle.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@ module.exports = {
88
rootDir: ROOT,
99
displayName: 'bundle',
1010
// testMatch: ['<rootDir>/@tunnckocore/execa/src/index.js'],
11-
testMatch: workspaces
12-
.map(
13-
(ws) => `<rootDir>/${ws}/!(jest-runner-*)/src/index.{${exts.join(',')}}`,
14-
)
15-
.concat([
16-
`<rootDir>/@tunnckocore/jest-runner-*/src/runner.js`,
17-
`<rootDir>/packages/jest-runner-*/src/runner.js`,
18-
]),
11+
testMatch: workspaces.map(
12+
(ws) => `<rootDir>/${ws}/!(*jest-runner*)/src/index.{${exts.join(',')}}`,
13+
),
1914
testPathIgnorePatterns: [
2015
/node_modules/.toString(),
2116
/(?:__)?(?:fixtures?|supports?|shared)(?:__)?/.toString(),

jest/docs.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ const { exts, workspaces } = utils.createAliases(ROOT);
77
module.exports = {
88
rootDir: ROOT,
99
displayName: 'docs',
10-
testMatch: workspaces.map((ws) => `<rootDir>/${ws}/*/src/index.js`),
10+
testMatch: workspaces.map(
11+
(ws) => `<rootDir>/${ws}/*/src/index.{${exts.join(',')}}`,
12+
),
1113
testPathIgnorePatterns: [
1214
/node_modules/.toString(),
1315
/(?:__)?(?:fixtures?|supports?|shared)(?:__)?/.toString(),
1416
// /.+(?:-config|babel-preset).+/.toString(),
1517
],
1618
// moduleNameMapper: alias,
1719
moduleFileExtensions: exts,
18-
runner: path.join(ROOT, 'packages/jest-runner-docs/dist/cjs/index.js'),
20+
runner: path.join(ROOT, 'packages/jest-runner-docs/src/index.js'),
1921
};

packages/jest-runner-docs/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"engines": {
1010
"node": ">=8.11"
1111
},
12-
"main": "dist/cjs/index.js",
13-
"module": "dist/esm/index.js",
14-
"types": "dist/types/index.d.ts",
12+
"main": "src/index.js",
13+
"module": "src/index.js",
14+
"typings": "src/index.d.ts",
1515
"files": [
16-
"dist"
16+
"src"
1717
],
1818
"keywords": [
1919
"tunnckocorehq",
@@ -33,13 +33,12 @@
3333
],
3434
"scripts": {},
3535
"dependencies": {
36-
"parse-comments": "^1.0.0"
37-
},
38-
"devDependencies": {
3936
"@tunnckocore/create-jest-runner": "^0.7.2",
4037
"@tunnckocore/utils": "^0.9.2",
41-
"cosmiconfig": "^5.2.1"
38+
"cosmiconfig": "^5.2.1",
39+
"parse-comments": "^1.0.0"
4240
},
41+
"devDependencies": {},
4342
"publishConfig": {
4443
"access": "public",
4544
"tag": "latest"
File renamed without changes.

packages/jest-runner-docs/src/runner.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/* eslint-disable max-statements */
2-
import fs from 'fs';
3-
import path from 'path';
2+
const fs = require('fs');
3+
const path = require('path');
44

5-
import { pass, fail, skip } from '@tunnckocore/create-jest-runner';
6-
import { isMonorepo } from '@tunnckocore/utils';
5+
const { pass, fail, skip } = require('@tunnckocore/create-jest-runner');
6+
const { isMonorepo } = require('@tunnckocore/utils');
77

8-
import cosmiconfig from 'cosmiconfig';
9-
import docks from './docks';
8+
const cosmiconfig = require('cosmiconfig');
9+
const docks = require('./docks');
1010

1111
const jestRunnerConfig = cosmiconfig('jest-runner');
1212
const jestRunnerDocks = cosmiconfig('docks');
1313

14-
export default async function jetRunnerDocs({ testPath, config }) {
14+
module.exports = async function jestRunnerDocs({ testPath, config }) {
1515
const start = new Date();
1616
const conf = await tryLoadConfig(testPath, start);
1717
if (conf.hasError) return conf.error;
@@ -100,7 +100,7 @@ export default async function jetRunnerDocs({ testPath, config }) {
100100
title: 'Docks',
101101
},
102102
});
103-
}
103+
};
104104

105105
async function tryLoadConfig(testPath, start) {
106106
return tryCatch(testPath, start, () => {

0 commit comments

Comments
 (0)