File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @pandacss/eslint-plugin ' : patch
3+ ---
4+
5+ Fix global configPath
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ type Opts = {
1111 configPath ?: string
1212}
1313
14- let configPath : string | undefined
1514const contextCache : { [ configPath : string ] : Promise < PandaContext > } = { }
1615
1716async function _getContext ( configPath : string | undefined ) {
@@ -25,14 +24,13 @@ async function _getContext(configPath: string | undefined) {
2524
2625export async function getContext ( opts : Opts ) {
2726 if ( process . env . NODE_ENV === 'test' ) {
28- configPath = opts . configPath
2927 const ctx = createContext ( ) as unknown as PandaContext
3028 ctx . getFiles = ( ) => [ 'App.tsx' ]
3129 return ctx
3230 } else {
33- configPath = configPath || findConfig ( { cwd : opts . configPath ?? opts . currentFile } )
31+ const configPath = findConfig ( { cwd : opts . configPath ?? opts . currentFile } )
3432
35- // Ensure that the context is refreshed when the configPath changes.
33+ // The context cache ensures we don't reload the same config multiple times
3634 if ( ! contextCache [ configPath ] ) {
3735 contextCache [ configPath ] = _getContext ( configPath )
3836 }
You can’t perform that action at this time.
0 commit comments