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 2121 - 18
2222 - 20
2323 - 22
24- - 23
24+ - 24
2525 eslint :
2626 - 8
2727 - 9
Original file line number Diff line number Diff line change 2323 "types" : " ./lib/index.d.ts" ,
2424 "default" : " ./lib/index.js"
2525 },
26- "module-sync" : {
27- "types" : " ./lib/index.d.ts" ,
28- "default" : " ./lib/index.js"
29- },
3026 "require" : {
3127 "types" : " ./index.d.cts" ,
3228 "default" : " ./lib/index.cjs"
Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ export const nextCharOffsetFactory = (text: string) => {
121121 }
122122}
123123
124+ const importMetaUrl = import . meta. url
125+
124126/* 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 )
127129 : require
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ const ignoreCheckCache = new Map<
8686 ( filePath : string ) => Promise < boolean >
8787> ( )
8888
89- const getRemarkConfig = async ( filePath : string , cwd = process . cwd ( ) ) => {
89+ const getRemarkConfig = async ( filePath : string , cwd : string ) => {
9090 let configLoad = configLoadCache . get ( cwd )
9191
9292 if ( ! configLoad ) {
@@ -141,9 +141,9 @@ export const getRemarkProcessor = async (
141141 filePath : string ,
142142 isMdx : boolean ,
143143 ignoreRemarkConfig ?: boolean ,
144- cwd ?: string ,
144+ cwd = process . cwd ( ) ,
145145) => {
146- const initCacheKey = `${ String ( isMdx ) } -${ filePath } `
146+ const initCacheKey = `${ String ( isMdx ) } -${ cwd } \0 ${ filePath } `
147147
148148 let cachedProcessor = processorCache . get ( initCacheKey )
149149
Original file line number Diff line number Diff line change 2323 "types" : " ./lib/index.d.ts" ,
2424 "default" : " ./lib/index.js"
2525 },
26- "module-sync" : {
27- "types" : " ./lib/index.d.ts" ,
28- "default" : " ./lib/index.js"
29- },
3026 "require" : {
3127 "types" : " ./index.d.cts" ,
3228 "default" : " ./lib/index.cjs"
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ export const getGlobals = <
2222 initialGlobals as R ,
2323 )
2424
25+ const importMetaUrl = import . meta. url
26+
2527/* 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 )
2830 : require
You can’t perform that action at this time.
0 commit comments