-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve circular imports in worker (#412)
Co-authored-by: Zhenggang Su <zgsu@alauda.io> Co-authored-by: JounQin <admin@1stg.me>
- Loading branch information
1 parent
89a83a6
commit e697910
Showing
5 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@fake-scope/fake-pkg": patch | ||
--- | ||
|
||
fix: resolve circular imports in worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './helpers' | ||
export * from './parser' | ||
export * from './sync' | ||
export * from './types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { createSyncFn } from 'synckit' | ||
|
||
import type { | ||
WorkerOptions, | ||
WorkerParseResult, | ||
WorkerProcessResult, | ||
} from './types' | ||
|
||
const workerPath = require.resolve('./worker') | ||
|
||
export const performSyncWork = createSyncFn(workerPath) as (( | ||
options: Omit<WorkerOptions, 'process'>, | ||
) => WorkerParseResult) & | ||
((options: WorkerOptions & { process: true }) => WorkerProcessResult) |