zedbee 0.1.0-beta.16 → 0.1.0-beta.17

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 (351) hide show
  1. package/THIRD_PARTY_NOTICES.md +68 -74
  2. package/dist/attribution/metrics.d.ts.map +1 -1
  3. package/dist/attribution/metrics.js +8 -5
  4. package/dist/attribution/metrics.js.map +1 -1
  5. package/dist/attribution/pair-source-moves.d.ts +12 -0
  6. package/dist/attribution/pair-source-moves.d.ts.map +1 -0
  7. package/dist/attribution/pair-source-moves.js +108 -0
  8. package/dist/attribution/pair-source-moves.js.map +1 -0
  9. package/dist/attribution/source-moves.d.ts +47 -0
  10. package/dist/attribution/source-moves.d.ts.map +1 -0
  11. package/dist/attribution/source-moves.js +199 -0
  12. package/dist/attribution/source-moves.js.map +1 -0
  13. package/dist/checks/applicability.d.ts.map +1 -1
  14. package/dist/checks/applicability.js +1 -1
  15. package/dist/checks/applicability.js.map +1 -1
  16. package/dist/checks/changed-file-paths.d.ts.map +1 -1
  17. package/dist/checks/changed-file-paths.js +7 -1
  18. package/dist/checks/changed-file-paths.js.map +1 -1
  19. package/dist/checks/closed-compiler-project.d.ts +5 -0
  20. package/dist/checks/closed-compiler-project.d.ts.map +1 -0
  21. package/dist/checks/closed-compiler-project.js +106 -0
  22. package/dist/checks/closed-compiler-project.js.map +1 -0
  23. package/dist/checks/compiler-inputs.d.ts +1 -1
  24. package/dist/checks/compiler-inputs.d.ts.map +1 -1
  25. package/dist/checks/compiler-inputs.js +33 -2
  26. package/dist/checks/compiler-inputs.js.map +1 -1
  27. package/dist/checks/complexity/adapter.d.ts.map +1 -1
  28. package/dist/checks/complexity/adapter.js +21 -2
  29. package/dist/checks/complexity/adapter.js.map +1 -1
  30. package/dist/checks/dead-code/adapter.d.ts.map +1 -1
  31. package/dist/checks/dead-code/adapter.js +16 -5
  32. package/dist/checks/dead-code/adapter.js.map +1 -1
  33. package/dist/checks/dead-code/entry-configuration.d.ts +6 -0
  34. package/dist/checks/dead-code/entry-configuration.d.ts.map +1 -0
  35. package/dist/checks/dead-code/entry-configuration.js +48 -0
  36. package/dist/checks/dead-code/entry-configuration.js.map +1 -0
  37. package/dist/checks/dead-code/managed-config.d.ts +1 -1
  38. package/dist/checks/dead-code/managed-config.d.ts.map +1 -1
  39. package/dist/checks/dead-code/managed-config.js +24 -3
  40. package/dist/checks/dead-code/managed-config.js.map +1 -1
  41. package/dist/checks/dead-code/vite-entrypoints.d.ts +13 -0
  42. package/dist/checks/dead-code/vite-entrypoints.d.ts.map +1 -0
  43. package/dist/checks/dead-code/vite-entrypoints.js +314 -0
  44. package/dist/checks/dead-code/vite-entrypoints.js.map +1 -0
  45. package/dist/checks/diagnostic-details.d.ts.map +1 -1
  46. package/dist/checks/diagnostic-details.js +32 -0
  47. package/dist/checks/diagnostic-details.js.map +1 -1
  48. package/dist/checks/engine-identity.d.ts.map +1 -1
  49. package/dist/checks/engine-identity.js +5 -4
  50. package/dist/checks/engine-identity.js.map +1 -1
  51. package/dist/checks/eslint/convert-message.d.ts.map +1 -1
  52. package/dist/checks/eslint/convert-message.js +5 -2
  53. package/dist/checks/eslint/convert-message.js.map +1 -1
  54. package/dist/checks/observation-result.d.ts.map +1 -1
  55. package/dist/checks/observation-result.js +69 -7
  56. package/dist/checks/observation-result.js.map +1 -1
  57. package/dist/checks/project-inputs.d.ts +1 -1
  58. package/dist/checks/project-inputs.d.ts.map +1 -1
  59. package/dist/checks/project-inputs.js +10 -1
  60. package/dist/checks/project-inputs.js.map +1 -1
  61. package/dist/checks/react/adapter.d.ts.map +1 -1
  62. package/dist/checks/react/adapter.js +25 -3
  63. package/dist/checks/react/adapter.js.map +1 -1
  64. package/dist/checks/source-moves.d.ts +9 -0
  65. package/dist/checks/source-moves.d.ts.map +1 -0
  66. package/dist/checks/source-moves.js +184 -0
  67. package/dist/checks/source-moves.js.map +1 -0
  68. package/dist/commands/checks.js +3 -3
  69. package/dist/commands/checks.js.map +1 -1
  70. package/dist/commands/diagnostics.d.ts +1 -0
  71. package/dist/commands/diagnostics.d.ts.map +1 -1
  72. package/dist/commands/diagnostics.js +28 -0
  73. package/dist/commands/diagnostics.js.map +1 -1
  74. package/dist/commands/fix.d.ts.map +1 -1
  75. package/dist/commands/fix.js +4 -1
  76. package/dist/commands/fix.js.map +1 -1
  77. package/dist/commands/scan.d.ts.map +1 -1
  78. package/dist/commands/scan.js +4 -0
  79. package/dist/commands/scan.js.map +1 -1
  80. package/dist/config/profiles.d.ts.map +1 -1
  81. package/dist/config/profiles.js +6 -0
  82. package/dist/config/profiles.js.map +1 -1
  83. package/dist/config/schema.d.ts +37 -17
  84. package/dist/config/schema.d.ts.map +1 -1
  85. package/dist/config/schema.js +16 -1
  86. package/dist/config/schema.js.map +1 -1
  87. package/dist/config/settings-registry.js +2 -2
  88. package/dist/config/settings-registry.js.map +1 -1
  89. package/dist/renderers/text.d.ts.map +1 -1
  90. package/dist/renderers/text.js +4 -0
  91. package/dist/renderers/text.js.map +1 -1
  92. package/dist/reporting/finding-priority.d.ts +6 -0
  93. package/dist/reporting/finding-priority.d.ts.map +1 -0
  94. package/dist/reporting/finding-priority.js +69 -0
  95. package/dist/reporting/finding-priority.js.map +1 -0
  96. package/dist/reporting/fix-plan-store.d.ts +2 -5
  97. package/dist/reporting/fix-plan-store.d.ts.map +1 -1
  98. package/dist/reporting/fix-plan-store.js +2 -1
  99. package/dist/reporting/fix-plan-store.js.map +1 -1
  100. package/dist/reporting/presentation.d.ts +3 -1
  101. package/dist/reporting/presentation.d.ts.map +1 -1
  102. package/dist/reporting/presentation.js +19 -7
  103. package/dist/reporting/presentation.js.map +1 -1
  104. package/dist/reporting/result-sections.d.ts +1 -0
  105. package/dist/reporting/result-sections.d.ts.map +1 -1
  106. package/dist/reporting/result-sections.js +12 -0
  107. package/dist/reporting/result-sections.js.map +1 -1
  108. package/dist/reporting/temporary-report-common.d.ts +13 -1
  109. package/dist/reporting/temporary-report-common.d.ts.map +1 -1
  110. package/dist/reporting/temporary-report-common.js +4 -1
  111. package/dist/reporting/temporary-report-common.js.map +1 -1
  112. package/dist/reporting/temporary-report-lifecycle.d.ts +3 -3
  113. package/dist/reporting/temporary-report-lifecycle.d.ts.map +1 -1
  114. package/dist/reporting/temporary-report-lifecycle.js +18 -4
  115. package/dist/reporting/temporary-report-lifecycle.js.map +1 -1
  116. package/dist/reporting/temporary-reports.d.ts +1 -1
  117. package/dist/reporting/temporary-reports.d.ts.map +1 -1
  118. package/dist/reporting/temporary-reports.js +22 -3
  119. package/dist/reporting/temporary-reports.js.map +1 -1
  120. package/dist/scan/analysis-session.d.ts.map +1 -1
  121. package/dist/scan/analysis-session.js +15 -1
  122. package/dist/scan/analysis-session.js.map +1 -1
  123. package/dist/ui/scan-result-dashboard.d.ts.map +1 -1
  124. package/dist/ui/scan-result-dashboard.js +1 -1
  125. package/dist/ui/scan-result-dashboard.js.map +1 -1
  126. package/docs/checks.md +96 -2
  127. package/docs/privacy.md +13 -0
  128. package/docs/reporting.md +35 -1
  129. package/{node_modules/dependency-cruiser/node_modules/picomatch/LICENSE → licenses/overrides/jscpd-5.4.2-LICENSE} +5 -5
  130. package/licenses/overrides/napi-rs-wasm-runtime-1.2.5-LICENSE +43 -0
  131. package/licenses/reviewed-overrides.json +70 -0
  132. package/node_modules/acorn/CHANGELOG.md +14 -0
  133. package/node_modules/acorn/dist/acorn.js +42 -14
  134. package/node_modules/acorn/dist/acorn.mjs +42 -14
  135. package/node_modules/acorn/package.json +1 -1
  136. package/node_modules/dependency-cruiser/README.md +7 -8
  137. package/node_modules/dependency-cruiser/bin/depcruise-baseline.mjs +12 -5
  138. package/node_modules/dependency-cruiser/bin/{dependency-cruise.mjs → dependency-cruiser.mjs} +24 -14
  139. package/node_modules/dependency-cruiser/configs/rules/no-duplicate-dependency-types.cjs +1 -1
  140. package/node_modules/dependency-cruiser/node_modules/ignore/README.md +138 -8
  141. package/node_modules/dependency-cruiser/node_modules/ignore/index.d.ts +56 -20
  142. package/node_modules/dependency-cruiser/node_modules/ignore/index.js +1032 -229
  143. package/node_modules/dependency-cruiser/node_modules/ignore/legacy.js +868 -184
  144. package/node_modules/dependency-cruiser/node_modules/ignore/package.json +10 -4
  145. package/node_modules/dependency-cruiser/node_modules/semver/LICENSE +15 -0
  146. package/node_modules/dependency-cruiser/node_modules/semver/README.md +680 -0
  147. package/node_modules/dependency-cruiser/node_modules/semver/bin/semver.js +195 -0
  148. package/node_modules/dependency-cruiser/node_modules/semver/classes/comparator.js +143 -0
  149. package/node_modules/dependency-cruiser/node_modules/semver/classes/index.js +7 -0
  150. package/node_modules/dependency-cruiser/node_modules/semver/classes/range.js +577 -0
  151. package/node_modules/dependency-cruiser/node_modules/semver/classes/semver.js +350 -0
  152. package/node_modules/dependency-cruiser/node_modules/semver/functions/clean.js +8 -0
  153. package/node_modules/dependency-cruiser/node_modules/semver/functions/cmp.js +54 -0
  154. package/node_modules/dependency-cruiser/node_modules/semver/functions/coerce.js +62 -0
  155. package/node_modules/dependency-cruiser/node_modules/semver/functions/compare-build.js +9 -0
  156. package/node_modules/dependency-cruiser/node_modules/semver/functions/compare-loose.js +5 -0
  157. package/node_modules/dependency-cruiser/node_modules/semver/functions/compare.js +7 -0
  158. package/node_modules/dependency-cruiser/node_modules/semver/functions/diff.js +60 -0
  159. package/node_modules/dependency-cruiser/node_modules/semver/functions/eq.js +5 -0
  160. package/node_modules/dependency-cruiser/node_modules/semver/functions/gt.js +5 -0
  161. package/node_modules/dependency-cruiser/node_modules/semver/functions/gte.js +5 -0
  162. package/node_modules/dependency-cruiser/node_modules/semver/functions/inc.js +21 -0
  163. package/node_modules/dependency-cruiser/node_modules/semver/functions/lt.js +5 -0
  164. package/node_modules/dependency-cruiser/node_modules/semver/functions/lte.js +5 -0
  165. package/node_modules/dependency-cruiser/node_modules/semver/functions/major.js +5 -0
  166. package/node_modules/dependency-cruiser/node_modules/semver/functions/minor.js +5 -0
  167. package/node_modules/dependency-cruiser/node_modules/semver/functions/neq.js +5 -0
  168. package/node_modules/dependency-cruiser/node_modules/semver/functions/parse.js +18 -0
  169. package/node_modules/dependency-cruiser/node_modules/semver/functions/patch.js +5 -0
  170. package/node_modules/dependency-cruiser/node_modules/semver/functions/prerelease.js +8 -0
  171. package/node_modules/dependency-cruiser/node_modules/semver/functions/rcompare.js +5 -0
  172. package/node_modules/dependency-cruiser/node_modules/semver/functions/rsort.js +5 -0
  173. package/node_modules/dependency-cruiser/node_modules/semver/functions/satisfies.js +12 -0
  174. package/node_modules/dependency-cruiser/node_modules/semver/functions/sort.js +5 -0
  175. package/node_modules/dependency-cruiser/node_modules/semver/functions/truncate.js +48 -0
  176. package/node_modules/dependency-cruiser/node_modules/semver/functions/valid.js +8 -0
  177. package/node_modules/dependency-cruiser/node_modules/semver/index.js +93 -0
  178. package/node_modules/dependency-cruiser/node_modules/semver/internal/constants.js +67 -0
  179. package/node_modules/dependency-cruiser/node_modules/semver/internal/debug.js +11 -0
  180. package/node_modules/dependency-cruiser/node_modules/semver/internal/identifiers.js +29 -0
  181. package/node_modules/dependency-cruiser/node_modules/semver/internal/lrucache.js +42 -0
  182. package/node_modules/dependency-cruiser/node_modules/semver/internal/parse-options.js +17 -0
  183. package/node_modules/dependency-cruiser/node_modules/semver/internal/re.js +223 -0
  184. package/node_modules/dependency-cruiser/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  185. package/node_modules/dependency-cruiser/node_modules/semver/package.json +78 -0
  186. package/node_modules/dependency-cruiser/node_modules/semver/preload.js +4 -0
  187. package/node_modules/dependency-cruiser/node_modules/semver/range.bnf +17 -0
  188. package/node_modules/dependency-cruiser/node_modules/semver/ranges/gtr.js +6 -0
  189. package/node_modules/dependency-cruiser/node_modules/semver/ranges/intersects.js +9 -0
  190. package/node_modules/dependency-cruiser/node_modules/semver/ranges/ltr.js +6 -0
  191. package/node_modules/dependency-cruiser/node_modules/semver/ranges/max-satisfying.js +27 -0
  192. package/node_modules/dependency-cruiser/node_modules/semver/ranges/min-satisfying.js +26 -0
  193. package/node_modules/dependency-cruiser/node_modules/semver/ranges/min-version.js +63 -0
  194. package/node_modules/dependency-cruiser/node_modules/semver/ranges/outside.js +82 -0
  195. package/node_modules/dependency-cruiser/node_modules/semver/ranges/simplify.js +49 -0
  196. package/node_modules/dependency-cruiser/node_modules/semver/ranges/subset.js +249 -0
  197. package/node_modules/dependency-cruiser/node_modules/semver/ranges/to-comparators.js +10 -0
  198. package/node_modules/dependency-cruiser/node_modules/semver/ranges/valid.js +13 -0
  199. package/node_modules/dependency-cruiser/package.json +16 -10
  200. package/node_modules/dependency-cruiser/src/analyze/analyze-modules.mjs +5 -1
  201. package/node_modules/dependency-cruiser/src/analyze/index.mjs +3 -3
  202. package/node_modules/dependency-cruiser/src/analyze/soften-known-violations.mjs +4 -2
  203. package/node_modules/dependency-cruiser/src/analyze/summarize/get-stats.mjs +38 -3
  204. package/node_modules/dependency-cruiser/src/analyze/summarize/index.mjs +28 -105
  205. package/node_modules/dependency-cruiser/src/analyze/summarize/summarize-options.mjs +3 -0
  206. package/node_modules/dependency-cruiser/src/analyze/summarize/verify-environment.mjs +146 -0
  207. package/node_modules/dependency-cruiser/src/cache/cache.mjs +1 -1
  208. package/node_modules/dependency-cruiser/src/cache/options-compatible.mjs +3 -0
  209. package/node_modules/dependency-cruiser/src/cli/defaults.mjs +0 -1
  210. package/node_modules/dependency-cruiser/src/cli/index.mjs +11 -3
  211. package/node_modules/dependency-cruiser/src/cli/init-config/build-config.mjs +14 -0
  212. package/node_modules/dependency-cruiser/src/cli/init-config/config-template.mjs +7 -2
  213. package/node_modules/dependency-cruiser/src/cli/init-config/environment-helpers.mjs +5 -1
  214. package/node_modules/dependency-cruiser/src/cli/init-config/get-user-input.mjs +11 -0
  215. package/node_modules/dependency-cruiser/src/cli/init-config/index.mjs +1 -0
  216. package/node_modules/dependency-cruiser/src/cli/init-config/normalize-init-options.mjs +1 -1
  217. package/node_modules/dependency-cruiser/src/cli/init-config/types.d.mts +4 -0
  218. package/node_modules/dependency-cruiser/src/cli/init-config/write-run-scripts-to-manifest.mjs +7 -7
  219. package/node_modules/dependency-cruiser/src/cli/normalize-cli-options.mjs +63 -2
  220. package/node_modules/dependency-cruiser/src/config-utl/extract-ts-config.mjs +1 -1
  221. package/node_modules/dependency-cruiser/src/extract/helpers.mjs +1 -0
  222. package/node_modules/dependency-cruiser/src/extract/resolve/determine-dependency-types.mjs +15 -7
  223. package/node_modules/dependency-cruiser/src/extract/resolve/merge-manifests.mjs +6 -3
  224. package/node_modules/dependency-cruiser/src/extract/swc/dependency-visitor.mjs +21 -4
  225. package/node_modules/dependency-cruiser/src/extract/swc/parse.mjs +14 -4
  226. package/node_modules/dependency-cruiser/src/extract/transpile/index.mjs +1 -1
  227. package/node_modules/dependency-cruiser/src/extract/transpile/meta.mjs +15 -3
  228. package/node_modules/dependency-cruiser/src/extract/transpile/svelte-wrap.mjs +23 -2
  229. package/node_modules/dependency-cruiser/src/extract/transpile/try-import-available.mjs +2 -2
  230. package/node_modules/dependency-cruiser/src/extract/transpile/typescript-wrap.mjs +23 -1
  231. package/node_modules/dependency-cruiser/src/extract/tsc/extract-typescript-deps.mjs +57 -12
  232. package/node_modules/dependency-cruiser/src/extract/tsc/extract.mjs +2 -0
  233. package/node_modules/dependency-cruiser/src/graph-utl/add-focus.mjs +2 -2
  234. package/node_modules/dependency-cruiser/src/graph-utl/compare.mjs +113 -14
  235. package/node_modules/dependency-cruiser/src/main/cruise.mjs +1 -2
  236. package/node_modules/dependency-cruiser/src/main/format.mjs +1 -1
  237. package/node_modules/dependency-cruiser/src/main/options/defaults.mjs +1 -0
  238. package/node_modules/dependency-cruiser/src/main/options/normalize.mjs +13 -4
  239. package/node_modules/dependency-cruiser/src/main/report-wrap.mjs +4 -2
  240. package/node_modules/dependency-cruiser/src/main/resolve-options/normalize.mjs +0 -27
  241. package/node_modules/dependency-cruiser/src/meta.cjs +1 -1
  242. package/node_modules/dependency-cruiser/src/report/anon/index.mjs +1 -1
  243. package/node_modules/dependency-cruiser/src/report/azure-devops.mjs +15 -11
  244. package/node_modules/dependency-cruiser/src/report/baseline.mjs +67 -10
  245. package/node_modules/dependency-cruiser/src/report/csv.mjs +1 -1
  246. package/node_modules/dependency-cruiser/src/report/dot/index.mjs +1 -1
  247. package/node_modules/dependency-cruiser/src/report/dot-webpage/dot-module.mjs +1 -1
  248. package/node_modules/dependency-cruiser/src/report/error-html/error-html-template.mjs +2 -0
  249. package/node_modules/dependency-cruiser/src/report/error-html/index.mjs +84 -8
  250. package/node_modules/dependency-cruiser/src/report/error.mjs +62 -13
  251. package/node_modules/dependency-cruiser/src/report/html/index.mjs +1 -1
  252. package/node_modules/dependency-cruiser/src/report/index.mjs +3 -2
  253. package/node_modules/dependency-cruiser/src/report/markdown.mjs +89 -19
  254. package/node_modules/dependency-cruiser/src/report/metrics.mjs +3 -3
  255. package/node_modules/dependency-cruiser/src/report/null.mjs +6 -3
  256. package/node_modules/dependency-cruiser/src/report/teamcity.mjs +4 -1
  257. package/node_modules/dependency-cruiser/src/schema/configuration.validate.mjs +1 -1
  258. package/node_modules/dependency-cruiser/src/schema/cruise-result.validate.mjs +1 -1
  259. package/node_modules/dependency-cruiser/src/utl/try-import.mjs +1 -1
  260. package/node_modules/dependency-cruiser/types/cruise-result.d.mts +14 -0
  261. package/node_modules/dependency-cruiser/types/dependency-cruiser.d.mts +6 -0
  262. package/node_modules/dependency-cruiser/types/options.d.mts +37 -2
  263. package/node_modules/dependency-cruiser/types/reporter-options.d.mts +30 -5
  264. package/node_modules/dependency-cruiser/types/restrictions.d.mts +2 -2
  265. package/node_modules/dependency-cruiser/types/shared-types.d.mts +16 -13
  266. package/node_modules/enhanced-resolve/README.md +46 -1
  267. package/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js +31 -6
  268. package/node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js +27 -6
  269. package/node_modules/enhanced-resolve/lib/PackageMapPlugin.js +297 -0
  270. package/node_modules/enhanced-resolve/lib/Resolver.js +37 -30
  271. package/node_modules/enhanced-resolve/lib/ResolverFactory.js +104 -11
  272. package/node_modules/enhanced-resolve/lib/getPaths.js +6 -1
  273. package/node_modules/enhanced-resolve/lib/index.js +4 -0
  274. package/node_modules/enhanced-resolve/lib/util/entrypoints.js +104 -0
  275. package/node_modules/enhanced-resolve/lib/util/graceful-fs-browser.js +5 -1
  276. package/node_modules/enhanced-resolve/lib/util/identifier.js +4 -2
  277. package/node_modules/enhanced-resolve/lib/util/packageMap.js +224 -0
  278. package/node_modules/enhanced-resolve/lib/util/path.js +29 -8
  279. package/node_modules/enhanced-resolve/lib/util/pathToFileURL.js +87 -0
  280. package/node_modules/enhanced-resolve/package.json +8 -9
  281. package/node_modules/enhanced-resolve/types/AliasFieldPlugin.d.ts +41 -0
  282. package/node_modules/enhanced-resolve/types/AliasPlugin.d.ts +32 -0
  283. package/node_modules/enhanced-resolve/types/AliasUtils.d.ts +128 -0
  284. package/node_modules/enhanced-resolve/types/AppendPlugin.d.ts +27 -0
  285. package/node_modules/enhanced-resolve/types/CachedInputFileSystem.d.ts +224 -0
  286. package/node_modules/enhanced-resolve/types/CloneBasenamePlugin.d.ts +24 -0
  287. package/node_modules/enhanced-resolve/types/ConditionalPlugin.d.ts +33 -0
  288. package/node_modules/enhanced-resolve/types/DescriptionFilePlugin.d.ts +30 -0
  289. package/node_modules/enhanced-resolve/types/DescriptionFileUtils.d.ts +83 -0
  290. package/node_modules/enhanced-resolve/types/DirectoryExistsPlugin.d.ts +23 -0
  291. package/node_modules/enhanced-resolve/types/ExportsFieldPlugin.d.ts +45 -0
  292. package/node_modules/enhanced-resolve/types/ExtensionAliasPlugin.d.ts +31 -0
  293. package/node_modules/enhanced-resolve/types/FileExistsPlugin.d.ts +23 -0
  294. package/node_modules/enhanced-resolve/types/ImportsFieldPlugin.d.ts +45 -0
  295. package/node_modules/enhanced-resolve/types/JoinRequestPartPlugin.d.ts +24 -0
  296. package/node_modules/enhanced-resolve/types/JoinRequestPlugin.d.ts +24 -0
  297. package/node_modules/enhanced-resolve/types/LogInfoPlugin.d.ts +18 -0
  298. package/node_modules/enhanced-resolve/types/MainFieldPlugin.d.ts +41 -0
  299. package/node_modules/enhanced-resolve/types/ModulesInHierachicDirectoriesPlugin.d.ts +2 -0
  300. package/node_modules/enhanced-resolve/types/ModulesInHierarchicalDirectoriesPlugin.d.ts +26 -0
  301. package/node_modules/enhanced-resolve/types/ModulesInRootPlugin.d.ts +27 -0
  302. package/node_modules/enhanced-resolve/types/ModulesUtils.d.ts +25 -0
  303. package/node_modules/enhanced-resolve/types/NextPlugin.d.ts +23 -0
  304. package/node_modules/enhanced-resolve/types/PackageMapPlugin.d.ts +85 -0
  305. package/node_modules/enhanced-resolve/types/ParsePlugin.d.ts +27 -0
  306. package/node_modules/enhanced-resolve/types/PnpPlugin.d.ts +42 -0
  307. package/node_modules/enhanced-resolve/types/Resolver.d.ts +1545 -0
  308. package/node_modules/enhanced-resolve/types/ResolverFactory.d.ts +340 -0
  309. package/node_modules/enhanced-resolve/types/RestrictionsPlugin.d.ts +52 -0
  310. package/node_modules/enhanced-resolve/types/ResultPlugin.d.ts +18 -0
  311. package/node_modules/enhanced-resolve/types/RootsPlugin.d.ts +30 -0
  312. package/node_modules/enhanced-resolve/types/SelfReferencePlugin.d.ts +31 -0
  313. package/node_modules/enhanced-resolve/types/SymlinkPlugin.d.ts +24 -0
  314. package/node_modules/enhanced-resolve/types/SyncAsyncFileSystemDecorator.d.ts +52 -0
  315. package/node_modules/enhanced-resolve/types/TryNextPlugin.d.ts +26 -0
  316. package/node_modules/enhanced-resolve/types/TsconfigPathsPlugin.d.ts +204 -0
  317. package/node_modules/enhanced-resolve/types/UnsafeCachePlugin.d.ts +43 -0
  318. package/node_modules/enhanced-resolve/types/UseFilePlugin.d.ts +27 -0
  319. package/node_modules/enhanced-resolve/types/createInnerContext.d.ts +10 -0
  320. package/node_modules/enhanced-resolve/types/forEachBail.d.ts +15 -0
  321. package/node_modules/enhanced-resolve/types/getInnerRequest.d.ts +7 -0
  322. package/node_modules/enhanced-resolve/types/getPaths.d.ts +34 -0
  323. package/node_modules/enhanced-resolve/types/index.d.ts +131 -0
  324. package/node_modules/enhanced-resolve/types/util/entrypoints.d.ts +62 -0
  325. package/node_modules/enhanced-resolve/types/util/fileURLToPath.d.ts +14 -0
  326. package/node_modules/enhanced-resolve/types/util/fs.d.ts +38 -0
  327. package/node_modules/enhanced-resolve/types/util/graceful-fs-browser.d.ts +22 -0
  328. package/node_modules/enhanced-resolve/types/util/identifier.d.ts +7 -0
  329. package/node_modules/enhanced-resolve/types/util/memoize.d.ts +15 -0
  330. package/node_modules/enhanced-resolve/types/util/module-browser.d.ts +1 -0
  331. package/node_modules/enhanced-resolve/types/util/packageMap.d.ts +118 -0
  332. package/node_modules/enhanced-resolve/types/util/path-browser.d.ts +45 -0
  333. package/node_modules/enhanced-resolve/types/util/path.d.ts +125 -0
  334. package/node_modules/enhanced-resolve/types/util/pathToFileURL.d.ts +14 -0
  335. package/node_modules/enhanced-resolve/types/util/process-browser.d.ts +3 -0
  336. package/node_modules/enhanced-resolve/types/util/strip-json-comments.d.ts +24 -0
  337. package/node_modules/enhanced-resolve/types/util/url-browser.d.ts +1 -0
  338. package/node_modules/enhanced-resolve/types.d.ts +5 -2057
  339. package/node_modules/is-installed-globally/index.js +26 -4
  340. package/node_modules/is-installed-globally/package.json +1 -1
  341. package/package.json +5 -5
  342. package/schema/zedbee.schema.json +12 -1
  343. package/node_modules/dependency-cruiser/node_modules/picomatch/README.md +0 -743
  344. package/node_modules/dependency-cruiser/node_modules/picomatch/index.js +0 -17
  345. package/node_modules/dependency-cruiser/node_modules/picomatch/lib/constants.js +0 -184
  346. package/node_modules/dependency-cruiser/node_modules/picomatch/lib/parse.js +0 -1416
  347. package/node_modules/dependency-cruiser/node_modules/picomatch/lib/picomatch.js +0 -361
  348. package/node_modules/dependency-cruiser/node_modules/picomatch/lib/scan.js +0 -391
  349. package/node_modules/dependency-cruiser/node_modules/picomatch/lib/utils.js +0 -72
  350. package/node_modules/dependency-cruiser/node_modules/picomatch/package.json +0 -83
  351. package/node_modules/dependency-cruiser/node_modules/picomatch/posix.js +0 -3
@@ -73,7 +73,12 @@ function getPathsCached(fileSystem, path) {
73
73
  const cached = cache.get(path);
74
74
  if (cached !== undefined) return cached;
75
75
  }
76
- const result = getPaths(path);
76
+ const { paths, segments } = getPaths(path);
77
+ // `push` leaves a store sized for 17 entries while a path has a handful, and
78
+ // what is cached here is kept for the filesystem's lifetime. A copy sizes both
79
+ // to what they hold, and copying a pushed array keeps them packed, which is
80
+ // the element kind every reader of them is compiled for.
81
+ const result = { paths: [...paths], segments: [...segments] };
77
82
  cache.set(path, result);
78
83
  return result;
79
84
  }
@@ -7,7 +7,10 @@
7
7
 
8
8
  const memoize = require("./util/memoize");
9
9
 
10
+ /** @typedef {import("./CachedInputFileSystem")} CachedInputFileSystem */
10
11
  /** @typedef {import("./CachedInputFileSystem").BaseFileSystem} BaseFileSystem */
12
+ /** @typedef {import("./CloneBasenamePlugin")} CloneBasenamePlugin */
13
+ /** @typedef {import("./LogInfoPlugin")} LogInfoPlugin */
11
14
  /** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */
12
15
  /** @typedef {import("./Resolver")} Resolver */
13
16
  /** @typedef {import("./Resolver").Context} Context */
@@ -18,6 +21,7 @@ const memoize = require("./util/memoize");
18
21
  /** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */
19
22
  /** @typedef {import("./ResolverFactory").Plugin} Plugin */
20
23
  /** @typedef {import("./ResolverFactory").UserResolveOptions} ResolveOptions */
24
+ /** @typedef {import("./TsconfigPathsPlugin")} TsconfigPathsPlugin */
21
25
 
22
26
  /**
23
27
  * @typedef {{
@@ -582,6 +582,110 @@ function assertExportsFieldRequest(request) {
582
582
  return request.slice(2);
583
583
  }
584
584
 
585
+ /**
586
+ * Looks for a conditional mapping whose keys are subpaths - the "conditions
587
+ * wrapping subpaths" shape from
588
+ * https://github.com/webpack/enhanced-resolve/issues/325, which Node.js does
589
+ * not support: the subpaths are read as condition names and match nothing.
590
+ *
591
+ * Diagnostic only, and deliberately not part of building the field. Walking
592
+ * every target of every package.json would cost a full tree walk per package
593
+ * to catch a mistake almost none of them make, and rejecting the field
594
+ * outright would break packages that resolve today under some conditions.
595
+ * Callers run this once a request has already failed, where the walk is free
596
+ * relative to the error being raised anyway.
597
+ * @param {MappingValue} mapping mapping in target position
598
+ * @param {number} subpathCode leading char code that marks a subpath key
599
+ * @param {string[]} trail keys walked from the field root down to `mapping`
600
+ * @returns {{ trail: string[], keys: string[] } | null} offending mapping
601
+ */
602
+ function findSubpathsInConditions(mapping, subpathCode, trail) {
603
+ if (mapping === null || typeof mapping !== "object") return null;
604
+
605
+ if (Array.isArray(mapping)) {
606
+ for (let i = 0; i < mapping.length; i++) {
607
+ const found = findSubpathsInConditions(mapping[i], subpathCode, trail);
608
+ if (found) return found;
609
+ }
610
+ return null;
611
+ }
612
+
613
+ const keys = Object.keys(mapping);
614
+
615
+ for (let i = 0; i < keys.length; i++) {
616
+ if (keys[i].charCodeAt(0) === subpathCode) {
617
+ return { trail: [...trail], keys };
618
+ }
619
+ }
620
+
621
+ for (let i = 0; i < keys.length; i++) {
622
+ const key = keys[i];
623
+ trail.push(key);
624
+ const found = findSubpathsInConditions(mapping[key], subpathCode, trail);
625
+ if (found) return found;
626
+ trail.pop();
627
+ }
628
+
629
+ return null;
630
+ }
631
+
632
+ /**
633
+ * Explains why nothing matched, when the reason is a conditional mapping that
634
+ * wraps subpaths. Returns `null` when the field does not have that shape, so
635
+ * the caller keeps its ordinary "not exported" wording.
636
+ *
637
+ * Only the top-level values are descended into, never the field's own keys:
638
+ * in both forms of `exports` and in `imports` those values are targets, while
639
+ * the keys are either subpaths or - for the `exports` shorthand, where the
640
+ * whole field is one conditional mapping - condition names that
641
+ * `buildExportsField` has already checked.
642
+ * @param {ExportsField | ImportsField | null | undefined} field the field
643
+ * @param {boolean} isExports true for `exports`, false for `imports`
644
+ * @returns {string | null} explanation to append to the error, if any
645
+ */
646
+ module.exports.explainSubpathsInConditions =
647
+ function explainSubpathsInConditions(field, isExports) {
648
+ if (field === null || typeof field !== "object" || Array.isArray(field)) {
649
+ return null;
650
+ }
651
+
652
+ const subpathCode = isExports ? dotCode : hashCode;
653
+ const keys = Object.keys(field);
654
+ /** @type {string[]} */
655
+ const trail = [];
656
+ /** @type {{ trail: string[], keys: string[] } | null} */
657
+ let found = null;
658
+
659
+ for (let i = 0; i < keys.length && !found; i++) {
660
+ trail.push(keys[i]);
661
+ found = findSubpathsInConditions(
662
+ /** @type {Record<string, MappingValue>} */ (field)[keys[i]],
663
+ subpathCode,
664
+ trail,
665
+ );
666
+ trail.pop();
667
+ }
668
+
669
+ if (!found) return null;
670
+
671
+ const quote = (/** @type {string} */ key) => JSON.stringify(key);
672
+ const subpathKeys = found.keys.filter(
673
+ (key) => key.charCodeAt(0) === subpathCode,
674
+ );
675
+ const condition = found.trail[found.trail.length - 1];
676
+ const example = subpathKeys
677
+ .map((key) => `${quote(key)}: { ${quote(condition)}: ... }`)
678
+ .join(", ");
679
+
680
+ return `the value at ${found.trail
681
+ .map(quote)
682
+ .join(" -> ")} is an object with subpath keys (${subpathKeys
683
+ .map(quote)
684
+ .join(
685
+ ", ",
686
+ )}), which is not supported - a condition can only map to a target or to further conditions, so those subpaths never match. Put the subpaths at the top level and nest the conditions inside them instead, e.g. { ${example} }.`;
687
+ };
688
+
585
689
  /**
586
690
  * @param {ExportsField} field exports field
587
691
  * @returns {ExportsField} normalized exports field
@@ -16,9 +16,13 @@ const message =
16
16
  "Pass a `fileSystem` to `create()` or `ResolverFactory.createResolver()`.";
17
17
 
18
18
  /**
19
+ * Takes the arguments its callers pass - `readFile(path, callback)` and the
20
+ * rest - so the declaration describes a call that actually compiles, even
21
+ * though every one of them throws.
22
+ * @param {...unknown} _args arguments, ignored
19
23
  * @returns {never} always throws
20
24
  */
21
- const unavailable = () => {
25
+ const unavailable = (..._args) => {
22
26
  throw new Error(message);
23
27
  };
24
28
 
@@ -6,11 +6,11 @@
6
6
  "use strict";
7
7
 
8
8
  const { fileURLToPath } = require("url");
9
+ const { isFileURL } = require("./path");
9
10
 
10
11
  const PATH_QUERY_FRAGMENT_REGEXP =
11
12
  /^(#?(?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;
12
13
  const ZERO_ESCAPE_REGEXP = /\0(.)/g;
13
- const FILE_REG_EXP = /file:/i;
14
14
 
15
15
  /**
16
16
  * Index past a DOS device path prefix (`\\?\…` or `\\.\…`), or 0. Kept
@@ -41,7 +41,9 @@ function parseIdentifier(identifier) {
41
41
  return null;
42
42
  }
43
43
 
44
- if (FILE_REG_EXP.test(identifier)) {
44
+ // Only a whole `file:` URL is one - a path segment spelled `file:`, which
45
+ // `/tmp/profile:1.js` also contains, stays the path it is.
46
+ if (isFileURL(identifier)) {
45
47
  identifier = fileURLToPath(identifier);
46
48
  }
47
49
 
@@ -0,0 +1,224 @@
1
+ /*
2
+ MIT License http://www.opensource.org/licenses/mit-license.php
3
+ */
4
+
5
+ "use strict";
6
+
7
+ // Node.js package maps: https://nodejs.org/api/packages.html#package-maps
8
+ //
9
+ // A package map is a static table that maps bare specifiers to package
10
+ // locations per importing package, so resolution never has to walk
11
+ // `node_modules`. This module turns the configuration file into the lookup
12
+ // tables `PackageMapPlugin` needs; no file system access is involved beyond
13
+ // reading the file itself.
14
+ //
15
+ // @experimental Package maps are stability 1 (experimental) in Node.js and are
16
+ // only reachable there behind `--experimental-package-map`. This parser tracks
17
+ // that specification and may change with it, including in a patch release.
18
+
19
+ const fileURLToPath = require("./fileURLToPath");
20
+ const { isInside, normalize } = require("./path");
21
+ const pathToFileURL = require("./pathToFileURL");
22
+
23
+ /** @typedef {import("../Resolver").JsonObject} JsonObject */
24
+
25
+ /** @typedef {{ [specifier: string]: string }} PackageMapDependencies */
26
+
27
+ /**
28
+ * A single entry of the configuration file's `packages` object.
29
+ * @typedef {object} PackageMapPackage
30
+ * @property {string} url an absolute or relative `file:` URL, resolved against the configuration file
31
+ * @property {PackageMapDependencies=} dependencies bare specifier to package id
32
+ */
33
+
34
+ /** @typedef {{ [id: string]: PackageMapPackage }} PackageMapPackages */
35
+
36
+ /**
37
+ * The parsed contents of a package map configuration file.
38
+ * @typedef {object} PackageMapJson
39
+ * @property {PackageMapPackages} packages package entries by package id
40
+ */
41
+
42
+ /**
43
+ * @typedef {object} PackageMapEntry
44
+ * @property {string} id the package id this entry is keyed by
45
+ * @property {string} path absolute filesystem path the entry's `url` points at
46
+ * @property {Map<string, string>} dependencies bare specifier to package id
47
+ */
48
+
49
+ /**
50
+ * @typedef {object} PackageMap
51
+ * @property {Map<string, PackageMapEntry>} packages entries by package id
52
+ * @property {{ path: string, ids: string[] }[]} locations package ids by location, longest path first
53
+ */
54
+
55
+ /**
56
+ * @param {string} message message
57
+ * @param {string} code error code
58
+ * @returns {Error & { code: string }} the error
59
+ */
60
+ function createError(message, code) {
61
+ const error = /** @type {Error & { code: string }} */ (new Error(message));
62
+ error.code = code;
63
+ return error;
64
+ }
65
+
66
+ /**
67
+ * Resolve an entry's `url` the way Node does: through the WHATWG `URL` parser
68
+ * with the configuration file as the base, accepting only `file:`.
69
+ * @param {string} url the entry's `url` value
70
+ * @param {URL} base the configuration file URL
71
+ * @param {string} id the package id, for error messages
72
+ * @returns {string} the absolute filesystem path
73
+ */
74
+ function toPackagePath(url, base, id) {
75
+ let parsed;
76
+ try {
77
+ parsed = new URL(url, base);
78
+ } catch (_err) {
79
+ throw createError(
80
+ `Package map entry "${id}" has an invalid "url": ${url}`,
81
+ "ERR_INVALID_PACKAGE_MAP",
82
+ );
83
+ }
84
+ if (parsed.protocol !== "file:") {
85
+ throw createError(
86
+ `Package map entry "${id}" must use a "file:" url, received: ${url}`,
87
+ "ERR_INVALID_PACKAGE_MAP",
88
+ );
89
+ }
90
+ return normalize(fileURLToPath(parsed));
91
+ }
92
+
93
+ /**
94
+ * Parse and validate a package map configuration file.
95
+ *
96
+ * Dangling dependency targets are rejected here rather than at resolution
97
+ * time: the map is static, so a broken table is a configuration error that is
98
+ * better surfaced once and in full.
99
+ * @param {JsonObject} data the parsed configuration file contents
100
+ * @param {string} configFilePath absolute path of the configuration file, used as the base for relative urls
101
+ * @returns {PackageMap} the parsed package map
102
+ */
103
+ function parsePackageMap(data, configFilePath) {
104
+ if (!data || typeof data !== "object" || Array.isArray(data)) {
105
+ throw createError(
106
+ `Package map "${configFilePath}" must contain a JSON object`,
107
+ "ERR_INVALID_PACKAGE_MAP",
108
+ );
109
+ }
110
+
111
+ const rawPackages = data.packages;
112
+
113
+ if (
114
+ !rawPackages ||
115
+ typeof rawPackages !== "object" ||
116
+ Array.isArray(rawPackages)
117
+ ) {
118
+ throw createError(
119
+ `Package map "${configFilePath}" must contain a "packages" object`,
120
+ "ERR_INVALID_PACKAGE_MAP",
121
+ );
122
+ }
123
+
124
+ const base = pathToFileURL(configFilePath);
125
+ /** @type {Map<string, PackageMapEntry>} */
126
+ const packages = new Map();
127
+ /** @type {Map<string, string[]>} */
128
+ const idsByPath = new Map();
129
+
130
+ for (const id of Object.keys(rawPackages)) {
131
+ const rawEntry = /** @type {JsonObject} */ (rawPackages[id]);
132
+
133
+ if (!rawEntry || typeof rawEntry !== "object" || Array.isArray(rawEntry)) {
134
+ throw createError(
135
+ `Package map entry "${id}" must be an object`,
136
+ "ERR_INVALID_PACKAGE_MAP",
137
+ );
138
+ }
139
+ // An empty `url` would resolve to the configuration file itself rather
140
+ // than to a package directory, so reject it like Node does.
141
+ if (typeof rawEntry.url !== "string" || rawEntry.url === "") {
142
+ throw createError(
143
+ `Package map entry "${id}" must have a non-empty string "url"`,
144
+ "ERR_INVALID_PACKAGE_MAP",
145
+ );
146
+ }
147
+
148
+ const packagePath = toPackagePath(rawEntry.url, base, id);
149
+ /** @type {Map<string, string>} */
150
+ const dependencies = new Map();
151
+ const rawDependencies = rawEntry.dependencies;
152
+
153
+ if (rawDependencies !== undefined) {
154
+ if (
155
+ !rawDependencies ||
156
+ typeof rawDependencies !== "object" ||
157
+ Array.isArray(rawDependencies)
158
+ ) {
159
+ throw createError(
160
+ `Package map entry "${id}" has a non-object "dependencies"`,
161
+ "ERR_INVALID_PACKAGE_MAP",
162
+ );
163
+ }
164
+ for (const specifier of Object.keys(rawDependencies)) {
165
+ const target = rawDependencies[specifier];
166
+
167
+ if (typeof target !== "string") {
168
+ throw createError(
169
+ `Package map entry "${id}" maps "${specifier}" to a non-string package id`,
170
+ "ERR_INVALID_PACKAGE_MAP",
171
+ );
172
+ }
173
+ dependencies.set(specifier, target);
174
+ }
175
+ }
176
+
177
+ packages.set(id, { id, path: packagePath, dependencies });
178
+
179
+ const ids = idsByPath.get(packagePath);
180
+ if (ids) {
181
+ ids.push(id);
182
+ } else {
183
+ idsByPath.set(packagePath, [id]);
184
+ }
185
+ }
186
+
187
+ for (const entry of packages.values()) {
188
+ for (const [specifier, target] of entry.dependencies) {
189
+ if (!packages.has(target)) {
190
+ throw createError(
191
+ `Package map entry "${entry.id}" maps "${specifier}" to unknown package id "${target}"`,
192
+ "ERR_INVALID_PACKAGE_MAP",
193
+ );
194
+ }
195
+ }
196
+ }
197
+
198
+ // Longest path first so a package nested inside another one wins the
199
+ // containment lookup below.
200
+ const locations = [...idsByPath]
201
+ .map(([path, ids]) => ({ path, ids }))
202
+ .sort((a, b) => b.path.length - a.path.length);
203
+
204
+ return { packages, locations };
205
+ }
206
+
207
+ /**
208
+ * Find the package ids whose location contains `filePath`. More than one id is
209
+ * returned when several package entries share the same `url`, which the caller
210
+ * has to disambiguate with an explicit package id.
211
+ * @param {PackageMap} packageMap the package map
212
+ * @param {string} filePath an absolute filesystem path
213
+ * @returns {string[]} the matching package ids, empty when the path is outside every package
214
+ */
215
+ function findPackageIds(packageMap, filePath) {
216
+ for (const location of packageMap.locations) {
217
+ if (isInside(location.path, filePath)) return location.ids;
218
+ }
219
+ return [];
220
+ }
221
+
222
+ module.exports.createError = createError;
223
+ module.exports.findPackageIds = findPackageIds;
224
+ module.exports.parsePackageMap = parsePackageMap;
@@ -17,6 +17,10 @@ const CHAR_LOWER_A = "a".charCodeAt(0);
17
17
  const CHAR_LOWER_Z = "z".charCodeAt(0);
18
18
  const CHAR_DOT = ".".charCodeAt(0);
19
19
  const CHAR_COLON = ":".charCodeAt(0);
20
+ const CHAR_F = "F".charCodeAt(0);
21
+ const CHAR_LOWER_F = "f".charCodeAt(0);
22
+
23
+ const FILE_URL_REGEXP = /^file:\//i;
20
24
 
21
25
  const posixNormalize = path.posix.normalize;
22
26
  const winNormalize = path.win32.normalize;
@@ -422,16 +426,32 @@ const isSubPath = (parentPath, childPath) => {
422
426
  };
423
427
 
424
428
  /**
425
- * Convert a `file:` `URL` instance to a filesystem path; any other input
426
- * (including plain strings) is returned unchanged. Mirrors Node's `fs`, which
427
- * treats strings as literal paths and only `URL` objects as URLs (see
428
- * nodejs/node#17658) — so a directory literally named `file:` is never
429
- * mistaken for a URL.
430
- * @param {string | URL} maybeURL a path string or a `file:` `URL` instance
429
+ * Whether a string names a `file:` URL rather than a path. The scheme has to
430
+ * open the string and be followed by a slash, as Node's own URL parser needs,
431
+ * so a path segment spelled `file:` stays a path and `file:x.js` — which Node
432
+ * reads as `/x.js` — stays the relative request it looks like.
433
+ * @param {string} maybePath a path or a `file:` URL string
434
+ * @returns {boolean} true when the string is a `file:` URL
435
+ */
436
+ const isFileURL = (maybePath) => {
437
+ // The first character keeps every path not starting with `f` off the regexp
438
+ const c0 = maybePath.charCodeAt(0);
439
+ return (
440
+ (c0 === CHAR_LOWER_F || c0 === CHAR_F) && FILE_URL_REGEXP.test(maybePath)
441
+ );
442
+ };
443
+
444
+ /**
445
+ * Convert a `file:` URL — a `URL` instance or a `file:/` string, the form
446
+ * `import.meta.resolve` returns — to the path it names. Anything else is
447
+ * returned unchanged, so a path passes through.
448
+ * @param {string | URL} maybeURL a path, a `file:` URL string or a `file:` `URL` instance
431
449
  * @returns {string} a filesystem path
432
450
  */
433
- const toPath = (maybeURL) =>
434
- maybeURL instanceof URL ? fileURLToPath(maybeURL) : maybeURL;
451
+ const toPath = (maybeURL) => {
452
+ if (maybeURL instanceof URL) return fileURLToPath(maybeURL);
453
+ return isFileURL(maybeURL) ? fileURLToPath(maybeURL) : maybeURL;
454
+ };
435
455
 
436
456
  module.exports.PathType = PathType;
437
457
  module.exports.createCachedBasename = createCachedBasename;
@@ -441,6 +461,7 @@ module.exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx;
441
461
  module.exports.dirname = dirname;
442
462
  module.exports.getType = getType;
443
463
  module.exports.invalidSegmentRegEx = invalidSegmentRegEx;
464
+ module.exports.isFileURL = isFileURL;
444
465
  module.exports.isInside = isInside;
445
466
  module.exports.isRelativeRequest = isRelativeRequest;
446
467
  module.exports.isSubPath = isSubPath;
@@ -0,0 +1,87 @@
1
+ /*
2
+ MIT License http://www.opensource.org/licenses/mit-license.php
3
+ */
4
+
5
+ "use strict";
6
+
7
+ // A runtime-agnostic port of Node's `url.pathToFileURL`, built on the global
8
+ // `URL` (available in Node, browsers, Deno and Bun) so the resolver does not
9
+ // depend on the Node `url` builtin. It is the inverse of `./fileURLToPath` and
10
+ // takes the same `windows` option to force the platform branch.
11
+ //
12
+ // Unlike Node's version this does not call `path.resolve` on the input: the
13
+ // resolver only ever converts paths it has already made absolute, and reaching
14
+ // for the current working directory would not work in a browser.
15
+
16
+ const percentRegEx = /%/g;
17
+ const backslashRegEx = /\\/g;
18
+ const newlineRegEx = /\n/g;
19
+ const carriageReturnRegEx = /\r/g;
20
+ const tabRegEx = /\t/g;
21
+
22
+ const isWindows =
23
+ typeof process !== "undefined" && process.platform === "win32";
24
+
25
+ /**
26
+ * Percent-encode the characters the `URL` pathname setter would otherwise
27
+ * interpret. Everything else is left to the setter itself.
28
+ * @param {string} filepath absolute filesystem path
29
+ * @param {boolean} windows true to follow the Windows branch
30
+ * @returns {string} the encoded path
31
+ */
32
+ function encodePathChars(filepath, windows) {
33
+ if (filepath.includes("%")) {
34
+ filepath = filepath.replace(percentRegEx, "%25");
35
+ }
36
+ // A backslash is a legal character in a POSIX file name, so it has to be
37
+ // encoded rather than treated as a separator.
38
+ if (!windows && filepath.includes("\\")) {
39
+ filepath = filepath.replace(backslashRegEx, "%5C");
40
+ }
41
+ if (filepath.includes("\n")) {
42
+ filepath = filepath.replace(newlineRegEx, "%0A");
43
+ }
44
+ if (filepath.includes("\r")) {
45
+ filepath = filepath.replace(carriageReturnRegEx, "%0D");
46
+ }
47
+ if (filepath.includes("\t")) {
48
+ filepath = filepath.replace(tabRegEx, "%09");
49
+ }
50
+ return filepath;
51
+ }
52
+
53
+ /**
54
+ * @param {string} filepath an absolute filesystem path
55
+ * @param {{ windows?: boolean }=} options force the platform branch
56
+ * @returns {URL} the `file:` URL
57
+ */
58
+ function pathToFileURL(filepath, options) {
59
+ const windows =
60
+ options && options.windows !== undefined ? options.windows : isWindows;
61
+
62
+ if (windows && filepath.startsWith("\\\\")) {
63
+ // UNC path: `\\server\share\file` becomes `file://server/share/file`.
64
+ const hostnameEndIndex = filepath.indexOf("\\", 2);
65
+ if (hostnameEndIndex === -1) {
66
+ throw new TypeError(
67
+ `Missing UNC resource path in file path '${filepath}'`,
68
+ );
69
+ }
70
+ if (hostnameEndIndex === 2) {
71
+ throw new TypeError(`Empty UNC servername in file path '${filepath}'`);
72
+ }
73
+ const url = new URL("file://");
74
+ url.hostname = filepath.slice(2, hostnameEndIndex);
75
+ url.pathname = encodePathChars(
76
+ filepath.slice(hostnameEndIndex).replace(backslashRegEx, "/"),
77
+ windows,
78
+ );
79
+ return url;
80
+ }
81
+
82
+ const url = new URL("file://");
83
+ url.pathname = encodePathChars(filepath, windows);
84
+ return url;
85
+ }
86
+
87
+ module.exports = pathToFileURL;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enhanced-resolve",
3
- "version": "5.24.5",
3
+ "version": "5.26.0",
4
4
  "description": "Offers a async require.resolve function. It's highly configurable.",
5
5
  "homepage": "https://github.com/webpack/enhanced-resolve#readme",
6
6
  "repository": {
@@ -20,23 +20,23 @@
20
20
  "types": "types.d.ts",
21
21
  "files": [
22
22
  "lib",
23
+ "types",
23
24
  "types.d.ts",
24
25
  "LICENSE"
25
26
  ],
26
27
  "scripts": {
27
28
  "prepare": "husky",
28
- "lint": "npm run lint:code && npm run lint:types && npm run lint:types-test && npm run lint:special && npm run fmt:check && npm run lint:spellcheck",
29
+ "lint": "npm run lint:code && npm run lint:types && npm run lint:types-test && npm run fmt:check && npm run lint:spellcheck",
29
30
  "lint:code": "eslint --cache .",
30
- "lint:special": "node node_modules/tooling/inherit-types && node node_modules/tooling/generate-types",
31
31
  "lint:types": "tsc",
32
32
  "lint:types-test": "tsc -p tsconfig.types.test.json",
33
33
  "lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
34
34
  "fmt": "npm run fmt:base -- --log-level warn --write",
35
35
  "fmt:check": "npm run fmt:base -- --check",
36
36
  "fmt:base": "node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .",
37
- "fix": "npm run fix:code && npm run fix:special",
37
+ "fix": "npm run fix:code && npm run build:types",
38
38
  "fix:code": "npm run lint:code -- --fix",
39
- "fix:special": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/generate-types --write",
39
+ "build:types": "node -e \"require('fs').rmSync('types', { recursive: true, force: true })\" && tsc -p tsconfig.types.json && prettier --log-level warn --write \"types/**/*.d.ts\"",
40
40
  "type-report": "rimraf coverage && npm run cover:types && npm run cover:report && open-cli coverage/lcov-report/index.html",
41
41
  "pretest": "npm run lint",
42
42
  "test": "npm run test:only",
@@ -62,9 +62,9 @@
62
62
  "tapable": "^2.3.3"
63
63
  },
64
64
  "devDependencies": {
65
- "@changesets/cli": "^2.30.0",
66
- "@changesets/get-github-info": "^0.8.0",
67
- "@codspeed/core": "^5.2.0",
65
+ "@changesets/cli": "^3.0.2",
66
+ "@changesets/get-github-info": "^1.0.1",
67
+ "@codspeed/core": "^5.7.1",
68
68
  "@types/graceful-fs": "^4.1.6",
69
69
  "@types/node": "^24.10.4",
70
70
  "cspell": "^10.0.0",
@@ -75,7 +75,6 @@
75
75
  "memfs": "^4.56.11",
76
76
  "prettier": "^3.7.4",
77
77
  "tinybench": "^6.0.0",
78
- "tooling": "webpack/tooling#v1.26.4",
79
78
  "typescript": "^6.0.2",
80
79
  "webpack": "^5.107.2"
81
80
  },
@@ -0,0 +1,41 @@
1
+ export = AliasFieldPlugin;
2
+ declare class AliasFieldPlugin {
3
+ /**
4
+ * @param {string | ResolveStepHook} source source
5
+ * @param {string | string[]} field field
6
+ * @param {string | ResolveStepHook} target target
7
+ */
8
+ constructor(
9
+ source: string | ResolveStepHook,
10
+ field: string | string[],
11
+ target: string | ResolveStepHook,
12
+ );
13
+ source: string | import("./Resolver").ResolveStepHook;
14
+ field: string | string[];
15
+ target: string | import("./Resolver").ResolveStepHook;
16
+ /** @type {WeakMap<import("./Resolver").JsonObject, { [k: string]: JsonPrimitive } | typeof NO_FIELD_OBJECT>} */
17
+ _fieldDataCache: WeakMap<
18
+ import("./Resolver").JsonObject,
19
+ | {
20
+ [k: string]: JsonPrimitive;
21
+ }
22
+ | typeof NO_FIELD_OBJECT
23
+ >;
24
+ /**
25
+ * @param {Resolver} resolver the resolver
26
+ * @returns {void}
27
+ */
28
+ apply(resolver: Resolver): void;
29
+ }
30
+ declare namespace AliasFieldPlugin {
31
+ export { Resolver, JsonPrimitive, ResolveRequest, ResolveStepHook };
32
+ }
33
+ /** @typedef {import("./Resolver")} Resolver */
34
+ /** @typedef {import("./Resolver").JsonPrimitive} JsonPrimitive */
35
+ /** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
36
+ /** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
37
+ declare const NO_FIELD_OBJECT: unique symbol;
38
+ type Resolver = import("./Resolver");
39
+ type JsonPrimitive = import("./Resolver").JsonPrimitive;
40
+ type ResolveRequest = import("./Resolver").ResolveRequest;
41
+ type ResolveStepHook = import("./Resolver").ResolveStepHook;