File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 12071207 "types" : " ./dist/lib/dependencies/prompts.d.ts" ,
12081208 "default" : " ./dist/lib/dependencies/prompts.js"
12091209 },
1210+ "./lib/dependencies/reset" : {
1211+ "types" : " ./dist/lib/dependencies/reset.d.ts" ,
1212+ "default" : " ./dist/lib/dependencies/reset.js"
1213+ },
12101214 "./lib/dependencies/system" : {
12111215 "types" : " ./dist/lib/dependencies/system.d.ts" ,
12121216 "default" : " ./dist/lib/dependencies/system.js"
Original file line number Diff line number Diff line change 11/** @fileoverview Central dependency registry for all external dependencies. */
22
3- import { resetBuildToolsDependencies } from './build-tools'
4- import { resetFileSystemDependencies } from './file-system'
5- import { resetLoggingDependencies } from './logging'
6- import { resetNpmToolsDependencies } from './npm-tools'
7- import { resetPromptsDependencies } from './prompts'
8- import { resetSystemDependencies } from './system'
9- import { resetValidationDependencies } from './validation'
10-
113// Re-export all types and functions from sub-modules
124export * from './build-tools'
135export * from './file-system'
@@ -16,17 +8,3 @@ export * from './npm-tools'
168export * from './prompts'
179export * from './system'
1810export * from './validation'
19-
20- /**
21- * Reset all dependencies to undefined (forces reload on next access).
22- * Useful for testing to ensure clean state between tests.
23- */
24- export function resetDependencies ( ) : void {
25- resetBuildToolsDependencies ( )
26- resetFileSystemDependencies ( )
27- resetLoggingDependencies ( )
28- resetNpmToolsDependencies ( )
29- resetPromptsDependencies ( )
30- resetSystemDependencies ( )
31- resetValidationDependencies ( )
32- }
Original file line number Diff line number Diff line change 1+ /** @fileoverview Reset utilities for dependency management. */
2+
3+ import { resetBuildToolsDependencies } from './build-tools'
4+ import { resetFileSystemDependencies } from './file-system'
5+ import { resetLoggingDependencies } from './logging'
6+ import { resetNpmToolsDependencies } from './npm-tools'
7+ import { resetPromptsDependencies } from './prompts'
8+ import { resetSystemDependencies } from './system'
9+ import { resetValidationDependencies } from './validation'
10+
11+ /**
12+ * Reset all dependencies to undefined (forces reload on next access).
13+ * Useful for testing to ensure clean state between tests.
14+ */
15+ export function resetDependencies ( ) : void {
16+ resetBuildToolsDependencies ( )
17+ resetFileSystemDependencies ( )
18+ resetLoggingDependencies ( )
19+ resetNpmToolsDependencies ( )
20+ resetPromptsDependencies ( )
21+ resetSystemDependencies ( )
22+ resetValidationDependencies ( )
23+ }
Original file line number Diff line number Diff line change 55
66import ENV from './constants/ENV'
77import abortSignal from './constants/abort-signal'
8- import { getYoctoSpinner } from './dependencies'
8+ import { getYoctoSpinner } from './dependencies/logging '
99import { isBlankString } from './strings'
1010
1111import type { Writable } from 'node:stream'
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import {
1818 setFastGlob ,
1919 setPicomatch ,
2020} from '../../registry/dist/lib/dependencies/file-system.js'
21- import { resetDependencies } from '../../registry/dist/lib/dependencies/index.js'
2221import {
2322 getDebug ,
2423 getIsUnicodeSupported ,
@@ -68,6 +67,7 @@ import {
6867 setInquirerSearch ,
6968 setInquirerSelect ,
7069} from '../../registry/dist/lib/dependencies/prompts.js'
70+ import { resetDependencies } from '../../registry/dist/lib/dependencies/reset.js'
7171import {
7272 getPromiseSpawn ,
7373 getStreamingIterables ,
You can’t perform that action at this time.
0 commit comments