deps-conflict-resolver 1.1.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +30 -0
- package/README.md +30 -0
- package/dist/cli.cjs +4413 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +4407 -0
- package/dist/cli.js.map +1 -0
- package/dist/{config.types-DPfKh8_B.d.cts → config.types-CVCkyLb5.d.cts} +34 -2
- package/dist/{config.types-DPfKh8_B.d.ts → config.types-CVCkyLb5.d.ts} +34 -2
- package/dist/index.cjs +1410 -498
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +1412 -501
- package/dist/index.js.map +1 -1
- package/dist/{resolver-Bres_MgX.d.cts → resolver-BAIQL1Xf.d.cts} +44 -2
- package/dist/{resolver-BBrA-8me.d.ts → resolver-DNFa0I8O.d.ts} +44 -2
- package/dist/vite.cjs +1480 -590
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +1482 -592
- package/dist/vite.js.map +1 -1
- package/dist/webpack.cjs +1469 -576
- package/dist/webpack.cjs.map +1 -1
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +1471 -578
- package/dist/webpack.js.map +1 -1
- package/package.json +4 -1
|
@@ -80,6 +80,26 @@ interface DependencyPath {
|
|
|
80
80
|
requiredRange: string;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/** A problem the caller can inspect without parsing log messages. */
|
|
84
|
+
interface ResolverDiagnostic {
|
|
85
|
+
code: 'PROJECT_STATE_CHANGED' | 'DEPENDENCY_NOT_FOUND' | 'PEER_NOT_DECLARED' | 'PEER_NOT_INSTALLED' | 'REGISTRY_ERROR' | 'NO_MATCHING_VERSION' | 'OFFLINE_ALIAS_MISSING' | 'ALIAS_INSTALL_FAILED' | 'ALIAS_NOT_INSTALLED' | 'ALIAS_PEER_UNSATISFIED' | 'ALIAS_METADATA_UNAVAILABLE' | 'SHARED_PEER_CONTEXT' | 'AMBIGUOUS_ALIAS_SCOPE' | 'AMBIGUOUS_IMPORTER';
|
|
86
|
+
severity: 'warning' | 'error';
|
|
87
|
+
message: string;
|
|
88
|
+
packageName: string;
|
|
89
|
+
requestedBy?: string[];
|
|
90
|
+
aliases?: string[];
|
|
91
|
+
importerPaths?: string[];
|
|
92
|
+
}
|
|
93
|
+
/** Why a particular request was redirected or left to the normal resolver. */
|
|
94
|
+
interface ResolutionExplanation {
|
|
95
|
+
request: string;
|
|
96
|
+
importer?: string;
|
|
97
|
+
resolved: string | null;
|
|
98
|
+
reason: 'redirected' | 'excluded' | 'ambiguous' | 'unmatched' | 'no-rule' | 'no-importer' | 'inactive' | 'hook';
|
|
99
|
+
aliases: string[];
|
|
100
|
+
matchedPaths: string[];
|
|
101
|
+
}
|
|
102
|
+
|
|
83
103
|
/**
|
|
84
104
|
* 别名映射
|
|
85
105
|
*/
|
|
@@ -117,11 +137,17 @@ interface AliasMapping {
|
|
|
117
137
|
* does not fall back to the legacy name-only `allDependents` rule.
|
|
118
138
|
*/
|
|
119
139
|
importerPaths?: string[];
|
|
140
|
+
/** Alias-owned importer paths, used to remove failed aliases from peer scopes. */
|
|
141
|
+
peerImporterPaths?: Record<string, string[]>;
|
|
120
142
|
}
|
|
121
143
|
/**
|
|
122
144
|
* 依赖分析结果
|
|
123
145
|
*/
|
|
124
146
|
interface AnalysisResult {
|
|
147
|
+
/** Package manifests and workspace files consulted by dependency analysis. */
|
|
148
|
+
watchFiles?: string[];
|
|
149
|
+
/** Structured issues; optional for compatibility with older result producers. */
|
|
150
|
+
diagnostics?: ResolverDiagnostic[];
|
|
125
151
|
/**
|
|
126
152
|
* 所有分析过的依赖
|
|
127
153
|
*/
|
|
@@ -192,6 +218,10 @@ interface DepsConflictResolverOptions {
|
|
|
192
218
|
* @default false
|
|
193
219
|
*/
|
|
194
220
|
debug?: boolean;
|
|
221
|
+
/** Never query a registry or run installation; only verified installed aliases are usable. */
|
|
222
|
+
offline?: boolean;
|
|
223
|
+
/** Fail when required peers, aliases, or resolution contexts remain unresolved. */
|
|
224
|
+
strict?: boolean;
|
|
195
225
|
/**
|
|
196
226
|
* 自定义别名前缀
|
|
197
227
|
* @default 'aliased-'
|
|
@@ -217,7 +247,9 @@ interface DepsConflictResolverOptions {
|
|
|
217
247
|
* 解析后的配置(带默认值)
|
|
218
248
|
* 注意:packageManager 和 registry 在解析后会是具体的值,不会是 'auto'
|
|
219
249
|
*/
|
|
220
|
-
interface ResolvedOptions extends Required<DepsConflictResolverOptions
|
|
250
|
+
interface ResolvedOptions extends Required<Omit<DepsConflictResolverOptions, 'offline' | 'strict'>> {
|
|
251
|
+
offline?: boolean;
|
|
252
|
+
strict?: boolean;
|
|
221
253
|
/**
|
|
222
254
|
* 解析后的包管理器类型(已自动检测或用户指定)
|
|
223
255
|
*/
|
|
@@ -250,4 +282,4 @@ interface PluginConfig extends DepsConflictResolverOptions {
|
|
|
250
282
|
hooks?: PluginHooks;
|
|
251
283
|
}
|
|
252
284
|
|
|
253
|
-
export type {
|
|
285
|
+
export type { AliasPathMapping as A, DepsConflictResolverOptions as D, PluginConfig as P, ResolverDiagnostic as R, AnalysisResult as a, PluginHooks as b, ResolutionExplanation as c, ResolvedOptions as d, AliasMapping as e, PeerConflict as f };
|
|
@@ -80,6 +80,26 @@ interface DependencyPath {
|
|
|
80
80
|
requiredRange: string;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/** A problem the caller can inspect without parsing log messages. */
|
|
84
|
+
interface ResolverDiagnostic {
|
|
85
|
+
code: 'PROJECT_STATE_CHANGED' | 'DEPENDENCY_NOT_FOUND' | 'PEER_NOT_DECLARED' | 'PEER_NOT_INSTALLED' | 'REGISTRY_ERROR' | 'NO_MATCHING_VERSION' | 'OFFLINE_ALIAS_MISSING' | 'ALIAS_INSTALL_FAILED' | 'ALIAS_NOT_INSTALLED' | 'ALIAS_PEER_UNSATISFIED' | 'ALIAS_METADATA_UNAVAILABLE' | 'SHARED_PEER_CONTEXT' | 'AMBIGUOUS_ALIAS_SCOPE' | 'AMBIGUOUS_IMPORTER';
|
|
86
|
+
severity: 'warning' | 'error';
|
|
87
|
+
message: string;
|
|
88
|
+
packageName: string;
|
|
89
|
+
requestedBy?: string[];
|
|
90
|
+
aliases?: string[];
|
|
91
|
+
importerPaths?: string[];
|
|
92
|
+
}
|
|
93
|
+
/** Why a particular request was redirected or left to the normal resolver. */
|
|
94
|
+
interface ResolutionExplanation {
|
|
95
|
+
request: string;
|
|
96
|
+
importer?: string;
|
|
97
|
+
resolved: string | null;
|
|
98
|
+
reason: 'redirected' | 'excluded' | 'ambiguous' | 'unmatched' | 'no-rule' | 'no-importer' | 'inactive' | 'hook';
|
|
99
|
+
aliases: string[];
|
|
100
|
+
matchedPaths: string[];
|
|
101
|
+
}
|
|
102
|
+
|
|
83
103
|
/**
|
|
84
104
|
* 别名映射
|
|
85
105
|
*/
|
|
@@ -117,11 +137,17 @@ interface AliasMapping {
|
|
|
117
137
|
* does not fall back to the legacy name-only `allDependents` rule.
|
|
118
138
|
*/
|
|
119
139
|
importerPaths?: string[];
|
|
140
|
+
/** Alias-owned importer paths, used to remove failed aliases from peer scopes. */
|
|
141
|
+
peerImporterPaths?: Record<string, string[]>;
|
|
120
142
|
}
|
|
121
143
|
/**
|
|
122
144
|
* 依赖分析结果
|
|
123
145
|
*/
|
|
124
146
|
interface AnalysisResult {
|
|
147
|
+
/** Package manifests and workspace files consulted by dependency analysis. */
|
|
148
|
+
watchFiles?: string[];
|
|
149
|
+
/** Structured issues; optional for compatibility with older result producers. */
|
|
150
|
+
diagnostics?: ResolverDiagnostic[];
|
|
125
151
|
/**
|
|
126
152
|
* 所有分析过的依赖
|
|
127
153
|
*/
|
|
@@ -192,6 +218,10 @@ interface DepsConflictResolverOptions {
|
|
|
192
218
|
* @default false
|
|
193
219
|
*/
|
|
194
220
|
debug?: boolean;
|
|
221
|
+
/** Never query a registry or run installation; only verified installed aliases are usable. */
|
|
222
|
+
offline?: boolean;
|
|
223
|
+
/** Fail when required peers, aliases, or resolution contexts remain unresolved. */
|
|
224
|
+
strict?: boolean;
|
|
195
225
|
/**
|
|
196
226
|
* 自定义别名前缀
|
|
197
227
|
* @default 'aliased-'
|
|
@@ -217,7 +247,9 @@ interface DepsConflictResolverOptions {
|
|
|
217
247
|
* 解析后的配置(带默认值)
|
|
218
248
|
* 注意:packageManager 和 registry 在解析后会是具体的值,不会是 'auto'
|
|
219
249
|
*/
|
|
220
|
-
interface ResolvedOptions extends Required<DepsConflictResolverOptions
|
|
250
|
+
interface ResolvedOptions extends Required<Omit<DepsConflictResolverOptions, 'offline' | 'strict'>> {
|
|
251
|
+
offline?: boolean;
|
|
252
|
+
strict?: boolean;
|
|
221
253
|
/**
|
|
222
254
|
* 解析后的包管理器类型(已自动检测或用户指定)
|
|
223
255
|
*/
|
|
@@ -250,4 +282,4 @@ interface PluginConfig extends DepsConflictResolverOptions {
|
|
|
250
282
|
hooks?: PluginHooks;
|
|
251
283
|
}
|
|
252
284
|
|
|
253
|
-
export type {
|
|
285
|
+
export type { AliasPathMapping as A, DepsConflictResolverOptions as D, PluginConfig as P, ResolverDiagnostic as R, AnalysisResult as a, PluginHooks as b, ResolutionExplanation as c, ResolvedOptions as d, AliasMapping as e, PeerConflict as f };
|