File tree Expand file tree Collapse file tree 8 files changed +23
-16
lines changed Expand file tree Collapse file tree 8 files changed +23
-16
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " eslint-mdx " : patch
3
+ ---
4
+
5
+ fix: take ` cwd ` into cache key account
Original file line number Diff line number Diff line change
1
+ ---
2
+ " eslint-mdx " : patch
3
+ " eslint-plugin-mdx " : patch
4
+ ---
5
+
6
+ fix: remove buggy ` module-sync ` entry
Original file line number Diff line number Diff line change 21
21
- 18
22
22
- 20
23
23
- 22
24
- - 23
24
+ - 24
25
25
eslint :
26
26
- 8
27
27
- 9
Original file line number Diff line number Diff line change 23
23
"types" : " ./lib/index.d.ts" ,
24
24
"default" : " ./lib/index.js"
25
25
},
26
- "module-sync" : {
27
- "types" : " ./lib/index.d.ts" ,
28
- "default" : " ./lib/index.js"
29
- },
30
26
"require" : {
31
27
"types" : " ./index.d.cts" ,
32
28
"default" : " ./lib/index.cjs"
Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ export const nextCharOffsetFactory = (text: string) => {
121
121
}
122
122
}
123
123
124
+ const importMetaUrl = import . meta. url
125
+
124
126
/* istanbul ignore next */
125
- export const cjsRequire : CjsRequire = import . meta . url
126
- ? createRequire ( import . meta . url )
127
+ export const cjsRequire : CjsRequire = importMetaUrl
128
+ ? createRequire ( importMetaUrl )
127
129
: require
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ const ignoreCheckCache = new Map<
86
86
( filePath : string ) => Promise < boolean >
87
87
> ( )
88
88
89
- const getRemarkConfig = async ( filePath : string , cwd = process . cwd ( ) ) => {
89
+ const getRemarkConfig = async ( filePath : string , cwd : string ) => {
90
90
let configLoad = configLoadCache . get ( cwd )
91
91
92
92
if ( ! configLoad ) {
@@ -141,9 +141,9 @@ export const getRemarkProcessor = async (
141
141
filePath : string ,
142
142
isMdx : boolean ,
143
143
ignoreRemarkConfig ?: boolean ,
144
- cwd ?: string ,
144
+ cwd = process . cwd ( ) ,
145
145
) => {
146
- const initCacheKey = `${ String ( isMdx ) } -${ filePath } `
146
+ const initCacheKey = `${ String ( isMdx ) } -${ cwd } \0 ${ filePath } `
147
147
148
148
let cachedProcessor = processorCache . get ( initCacheKey )
149
149
Original file line number Diff line number Diff line change 23
23
"types" : " ./lib/index.d.ts" ,
24
24
"default" : " ./lib/index.js"
25
25
},
26
- "module-sync" : {
27
- "types" : " ./lib/index.d.ts" ,
28
- "default" : " ./lib/index.js"
29
- },
30
26
"require" : {
31
27
"types" : " ./index.d.cts" ,
32
28
"default" : " ./lib/index.cjs"
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ export const getGlobals = <
22
22
initialGlobals as R ,
23
23
)
24
24
25
+ const importMetaUrl = import . meta. url
26
+
25
27
/* istanbul ignore next */
26
- export const cjsRequire : CjsRequire = import . meta . url
27
- ? createRequire ( import . meta . url )
28
+ export const cjsRequire : CjsRequire = importMetaUrl
29
+ ? createRequire ( importMetaUrl )
28
30
: require
You can’t perform that action at this time.
0 commit comments