knip 2.30.1 → 2.31.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/dist/ConfigurationChief.d.ts +2 -0
- package/dist/ConfigurationChief.js +57 -61
- package/dist/ConfigurationValidator.d.ts +321 -321
- package/dist/ConfigurationValidator.js +1 -1
- package/dist/WorkspaceWorker.js +11 -6
- package/dist/index.js +8 -2
- package/dist/types/config.d.ts +3 -2
- package/dist/util/compilers.d.ts +80 -80
- package/dist/util/plugin.d.ts +1 -1
- package/dist/util/plugin.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/WorkspaceWorker.js
CHANGED
|
@@ -6,6 +6,7 @@ import { _pureGlob, negate, hasProductionSuffix, hasNoProductionSuffix, prependD
|
|
|
6
6
|
import { getKeysByValue } from './util/object.js';
|
|
7
7
|
import { join, toPosix } from './util/path.js';
|
|
8
8
|
const negatedTestFilePatterns = TEST_FILE_PATTERNS.map(negate);
|
|
9
|
+
const nullConfig = { config: null, entry: null, project: null };
|
|
9
10
|
export class WorkspaceWorker {
|
|
10
11
|
name;
|
|
11
12
|
dir;
|
|
@@ -49,6 +50,10 @@ export class WorkspaceWorker {
|
|
|
49
50
|
for (const [pluginName, plugin] of pluginEntries) {
|
|
50
51
|
if (this.config[pluginName] === false)
|
|
51
52
|
continue;
|
|
53
|
+
if (this.config[pluginName]) {
|
|
54
|
+
this.enabled[pluginName] = true;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
52
57
|
const isEnabledInAncestor = this.enabledPluginsInAncestors.includes(pluginName);
|
|
53
58
|
if (isEnabledInAncestor ||
|
|
54
59
|
(await plugin.isEnabled({ cwd: this.dir, manifest, dependencies, config: this.config }))) {
|
|
@@ -74,7 +79,7 @@ export class WorkspaceWorker {
|
|
|
74
79
|
this.hasTypesIncluded = hasTypesIncluded;
|
|
75
80
|
}
|
|
76
81
|
getConfigForPlugin(pluginName) {
|
|
77
|
-
return this.config[pluginName] ??
|
|
82
|
+
return this.config[pluginName] ?? nullConfig;
|
|
78
83
|
}
|
|
79
84
|
getEntryFilePatterns() {
|
|
80
85
|
const { entry } = this.config;
|
|
@@ -103,7 +108,7 @@ export class WorkspaceWorker {
|
|
|
103
108
|
for (const [pluginName, plugin] of Object.entries(plugins)) {
|
|
104
109
|
const pluginConfig = this.getConfigForPlugin(pluginName);
|
|
105
110
|
if (this.enabled[pluginName] && pluginConfig) {
|
|
106
|
-
const { entry } = pluginConfig;
|
|
111
|
+
const { entry } = pluginConfig === true ? nullConfig : pluginConfig;
|
|
107
112
|
const defaultEntryFiles = 'ENTRY_FILE_PATTERNS' in plugin ? plugin.ENTRY_FILE_PATTERNS : [];
|
|
108
113
|
patterns.push(...(entry ?? defaultEntryFiles));
|
|
109
114
|
if (isIncludeProductionEntryFiles) {
|
|
@@ -119,7 +124,7 @@ export class WorkspaceWorker {
|
|
|
119
124
|
for (const [pluginName, plugin] of Object.entries(plugins)) {
|
|
120
125
|
const pluginConfig = this.getConfigForPlugin(pluginName);
|
|
121
126
|
if (this.enabled[pluginName] && pluginConfig) {
|
|
122
|
-
const { entry, project } = pluginConfig;
|
|
127
|
+
const { entry, project } = pluginConfig === true ? nullConfig : pluginConfig;
|
|
123
128
|
patterns.push(...(project ??
|
|
124
129
|
entry ??
|
|
125
130
|
('PROJECT_FILE_PATTERNS' in plugin
|
|
@@ -136,7 +141,7 @@ export class WorkspaceWorker {
|
|
|
136
141
|
for (const [pluginName, plugin] of Object.entries(plugins)) {
|
|
137
142
|
const pluginConfig = this.getConfigForPlugin(pluginName);
|
|
138
143
|
if (this.enabled[pluginName] && pluginConfig) {
|
|
139
|
-
const { config } = pluginConfig;
|
|
144
|
+
const { config } = pluginConfig === true ? nullConfig : pluginConfig;
|
|
140
145
|
const defaultConfigFiles = 'CONFIG_FILE_PATTERNS' in plugin ? plugin.CONFIG_FILE_PATTERNS : [];
|
|
141
146
|
patterns.push(...(config ?? defaultConfigFiles));
|
|
142
147
|
}
|
|
@@ -179,7 +184,7 @@ export class WorkspaceWorker {
|
|
|
179
184
|
const pluginConfig = this.getConfigForPlugin(pluginName);
|
|
180
185
|
if (this.enabled[pluginName] && pluginConfig) {
|
|
181
186
|
if ('PRODUCTION_ENTRY_FILE_PATTERNS' in plugin) {
|
|
182
|
-
patterns.push(...(pluginConfig.entry ?? plugin.PRODUCTION_ENTRY_FILE_PATTERNS));
|
|
187
|
+
patterns.push(...((pluginConfig === true ? null : pluginConfig.entry) ?? plugin.PRODUCTION_ENTRY_FILE_PATTERNS));
|
|
183
188
|
}
|
|
184
189
|
}
|
|
185
190
|
}
|
|
@@ -192,7 +197,7 @@ export class WorkspaceWorker {
|
|
|
192
197
|
const pluginConfig = this.getConfigForPlugin(pluginName);
|
|
193
198
|
if (pluginConfig) {
|
|
194
199
|
const defaultConfig = 'CONFIG_FILE_PATTERNS' in plugin ? plugin.CONFIG_FILE_PATTERNS : [];
|
|
195
|
-
return pluginConfig.config ?? defaultConfig;
|
|
200
|
+
return (pluginConfig === true ? null : pluginConfig.config) ?? defaultConfig;
|
|
196
201
|
}
|
|
197
202
|
return [];
|
|
198
203
|
}
|
package/dist/index.js
CHANGED
|
@@ -183,6 +183,7 @@ export const main = async (unresolvedConfiguration) => {
|
|
|
183
183
|
const exportedSymbols = new Map();
|
|
184
184
|
const importedSymbols = new Map();
|
|
185
185
|
for (const principal of principals) {
|
|
186
|
+
const specifierFilePaths = new Set();
|
|
186
187
|
const analyzeSourceFile = (filePath, _principal = principal) => {
|
|
187
188
|
const workspace = chief.findWorkspaceByFilePath(filePath);
|
|
188
189
|
if (workspace) {
|
|
@@ -200,8 +201,7 @@ export const main = async (unresolvedConfiguration) => {
|
|
|
200
201
|
if (workspace) {
|
|
201
202
|
const principal = factory.getPrincipalByPackageName(workspace.pkgName);
|
|
202
203
|
if (principal && !principal.isGitIgnored(specifierFilePath)) {
|
|
203
|
-
|
|
204
|
-
analyzedFiles.add(specifierFilePath);
|
|
204
|
+
specifierFilePaths.add(specifierFilePath);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
}
|
|
@@ -257,6 +257,12 @@ export const main = async (unresolvedConfiguration) => {
|
|
|
257
257
|
analyzedFiles.add(filePath);
|
|
258
258
|
});
|
|
259
259
|
} while (size !== principal.entryPaths.size);
|
|
260
|
+
specifierFilePaths.forEach(specifierFilePath => {
|
|
261
|
+
if (!analyzedFiles.has(specifierFilePath)) {
|
|
262
|
+
analyzedFiles.add(specifierFilePath);
|
|
263
|
+
analyzeSourceFile(specifierFilePath, principal);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
260
266
|
}
|
|
261
267
|
const isSymbolImported = (symbol, importingModule) => {
|
|
262
268
|
if (!importingModule)
|
package/dist/types/config.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type PluginConfiguration = {
|
|
|
11
11
|
config: NormalizedGlob | null;
|
|
12
12
|
entry: NormalizedGlob | null;
|
|
13
13
|
project: NormalizedGlob | null;
|
|
14
|
-
} |
|
|
14
|
+
} | boolean;
|
|
15
15
|
export type PluginsConfiguration = Record<PluginName, PluginConfiguration>;
|
|
16
16
|
interface BaseWorkspaceConfiguration {
|
|
17
17
|
entry: NormalizedGlob;
|
|
@@ -33,8 +33,9 @@ export interface Configuration {
|
|
|
33
33
|
ignoreDependencies: string[];
|
|
34
34
|
ignoreExportsUsedInFile: boolean | Partial<Record<IgnorableExport, boolean>>;
|
|
35
35
|
ignoreWorkspaces: string[];
|
|
36
|
-
workspaces: Record<string, WorkspaceConfiguration>;
|
|
37
36
|
syncCompilers: SyncCompilers;
|
|
38
37
|
asyncCompilers: AsyncCompilers;
|
|
38
|
+
defaultWorkspaceConfig: WorkspaceConfiguration;
|
|
39
|
+
rootPluginConfigs: Partial<PluginsConfiguration>;
|
|
39
40
|
}
|
|
40
41
|
export {};
|
package/dist/util/compilers.d.ts
CHANGED
|
@@ -22,403 +22,403 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
22
22
|
ignore?: string | string[] | undefined;
|
|
23
23
|
ignoreBinaries?: string[] | undefined;
|
|
24
24
|
ignoreDependencies?: string[] | undefined;
|
|
25
|
-
angular?: string |
|
|
25
|
+
angular?: string | boolean | string[] | {
|
|
26
26
|
config?: string | string[] | undefined;
|
|
27
27
|
entry?: string | string[] | undefined;
|
|
28
28
|
project?: string | string[] | undefined;
|
|
29
29
|
} | undefined;
|
|
30
|
-
ava?: string |
|
|
30
|
+
ava?: string | boolean | string[] | {
|
|
31
31
|
config?: string | string[] | undefined;
|
|
32
32
|
entry?: string | string[] | undefined;
|
|
33
33
|
project?: string | string[] | undefined;
|
|
34
34
|
} | undefined;
|
|
35
|
-
babel?: string |
|
|
35
|
+
babel?: string | boolean | string[] | {
|
|
36
36
|
config?: string | string[] | undefined;
|
|
37
37
|
entry?: string | string[] | undefined;
|
|
38
38
|
project?: string | string[] | undefined;
|
|
39
39
|
} | undefined;
|
|
40
|
-
capacitor?: string |
|
|
40
|
+
capacitor?: string | boolean | string[] | {
|
|
41
41
|
config?: string | string[] | undefined;
|
|
42
42
|
entry?: string | string[] | undefined;
|
|
43
43
|
project?: string | string[] | undefined;
|
|
44
44
|
} | undefined;
|
|
45
|
-
changesets?: string |
|
|
45
|
+
changesets?: string | boolean | string[] | {
|
|
46
46
|
config?: string | string[] | undefined;
|
|
47
47
|
entry?: string | string[] | undefined;
|
|
48
48
|
project?: string | string[] | undefined;
|
|
49
49
|
} | undefined;
|
|
50
|
-
commitizen?: string |
|
|
50
|
+
commitizen?: string | boolean | string[] | {
|
|
51
51
|
config?: string | string[] | undefined;
|
|
52
52
|
entry?: string | string[] | undefined;
|
|
53
53
|
project?: string | string[] | undefined;
|
|
54
54
|
} | undefined;
|
|
55
|
-
commitlint?: string |
|
|
55
|
+
commitlint?: string | boolean | string[] | {
|
|
56
56
|
config?: string | string[] | undefined;
|
|
57
57
|
entry?: string | string[] | undefined;
|
|
58
58
|
project?: string | string[] | undefined;
|
|
59
59
|
} | undefined;
|
|
60
|
-
cspell?: string |
|
|
60
|
+
cspell?: string | boolean | string[] | {
|
|
61
61
|
config?: string | string[] | undefined;
|
|
62
62
|
entry?: string | string[] | undefined;
|
|
63
63
|
project?: string | string[] | undefined;
|
|
64
64
|
} | undefined;
|
|
65
|
-
cypress?: string |
|
|
65
|
+
cypress?: string | boolean | string[] | {
|
|
66
66
|
config?: string | string[] | undefined;
|
|
67
67
|
entry?: string | string[] | undefined;
|
|
68
68
|
project?: string | string[] | undefined;
|
|
69
69
|
} | undefined;
|
|
70
|
-
eslint?: string |
|
|
70
|
+
eslint?: string | boolean | string[] | {
|
|
71
71
|
config?: string | string[] | undefined;
|
|
72
72
|
entry?: string | string[] | undefined;
|
|
73
73
|
project?: string | string[] | undefined;
|
|
74
74
|
} | undefined;
|
|
75
|
-
gatsby?: string |
|
|
75
|
+
gatsby?: string | boolean | string[] | {
|
|
76
76
|
config?: string | string[] | undefined;
|
|
77
77
|
entry?: string | string[] | undefined;
|
|
78
78
|
project?: string | string[] | undefined;
|
|
79
79
|
} | undefined;
|
|
80
|
-
'github-actions'?: string |
|
|
80
|
+
'github-actions'?: string | boolean | string[] | {
|
|
81
81
|
config?: string | string[] | undefined;
|
|
82
82
|
entry?: string | string[] | undefined;
|
|
83
83
|
project?: string | string[] | undefined;
|
|
84
84
|
} | undefined;
|
|
85
|
-
husky?: string |
|
|
85
|
+
husky?: string | boolean | string[] | {
|
|
86
86
|
config?: string | string[] | undefined;
|
|
87
87
|
entry?: string | string[] | undefined;
|
|
88
88
|
project?: string | string[] | undefined;
|
|
89
89
|
} | undefined;
|
|
90
|
-
jest?: string |
|
|
90
|
+
jest?: string | boolean | string[] | {
|
|
91
91
|
config?: string | string[] | undefined;
|
|
92
92
|
entry?: string | string[] | undefined;
|
|
93
93
|
project?: string | string[] | undefined;
|
|
94
94
|
} | undefined;
|
|
95
|
-
lefthook?: string |
|
|
95
|
+
lefthook?: string | boolean | string[] | {
|
|
96
96
|
config?: string | string[] | undefined;
|
|
97
97
|
entry?: string | string[] | undefined;
|
|
98
98
|
project?: string | string[] | undefined;
|
|
99
99
|
} | undefined;
|
|
100
|
-
'lint-staged'?: string |
|
|
100
|
+
'lint-staged'?: string | boolean | string[] | {
|
|
101
101
|
config?: string | string[] | undefined;
|
|
102
102
|
entry?: string | string[] | undefined;
|
|
103
103
|
project?: string | string[] | undefined;
|
|
104
104
|
} | undefined;
|
|
105
|
-
markdownlint?: string |
|
|
105
|
+
markdownlint?: string | boolean | string[] | {
|
|
106
106
|
config?: string | string[] | undefined;
|
|
107
107
|
entry?: string | string[] | undefined;
|
|
108
108
|
project?: string | string[] | undefined;
|
|
109
109
|
} | undefined;
|
|
110
|
-
mocha?: string |
|
|
110
|
+
mocha?: string | boolean | string[] | {
|
|
111
111
|
config?: string | string[] | undefined;
|
|
112
112
|
entry?: string | string[] | undefined;
|
|
113
113
|
project?: string | string[] | undefined;
|
|
114
114
|
} | undefined;
|
|
115
|
-
next?: string |
|
|
115
|
+
next?: string | boolean | string[] | {
|
|
116
116
|
config?: string | string[] | undefined;
|
|
117
117
|
entry?: string | string[] | undefined;
|
|
118
118
|
project?: string | string[] | undefined;
|
|
119
119
|
} | undefined;
|
|
120
|
-
'npm-package-json-lint'?: string |
|
|
120
|
+
'npm-package-json-lint'?: string | boolean | string[] | {
|
|
121
121
|
config?: string | string[] | undefined;
|
|
122
122
|
entry?: string | string[] | undefined;
|
|
123
123
|
project?: string | string[] | undefined;
|
|
124
124
|
} | undefined;
|
|
125
|
-
nx?: string |
|
|
125
|
+
nx?: string | boolean | string[] | {
|
|
126
126
|
config?: string | string[] | undefined;
|
|
127
127
|
entry?: string | string[] | undefined;
|
|
128
128
|
project?: string | string[] | undefined;
|
|
129
129
|
} | undefined;
|
|
130
|
-
nyc?: string |
|
|
130
|
+
nyc?: string | boolean | string[] | {
|
|
131
131
|
config?: string | string[] | undefined;
|
|
132
132
|
entry?: string | string[] | undefined;
|
|
133
133
|
project?: string | string[] | undefined;
|
|
134
134
|
} | undefined;
|
|
135
|
-
playwright?: string |
|
|
135
|
+
playwright?: string | boolean | string[] | {
|
|
136
136
|
config?: string | string[] | undefined;
|
|
137
137
|
entry?: string | string[] | undefined;
|
|
138
138
|
project?: string | string[] | undefined;
|
|
139
139
|
} | undefined;
|
|
140
|
-
postcss?: string |
|
|
140
|
+
postcss?: string | boolean | string[] | {
|
|
141
141
|
config?: string | string[] | undefined;
|
|
142
142
|
entry?: string | string[] | undefined;
|
|
143
143
|
project?: string | string[] | undefined;
|
|
144
144
|
} | undefined;
|
|
145
|
-
prettier?: string |
|
|
145
|
+
prettier?: string | boolean | string[] | {
|
|
146
146
|
config?: string | string[] | undefined;
|
|
147
147
|
entry?: string | string[] | undefined;
|
|
148
148
|
project?: string | string[] | undefined;
|
|
149
149
|
} | undefined;
|
|
150
|
-
'release-it'?: string |
|
|
150
|
+
'release-it'?: string | boolean | string[] | {
|
|
151
151
|
config?: string | string[] | undefined;
|
|
152
152
|
entry?: string | string[] | undefined;
|
|
153
153
|
project?: string | string[] | undefined;
|
|
154
154
|
} | undefined;
|
|
155
|
-
remark?: string |
|
|
155
|
+
remark?: string | boolean | string[] | {
|
|
156
156
|
config?: string | string[] | undefined;
|
|
157
157
|
entry?: string | string[] | undefined;
|
|
158
158
|
project?: string | string[] | undefined;
|
|
159
159
|
} | undefined;
|
|
160
|
-
remix?: string |
|
|
160
|
+
remix?: string | boolean | string[] | {
|
|
161
161
|
config?: string | string[] | undefined;
|
|
162
162
|
entry?: string | string[] | undefined;
|
|
163
163
|
project?: string | string[] | undefined;
|
|
164
164
|
} | undefined;
|
|
165
|
-
rollup?: string |
|
|
165
|
+
rollup?: string | boolean | string[] | {
|
|
166
166
|
config?: string | string[] | undefined;
|
|
167
167
|
entry?: string | string[] | undefined;
|
|
168
168
|
project?: string | string[] | undefined;
|
|
169
169
|
} | undefined;
|
|
170
|
-
'semantic-release'?: string |
|
|
170
|
+
'semantic-release'?: string | boolean | string[] | {
|
|
171
171
|
config?: string | string[] | undefined;
|
|
172
172
|
entry?: string | string[] | undefined;
|
|
173
173
|
project?: string | string[] | undefined;
|
|
174
174
|
} | undefined;
|
|
175
|
-
sentry?: string |
|
|
175
|
+
sentry?: string | boolean | string[] | {
|
|
176
176
|
config?: string | string[] | undefined;
|
|
177
177
|
entry?: string | string[] | undefined;
|
|
178
178
|
project?: string | string[] | undefined;
|
|
179
179
|
} | undefined;
|
|
180
|
-
storybook?: string |
|
|
180
|
+
storybook?: string | boolean | string[] | {
|
|
181
181
|
config?: string | string[] | undefined;
|
|
182
182
|
entry?: string | string[] | undefined;
|
|
183
183
|
project?: string | string[] | undefined;
|
|
184
184
|
} | undefined;
|
|
185
|
-
stryker?: string |
|
|
185
|
+
stryker?: string | boolean | string[] | {
|
|
186
186
|
config?: string | string[] | undefined;
|
|
187
187
|
entry?: string | string[] | undefined;
|
|
188
188
|
project?: string | string[] | undefined;
|
|
189
189
|
} | undefined;
|
|
190
|
-
stylelint?: string |
|
|
190
|
+
stylelint?: string | boolean | string[] | {
|
|
191
191
|
config?: string | string[] | undefined;
|
|
192
192
|
entry?: string | string[] | undefined;
|
|
193
193
|
project?: string | string[] | undefined;
|
|
194
194
|
} | undefined;
|
|
195
|
-
tailwind?: string |
|
|
195
|
+
tailwind?: string | boolean | string[] | {
|
|
196
196
|
config?: string | string[] | undefined;
|
|
197
197
|
entry?: string | string[] | undefined;
|
|
198
198
|
project?: string | string[] | undefined;
|
|
199
199
|
} | undefined;
|
|
200
|
-
typedoc?: string |
|
|
200
|
+
typedoc?: string | boolean | string[] | {
|
|
201
201
|
config?: string | string[] | undefined;
|
|
202
202
|
entry?: string | string[] | undefined;
|
|
203
203
|
project?: string | string[] | undefined;
|
|
204
204
|
} | undefined;
|
|
205
|
-
typescript?: string |
|
|
205
|
+
typescript?: string | boolean | string[] | {
|
|
206
206
|
config?: string | string[] | undefined;
|
|
207
207
|
entry?: string | string[] | undefined;
|
|
208
208
|
project?: string | string[] | undefined;
|
|
209
209
|
} | undefined;
|
|
210
|
-
vite?: string |
|
|
210
|
+
vite?: string | boolean | string[] | {
|
|
211
211
|
config?: string | string[] | undefined;
|
|
212
212
|
entry?: string | string[] | undefined;
|
|
213
213
|
project?: string | string[] | undefined;
|
|
214
214
|
} | undefined;
|
|
215
|
-
vitest?: string |
|
|
215
|
+
vitest?: string | boolean | string[] | {
|
|
216
216
|
config?: string | string[] | undefined;
|
|
217
217
|
entry?: string | string[] | undefined;
|
|
218
218
|
project?: string | string[] | undefined;
|
|
219
219
|
} | undefined;
|
|
220
|
-
webpack?: string |
|
|
220
|
+
webpack?: string | boolean | string[] | {
|
|
221
221
|
config?: string | string[] | undefined;
|
|
222
222
|
entry?: string | string[] | undefined;
|
|
223
223
|
project?: string | string[] | undefined;
|
|
224
224
|
} | undefined;
|
|
225
225
|
}> | undefined;
|
|
226
|
-
angular?: string |
|
|
226
|
+
angular?: string | boolean | string[] | {
|
|
227
227
|
config?: string | string[] | undefined;
|
|
228
228
|
entry?: string | string[] | undefined;
|
|
229
229
|
project?: string | string[] | undefined;
|
|
230
230
|
} | undefined;
|
|
231
|
-
ava?: string |
|
|
231
|
+
ava?: string | boolean | string[] | {
|
|
232
232
|
config?: string | string[] | undefined;
|
|
233
233
|
entry?: string | string[] | undefined;
|
|
234
234
|
project?: string | string[] | undefined;
|
|
235
235
|
} | undefined;
|
|
236
|
-
babel?: string |
|
|
236
|
+
babel?: string | boolean | string[] | {
|
|
237
237
|
config?: string | string[] | undefined;
|
|
238
238
|
entry?: string | string[] | undefined;
|
|
239
239
|
project?: string | string[] | undefined;
|
|
240
240
|
} | undefined;
|
|
241
|
-
capacitor?: string |
|
|
241
|
+
capacitor?: string | boolean | string[] | {
|
|
242
242
|
config?: string | string[] | undefined;
|
|
243
243
|
entry?: string | string[] | undefined;
|
|
244
244
|
project?: string | string[] | undefined;
|
|
245
245
|
} | undefined;
|
|
246
|
-
changesets?: string |
|
|
246
|
+
changesets?: string | boolean | string[] | {
|
|
247
247
|
config?: string | string[] | undefined;
|
|
248
248
|
entry?: string | string[] | undefined;
|
|
249
249
|
project?: string | string[] | undefined;
|
|
250
250
|
} | undefined;
|
|
251
|
-
commitizen?: string |
|
|
251
|
+
commitizen?: string | boolean | string[] | {
|
|
252
252
|
config?: string | string[] | undefined;
|
|
253
253
|
entry?: string | string[] | undefined;
|
|
254
254
|
project?: string | string[] | undefined;
|
|
255
255
|
} | undefined;
|
|
256
|
-
commitlint?: string |
|
|
256
|
+
commitlint?: string | boolean | string[] | {
|
|
257
257
|
config?: string | string[] | undefined;
|
|
258
258
|
entry?: string | string[] | undefined;
|
|
259
259
|
project?: string | string[] | undefined;
|
|
260
260
|
} | undefined;
|
|
261
|
-
cspell?: string |
|
|
261
|
+
cspell?: string | boolean | string[] | {
|
|
262
262
|
config?: string | string[] | undefined;
|
|
263
263
|
entry?: string | string[] | undefined;
|
|
264
264
|
project?: string | string[] | undefined;
|
|
265
265
|
} | undefined;
|
|
266
|
-
cypress?: string |
|
|
266
|
+
cypress?: string | boolean | string[] | {
|
|
267
267
|
config?: string | string[] | undefined;
|
|
268
268
|
entry?: string | string[] | undefined;
|
|
269
269
|
project?: string | string[] | undefined;
|
|
270
270
|
} | undefined;
|
|
271
|
-
eslint?: string |
|
|
271
|
+
eslint?: string | boolean | string[] | {
|
|
272
272
|
config?: string | string[] | undefined;
|
|
273
273
|
entry?: string | string[] | undefined;
|
|
274
274
|
project?: string | string[] | undefined;
|
|
275
275
|
} | undefined;
|
|
276
|
-
gatsby?: string |
|
|
276
|
+
gatsby?: string | boolean | string[] | {
|
|
277
277
|
config?: string | string[] | undefined;
|
|
278
278
|
entry?: string | string[] | undefined;
|
|
279
279
|
project?: string | string[] | undefined;
|
|
280
280
|
} | undefined;
|
|
281
|
-
'github-actions'?: string |
|
|
281
|
+
'github-actions'?: string | boolean | string[] | {
|
|
282
282
|
config?: string | string[] | undefined;
|
|
283
283
|
entry?: string | string[] | undefined;
|
|
284
284
|
project?: string | string[] | undefined;
|
|
285
285
|
} | undefined;
|
|
286
|
-
husky?: string |
|
|
286
|
+
husky?: string | boolean | string[] | {
|
|
287
287
|
config?: string | string[] | undefined;
|
|
288
288
|
entry?: string | string[] | undefined;
|
|
289
289
|
project?: string | string[] | undefined;
|
|
290
290
|
} | undefined;
|
|
291
|
-
jest?: string |
|
|
291
|
+
jest?: string | boolean | string[] | {
|
|
292
292
|
config?: string | string[] | undefined;
|
|
293
293
|
entry?: string | string[] | undefined;
|
|
294
294
|
project?: string | string[] | undefined;
|
|
295
295
|
} | undefined;
|
|
296
|
-
lefthook?: string |
|
|
296
|
+
lefthook?: string | boolean | string[] | {
|
|
297
297
|
config?: string | string[] | undefined;
|
|
298
298
|
entry?: string | string[] | undefined;
|
|
299
299
|
project?: string | string[] | undefined;
|
|
300
300
|
} | undefined;
|
|
301
|
-
'lint-staged'?: string |
|
|
301
|
+
'lint-staged'?: string | boolean | string[] | {
|
|
302
302
|
config?: string | string[] | undefined;
|
|
303
303
|
entry?: string | string[] | undefined;
|
|
304
304
|
project?: string | string[] | undefined;
|
|
305
305
|
} | undefined;
|
|
306
|
-
markdownlint?: string |
|
|
306
|
+
markdownlint?: string | boolean | string[] | {
|
|
307
307
|
config?: string | string[] | undefined;
|
|
308
308
|
entry?: string | string[] | undefined;
|
|
309
309
|
project?: string | string[] | undefined;
|
|
310
310
|
} | undefined;
|
|
311
|
-
mocha?: string |
|
|
311
|
+
mocha?: string | boolean | string[] | {
|
|
312
312
|
config?: string | string[] | undefined;
|
|
313
313
|
entry?: string | string[] | undefined;
|
|
314
314
|
project?: string | string[] | undefined;
|
|
315
315
|
} | undefined;
|
|
316
|
-
next?: string |
|
|
316
|
+
next?: string | boolean | string[] | {
|
|
317
317
|
config?: string | string[] | undefined;
|
|
318
318
|
entry?: string | string[] | undefined;
|
|
319
319
|
project?: string | string[] | undefined;
|
|
320
320
|
} | undefined;
|
|
321
|
-
'npm-package-json-lint'?: string |
|
|
321
|
+
'npm-package-json-lint'?: string | boolean | string[] | {
|
|
322
322
|
config?: string | string[] | undefined;
|
|
323
323
|
entry?: string | string[] | undefined;
|
|
324
324
|
project?: string | string[] | undefined;
|
|
325
325
|
} | undefined;
|
|
326
|
-
nx?: string |
|
|
326
|
+
nx?: string | boolean | string[] | {
|
|
327
327
|
config?: string | string[] | undefined;
|
|
328
328
|
entry?: string | string[] | undefined;
|
|
329
329
|
project?: string | string[] | undefined;
|
|
330
330
|
} | undefined;
|
|
331
|
-
nyc?: string |
|
|
331
|
+
nyc?: string | boolean | string[] | {
|
|
332
332
|
config?: string | string[] | undefined;
|
|
333
333
|
entry?: string | string[] | undefined;
|
|
334
334
|
project?: string | string[] | undefined;
|
|
335
335
|
} | undefined;
|
|
336
|
-
playwright?: string |
|
|
336
|
+
playwright?: string | boolean | string[] | {
|
|
337
337
|
config?: string | string[] | undefined;
|
|
338
338
|
entry?: string | string[] | undefined;
|
|
339
339
|
project?: string | string[] | undefined;
|
|
340
340
|
} | undefined;
|
|
341
|
-
postcss?: string |
|
|
341
|
+
postcss?: string | boolean | string[] | {
|
|
342
342
|
config?: string | string[] | undefined;
|
|
343
343
|
entry?: string | string[] | undefined;
|
|
344
344
|
project?: string | string[] | undefined;
|
|
345
345
|
} | undefined;
|
|
346
|
-
prettier?: string |
|
|
346
|
+
prettier?: string | boolean | string[] | {
|
|
347
347
|
config?: string | string[] | undefined;
|
|
348
348
|
entry?: string | string[] | undefined;
|
|
349
349
|
project?: string | string[] | undefined;
|
|
350
350
|
} | undefined;
|
|
351
|
-
'release-it'?: string |
|
|
351
|
+
'release-it'?: string | boolean | string[] | {
|
|
352
352
|
config?: string | string[] | undefined;
|
|
353
353
|
entry?: string | string[] | undefined;
|
|
354
354
|
project?: string | string[] | undefined;
|
|
355
355
|
} | undefined;
|
|
356
|
-
remark?: string |
|
|
356
|
+
remark?: string | boolean | string[] | {
|
|
357
357
|
config?: string | string[] | undefined;
|
|
358
358
|
entry?: string | string[] | undefined;
|
|
359
359
|
project?: string | string[] | undefined;
|
|
360
360
|
} | undefined;
|
|
361
|
-
remix?: string |
|
|
361
|
+
remix?: string | boolean | string[] | {
|
|
362
362
|
config?: string | string[] | undefined;
|
|
363
363
|
entry?: string | string[] | undefined;
|
|
364
364
|
project?: string | string[] | undefined;
|
|
365
365
|
} | undefined;
|
|
366
|
-
rollup?: string |
|
|
366
|
+
rollup?: string | boolean | string[] | {
|
|
367
367
|
config?: string | string[] | undefined;
|
|
368
368
|
entry?: string | string[] | undefined;
|
|
369
369
|
project?: string | string[] | undefined;
|
|
370
370
|
} | undefined;
|
|
371
|
-
'semantic-release'?: string |
|
|
371
|
+
'semantic-release'?: string | boolean | string[] | {
|
|
372
372
|
config?: string | string[] | undefined;
|
|
373
373
|
entry?: string | string[] | undefined;
|
|
374
374
|
project?: string | string[] | undefined;
|
|
375
375
|
} | undefined;
|
|
376
|
-
sentry?: string |
|
|
376
|
+
sentry?: string | boolean | string[] | {
|
|
377
377
|
config?: string | string[] | undefined;
|
|
378
378
|
entry?: string | string[] | undefined;
|
|
379
379
|
project?: string | string[] | undefined;
|
|
380
380
|
} | undefined;
|
|
381
|
-
storybook?: string |
|
|
381
|
+
storybook?: string | boolean | string[] | {
|
|
382
382
|
config?: string | string[] | undefined;
|
|
383
383
|
entry?: string | string[] | undefined;
|
|
384
384
|
project?: string | string[] | undefined;
|
|
385
385
|
} | undefined;
|
|
386
|
-
stryker?: string |
|
|
386
|
+
stryker?: string | boolean | string[] | {
|
|
387
387
|
config?: string | string[] | undefined;
|
|
388
388
|
entry?: string | string[] | undefined;
|
|
389
389
|
project?: string | string[] | undefined;
|
|
390
390
|
} | undefined;
|
|
391
|
-
stylelint?: string |
|
|
391
|
+
stylelint?: string | boolean | string[] | {
|
|
392
392
|
config?: string | string[] | undefined;
|
|
393
393
|
entry?: string | string[] | undefined;
|
|
394
394
|
project?: string | string[] | undefined;
|
|
395
395
|
} | undefined;
|
|
396
|
-
tailwind?: string |
|
|
396
|
+
tailwind?: string | boolean | string[] | {
|
|
397
397
|
config?: string | string[] | undefined;
|
|
398
398
|
entry?: string | string[] | undefined;
|
|
399
399
|
project?: string | string[] | undefined;
|
|
400
400
|
} | undefined;
|
|
401
|
-
typedoc?: string |
|
|
401
|
+
typedoc?: string | boolean | string[] | {
|
|
402
402
|
config?: string | string[] | undefined;
|
|
403
403
|
entry?: string | string[] | undefined;
|
|
404
404
|
project?: string | string[] | undefined;
|
|
405
405
|
} | undefined;
|
|
406
|
-
typescript?: string |
|
|
406
|
+
typescript?: string | boolean | string[] | {
|
|
407
407
|
config?: string | string[] | undefined;
|
|
408
408
|
entry?: string | string[] | undefined;
|
|
409
409
|
project?: string | string[] | undefined;
|
|
410
410
|
} | undefined;
|
|
411
|
-
vite?: string |
|
|
411
|
+
vite?: string | boolean | string[] | {
|
|
412
412
|
config?: string | string[] | undefined;
|
|
413
413
|
entry?: string | string[] | undefined;
|
|
414
414
|
project?: string | string[] | undefined;
|
|
415
415
|
} | undefined;
|
|
416
|
-
vitest?: string |
|
|
416
|
+
vitest?: string | boolean | string[] | {
|
|
417
417
|
config?: string | string[] | undefined;
|
|
418
418
|
entry?: string | string[] | undefined;
|
|
419
419
|
project?: string | string[] | undefined;
|
|
420
420
|
} | undefined;
|
|
421
|
-
webpack?: string |
|
|
421
|
+
webpack?: string | boolean | string[] | {
|
|
422
422
|
config?: string | string[] | undefined;
|
|
423
423
|
entry?: string | string[] | undefined;
|
|
424
424
|
project?: string | string[] | undefined;
|
package/dist/util/plugin.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { _load as load } from './loader.js';
|
|
|
2
2
|
import type { RawPluginConfiguration } from 'src/types/config.js';
|
|
3
3
|
export declare const toCamelCase: (name: string) => string;
|
|
4
4
|
export declare const hasDependency: (dependencies: Set<string>, values: (string | RegExp)[]) => boolean;
|
|
5
|
-
export declare const normalizePluginConfig: (pluginConfig: RawPluginConfiguration) =>
|
|
5
|
+
export declare const normalizePluginConfig: (pluginConfig: RawPluginConfiguration) => boolean | {
|
|
6
6
|
config: string[] | null;
|
|
7
7
|
entry: string[] | null;
|
|
8
8
|
project: string[] | null;
|
package/dist/util/plugin.js
CHANGED
|
@@ -14,8 +14,8 @@ export const hasDependency = (dependencies, values) => values.some(value => {
|
|
|
14
14
|
return false;
|
|
15
15
|
});
|
|
16
16
|
export const normalizePluginConfig = (pluginConfig) => {
|
|
17
|
-
if (pluginConfig ===
|
|
18
|
-
return
|
|
17
|
+
if (typeof pluginConfig === 'boolean') {
|
|
18
|
+
return pluginConfig;
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
21
|
const isObject = typeof pluginConfig !== 'string' && !Array.isArray(pluginConfig);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.31.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.31.0';
|
package/package.json
CHANGED