knip 5.38.2 → 5.38.4

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/constants.js CHANGED
@@ -84,6 +84,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
84
84
  'pwd',
85
85
  'rm',
86
86
  'rmdir',
87
+ 'scp',
87
88
  'seq',
88
89
  'set',
89
90
  'sha1sum',
@@ -34,6 +34,9 @@ const resolveConfig = async (config, options) => {
34
34
  if ('tsConfig' in opts && typeof opts.tsConfig === 'string') {
35
35
  inputs.add(toConfig('typescript', opts.tsConfig, configFilePath));
36
36
  }
37
+ if ('server' in opts && opts.server && typeof opts.server === 'string') {
38
+ inputs.add(toProductionEntry(join(cwd, opts.server)));
39
+ }
37
40
  }
38
41
  }
39
42
  }
@@ -21,6 +21,20 @@ type Project = Project1 & {
21
21
  [k: string]: unknown;
22
22
  };
23
23
  };
24
+ } | {
25
+ builder?: '@angular/build:application';
26
+ defaultConfiguration?: string;
27
+ options?: ApplicationSchemaForBuildFacade;
28
+ configurations?: {
29
+ [k: string]: ApplicationSchemaForBuildFacade;
30
+ };
31
+ } | {
32
+ builder?: '@angular-devkit/build-angular:application';
33
+ defaultConfiguration?: string;
34
+ options?: ApplicationSchemaForBuildFacade;
35
+ configurations?: {
36
+ [k: string]: ApplicationSchemaForBuildFacade;
37
+ };
24
38
  } | {
25
39
  builder?: '@angular-devkit/build-angular:app-shell';
26
40
  defaultConfiguration?: string;
@@ -43,19 +57,33 @@ type Project = Project1 & {
43
57
  [k: string]: EsbuildBrowserSchemaForBuildFacade;
44
58
  };
45
59
  } | {
46
- builder?: '@angular-devkit/build-angular:dev-server';
60
+ builder?: '@angular/build:dev-server';
47
61
  defaultConfiguration?: string;
48
62
  options?: DevServerTarget;
49
63
  configurations?: {
50
64
  [k: string]: DevServerTarget;
51
65
  };
52
66
  } | {
53
- builder?: '@angular-devkit/build-angular:extract-i18n';
67
+ builder?: '@angular-devkit/build-angular:dev-server';
68
+ defaultConfiguration?: string;
69
+ options?: DevServerTarget1;
70
+ configurations?: {
71
+ [k: string]: DevServerTarget1;
72
+ };
73
+ } | {
74
+ builder?: '@angular/build:extract-i18n';
54
75
  defaultConfiguration?: string;
55
76
  options?: ExtractI18NTarget;
56
77
  configurations?: {
57
78
  [k: string]: ExtractI18NTarget;
58
79
  };
80
+ } | {
81
+ builder?: '@angular-devkit/build-angular:extract-i18n';
82
+ defaultConfiguration?: string;
83
+ options?: ExtractI18NTarget1;
84
+ configurations?: {
85
+ [k: string]: ExtractI18NTarget1;
86
+ };
59
87
  } | {
60
88
  builder?: '@angular-devkit/build-angular:karma';
61
89
  defaultConfiguration?: string;
@@ -71,11 +99,25 @@ type Project = Project1 & {
71
99
  [k: string]: JestBrowserSchemaForBuildFacade;
72
100
  };
73
101
  } | {
74
- builder?: '@angular-devkit/build-angular:protractor';
102
+ builder?: '@angular-devkit/build-angular:web-test-runner';
103
+ defaultConfiguration?: string;
104
+ options?: WebTestRunnerTarget;
105
+ configurations?: {
106
+ [k: string]: WebTestRunnerTarget;
107
+ };
108
+ } | {
109
+ builder?: '@angular-devkit/build-angular:prerender';
75
110
  defaultConfiguration?: string;
76
- options?: ProtractorTarget;
111
+ options?: PrerenderTarget;
77
112
  configurations?: {
78
- [k: string]: ProtractorTarget;
113
+ [k: string]: PrerenderTarget;
114
+ };
115
+ } | {
116
+ builder?: '@angular-devkit/build-angular:ssr-dev-server';
117
+ defaultConfiguration?: string;
118
+ options?: SSRDevServerTarget;
119
+ configurations?: {
120
+ [k: string]: SSRDevServerTarget;
79
121
  };
80
122
  } | {
81
123
  builder?: '@angular-devkit/build-angular:server';
@@ -105,6 +147,20 @@ type Project = Project1 & {
105
147
  [k: string]: unknown;
106
148
  };
107
149
  };
150
+ } | {
151
+ builder?: '@angular/build:application';
152
+ defaultConfiguration?: string;
153
+ options?: ApplicationSchemaForBuildFacade;
154
+ configurations?: {
155
+ [k: string]: ApplicationSchemaForBuildFacade;
156
+ };
157
+ } | {
158
+ builder?: '@angular-devkit/build-angular:application';
159
+ defaultConfiguration?: string;
160
+ options?: ApplicationSchemaForBuildFacade;
161
+ configurations?: {
162
+ [k: string]: ApplicationSchemaForBuildFacade;
163
+ };
108
164
  } | {
109
165
  builder?: '@angular-devkit/build-angular:app-shell';
110
166
  defaultConfiguration?: string;
@@ -127,19 +183,33 @@ type Project = Project1 & {
127
183
  [k: string]: EsbuildBrowserSchemaForBuildFacade;
128
184
  };
129
185
  } | {
130
- builder?: '@angular-devkit/build-angular:dev-server';
186
+ builder?: '@angular/build:dev-server';
131
187
  defaultConfiguration?: string;
132
188
  options?: DevServerTarget;
133
189
  configurations?: {
134
190
  [k: string]: DevServerTarget;
135
191
  };
136
192
  } | {
137
- builder?: '@angular-devkit/build-angular:extract-i18n';
193
+ builder?: '@angular-devkit/build-angular:dev-server';
194
+ defaultConfiguration?: string;
195
+ options?: DevServerTarget1;
196
+ configurations?: {
197
+ [k: string]: DevServerTarget1;
198
+ };
199
+ } | {
200
+ builder?: '@angular/build:extract-i18n';
138
201
  defaultConfiguration?: string;
139
202
  options?: ExtractI18NTarget;
140
203
  configurations?: {
141
204
  [k: string]: ExtractI18NTarget;
142
205
  };
206
+ } | {
207
+ builder?: '@angular-devkit/build-angular:extract-i18n';
208
+ defaultConfiguration?: string;
209
+ options?: ExtractI18NTarget1;
210
+ configurations?: {
211
+ [k: string]: ExtractI18NTarget1;
212
+ };
143
213
  } | {
144
214
  builder?: '@angular-devkit/build-angular:karma';
145
215
  defaultConfiguration?: string;
@@ -155,11 +225,25 @@ type Project = Project1 & {
155
225
  [k: string]: JestBrowserSchemaForBuildFacade;
156
226
  };
157
227
  } | {
158
- builder?: '@angular-devkit/build-angular:protractor';
228
+ builder?: '@angular-devkit/build-angular:web-test-runner';
229
+ defaultConfiguration?: string;
230
+ options?: WebTestRunnerTarget;
231
+ configurations?: {
232
+ [k: string]: WebTestRunnerTarget;
233
+ };
234
+ } | {
235
+ builder?: '@angular-devkit/build-angular:prerender';
159
236
  defaultConfiguration?: string;
160
- options?: ProtractorTarget;
237
+ options?: PrerenderTarget;
161
238
  configurations?: {
162
- [k: string]: ProtractorTarget;
239
+ [k: string]: PrerenderTarget;
240
+ };
241
+ } | {
242
+ builder?: '@angular-devkit/build-angular:ssr-dev-server';
243
+ defaultConfiguration?: string;
244
+ options?: SSRDevServerTarget;
245
+ configurations?: {
246
+ [k: string]: SSRDevServerTarget;
163
247
  };
164
248
  } | {
165
249
  builder?: '@angular-devkit/build-angular:server';
@@ -182,6 +266,9 @@ type Project = Project1 & {
182
266
  type Project1 = {
183
267
  [k: string]: unknown;
184
268
  };
269
+ type PrerenderTarget = {
270
+ [k: string]: unknown;
271
+ };
185
272
  export interface AngularCLIWorkspaceConfiguration {
186
273
  $schema?: string;
187
274
  version: FileVersion;
@@ -194,7 +281,7 @@ export interface AngularCLIWorkspaceConfiguration {
194
281
  }
195
282
  interface CliOptions {
196
283
  schematicCollections?: string[];
197
- packageManager?: 'npm' | 'cnpm' | 'yarn' | 'pnpm';
284
+ packageManager?: 'npm' | 'cnpm' | 'yarn' | 'pnpm' | 'bun';
198
285
  warnings?: {
199
286
  versionMismatch?: boolean;
200
287
  };
@@ -224,7 +311,7 @@ interface SchematicOptions {
224
311
  }
225
312
  interface AngularApplicationOptionsSchema {
226
313
  projectRoot?: string;
227
- name?: string;
314
+ name: string;
228
315
  inlineStyle?: boolean;
229
316
  inlineTemplate?: boolean;
230
317
  viewEncapsulation?: 'Emulated' | 'None' | 'ShadowDom';
@@ -237,18 +324,21 @@ interface AngularApplicationOptionsSchema {
237
324
  skipInstall?: boolean;
238
325
  strict?: boolean;
239
326
  standalone?: boolean;
327
+ ssr?: boolean;
328
+ serverRouting?: boolean;
329
+ experimentalZoneless?: boolean;
240
330
  }
241
331
  interface AngularClassOptionsSchema {
242
- name?: string;
332
+ name: string;
243
333
  path?: string;
244
- project?: string;
334
+ project: string;
245
335
  skipTests?: boolean;
246
336
  type?: string;
247
337
  }
248
338
  interface AngularComponentOptionsSchema {
249
339
  path?: string;
250
- project?: string;
251
- name?: string;
340
+ project: string;
341
+ name: string;
252
342
  displayBlock?: boolean;
253
343
  inlineStyle?: boolean;
254
344
  inlineTemplate?: boolean;
@@ -267,11 +357,12 @@ interface AngularComponentOptionsSchema {
267
357
  skipSelector?: boolean;
268
358
  module?: string;
269
359
  export?: boolean;
360
+ exportDefault?: boolean;
270
361
  }
271
362
  interface AngularDirectiveOptionsSchema {
272
- name?: string;
363
+ name: string;
273
364
  path?: string;
274
- project?: string;
365
+ project: string;
275
366
  prefix?: {
276
367
  [k: string]: unknown;
277
368
  } & string;
@@ -284,17 +375,17 @@ interface AngularDirectiveOptionsSchema {
284
375
  export?: boolean;
285
376
  }
286
377
  interface AngularEnumOptionsSchema {
287
- name?: string;
378
+ name: string;
288
379
  path?: string;
289
- project?: string;
380
+ project: string;
290
381
  type?: string;
291
382
  }
292
383
  interface AngularGuardOptionsSchema {
293
- name?: string;
384
+ name: string;
294
385
  skipTests?: boolean;
295
386
  flat?: boolean;
296
387
  path?: string;
297
- project?: string;
388
+ project: string;
298
389
  functional?: boolean;
299
390
  implements?: [
300
391
  'CanActivate' | 'CanActivateChild' | 'CanDeactivate' | 'CanMatch',
@@ -302,22 +393,22 @@ interface AngularGuardOptionsSchema {
302
393
  ];
303
394
  }
304
395
  interface AngularInterceptorOptionsSchema {
305
- name?: string;
396
+ name: string;
306
397
  path?: string;
307
- project?: string;
398
+ project: string;
308
399
  flat?: boolean;
309
400
  skipTests?: boolean;
310
401
  functional?: boolean;
311
402
  }
312
403
  interface AngularInterfaceOptionsSchema {
313
- name?: string;
404
+ name: string;
314
405
  path?: string;
315
- project?: string;
406
+ project: string;
316
407
  prefix?: string;
317
408
  type?: string;
318
409
  }
319
410
  interface LibraryOptionsSchema {
320
- name?: string;
411
+ name: string;
321
412
  entryFile?: string;
322
413
  prefix?: string;
323
414
  skipPackageJson?: boolean;
@@ -327,9 +418,9 @@ interface LibraryOptionsSchema {
327
418
  standalone?: boolean;
328
419
  }
329
420
  interface AngularPipeOptionsSchema {
330
- name?: string;
421
+ name: string;
331
422
  path?: string;
332
- project?: string;
423
+ project: string;
333
424
  flat?: boolean;
334
425
  skipTests?: boolean;
335
426
  skipImport?: boolean;
@@ -339,13 +430,12 @@ interface AngularPipeOptionsSchema {
339
430
  }
340
431
  interface AngularNgNewOptionsSchema {
341
432
  directory?: string;
342
- name?: string;
433
+ name: string;
343
434
  skipInstall?: boolean;
344
- linkCli?: boolean;
345
435
  skipGit?: boolean;
346
436
  commit?: boolean | {
347
- name?: string;
348
- email?: string;
437
+ name: string;
438
+ email: string;
349
439
  message?: string;
350
440
  [k: string]: unknown;
351
441
  };
@@ -353,7 +443,7 @@ interface AngularNgNewOptionsSchema {
353
443
  inlineStyle?: boolean;
354
444
  inlineTemplate?: boolean;
355
445
  viewEncapsulation?: 'Emulated' | 'None' | 'ShadowDom';
356
- version?: string;
446
+ version: string;
357
447
  routing?: boolean;
358
448
  prefix?: string;
359
449
  style?: 'css' | 'scss' | 'sass' | 'less';
@@ -361,28 +451,31 @@ interface AngularNgNewOptionsSchema {
361
451
  createApplication?: boolean;
362
452
  minimal?: boolean;
363
453
  strict?: boolean;
364
- packageManager?: 'npm' | 'yarn' | 'pnpm' | 'cnpm';
454
+ packageManager?: 'npm' | 'yarn' | 'pnpm' | 'cnpm' | 'bun';
365
455
  standalone?: boolean;
456
+ ssr?: boolean;
457
+ serverRouting?: boolean;
458
+ experimentalZoneless?: boolean;
366
459
  }
367
460
  interface AngularResolverOptionsSchema {
368
- name?: string;
461
+ name: string;
369
462
  skipTests?: boolean;
370
463
  flat?: boolean;
371
464
  functional?: boolean;
372
465
  path?: string;
373
- project?: string;
466
+ project: string;
374
467
  }
375
468
  interface AngularServiceOptionsSchema {
376
- name?: string;
469
+ name: string;
377
470
  path?: string;
378
- project?: string;
471
+ project: string;
379
472
  flat?: boolean;
380
473
  skipTests?: boolean;
381
474
  }
382
475
  interface AngularWebWorkerOptionsSchema {
383
476
  path?: string;
384
- project?: string;
385
- name?: string;
477
+ project: string;
478
+ name: string;
386
479
  snippet?: boolean;
387
480
  }
388
481
  interface I18N {
@@ -397,9 +490,131 @@ interface I18N {
397
490
  };
398
491
  };
399
492
  }
493
+ interface ApplicationSchemaForBuildFacade {
494
+ assets?: ({
495
+ followSymlinks?: boolean;
496
+ glob: string;
497
+ input: string;
498
+ ignore?: string[];
499
+ output?: string;
500
+ } | string)[];
501
+ browser: string;
502
+ server?: (string | false) & string;
503
+ polyfills?: string[];
504
+ tsConfig: string;
505
+ deployUrl?: string;
506
+ security?: {
507
+ autoCsp?: {
508
+ unsafeEval?: boolean;
509
+ } | boolean;
510
+ };
511
+ scripts?: ({
512
+ input: string;
513
+ bundleName?: string;
514
+ inject?: boolean;
515
+ } | string)[];
516
+ styles?: ({
517
+ input: string;
518
+ bundleName?: string;
519
+ inject?: boolean;
520
+ } | string)[];
521
+ inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
522
+ stylePreprocessorOptions?: {
523
+ includePaths?: string[];
524
+ sass?: {
525
+ fatalDeprecations?: string[];
526
+ silenceDeprecations?: string[];
527
+ futureDeprecations?: string[];
528
+ };
529
+ };
530
+ externalDependencies?: string[];
531
+ clearScreen?: boolean;
532
+ optimization?: {
533
+ scripts?: boolean;
534
+ styles?: {
535
+ minify?: boolean;
536
+ inlineCritical?: boolean;
537
+ removeSpecialComments?: boolean;
538
+ } | boolean;
539
+ fonts?: {
540
+ inline?: boolean;
541
+ } | boolean;
542
+ } | boolean;
543
+ loader?: {
544
+ [k: string]: 'text' | 'binary' | 'file' | 'empty';
545
+ };
546
+ define?: {
547
+ [k: string]: string;
548
+ };
549
+ fileReplacements?: FileReplacement[];
550
+ outputPath: {
551
+ base: string;
552
+ browser?: string;
553
+ server?: string;
554
+ media?: string;
555
+ } | string;
556
+ aot?: boolean;
557
+ sourceMap?: {
558
+ scripts?: boolean;
559
+ styles?: boolean;
560
+ hidden?: boolean;
561
+ vendor?: boolean;
562
+ } | boolean;
563
+ baseHref?: string;
564
+ verbose?: boolean;
565
+ progress?: boolean;
566
+ i18nMissingTranslation?: 'warning' | 'error' | 'ignore';
567
+ i18nDuplicateTranslation?: 'warning' | 'error' | 'ignore';
568
+ localize?: boolean | [string, ...string[]];
569
+ watch?: boolean;
570
+ outputHashing?: 'none' | 'all' | 'media' | 'bundles';
571
+ poll?: number;
572
+ deleteOutputPath?: boolean;
573
+ preserveSymlinks?: boolean;
574
+ extractLicenses?: boolean;
575
+ namedChunks?: boolean;
576
+ subresourceIntegrity?: boolean;
577
+ serviceWorker?: string | false;
578
+ index: string | {
579
+ input: string;
580
+ output?: string;
581
+ preloadInitial?: boolean;
582
+ [k: string]: unknown;
583
+ } | false;
584
+ statsJson?: boolean;
585
+ budgets?: Budget[];
586
+ webWorkerTsConfig?: string;
587
+ crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
588
+ allowedCommonJsDependencies?: string[];
589
+ prerender?: boolean | {
590
+ routesFile?: string;
591
+ discoverRoutes?: boolean;
592
+ };
593
+ ssr?: boolean | {
594
+ entry?: string;
595
+ experimentalPlatform?: 'node' | 'neutral';
596
+ };
597
+ appShell?: boolean;
598
+ outputMode?: 'static' | 'server';
599
+ }
600
+ interface FileReplacement {
601
+ replace: string;
602
+ with: string;
603
+ }
604
+ interface Budget {
605
+ type: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
606
+ name?: string;
607
+ baseline?: string;
608
+ maximumWarning?: string;
609
+ maximumError?: string;
610
+ minimumWarning?: string;
611
+ minimumError?: string;
612
+ warning?: string;
613
+ error?: string;
614
+ }
400
615
  interface AppShellTarget {
401
- browserTarget?: string;
402
- serverTarget?: string;
616
+ browserTarget: string;
617
+ serverTarget: string;
403
618
  appModuleBundle?: string;
404
619
  route?: string;
405
620
  inputIndexPath?: string;
@@ -408,21 +623,21 @@ interface AppShellTarget {
408
623
  interface WebpackBrowserSchemaForBuildFacade {
409
624
  assets?: ({
410
625
  followSymlinks?: boolean;
411
- glob?: string;
412
- input?: string;
626
+ glob: string;
627
+ input: string;
413
628
  ignore?: string[];
414
629
  output?: string;
415
630
  } | string)[];
416
- main?: string;
631
+ main: string;
417
632
  polyfills?: string[] | string;
418
- tsConfig?: string;
633
+ tsConfig: string;
419
634
  scripts?: ({
420
- input?: string;
635
+ input: string;
421
636
  bundleName?: string;
422
637
  inject?: boolean;
423
638
  } | string)[];
424
639
  styles?: ({
425
- input?: string;
640
+ input: string;
426
641
  bundleName?: string;
427
642
  inject?: boolean;
428
643
  } | string)[];
@@ -441,13 +656,13 @@ interface WebpackBrowserSchemaForBuildFacade {
441
656
  } | boolean;
442
657
  } | boolean;
443
658
  fileReplacements?: ({
444
- src?: string;
445
- replaceWith?: string;
659
+ src: string;
660
+ replaceWith: string;
446
661
  } | {
447
- replace?: string;
448
- with?: string;
662
+ replace: string;
663
+ with: string;
449
664
  })[];
450
- outputPath?: string;
665
+ outputPath: string;
451
666
  resourcesOutputPath?: string;
452
667
  aot?: boolean;
453
668
  sourceMap?: {
@@ -476,19 +691,19 @@ interface WebpackBrowserSchemaForBuildFacade {
476
691
  subresourceIntegrity?: boolean;
477
692
  serviceWorker?: boolean;
478
693
  ngswConfigPath?: string;
479
- index?: string | {
480
- input?: string;
694
+ index: string | {
695
+ input: string;
481
696
  output?: string;
482
697
  [k: string]: unknown;
483
698
  };
484
699
  statsJson?: boolean;
485
- budgets?: Budget[];
700
+ budgets?: Budget1[];
486
701
  webWorkerTsConfig?: string;
487
702
  crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
488
703
  allowedCommonJsDependencies?: string[];
489
704
  }
490
- interface Budget {
491
- type?: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
705
+ interface Budget1 {
706
+ type: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
492
707
  name?: string;
493
708
  baseline?: string;
494
709
  maximumWarning?: string;
@@ -501,21 +716,21 @@ interface Budget {
501
716
  interface EsbuildBrowserSchemaForBuildFacade {
502
717
  assets?: ({
503
718
  followSymlinks?: boolean;
504
- glob?: string;
505
- input?: string;
719
+ glob: string;
720
+ input: string;
506
721
  ignore?: string[];
507
722
  output?: string;
508
723
  } | string)[];
509
- main?: string;
724
+ main: string;
510
725
  polyfills?: string[] | string;
511
- tsConfig?: string;
726
+ tsConfig: string;
512
727
  scripts?: ({
513
- input?: string;
728
+ input: string;
514
729
  bundleName?: string;
515
730
  inject?: boolean;
516
731
  } | string)[];
517
732
  styles?: ({
518
- input?: string;
733
+ input: string;
519
734
  bundleName?: string;
520
735
  inject?: boolean;
521
736
  } | string)[];
@@ -534,8 +749,8 @@ interface EsbuildBrowserSchemaForBuildFacade {
534
749
  inline?: boolean;
535
750
  } | boolean;
536
751
  } | boolean;
537
- fileReplacements?: FileReplacement[];
538
- outputPath?: string;
752
+ fileReplacements?: FileReplacement1[];
753
+ outputPath: string;
539
754
  resourcesOutputPath?: string;
540
755
  aot?: boolean;
541
756
  sourceMap?: {
@@ -564,23 +779,23 @@ interface EsbuildBrowserSchemaForBuildFacade {
564
779
  subresourceIntegrity?: boolean;
565
780
  serviceWorker?: boolean;
566
781
  ngswConfigPath?: string;
567
- index?: string | {
568
- input?: string;
782
+ index: string | {
783
+ input: string;
569
784
  output?: string;
570
785
  [k: string]: unknown;
571
786
  } | false;
572
787
  statsJson?: boolean;
573
- budgets?: Budget1[];
788
+ budgets?: Budget2[];
574
789
  webWorkerTsConfig?: string;
575
790
  crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
576
791
  allowedCommonJsDependencies?: string[];
577
792
  }
578
- interface FileReplacement {
579
- replace?: string;
580
- with?: string;
793
+ interface FileReplacement1 {
794
+ replace: string;
795
+ with: string;
581
796
  }
582
- interface Budget1 {
583
- type?: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
797
+ interface Budget2 {
798
+ type: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
584
799
  name?: string;
585
800
  baseline?: string;
586
801
  maximumWarning?: string;
@@ -591,7 +806,30 @@ interface Budget1 {
591
806
  error?: string;
592
807
  }
593
808
  interface DevServerTarget {
594
- browserTarget?: string;
809
+ buildTarget: string;
810
+ port?: number;
811
+ host?: string;
812
+ proxyConfig?: string;
813
+ ssl?: boolean;
814
+ sslKey?: string;
815
+ sslCert?: string;
816
+ headers?: {
817
+ [k: string]: string;
818
+ };
819
+ open?: boolean;
820
+ verbose?: boolean;
821
+ liveReload?: boolean;
822
+ servePath?: string;
823
+ hmr?: boolean;
824
+ watch?: boolean;
825
+ poll?: number;
826
+ inspect?: string | boolean;
827
+ prebundle?: boolean | {
828
+ exclude: string[];
829
+ };
830
+ }
831
+ interface DevServerTarget1 {
832
+ buildTarget: string;
595
833
  port?: number;
596
834
  host?: string;
597
835
  proxyConfig?: string;
@@ -611,9 +849,21 @@ interface DevServerTarget {
611
849
  hmr?: boolean;
612
850
  watch?: boolean;
613
851
  poll?: number;
852
+ inspect?: string | boolean;
853
+ forceEsbuild?: boolean;
854
+ prebundle?: boolean | {
855
+ exclude: string[];
856
+ };
614
857
  }
615
858
  interface ExtractI18NTarget {
616
- browserTarget?: string;
859
+ buildTarget?: string;
860
+ format?: 'xmb' | 'xlf' | 'xlif' | 'xliff' | 'xlf2' | 'xliff2' | 'json' | 'arb' | 'legacy-migrate';
861
+ progress?: boolean;
862
+ outputPath?: string;
863
+ outFile?: string;
864
+ }
865
+ interface ExtractI18NTarget1 {
866
+ buildTarget?: string;
617
867
  format?: 'xmb' | 'xlf' | 'xlif' | 'xliff' | 'xlf2' | 'xliff2' | 'json' | 'arb' | 'legacy-migrate';
618
868
  progress?: boolean;
619
869
  outputPath?: string;
@@ -621,22 +871,22 @@ interface ExtractI18NTarget {
621
871
  }
622
872
  interface KarmaTarget {
623
873
  main?: string;
624
- tsConfig?: string;
874
+ tsConfig: string;
625
875
  karmaConfig?: string;
626
876
  polyfills?: string[] | string;
627
877
  assets?: ({
628
- glob?: string;
629
- input?: string;
878
+ glob: string;
879
+ input: string;
630
880
  output?: string;
631
881
  ignore?: string[];
632
882
  } | string)[];
633
883
  scripts?: ({
634
- input?: string;
884
+ input: string;
635
885
  bundleName?: string;
636
886
  inject?: boolean;
637
887
  } | string)[];
638
888
  styles?: ({
639
- input?: string;
889
+ input: string;
640
890
  bundleName?: string;
641
891
  inject?: boolean;
642
892
  } | string)[];
@@ -655,47 +905,99 @@ interface KarmaTarget {
655
905
  watch?: boolean;
656
906
  poll?: number;
657
907
  preserveSymlinks?: boolean;
658
- browsers?: string;
908
+ browsers?: string | false;
659
909
  codeCoverage?: boolean;
660
910
  codeCoverageExclude?: string[];
661
911
  fileReplacements?: ({
662
- src?: string;
663
- replaceWith?: string;
912
+ src: string;
913
+ replaceWith: string;
664
914
  } | {
665
- replace?: string;
666
- with?: string;
915
+ replace: string;
916
+ with: string;
667
917
  })[];
668
918
  reporters?: string[];
919
+ builderMode?: 'detect' | 'browser' | 'application';
669
920
  webWorkerTsConfig?: string;
670
921
  }
671
922
  interface JestBrowserSchemaForBuildFacade {
672
923
  include?: string[];
673
924
  exclude?: string[];
674
- tsConfig?: string;
925
+ tsConfig: string;
926
+ polyfills?: string[];
927
+ }
928
+ interface WebTestRunnerTarget {
929
+ main?: string;
930
+ tsConfig: string;
675
931
  polyfills?: string[] | string;
932
+ assets?: ({
933
+ glob: string;
934
+ input: string;
935
+ output?: string;
936
+ ignore?: string[];
937
+ } | string)[];
938
+ scripts?: ({
939
+ input: string;
940
+ bundleName?: string;
941
+ inject?: boolean;
942
+ } | string)[];
943
+ styles?: ({
944
+ input: string;
945
+ bundleName?: string;
946
+ inject?: boolean;
947
+ } | string)[];
948
+ inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
949
+ stylePreprocessorOptions?: {
950
+ includePaths?: string[];
951
+ };
952
+ include?: string[];
953
+ exclude?: string[];
954
+ sourceMap?: {
955
+ scripts?: boolean;
956
+ styles?: boolean;
957
+ vendor?: boolean;
958
+ } | boolean;
959
+ progress?: boolean;
960
+ watch?: boolean;
961
+ poll?: number;
962
+ preserveSymlinks?: boolean;
963
+ browsers?: string;
964
+ codeCoverage?: boolean;
965
+ codeCoverageExclude?: string[];
966
+ fileReplacements?: ({
967
+ src: string;
968
+ replaceWith: string;
969
+ } | {
970
+ replace: string;
971
+ with: string;
972
+ })[];
973
+ webWorkerTsConfig?: string;
676
974
  }
677
- interface ProtractorTarget {
678
- protractorConfig?: string;
679
- devServerTarget?: string;
680
- grep?: string;
681
- invertGrep?: boolean;
682
- specs?: string[];
683
- suite?: string;
684
- webdriverUpdate?: boolean;
685
- port?: number;
975
+ interface SSRDevServerTarget {
976
+ browserTarget: string;
977
+ serverTarget: string;
686
978
  host?: string;
687
- baseUrl?: string;
979
+ port?: number;
980
+ watch?: boolean;
981
+ publicHost?: string;
982
+ open?: boolean;
983
+ progress?: boolean;
984
+ inspect?: boolean;
985
+ ssl?: boolean;
986
+ sslKey?: string;
987
+ sslCert?: string;
988
+ proxyConfig?: string;
989
+ verbose?: boolean;
688
990
  }
689
991
  interface UniversalTarget {
690
992
  assets?: ({
691
993
  followSymlinks?: boolean;
692
- glob?: string;
693
- input?: string;
994
+ glob: string;
995
+ input: string;
694
996
  ignore?: string[];
695
997
  output?: string;
696
998
  } | string)[];
697
- main?: string;
698
- tsConfig?: string;
999
+ main: string;
1000
+ tsConfig: string;
699
1001
  inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
700
1002
  stylePreprocessorOptions?: {
701
1003
  includePaths?: string[];
@@ -705,13 +1007,13 @@ interface UniversalTarget {
705
1007
  styles?: boolean;
706
1008
  } | boolean;
707
1009
  fileReplacements?: ({
708
- src?: string;
709
- replaceWith?: string;
1010
+ src: string;
1011
+ replaceWith: string;
710
1012
  } | {
711
- replace?: string;
712
- with?: string;
1013
+ replace: string;
1014
+ with: string;
713
1015
  })[];
714
- outputPath?: string;
1016
+ outputPath: string;
715
1017
  resourcesOutputPath?: string;
716
1018
  sourceMap?: {
717
1019
  scripts?: boolean;
@@ -738,8 +1040,9 @@ interface UniversalTarget {
738
1040
  poll?: number;
739
1041
  }
740
1042
  interface NgPackagrTarget {
741
- project?: string;
1043
+ project: string;
742
1044
  tsConfig?: string;
743
1045
  watch?: boolean;
1046
+ poll?: number;
744
1047
  }
745
1048
  export {};
@@ -9,6 +9,7 @@ const TEST_FILE_PATTERNS = ['cypress/e2e/**/*.cy.{js,jsx,ts,tsx}'];
9
9
  const SUPPORT_FILE_PATTERNS = [
10
10
  'cypress/support/e2e.{js,jsx,ts,tsx}',
11
11
  'cypress/support/commands.{js,ts}',
12
+ 'cypress/support/component.{js,ts}',
12
13
  'cypress/plugins/index.js',
13
14
  ];
14
15
  const entry = [...TEST_FILE_PATTERNS, ...SUPPORT_FILE_PATTERNS];
@@ -19,7 +19,14 @@ export const getIsIdentifierReferencedHandler = (graph, entryPaths) => {
19
19
  isReferenced = true;
20
20
  if (!isTrace)
21
21
  return { isReferenced, reExportingEntryFile, traceNode };
22
- addNodes(traceNode, id, graph, file.imported.get(identifier));
22
+ if (file.importedAs.has(identifier)) {
23
+ for (const aliases of file.importedAs.values()) {
24
+ for (const alias of aliases.keys())
25
+ addNodes(traceNode, alias, graph, aliases.get(alias));
26
+ }
27
+ }
28
+ else
29
+ addNodes(traceNode, id, graph, file.imported.get(identifier));
23
30
  }
24
31
  for (const [exportId, aliases] of file.importedAs.entries()) {
25
32
  if (identifier === exportId) {
@@ -27,8 +34,9 @@ export const getIsIdentifierReferencedHandler = (graph, entryPaths) => {
27
34
  const aliasedRef = [alias, ...rest].join('.');
28
35
  if (file.refs.has(aliasedRef)) {
29
36
  isReferenced = true;
30
- if (!isTrace)
37
+ if (!isTrace) {
31
38
  return { isReferenced, reExportingEntryFile, traceNode };
39
+ }
32
40
  addNodes(traceNode, aliasedRef, graph, aliases.get(alias));
33
41
  }
34
42
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.38.2";
1
+ export declare const version = "5.38.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.38.2';
1
+ export const version = '5.38.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.38.2",
3
+ "version": "5.38.4",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {