11import { CacheConsultant } from './CacheConsultant.js' ;
2- import { _getDependenciesFromScripts } from './binaries/index.js' ;
2+ import { _getInputsFromScripts } from './binaries/index.js' ;
33import { getFilteredScripts } from './manifest/helpers.js' ;
44import { PluginEntries , Plugins } from './plugins.js' ;
55import type { PluginName } from './types/PluginNames.js' ;
@@ -254,14 +254,14 @@ export class WorkspaceWorker {
254254 // Get dependencies from package.json#scripts
255255 const baseScriptOptions = { ...baseOptions , manifest, isProduction, enabledPlugins : this . enabledPlugins } ;
256256 const [ productionScripts , developmentScripts ] = getFilteredScripts ( manifest . scripts ?? { } ) ;
257- const inputsFromManifest = _getDependenciesFromScripts ( Object . values ( developmentScripts ) , baseOptions ) ;
258- const productionInputsFromManifest = _getDependenciesFromScripts ( Object . values ( productionScripts ) , baseOptions ) ;
257+ const inputsFromManifest = _getInputsFromScripts ( Object . values ( developmentScripts ) , baseOptions ) ;
258+ const productionInputsFromManifest = _getInputsFromScripts ( Object . values ( productionScripts ) , baseOptions ) ;
259259
260260 const hasProductionInput = ( input : Input ) =>
261261 productionInputsFromManifest . find ( d => d . specifier === input . specifier && d . type === input . type ) ;
262262
263- const getDependenciesFromScripts : GetInputsFromScriptsPartial = ( scripts , options ) =>
264- _getDependenciesFromScripts ( scripts , { ...baseScriptOptions , ...options } ) ;
263+ const getInputsFromScripts : GetInputsFromScriptsPartial = ( scripts , options ) =>
264+ _getInputsFromScripts ( scripts , { ...baseScriptOptions , ...options } ) ;
265265
266266 const inputs : Input [ ] = [ ] ;
267267 const configFiles = new Map < PluginName , Set < string > > ( ) ;
@@ -311,7 +311,7 @@ export class WorkspaceWorker {
311311 configFilePath : containingFilePath ,
312312 configFileDir : cwd ,
313313 configFileName : '' ,
314- getDependenciesFromScripts ,
314+ getInputsFromScripts ,
315315 } ;
316316
317317 const configEntryPaths : Input [ ] = [ ] ;
@@ -336,18 +336,18 @@ export class WorkspaceWorker {
336336 const data : CacheItem = { } ;
337337 if ( config ) {
338338 if ( hasResolveEntryPaths ) {
339- const dependencies = ( await plugin . resolveEntryPaths ?.( config , opts ) ) ?? [ ] ;
340- for ( const id of dependencies ) configEntryPaths . push ( id ) ;
341- data . resolveEntryPaths = dependencies ;
339+ const entryPaths = ( await plugin . resolveEntryPaths ?.( config , opts ) ) ?? [ ] ;
340+ for ( const entryPath of entryPaths ) configEntryPaths . push ( entryPath ) ;
341+ data . resolveEntryPaths = entryPaths ;
342342 }
343343 if ( shouldRunConfigResolver ) {
344- const dependencies = ( await plugin . resolveConfig ?.( config , opts ) ) ?? [ ] ;
345- for ( const id of dependencies ) {
346- if ( isConfigPattern ( id ) )
347- handleConfigInput ( id . pluginName , { ...id , containingFilePath : configFilePath } ) ;
348- addInput ( id , configFilePath ) ;
344+ const inputs = ( await plugin . resolveConfig ?.( config , opts ) ) ?? [ ] ;
345+ for ( const input of inputs ) {
346+ if ( isConfigPattern ( input ) )
347+ handleConfigInput ( input . pluginName , { ...input , containingFilePath : configFilePath } ) ;
348+ addInput ( input , configFilePath ) ;
349349 }
350- data . resolveConfig = dependencies ;
350+ data . resolveConfig = inputs ;
351351 }
352352 if ( ! isManifest && fd ?. changed && fd . meta ) fd . meta . data = data ;
353353 }
0 commit comments