File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { Span } from '../trace'
4
4
5
5
import path from 'path'
6
6
import * as Log from './output/log'
7
- import { Worker as JestWorker } from 'next/dist/compiled/jest- worker'
7
+ import { Worker } from '../lib/ worker'
8
8
import { verifyAndLint } from '../lib/verifyAndLint'
9
9
import createSpinner from './spinner'
10
10
import { eventTypeCheckCompleted } from '../telemetry/events'
@@ -30,20 +30,18 @@ function verifyTypeScriptSetup(
30
30
hasAppDir : boolean ,
31
31
hasPagesDir : boolean
32
32
) {
33
- const typeCheckWorker = new JestWorker (
33
+ const typeCheckWorker = new Worker (
34
34
require . resolve ( '../lib/verify-typescript-setup' ) ,
35
35
{
36
+ exposedMethods : [ 'verifyTypeScriptSetup' ] ,
36
37
numWorkers : 1 ,
37
38
enableWorkerThreads,
38
39
maxRetries : 0 ,
39
40
}
40
- ) as JestWorker & {
41
+ ) as Worker & {
41
42
verifyTypeScriptSetup : typeof import ( '../lib/verify-typescript-setup' ) . verifyTypeScriptSetup
42
43
}
43
44
44
- typeCheckWorker . getStdout ( ) . pipe ( process . stdout )
45
- typeCheckWorker . getStderr ( ) . pipe ( process . stderr )
46
-
47
45
return typeCheckWorker
48
46
. verifyTypeScriptSetup ( {
49
47
dir,
Original file line number Diff line number Diff line change 1
1
import { red } from './picocolors'
2
- import { Worker } from 'next/dist/compiled/jest- worker'
2
+ import { Worker } from './ worker'
3
3
import { existsSync } from 'fs'
4
4
import { join } from 'path'
5
5
import { ESLINT_DEFAULT_DIRS } from './constants'
@@ -23,16 +23,14 @@ export async function verifyAndLint(
23
23
24
24
try {
25
25
lintWorkers = new Worker ( require . resolve ( './eslint/runLintCheck' ) , {
26
+ exposedMethods : [ 'runLintCheck' ] ,
26
27
numWorkers : 1 ,
27
28
enableWorkerThreads,
28
29
maxRetries : 0 ,
29
30
} ) as Worker & {
30
31
runLintCheck : typeof import ( './eslint/runLintCheck' ) . runLintCheck
31
32
}
32
33
33
- lintWorkers . getStdout ( ) . pipe ( process . stdout )
34
- lintWorkers . getStderr ( ) . pipe ( process . stderr )
35
-
36
34
const lintDirs = ( configLintDirs ?? ESLINT_DEFAULT_DIRS ) . reduce (
37
35
( res : string [ ] , d : string ) => {
38
36
const currDir = join ( dir , d )
You can’t perform that action at this time.
0 commit comments