Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade jest-worker #23077

Merged
merged 12 commits into from Mar 16, 2021
2 changes: 0 additions & 2 deletions jest.config.js
@@ -1,6 +1,4 @@
module.exports = {
// this will become default in jest 27:
testRunner: 'jest-circus/runner',
testMatch: ['**/*.test.js'],
verbose: true,
rootDir: 'test',
Expand Down
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -59,7 +59,7 @@
"async-sema": "3.0.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.3",
"babel-jest": "24.9.0",
"babel-jest": "27.0.0-next.5",
"browserslist": "^4.14.7",
"browserstack-local": "1.4.0",
"cheerio": "0.22.0",
Expand Down Expand Up @@ -87,8 +87,7 @@
"image-size": "0.9.3",
"is-animated": "2.0.0",
"isomorphic-unfetch": "3.0.0",
"jest-circus": "26.0.1",
"jest-cli": "24.9.0",
"jest-cli": "27.0.0-next.5",
"ky": "0.19.1",
"ky-universal": "0.6.0",
"lerna": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/index.ts
Expand Up @@ -2,7 +2,7 @@ import { loadEnvConfig } from '@next/env'
import chalk from 'chalk'
import crypto from 'crypto'
import { promises, writeFileSync } from 'fs'
import Worker from 'jest-worker'
import { Worker } from 'jest-worker'
import devalue from 'next/dist/compiled/devalue'
import escapeStringRegexp from 'next/dist/compiled/escape-string-regexp'
import findUp from 'next/dist/compiled/find-up'
Expand Down
Expand Up @@ -7,7 +7,7 @@ import {
sources,
} from 'next/dist/compiled/webpack/webpack'
import pLimit from 'p-limit'
import jestWorker from 'jest-worker'
import { Worker } from 'jest-worker'
import crypto from 'crypto'
import cacache from 'next/dist/compiled/cacache'
import { spans } from '../../profiling-plugin'
Expand Down Expand Up @@ -192,13 +192,10 @@ class TerserPlugin {
return initializedWorker
}

initializedWorker = new jestWorker(
path.join(__dirname, './minify.js'),
{
numWorkers: numberOfWorkers,
enableWorkerThreads: true,
}
)
initializedWorker = new Worker(path.join(__dirname, './minify.js'), {
numWorkers: numberOfWorkers,
enableWorkerThreads: true,
})

initializedWorker.getStdout().pipe(process.stdout)
initializedWorker.getStderr().pipe(process.stderr)
Expand Down
2 changes: 1 addition & 1 deletion packages/next/compiled/conf/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/compiled/css-loader/cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/compiled/debug/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/compiled/find-cache-dir/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/next/compiled/postcss-flexbugs-fixes/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/next/compiled/postcss-preset-env/index.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.