File tree Expand file tree Collapse file tree 5 files changed +23
-20
lines changed
Expand file tree Collapse file tree 5 files changed +23
-20
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @fake-scope/fake-pkg " : patch
3+ ---
4+
5+ fix: resolve circular imports in worker
Original file line number Diff line number Diff line change @@ -4,15 +4,9 @@ import path from 'node:path'
44import { pathToFileURL } from 'node:url'
55
66import type { Position } from 'acorn'
7- import { createSyncFn } from 'synckit'
87import type { Point } from 'unist'
98
10- import type {
11- NormalPosition ,
12- WorkerOptions ,
13- WorkerParseResult ,
14- WorkerProcessResult ,
15- } from './types'
9+ import type { NormalPosition } from './types'
1610
1711export const last = < T > ( items : T [ ] | readonly T [ ] ) =>
1812 items && items [ items . length - 1 ]
@@ -221,10 +215,3 @@ export const nextCharOffsetFactory = (text: string) => {
221215 }
222216 }
223217}
224-
225- const workerPath = require . resolve ( './worker' )
226-
227- export const performSyncWork = createSyncFn ( workerPath ) as ( (
228- options : Omit < WorkerOptions , 'process' > ,
229- ) => WorkerParseResult ) &
230- ( ( options : WorkerOptions & { process : true } ) => WorkerProcessResult )
Original file line number Diff line number Diff line change 11export * from './helpers'
22export * from './parser'
3+ export * from './sync'
34export * from './types'
Original file line number Diff line number Diff line change @@ -3,12 +3,8 @@ import path from 'node:path'
33import type { Linter } from 'eslint'
44import type { VFileMessage } from 'vfile-message'
55
6- import {
7- arrayify ,
8- normalizePosition ,
9- performSyncWork ,
10- getPhysicalFilename ,
11- } from './helpers'
6+ import { arrayify , normalizePosition , getPhysicalFilename } from './helpers'
7+ import { performSyncWork } from './sync'
128import type { ParserOptions , WorkerParseResult } from './types'
139
1410export const DEFAULT_EXTENSIONS : readonly string [ ] = [ '.mdx' ]
Original file line number Diff line number Diff line change 1+ import { createSyncFn } from 'synckit'
2+
3+ import type {
4+ WorkerOptions ,
5+ WorkerParseResult ,
6+ WorkerProcessResult ,
7+ } from './types'
8+
9+ const workerPath = require . resolve ( './worker' )
10+
11+ export const performSyncWork = createSyncFn ( workerPath ) as ( (
12+ options : Omit < WorkerOptions , 'process' > ,
13+ ) => WorkerParseResult ) &
14+ ( ( options : WorkerOptions & { process : true } ) => WorkerProcessResult )
You can’t perform that action at this time.
0 commit comments