knip 5.86.0 → 5.88.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.
Files changed (66) hide show
  1. package/dist/ConfigurationChief.d.ts +18 -0
  2. package/dist/DependencyDeputy.js +11 -1
  3. package/dist/binaries/bash-parser.js +3 -3
  4. package/dist/binaries/resolvers/find.js +19 -0
  5. package/dist/binaries/{package-manager → resolvers}/index.d.ts +1 -0
  6. package/dist/binaries/{package-manager → resolvers}/index.js +2 -0
  7. package/dist/binaries/{package-manager → resolvers}/pnpm.js +1 -0
  8. package/dist/binaries/resolvers/yarn.d.ts +2 -0
  9. package/dist/compilers/index.d.ts +30 -0
  10. package/dist/graph/analyze.js +2 -0
  11. package/dist/graph/build.js +3 -1
  12. package/dist/plugins/babel/index.js +3 -0
  13. package/dist/plugins/changesets/index.js +8 -1
  14. package/dist/plugins/changesets/types.d.ts +1 -0
  15. package/dist/plugins/docusaurus/index.js +15 -0
  16. package/dist/plugins/docusaurus/types.d.ts +16 -0
  17. package/dist/plugins/index.d.ts +3 -0
  18. package/dist/plugins/index.js +6 -0
  19. package/dist/plugins/nuxt/index.js +6 -3
  20. package/dist/plugins/nx/index.js +10 -8
  21. package/dist/plugins/nx/types.d.ts +1 -0
  22. package/dist/plugins/openapi-ts/index.js +0 -9
  23. package/dist/plugins/oxfmt/index.d.ts +3 -0
  24. package/dist/plugins/oxfmt/index.js +16 -0
  25. package/dist/plugins/oxlint/index.js +1 -1
  26. package/dist/plugins/raycast/index.d.ts +3 -0
  27. package/dist/plugins/raycast/index.js +25 -0
  28. package/dist/plugins/raycast/types.d.ts +10 -0
  29. package/dist/plugins/sanity/index.d.ts +3 -0
  30. package/dist/plugins/sanity/index.js +12 -0
  31. package/dist/schema/configuration.d.ts +45 -0
  32. package/dist/schema/plugins.d.ts +15 -0
  33. package/dist/schema/plugins.js +3 -0
  34. package/dist/types/PluginNames.d.ts +2 -2
  35. package/dist/types/PluginNames.js +3 -0
  36. package/dist/typescript/resolve-module-names.js +2 -2
  37. package/dist/util/Performance.d.ts +3 -5
  38. package/dist/util/Performance.js +35 -18
  39. package/dist/util/create-input-handler.js +2 -2
  40. package/dist/util/create-options.d.ts +30 -0
  41. package/dist/util/glob-core.js +34 -9
  42. package/dist/util/modules.d.ts +1 -1
  43. package/dist/util/modules.js +16 -6
  44. package/dist/util/path.js +1 -1
  45. package/dist/util/resolve.d.ts +2 -3
  46. package/dist/util/resolve.js +4 -3
  47. package/dist/util/watch.js +4 -2
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.js +1 -1
  50. package/package.json +1 -1
  51. package/schema.json +8 -0
  52. package/dist/plugins/openapi-ts/types.d.ts +0 -8
  53. /package/dist/binaries/{package-manager → resolvers}/bun.d.ts +0 -0
  54. /package/dist/binaries/{package-manager → resolvers}/bun.js +0 -0
  55. /package/dist/binaries/{package-manager → resolvers}/bunx.d.ts +0 -0
  56. /package/dist/binaries/{package-manager → resolvers}/bunx.js +0 -0
  57. /package/dist/binaries/{package-manager/npm.d.ts → resolvers/find.d.ts} +0 -0
  58. /package/dist/binaries/{package-manager/npx.d.ts → resolvers/npm.d.ts} +0 -0
  59. /package/dist/binaries/{package-manager → resolvers}/npm.js +0 -0
  60. /package/dist/binaries/{package-manager/pnpm.d.ts → resolvers/npx.d.ts} +0 -0
  61. /package/dist/binaries/{package-manager → resolvers}/npx.js +0 -0
  62. /package/dist/binaries/{package-manager/yarn.d.ts → resolvers/pnpm.d.ts} +0 -0
  63. /package/dist/binaries/{package-manager → resolvers}/pnpx.d.ts +0 -0
  64. /package/dist/binaries/{package-manager → resolvers}/pnpx.js +0 -0
  65. /package/dist/binaries/{package-manager → resolvers}/yarn.js +0 -0
  66. /package/dist/plugins/{openapi-ts → raycast}/types.js +0 -0
@@ -0,0 +1,12 @@
1
+ import { hasDependency } from "../../util/plugin.js";
2
+ const title = 'Sanity';
3
+ const enablers = ['sanity'];
4
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
+ const entry = ['sanity.config.{js,jsx,ts,tsx}', 'sanity.cli.{ts,js}', 'sanity.blueprint.{ts,js,json}'];
6
+ const plugin = {
7
+ title,
8
+ enablers,
9
+ isEnabled,
10
+ entry,
11
+ };
12
+ export default plugin;
@@ -357,6 +357,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
357
357
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
358
358
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
359
359
  }, z.core.$strip>]>>;
360
+ oxfmt: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
361
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
362
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
363
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
364
+ }, z.core.$strip>]>>;
360
365
  oxlint: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
361
366
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
362
367
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -427,6 +432,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
427
432
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
428
433
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
429
434
  }, z.core.$strip>]>>;
435
+ raycast: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
436
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
437
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
438
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
439
+ }, z.core.$strip>]>>;
430
440
  'react-cosmos': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
431
441
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
432
442
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -487,6 +497,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
487
497
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
488
498
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
489
499
  }, z.core.$strip>]>>;
500
+ sanity: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
501
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
502
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
503
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
504
+ }, z.core.$strip>]>>;
490
505
  'semantic-release': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
491
506
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
492
507
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1059,6 +1074,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1059
1074
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1060
1075
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1061
1076
  }, z.core.$strip>]>>;
1077
+ oxfmt: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1078
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1079
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1080
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1081
+ }, z.core.$strip>]>>;
1062
1082
  oxlint: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1063
1083
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1064
1084
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1129,6 +1149,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1129
1149
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1130
1150
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1131
1151
  }, z.core.$strip>]>>;
1152
+ raycast: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1153
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1154
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1155
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1156
+ }, z.core.$strip>]>>;
1132
1157
  'react-cosmos': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1133
1158
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1134
1159
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1189,6 +1214,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1189
1214
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1190
1215
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1191
1216
  }, z.core.$strip>]>>;
1217
+ sanity: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1218
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1219
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1220
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1221
+ }, z.core.$strip>]>>;
1192
1222
  'semantic-release': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1193
1223
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1194
1224
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1750,6 +1780,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1750
1780
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1751
1781
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1752
1782
  }, z.core.$strip>]>>;
1783
+ oxfmt: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1784
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1785
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1786
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1787
+ }, z.core.$strip>]>>;
1753
1788
  oxlint: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1754
1789
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1755
1790
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1820,6 +1855,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1820
1855
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1821
1856
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1822
1857
  }, z.core.$strip>]>>;
1858
+ raycast: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1859
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1860
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1861
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1862
+ }, z.core.$strip>]>>;
1823
1863
  'react-cosmos': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1824
1864
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1825
1865
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -1880,6 +1920,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
1880
1920
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1881
1921
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1882
1922
  }, z.core.$strip>]>>;
1923
+ sanity: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1924
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1925
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1926
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1927
+ }, z.core.$strip>]>>;
1883
1928
  'semantic-release': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
1884
1929
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
1885
1930
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -361,6 +361,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
361
361
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
362
362
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
363
363
  }, z.core.$strip>]>;
364
+ oxfmt: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
365
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
366
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
367
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
368
+ }, z.core.$strip>]>;
364
369
  oxlint: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
365
370
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
366
371
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -431,6 +436,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
431
436
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
432
437
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
433
438
  }, z.core.$strip>]>;
439
+ raycast: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
440
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
441
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
442
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
443
+ }, z.core.$strip>]>;
434
444
  'react-cosmos': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
435
445
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
436
446
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -491,6 +501,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
491
501
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
492
502
  project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
493
503
  }, z.core.$strip>]>;
504
+ sanity: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
505
+ config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
506
+ entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
507
+ project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
508
+ }, z.core.$strip>]>;
494
509
  'semantic-release': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
495
510
  config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
496
511
  entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
@@ -81,6 +81,7 @@ export const pluginsSchema = z.object({
81
81
  nyc: pluginSchema,
82
82
  oclif: pluginSchema,
83
83
  'openapi-ts': pluginSchema,
84
+ oxfmt: pluginSchema,
84
85
  oxlint: pluginSchema,
85
86
  parcel: pluginSchema,
86
87
  payload: pluginSchema,
@@ -95,6 +96,7 @@ export const pluginsSchema = z.object({
95
96
  prettier: pluginSchema,
96
97
  prisma: pluginSchema,
97
98
  qwik: pluginSchema,
99
+ raycast: pluginSchema,
98
100
  'react-cosmos': pluginSchema,
99
101
  'react-native': pluginSchema,
100
102
  'react-router': pluginSchema,
@@ -107,6 +109,7 @@ export const pluginsSchema = z.object({
107
109
  rslib: pluginSchema,
108
110
  rspack: pluginSchema,
109
111
  rstest: pluginSchema,
112
+ sanity: pluginSchema,
110
113
  'semantic-release': pluginSchema,
111
114
  sentry: pluginSchema,
112
115
  'simple-git-hooks': pluginSchema,
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxlint' | 'parcel' | 'payload' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'react-cosmos' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie' | 'zx';
2
- export declare const pluginNames: readonly ["angular", "astro", "astro-db", "astro-og-canvas", "ava", "babel", "biome", "bumpp", "bun", "c8", "capacitor", "changelogen", "changelogithub", "changesets", "commitizen", "commitlint", "convex", "create-typescript-app", "cspell", "cucumber", "cypress", "danger", "dependency-cruiser", "docusaurus", "dotenv", "drizzle", "eleventy", "eslint", "execa", "expo", "expressive-code", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "hardhat", "husky", "i18next-parser", "jest", "karma", "knex", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mdx", "mdxlint", "metro", "mocha", "moonrepo", "msw", "nano-staged", "nest", "netlify", "next", "next-intl", "next-mdx", "nitro", "node", "node-modules-inspector", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "openapi-ts", "oxlint", "parcel", "payload", "playwright", "playwright-ct", "playwright-test", "plop", "pm2", "pnpm", "postcss", "preconstruct", "prettier", "prisma", "qwik", "react-cosmos", "react-native", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rslib", "rspack", "rstest", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "sveltekit", "svgo", "svgr", "swc", "syncpack", "tailwind", "tanstack-router", "taskfile", "travis", "ts-node", "tsdown", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitepress", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie", "zx"];
1
+ export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'parcel' | 'payload' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie' | 'zx';
2
+ export declare const pluginNames: readonly ["angular", "astro", "astro-db", "astro-og-canvas", "ava", "babel", "biome", "bumpp", "bun", "c8", "capacitor", "changelogen", "changelogithub", "changesets", "commitizen", "commitlint", "convex", "create-typescript-app", "cspell", "cucumber", "cypress", "danger", "dependency-cruiser", "docusaurus", "dotenv", "drizzle", "eleventy", "eslint", "execa", "expo", "expressive-code", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "hardhat", "husky", "i18next-parser", "jest", "karma", "knex", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mdx", "mdxlint", "metro", "mocha", "moonrepo", "msw", "nano-staged", "nest", "netlify", "next", "next-intl", "next-mdx", "nitro", "node", "node-modules-inspector", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "openapi-ts", "oxfmt", "oxlint", "parcel", "payload", "playwright", "playwright-ct", "playwright-test", "plop", "pm2", "pnpm", "postcss", "preconstruct", "prettier", "prisma", "qwik", "raycast", "react-cosmos", "react-native", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rslib", "rspack", "rstest", "sanity", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "sveltekit", "svgo", "svgr", "swc", "syncpack", "tailwind", "tanstack-router", "taskfile", "travis", "ts-node", "tsdown", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitepress", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie", "zx"];
@@ -70,6 +70,7 @@ export const pluginNames = [
70
70
  'nyc',
71
71
  'oclif',
72
72
  'openapi-ts',
73
+ 'oxfmt',
73
74
  'oxlint',
74
75
  'parcel',
75
76
  'payload',
@@ -84,6 +85,7 @@ export const pluginNames = [
84
85
  'prettier',
85
86
  'prisma',
86
87
  'qwik',
88
+ 'raycast',
87
89
  'react-cosmos',
88
90
  'react-native',
89
91
  'react-router',
@@ -96,6 +98,7 @@ export const pluginNames = [
96
98
  'rslib',
97
99
  'rspack',
98
100
  'rstest',
101
+ 'sanity',
99
102
  'semantic-release',
100
103
  'sentry',
101
104
  'simple-git-hooks',
@@ -5,7 +5,7 @@ import { DEFAULT_EXTENSIONS } from "../constants.js";
5
5
  import { sanitizeSpecifier } from "../util/modules.js";
6
6
  import { timerify } from "../util/Performance.js";
7
7
  import { dirname, extname, isAbsolute, isInNodeModules, join } from "../util/path.js";
8
- import { _createSyncModuleResolver, _resolveModuleSync } from "../util/resolve.js";
8
+ import { createSyncModuleResolver, resolveModuleSync } from "../util/resolve.js";
9
9
  import { isDeclarationFileExtension } from "./ast-helpers.js";
10
10
  const resolutionCache = new Map();
11
11
  const moduleIfFileExists = (name, containingFile) => {
@@ -23,7 +23,7 @@ const tsResolveModuleName = timerify(ts.resolveModuleName);
23
23
  export function createCustomModuleResolver(compilerOptions, customCompilerExtensions, toSourceFilePath, useCache = true) {
24
24
  const customCompilerExtensionsSet = new Set(customCompilerExtensions);
25
25
  const extensions = [...DEFAULT_EXTENSIONS, ...customCompilerExtensions];
26
- const resolveSync = customCompilerExtensionsSet.size === 0 ? _resolveModuleSync : _createSyncModuleResolver(extensions);
26
+ const resolveSync = customCompilerExtensionsSet.size === 0 ? resolveModuleSync : createSyncModuleResolver(extensions);
27
27
  const virtualDeclarationFiles = new Map();
28
28
  const tsSys = {
29
29
  ...ts.sys,
@@ -1,10 +1,10 @@
1
1
  import { type PerformanceEntry, PerformanceObserver } from 'node:perf_hooks';
2
- import { memoryUsage } from 'node:process';
3
2
  export declare const timerify: <T extends (...params: any[]) => any>(fn: T, name?: string) => T;
4
3
  type MemInfo = {
4
+ label: string;
5
5
  heapUsed: number;
6
6
  heapTotal: number;
7
- freemem: number;
7
+ rss: number;
8
8
  };
9
9
  interface MemoryEntry extends PerformanceEntry {
10
10
  detail: MemInfo;
@@ -21,8 +21,6 @@ declare class Performance {
21
21
  memId?: string;
22
22
  fnObserver?: PerformanceObserver;
23
23
  memObserver?: PerformanceObserver;
24
- memoryUsageStart?: ReturnType<typeof memoryUsage>;
25
- freeMemoryStart?: number;
26
24
  constructor({ isTimerifyFunctions, isMemoryUsageEnabled }: {
27
25
  isTimerifyFunctions?: boolean | undefined;
28
26
  isMemoryUsageEnabled?: boolean | undefined;
@@ -32,7 +30,7 @@ declare class Performance {
32
30
  private flush;
33
31
  private getPerfEntriesByName;
34
32
  getTimerifiedFunctionsTable(): string;
35
- addMemoryMark(index: number): void;
33
+ addMemoryMark(label: string): void;
36
34
  getMemoryUsageTable(): string;
37
35
  getCurrentDurationInMs(): number;
38
36
  getMemHeapUsage(): number;
@@ -1,4 +1,3 @@
1
- import os from 'node:os';
2
1
  import { PerformanceObserver, performance } from 'node:perf_hooks';
3
2
  import { memoryUsage } from 'node:process';
4
3
  import { parseArgs } from 'node:util';
@@ -24,12 +23,15 @@ export const timerify = (fn, name = fn.name) => {
24
23
  return fn;
25
24
  return performance.timerify(Object.defineProperty(fn, 'name', { get: () => name }));
26
25
  };
27
- const getMemInfo = () => Object.assign({ freemem: os.freemem() }, memoryUsage());
26
+ const getMemInfo = (label) => {
27
+ const usage = memoryUsage();
28
+ return { label, heapUsed: usage.heapUsed, heapTotal: usage.heapTotal, rss: usage.rss };
29
+ };
28
30
  const twoFixed = (value) => (typeof value === 'number' ? value.toFixed(2) : value);
29
31
  const inMB = (bytes) => bytes / 1024 / 1024;
30
- const keys = ['heapUsed', 'heapTotal', 'freemem'];
31
- const logHead = () => console.log(keys.map(key => key.padStart(10)).join(' '));
32
- const log = (memInfo) => console.log(keys.map(key => twoFixed(inMB(memInfo[key])).padStart(10)).join(' '));
32
+ const keys = ['heapUsed', 'heapTotal', 'rss'];
33
+ const logHead = () => console.log(['phase', ...keys].map(key => key.padStart(10)).join(' '));
34
+ const log = (memInfo) => console.log([memInfo.label.padStart(10), ...keys.map(key => twoFixed(inMB(memInfo[key])).padStart(10))].join(' '));
33
35
  class Performance {
34
36
  isEnabled;
35
37
  isTimerifyFunctions;
@@ -42,8 +44,6 @@ class Performance {
42
44
  memId;
43
45
  fnObserver;
44
46
  memObserver;
45
- memoryUsageStart;
46
- freeMemoryStart;
47
47
  constructor({ isTimerifyFunctions = false, isMemoryUsageEnabled = false }) {
48
48
  this.isEnabled = isTimerifyFunctions || isMemoryUsageEnabled;
49
49
  this.isTimerifyFunctions = isTimerifyFunctions;
@@ -69,7 +69,7 @@ class Performance {
69
69
  this.memObserver.observe({ type: 'mark' });
70
70
  if (isMemoryRealtime)
71
71
  logHead();
72
- this.addMemoryMark(0);
72
+ this.addMemoryMark('start');
73
73
  }
74
74
  }
75
75
  setMark(name) {
@@ -98,6 +98,7 @@ class Performance {
98
98
  }
99
99
  getTimerifiedFunctionsTable() {
100
100
  const entriesByName = this.getPerfEntriesByName();
101
+ const totalDuration = this.getCurrentDurationInMs();
101
102
  const table = new Table({ header: true });
102
103
  for (const [name, values] of Object.entries(entriesByName)) {
103
104
  const stats = getStats(values);
@@ -108,38 +109,53 @@ class Performance {
108
109
  table.cell('max', stats.max, twoFixed);
109
110
  table.cell('median', stats.median, twoFixed);
110
111
  table.cell('sum', stats.sum, twoFixed);
112
+ table.cell('%', (stats.sum / totalDuration) * 100, v => (typeof v === 'number' ? `${v.toFixed(0)}%` : ''));
111
113
  }
112
114
  table.sort('sum|desc');
113
115
  return table.toString();
114
116
  }
115
- addMemoryMark(index) {
117
+ addMemoryMark(label) {
116
118
  if (!this.isMemoryUsageEnabled)
117
119
  return;
118
- const id = `${this.memId}:${index}`;
119
- const detail = getMemInfo();
120
+ const id = `${this.memId}:${label}`;
121
+ const detail = getMemInfo(label);
120
122
  performance.mark(id, { detail });
121
- if (isMemoryRealtime && detail)
123
+ if (isMemoryRealtime)
122
124
  log(detail);
123
125
  }
124
126
  getMemoryUsageTable() {
125
127
  const table = new Table({ header: true });
126
- let i = 0;
128
+ let prevHeapUsed = 0;
129
+ let peakHeapUsed = 0;
130
+ let peakRss = 0;
127
131
  for (const entry of this.memEntries) {
128
132
  if (!entry.detail)
129
133
  continue;
134
+ const { label, heapUsed, rss } = entry.detail;
135
+ const delta = heapUsed - prevHeapUsed;
136
+ if (heapUsed > peakHeapUsed)
137
+ peakHeapUsed = heapUsed;
138
+ if (rss > peakRss)
139
+ peakRss = rss;
130
140
  table.row();
131
- table.cell('#', String(i++));
132
- table.cell('heapUsed', inMB(entry.detail.heapUsed), twoFixed);
133
- table.cell('heapTotal', inMB(entry.detail.heapTotal), twoFixed);
134
- table.cell('freemem', inMB(entry.detail.freemem), twoFixed);
141
+ table.cell('Phase', label);
142
+ table.cell('heapUsed', inMB(heapUsed), twoFixed);
143
+ table.cell('rss', inMB(rss), twoFixed);
144
+ table.cell('Δheap', prevHeapUsed === 0 ? '' : `${delta > 0 ? '+' : ''}${twoFixed(inMB(delta))}`, String);
145
+ prevHeapUsed = heapUsed;
135
146
  }
147
+ table.row();
148
+ table.cell('Phase', 'peak');
149
+ table.cell('heapUsed', inMB(peakHeapUsed), twoFixed);
150
+ table.cell('rss', inMB(peakRss), twoFixed);
151
+ table.cell('Δheap', '');
136
152
  return table.toString();
137
153
  }
138
154
  getCurrentDurationInMs() {
139
155
  return performance.now() - this.startTime;
140
156
  }
141
157
  getMemHeapUsage() {
142
- return (memoryUsage().heapUsed ?? 0) - (this.memoryUsageStart?.heapUsed ?? 0);
158
+ return memoryUsage().heapUsed;
143
159
  }
144
160
  getCurrentMemUsageInMb() {
145
161
  return twoFixed(inMB(this.getMemHeapUsage()));
@@ -147,6 +163,7 @@ class Performance {
147
163
  async finalize() {
148
164
  if (!this.isEnabled)
149
165
  return;
166
+ this.addMemoryMark('end');
150
167
  await this.flush();
151
168
  }
152
169
  reset() {
@@ -3,7 +3,7 @@ import { debugLog } from "./debug.js";
3
3
  import { fromBinary, isBinary, isConfig, isDeferResolve, isDeferResolveEntry, isDependency, toDebugString, } from "./input.js";
4
4
  import { getPackageNameFromSpecifier } from "./modules.js";
5
5
  import { dirname, isAbsolute, isInNodeModules, isInternal, join } from "./path.js";
6
- import { _resolveModuleSync, _resolveSync } from "./resolve.js";
6
+ import { resolveModuleSync, _resolveSync } from "./resolve.js";
7
7
  const isJoinable = (specifier) => {
8
8
  const char = specifier.charCodeAt(0);
9
9
  return char !== 35 && char !== 126 && char !== 64 && !isAbsolute(specifier);
@@ -84,7 +84,7 @@ export const createInputHandler = (deputy, chief, isGitIgnored, addIssue, extern
84
84
  }
85
85
  const filePath = isJoinable(specifier) ? join(input.dir ?? dirname(containingFilePath), specifier) : specifier;
86
86
  const basePath = input.dir ? join(input.dir, 'file.ts') : containingFilePath;
87
- const resolvedFilePath = _resolveModuleSync(filePath, basePath);
87
+ const resolvedFilePath = resolveModuleSync(filePath, basePath);
88
88
  if (resolvedFilePath && isInternal(resolvedFilePath)) {
89
89
  return isGitIgnored(resolvedFilePath) ? undefined : resolvedFilePath;
90
90
  }
@@ -400,6 +400,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
400
400
  entry?: string | string[] | undefined;
401
401
  project?: string | string[] | undefined;
402
402
  } | undefined;
403
+ oxfmt?: string | boolean | string[] | {
404
+ config?: string | string[] | undefined;
405
+ entry?: string | string[] | undefined;
406
+ project?: string | string[] | undefined;
407
+ } | undefined;
403
408
  oxlint?: string | boolean | string[] | {
404
409
  config?: string | string[] | undefined;
405
410
  entry?: string | string[] | undefined;
@@ -470,6 +475,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
470
475
  entry?: string | string[] | undefined;
471
476
  project?: string | string[] | undefined;
472
477
  } | undefined;
478
+ raycast?: string | boolean | string[] | {
479
+ config?: string | string[] | undefined;
480
+ entry?: string | string[] | undefined;
481
+ project?: string | string[] | undefined;
482
+ } | undefined;
473
483
  'react-cosmos'?: string | boolean | string[] | {
474
484
  config?: string | string[] | undefined;
475
485
  entry?: string | string[] | undefined;
@@ -530,6 +540,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
530
540
  entry?: string | string[] | undefined;
531
541
  project?: string | string[] | undefined;
532
542
  } | undefined;
543
+ sanity?: string | boolean | string[] | {
544
+ config?: string | string[] | undefined;
545
+ entry?: string | string[] | undefined;
546
+ project?: string | string[] | undefined;
547
+ } | undefined;
533
548
  'semantic-release'?: string | boolean | string[] | {
534
549
  config?: string | string[] | undefined;
535
550
  entry?: string | string[] | undefined;
@@ -1091,6 +1106,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1091
1106
  entry?: string | string[] | undefined;
1092
1107
  project?: string | string[] | undefined;
1093
1108
  } | undefined;
1109
+ oxfmt?: string | boolean | string[] | {
1110
+ config?: string | string[] | undefined;
1111
+ entry?: string | string[] | undefined;
1112
+ project?: string | string[] | undefined;
1113
+ } | undefined;
1094
1114
  oxlint?: string | boolean | string[] | {
1095
1115
  config?: string | string[] | undefined;
1096
1116
  entry?: string | string[] | undefined;
@@ -1161,6 +1181,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1161
1181
  entry?: string | string[] | undefined;
1162
1182
  project?: string | string[] | undefined;
1163
1183
  } | undefined;
1184
+ raycast?: string | boolean | string[] | {
1185
+ config?: string | string[] | undefined;
1186
+ entry?: string | string[] | undefined;
1187
+ project?: string | string[] | undefined;
1188
+ } | undefined;
1164
1189
  'react-cosmos'?: string | boolean | string[] | {
1165
1190
  config?: string | string[] | undefined;
1166
1191
  entry?: string | string[] | undefined;
@@ -1221,6 +1246,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
1221
1246
  entry?: string | string[] | undefined;
1222
1247
  project?: string | string[] | undefined;
1223
1248
  } | undefined;
1249
+ sanity?: string | boolean | string[] | {
1250
+ config?: string | string[] | undefined;
1251
+ entry?: string | string[] | undefined;
1252
+ project?: string | string[] | undefined;
1253
+ } | undefined;
1224
1254
  'semantic-release'?: string | boolean | string[] | {
1225
1255
  config?: string | string[] | undefined;
1226
1256
  entry?: string | string[] | undefined;
@@ -11,7 +11,6 @@ import { timerify } from "./Performance.js";
11
11
  import { parseAndConvertGitignorePatterns } from "./parse-and-convert-gitignores.js";
12
12
  import { dirname, join, relative, toPosix } from "./path.js";
13
13
  const walk = promisify(_walk);
14
- const _picomatch = timerify(picomatch);
15
14
  const cachedGitIgnores = new Map();
16
15
  const cachedGlobIgnores = new Map();
17
16
  const isGitRoot = (dir) => isDirectory(dir, '.git') || isFile(dir, '.git');
@@ -51,9 +50,18 @@ export const findAndParseGitignores = async (cwd, workspaceDirs) => {
51
50
  const gitignoreFiles = [];
52
51
  const pmOptions = { ignore: unignores };
53
52
  let deepFilterMatcher;
53
+ let prevUnignoreLength = unignores.length;
54
+ const pendingIgnores = [];
54
55
  const getMatcher = () => {
55
- if (!deepFilterMatcher)
56
- deepFilterMatcher = _picomatch(Array.from(ignores), pmOptions);
56
+ if (!deepFilterMatcher) {
57
+ deepFilterMatcher = picomatch(Array.from(ignores), pmOptions);
58
+ pendingIgnores.length = 0;
59
+ }
60
+ else if (pendingIgnores.length > 0) {
61
+ const prev = deepFilterMatcher;
62
+ const incr = picomatch(pendingIgnores.splice(0), pmOptions);
63
+ deepFilterMatcher = (path) => prev(path) || incr(path);
64
+ }
57
65
  return deepFilterMatcher;
58
66
  };
59
67
  const addFile = (filePath, baseDir) => {
@@ -63,6 +71,7 @@ export const findAndParseGitignores = async (cwd, workspaceDirs) => {
63
71
  const ancestor = base.startsWith('..') ? `${relative(dir, cwd)}/` : undefined;
64
72
  const ignoresForDir = new Set(base === '' ? GLOBAL_IGNORE_PATTERNS : []);
65
73
  const unignoresForDir = new Set();
74
+ const prevIgnoreSize = ignores.size;
66
75
  const patterns = readFileSync(filePath, 'utf8');
67
76
  for (const rule of parseAndConvertGitignorePatterns(patterns, ancestor)) {
68
77
  const [pattern, extraPattern] = rule.patterns;
@@ -112,7 +121,15 @@ export const findAndParseGitignores = async (cwd, workspaceDirs) => {
112
121
  else {
113
122
  cachedGitIgnores.set(cacheDir, { ignores: ignoresForDir, unignores: unignoresForDir });
114
123
  }
115
- deepFilterMatcher = undefined;
124
+ if (unignores.length !== prevUnignoreLength) {
125
+ deepFilterMatcher = undefined;
126
+ prevUnignoreLength = unignores.length;
127
+ }
128
+ else if (ignores.size !== prevIgnoreSize) {
129
+ for (const p of ignoresForDir)
130
+ if (!GLOBAL_IGNORE_PATTERNS.includes(p))
131
+ pendingIgnores.push(p);
132
+ }
116
133
  };
117
134
  for (const filePath of findAncestorGitignoreFiles(cwd))
118
135
  addFile(filePath);
@@ -159,8 +176,8 @@ export const findAndParseGitignores = async (cwd, workspaceDirs) => {
159
176
  const deepFilter = (entry) => (!isRelevantDir || isRelevantDir(toPosix(entry.path))) && !getMatcher()(relative(cwd, entry.path));
160
177
  await walk(cwd, {
161
178
  concurrency: 16,
162
- entryFilter: timerify(entryFilter),
163
- deepFilter: timerify(deepFilter),
179
+ entryFilter,
180
+ deepFilter,
164
181
  });
165
182
  debugLogObject('*', 'Parsed gitignore files', { gitignoreFiles });
166
183
  return { gitignoreFiles, ignores, unignores };
@@ -207,7 +224,15 @@ export async function getGitIgnoredHandler(options, workspaceDirs) {
207
224
  if (options.gitignore === false)
208
225
  return () => false;
209
226
  const { ignores, unignores } = await _parseFindGitignores(options.cwd, workspaceDirs);
210
- const matcher = _picomatch(Array.from(ignores), { ignore: unignores });
211
- const isGitIgnored = (filePath) => matcher(relative(options.cwd, filePath));
212
- return timerify(isGitIgnored);
227
+ const matcher = picomatch(Array.from(ignores), { ignore: unignores });
228
+ const cache = new Map();
229
+ const isGitIgnored = (filePath) => {
230
+ let result = cache.get(filePath);
231
+ if (result === undefined) {
232
+ result = matcher(relative(options.cwd, filePath));
233
+ cache.set(filePath, result);
234
+ }
235
+ return result;
236
+ };
237
+ return isGitIgnored;
213
238
  }
@@ -1,4 +1,4 @@
1
- export declare const getPackageNameFromModuleSpecifier: (moduleSpecifier: string) => string | undefined;
1
+ export declare const getPackageNameFromModuleSpecifier: (specifier: string) => string | undefined;
2
2
  export declare const getPackageNameFromFilePath: (value: string) => string;
3
3
  export declare const getPackageNameFromSpecifier: (specifier: string) => string | undefined;
4
4
  export declare const isStartsLikePackageName: (specifier: string) => boolean;
@@ -1,11 +1,21 @@
1
- import { isBuiltin } from 'node:module';
2
1
  import { DT_SCOPE, PROTOCOL_VIRTUAL } from "../constants.js";
3
2
  import { isAbsolute, isInNodeModules, toPosix } from "./path.js";
4
- export const getPackageNameFromModuleSpecifier = (moduleSpecifier) => {
5
- if (!isStartsLikePackageName(moduleSpecifier))
3
+ export const getPackageNameFromModuleSpecifier = (specifier) => {
4
+ if (!isStartsLikePackageName(specifier))
6
5
  return;
7
- const parts = moduleSpecifier.split('/').slice(0, 2);
8
- return moduleSpecifier.startsWith('@') ? parts.join('/') : parts[0];
6
+ let start = 0;
7
+ if (specifier.charCodeAt(0) === 64) {
8
+ const slash = specifier.indexOf('/', 1);
9
+ if (slash === -1)
10
+ return specifier;
11
+ start = slash + 1;
12
+ }
13
+ for (let i = start; i < specifier.length; i++) {
14
+ const ch = specifier.charCodeAt(i);
15
+ if (ch === 47 || ch === 64)
16
+ return specifier.slice(0, i);
17
+ }
18
+ return specifier;
9
19
  };
10
20
  const lastPackageNameMatch = /(?<=node_modules\/)(@[^/]+\/[^/]+|[^/]+)/g;
11
21
  export const getPackageNameFromFilePath = (value) => {
@@ -53,7 +63,7 @@ const CHAR_COLON = 58;
53
63
  const CHAR_HASH = 35;
54
64
  const CHAR_QUESTION = 63;
55
65
  export const sanitizeSpecifier = (specifier) => {
56
- if (isBuiltin(specifier) ||
66
+ if (specifier.startsWith('node:') ||
57
67
  isAbsolute(specifier) ||
58
68
  specifier.charCodeAt(0) === CHAR_COLON ||
59
69
  specifier.startsWith(PROTOCOL_VIRTUAL)) {