Skip to content

Commit 090a6c0

Browse files
committed
chore: extract workerPath for performance
1 parent a8e7584 commit 090a6c0

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/eslint-mdx/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"main": "lib",
1717
"module": "lib/esm",
1818
"es2015": "lib/es2015",
19-
"fesm5": "lib/esm",
2019
"types": "lib",
2120
"files": [
2221
"lib",

packages/eslint-plugin-mdx/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"main": "lib",
1717
"module": "lib/esm",
1818
"es2015": "lib/es2015",
19-
"fesm5": "lib/esm",
2019
"types": "lib",
2120
"files": [
2221
"lib",
@@ -39,7 +38,7 @@
3938
"remark-mdx": "^1.6.22",
4039
"remark-parse": "^8.0.3",
4140
"remark-stringify": "^8.1.1",
42-
"synckit": "^0.3.3",
41+
"synckit": "^0.3.4",
4342
"tslib": "^2.3.0",
4443
"unified": "^9.2.1",
4544
"vfile": "^4.2.1"

packages/eslint-plugin-mdx/src/rules/remark.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ import vfile from 'vfile'
1111
import { getPhysicalFilename, getRemarkProcessor } from './helpers'
1212
import type { RemarkLintMessage } from './types'
1313

14+
const workerPath = require.resolve('../worker')
15+
1416
// call `creatSyncFn` lazily for performance, it is already cached inside, related #323
1517
const lazyRemark = {
1618
get processSync() {
17-
return createSyncFn(require.resolve('../worker')) as (
19+
return createSyncFn(workerPath) as (
1820
fileOptions: VFileOptions,
1921
physicalFilename: string,
2022
isMdx: boolean,

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11504,10 +11504,10 @@ synckit@^0.1.5:
1150411504
tslib "^2.2.0"
1150511505
uuid "^8.3.2"
1150611506

11507-
synckit@^0.3.3:
11508-
version "0.3.3"
11509-
resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.3.3.tgz#a36af5d2f7382c9a2c5e528cd8ad64ed882dde70"
11510-
integrity sha512-uIPHDSdGBQS2C2PmFZkMhBYC20H0diioDEiOR1lsIoP25/xbJPHU0GdHJ7GgvAUkLgEkTJ32zNzulzIPnhrYZA==
11507+
synckit@^0.3.4:
11508+
version "0.3.4"
11509+
resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.3.4.tgz#8f0c2b1019663633d56d43d09589494d74654ab3"
11510+
integrity sha512-t6qVl+gzR6qMkrP5pW+sxGe0mVx/O7vj29ir9k4Lw9BacPBE/cKHMvcROJlFBgNHFW94etQL/sBYFq4uur6C6A==
1151111511
dependencies:
1151211512
tslib "^2.3.0"
1151311513
uuid "^8.3.2"

0 commit comments

Comments
 (0)