zedbee 0.1.0-beta.12 → 0.1.0-beta.13

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 (812) hide show
  1. package/README.md +3 -2
  2. package/THIRD_PARTY_NOTICES.md +130 -14
  3. package/dist/attribution/entities.d.ts.map +1 -1
  4. package/dist/attribution/entities.js +32 -9
  5. package/dist/attribution/entities.js.map +1 -1
  6. package/dist/cache/key.d.ts.map +1 -1
  7. package/dist/cache/key.js +3 -0
  8. package/dist/cache/key.js.map +1 -1
  9. package/dist/checks/applicability.d.ts.map +1 -1
  10. package/dist/checks/applicability.js +12 -12
  11. package/dist/checks/applicability.js.map +1 -1
  12. package/dist/checks/complexity/adapter.d.ts.map +1 -1
  13. package/dist/checks/complexity/adapter.js +11 -6
  14. package/dist/checks/complexity/adapter.js.map +1 -1
  15. package/dist/checks/complexity/pair-class-metrics.d.ts +12 -0
  16. package/dist/checks/complexity/pair-class-metrics.d.ts.map +1 -0
  17. package/dist/checks/complexity/pair-class-metrics.js +187 -0
  18. package/dist/checks/complexity/pair-class-metrics.js.map +1 -0
  19. package/dist/checks/dead-code/adapter.d.ts.map +1 -1
  20. package/dist/checks/dead-code/adapter.js +8 -97
  21. package/dist/checks/dead-code/adapter.js.map +1 -1
  22. package/dist/checks/dead-code/import-boundary.d.ts +1 -1
  23. package/dist/checks/dead-code/import-boundary.d.ts.map +1 -1
  24. package/dist/checks/dead-code/import-boundary.js +3 -1
  25. package/dist/checks/dead-code/import-boundary.js.map +1 -1
  26. package/dist/checks/dead-code/knip-worker.js +19 -8
  27. package/dist/checks/dead-code/knip-worker.js.map +1 -1
  28. package/dist/checks/dead-code/managed-config.d.ts +3 -2
  29. package/dist/checks/dead-code/managed-config.d.ts.map +1 -1
  30. package/dist/checks/dead-code/managed-config.js +23 -1
  31. package/dist/checks/dead-code/managed-config.js.map +1 -1
  32. package/dist/checks/dependency-architecture/adapter.d.ts.map +1 -1
  33. package/dist/checks/dependency-architecture/adapter.js +57 -46
  34. package/dist/checks/dependency-architecture/adapter.js.map +1 -1
  35. package/dist/checks/dependency-architecture/normalize-graph.d.ts +2 -0
  36. package/dist/checks/dependency-architecture/normalize-graph.d.ts.map +1 -1
  37. package/dist/checks/dependency-architecture/normalize-graph.js +12 -3
  38. package/dist/checks/dependency-architecture/normalize-graph.js.map +1 -1
  39. package/dist/checks/engine-identity.js +6 -6
  40. package/dist/checks/engine-identity.js.map +1 -1
  41. package/dist/checks/eslint/lint-adapter.d.ts.map +1 -1
  42. package/dist/checks/eslint/lint-adapter.js +17 -13
  43. package/dist/checks/eslint/lint-adapter.js.map +1 -1
  44. package/dist/checks/events.d.ts +7 -1
  45. package/dist/checks/events.d.ts.map +1 -1
  46. package/dist/checks/observation-result.js +2 -2
  47. package/dist/checks/observation-result.js.map +1 -1
  48. package/dist/checks/project-inputs.d.ts +6 -0
  49. package/dist/checks/project-inputs.d.ts.map +1 -0
  50. package/dist/checks/project-inputs.js +32 -0
  51. package/dist/checks/project-inputs.js.map +1 -0
  52. package/dist/checks/secrets/content.d.ts.map +1 -1
  53. package/dist/checks/secrets/content.js +16 -7
  54. package/dist/checks/secrets/content.js.map +1 -1
  55. package/dist/checks/typescript/adapter.d.ts.map +1 -1
  56. package/dist/checks/typescript/adapter.js +6 -14
  57. package/dist/checks/typescript/adapter.js.map +1 -1
  58. package/dist/checks/typescript/aliases.d.ts +28 -0
  59. package/dist/checks/typescript/aliases.d.ts.map +1 -0
  60. package/dist/checks/typescript/aliases.js +259 -0
  61. package/dist/checks/typescript/aliases.js.map +1 -0
  62. package/dist/checks/typescript/configuration-paths.d.ts +7 -0
  63. package/dist/checks/typescript/configuration-paths.d.ts.map +1 -0
  64. package/dist/checks/typescript/configuration-paths.js +69 -0
  65. package/dist/checks/typescript/configuration-paths.js.map +1 -0
  66. package/dist/checks/typescript/project-coverage.d.ts +16 -0
  67. package/dist/checks/typescript/project-coverage.d.ts.map +1 -0
  68. package/dist/checks/typescript/project-coverage.js +49 -0
  69. package/dist/checks/typescript/project-coverage.js.map +1 -0
  70. package/dist/cli.d.ts.map +1 -1
  71. package/dist/cli.js +3 -0
  72. package/dist/cli.js.map +1 -1
  73. package/dist/commands/agent.js +1 -1
  74. package/dist/commands/agent.js.map +1 -1
  75. package/dist/commands/scan.d.ts +2 -1
  76. package/dist/commands/scan.d.ts.map +1 -1
  77. package/dist/commands/scan.js +5 -0
  78. package/dist/commands/scan.js.map +1 -1
  79. package/dist/commands/telemetry.d.ts.map +1 -1
  80. package/dist/commands/telemetry.js +3 -0
  81. package/dist/commands/telemetry.js.map +1 -1
  82. package/dist/fixes/build-plan.d.ts +1 -0
  83. package/dist/fixes/build-plan.d.ts.map +1 -1
  84. package/dist/fixes/build-plan.js +5 -1
  85. package/dist/fixes/build-plan.js.map +1 -1
  86. package/dist/git/change-set.d.ts.map +1 -1
  87. package/dist/git/change-set.js +9 -0
  88. package/dist/git/change-set.js.map +1 -1
  89. package/dist/git/client.d.ts +16 -0
  90. package/dist/git/client.d.ts.map +1 -1
  91. package/dist/git/client.js +44 -3
  92. package/dist/git/client.js.map +1 -1
  93. package/dist/git/merge-comparison.d.ts.map +1 -1
  94. package/dist/git/merge-comparison.js +16 -4
  95. package/dist/git/merge-comparison.js.map +1 -1
  96. package/dist/git/selected-comparison.d.ts +13 -0
  97. package/dist/git/selected-comparison.d.ts.map +1 -0
  98. package/dist/git/selected-comparison.js +143 -0
  99. package/dist/git/selected-comparison.js.map +1 -0
  100. package/dist/git/snapshot-work.d.ts +18 -0
  101. package/dist/git/snapshot-work.d.ts.map +1 -0
  102. package/dist/git/snapshot-work.js +59 -0
  103. package/dist/git/snapshot-work.js.map +1 -0
  104. package/dist/git/snapshot.d.ts +6 -1
  105. package/dist/git/snapshot.d.ts.map +1 -1
  106. package/dist/git/snapshot.js +102 -5
  107. package/dist/git/snapshot.js.map +1 -1
  108. package/dist/inspection/inspect-repository.d.ts.map +1 -1
  109. package/dist/inspection/inspect-repository.js +13 -0
  110. package/dist/inspection/inspect-repository.js.map +1 -1
  111. package/dist/inspection/snapshot-registry.d.ts +2 -0
  112. package/dist/inspection/snapshot-registry.d.ts.map +1 -1
  113. package/dist/inspection/snapshot-registry.js +34 -5
  114. package/dist/inspection/snapshot-registry.js.map +1 -1
  115. package/dist/inspection/types.d.ts +6 -1
  116. package/dist/inspection/types.d.ts.map +1 -1
  117. package/dist/inspection/types.js +7 -1
  118. package/dist/inspection/types.js.map +1 -1
  119. package/dist/inspection/workspaces.d.ts.map +1 -1
  120. package/dist/inspection/workspaces.js +17 -0
  121. package/dist/inspection/workspaces.js.map +1 -1
  122. package/dist/scan/analysis-failure.d.ts.map +1 -1
  123. package/dist/scan/analysis-failure.js +23 -0
  124. package/dist/scan/analysis-failure.js.map +1 -1
  125. package/dist/scan/analysis-session.d.ts +4 -0
  126. package/dist/scan/analysis-session.d.ts.map +1 -1
  127. package/dist/scan/analysis-session.js +60 -13
  128. package/dist/scan/analysis-session.js.map +1 -1
  129. package/dist/scan/incomplete-report.js +2 -2
  130. package/dist/scan/incomplete-report.js.map +1 -1
  131. package/dist/scan/merge-scan.d.ts +2 -1
  132. package/dist/scan/merge-scan.d.ts.map +1 -1
  133. package/dist/scan/merge-scan.js +82 -37
  134. package/dist/scan/merge-scan.js.map +1 -1
  135. package/dist/scan/progress.d.ts +4 -0
  136. package/dist/scan/progress.d.ts.map +1 -0
  137. package/dist/scan/progress.js +18 -0
  138. package/dist/scan/progress.js.map +1 -0
  139. package/dist/scan/run-scan.d.ts.map +1 -1
  140. package/dist/scan/run-scan.js +7 -3
  141. package/dist/scan/run-scan.js.map +1 -1
  142. package/dist/service/identity-parallel.js +3 -3
  143. package/dist/service/identity-parallel.js.map +1 -1
  144. package/dist/service/identity.js +4 -4
  145. package/dist/service/identity.js.map +1 -1
  146. package/dist/service/state.d.ts.map +1 -1
  147. package/dist/service/state.js +12 -1
  148. package/dist/service/state.js.map +1 -1
  149. package/dist/telemetry/ai-context.d.ts +14 -0
  150. package/dist/telemetry/ai-context.d.ts.map +1 -0
  151. package/dist/telemetry/ai-context.js +129 -0
  152. package/dist/telemetry/ai-context.js.map +1 -0
  153. package/dist/telemetry/batch.d.ts +4 -0
  154. package/dist/telemetry/batch.d.ts.map +1 -0
  155. package/dist/telemetry/batch.js +21 -0
  156. package/dist/telemetry/batch.js.map +1 -0
  157. package/dist/telemetry/client.d.ts +3 -0
  158. package/dist/telemetry/client.d.ts.map +1 -1
  159. package/dist/telemetry/client.js +63 -2
  160. package/dist/telemetry/client.js.map +1 -1
  161. package/dist/telemetry/details-store.d.ts +15 -0
  162. package/dist/telemetry/details-store.d.ts.map +1 -0
  163. package/dist/telemetry/details-store.js +198 -0
  164. package/dist/telemetry/details-store.js.map +1 -0
  165. package/dist/telemetry/finding-catalog.d.ts +2 -0
  166. package/dist/telemetry/finding-catalog.d.ts.map +1 -0
  167. package/dist/telemetry/finding-catalog.js +2817 -0
  168. package/dist/telemetry/finding-catalog.js.map +1 -0
  169. package/dist/telemetry/finding-rules.d.ts +3 -0
  170. package/dist/telemetry/finding-rules.d.ts.map +1 -0
  171. package/dist/telemetry/finding-rules.js +16 -0
  172. package/dist/telemetry/finding-rules.js.map +1 -0
  173. package/dist/telemetry/finding-summary.d.ts +8 -0
  174. package/dist/telemetry/finding-summary.d.ts.map +1 -0
  175. package/dist/telemetry/finding-summary.js +63 -0
  176. package/dist/telemetry/finding-summary.js.map +1 -0
  177. package/dist/telemetry/schema.d.ts +602 -3
  178. package/dist/telemetry/schema.d.ts.map +1 -1
  179. package/dist/telemetry/schema.js +117 -1
  180. package/dist/telemetry/schema.js.map +1 -1
  181. package/dist/telemetry/state.d.ts +2 -2
  182. package/dist/telemetry/state.d.ts.map +1 -1
  183. package/dist/telemetry/state.js +3 -3
  184. package/dist/telemetry/state.js.map +1 -1
  185. package/dist/telemetry/transport.d.ts.map +1 -1
  186. package/dist/telemetry/transport.js +5 -1
  187. package/dist/telemetry/transport.js.map +1 -1
  188. package/dist/telemetry/worker.d.ts.map +1 -1
  189. package/dist/telemetry/worker.js +9 -1
  190. package/dist/telemetry/worker.js.map +1 -1
  191. package/dist/ui/init-app.js +1 -1
  192. package/dist/ui/init-app.js.map +1 -1
  193. package/dist/ui/live-dashboard.d.ts +5 -1
  194. package/dist/ui/live-dashboard.d.ts.map +1 -1
  195. package/dist/ui/live-dashboard.js +46 -4
  196. package/dist/ui/live-dashboard.js.map +1 -1
  197. package/dist/vendor/knip/node_modules/get-tsconfig/LICENSE +21 -0
  198. package/dist/vendor/knip/node_modules/get-tsconfig/README.md +268 -0
  199. package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.cjs +7 -0
  200. package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.d.cts +2116 -0
  201. package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.d.mts +2116 -0
  202. package/dist/vendor/knip/node_modules/get-tsconfig/dist/index.mjs +7 -0
  203. package/dist/vendor/knip/node_modules/get-tsconfig/package.json +46 -0
  204. package/docs/checks.md +32 -5
  205. package/docs/cli-reference.md +9 -1
  206. package/docs/commercial-licensing.md +1 -1
  207. package/docs/privacy.md +34 -2
  208. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended-raw.js +1 -0
  209. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts +2 -0
  210. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js +3 -0
  211. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/base.js +1 -0
  212. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.d.ts +2 -0
  213. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/disable-type-checked.js +3 -0
  214. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/eslint-recommended.js +1 -0
  215. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked-only.js +1 -0
  216. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended-type-checked.js +1 -0
  217. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/recommended.js +1 -0
  218. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.d.ts +2 -0
  219. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked-only.js +3 -0
  220. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.d.ts +2 -0
  221. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict-type-checked.js +3 -0
  222. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/strict.js +1 -0
  223. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked-only.js +1 -0
  224. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic-type-checked.js +1 -0
  225. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/stylistic.js +1 -0
  226. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js +3 -0
  227. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/base.js +1 -0
  228. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/disable-type-checked.js +3 -0
  229. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/eslint-recommended.js +1 -0
  230. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked-only.js +1 -0
  231. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended-type-checked.js +1 -0
  232. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/recommended.js +1 -0
  233. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked-only.js +3 -0
  234. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict-type-checked.js +3 -0
  235. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/strict.js +1 -0
  236. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked-only.js +1 -0
  237. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic-type-checked.js +1 -0
  238. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/stylistic.js +1 -0
  239. package/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts +9 -447
  240. package/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +1 -0
  241. package/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts +9 -447
  242. package/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.js +1 -0
  243. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +2 -0
  244. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +2 -0
  245. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.d.ts +6 -1
  246. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js +41 -6
  247. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +2 -0
  248. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js +2 -0
  249. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js +2 -0
  250. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js +2 -0
  251. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +2 -0
  252. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +2 -0
  253. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-return.js +2 -0
  254. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +2 -0
  255. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js +2 -0
  256. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js +2 -0
  257. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +2 -0
  258. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js +2 -0
  259. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js +2 -0
  260. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.d.ts +9 -0
  261. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js +69 -0
  262. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +2 -0
  263. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +2 -0
  264. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +2 -0
  265. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.d.ts +1 -447
  266. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +141 -273
  267. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js +2 -0
  268. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js +2 -0
  269. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +59 -1
  270. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +2 -0
  271. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +1 -0
  272. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js +1 -0
  273. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js +1 -0
  274. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js +1 -0
  275. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +1 -0
  276. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js +1 -0
  277. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js +1 -0
  278. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js +1 -0
  279. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +2 -0
  280. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js +2 -0
  281. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js +2 -0
  282. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +2 -0
  283. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js +2 -0
  284. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +30 -10
  285. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js +57 -2
  286. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js +2 -0
  287. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js +2 -0
  288. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js +2 -0
  289. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js +2 -0
  290. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js +2 -0
  291. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +3 -0
  292. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-object-type.js +10 -4
  293. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +12 -2
  294. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js +2 -0
  295. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +2 -0
  296. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +65 -55
  297. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js +2 -0
  298. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-generated-empty-object-type.d.ts +4 -0
  299. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-generated-empty-object-type.js +97 -0
  300. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js +2 -0
  301. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js +2 -0
  302. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +2 -0
  303. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js +2 -0
  304. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js +2 -0
  305. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js +2 -0
  306. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js +2 -0
  307. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js +2 -0
  308. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.d.ts +1 -1
  309. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +49 -1
  310. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js +2 -0
  311. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.d.ts +5 -1
  312. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +76 -4
  313. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js +6 -1
  314. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js +35 -23
  315. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +2 -0
  316. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +2 -0
  317. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js +2 -0
  318. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +2 -0
  319. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js +2 -0
  320. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js +6 -2
  321. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js +2 -0
  322. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js +3 -0
  323. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-types.js +2 -0
  324. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +2 -0
  325. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +2 -0
  326. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +2 -0
  327. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +2 -0
  328. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +85 -12
  329. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js +14 -4
  330. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +2 -0
  331. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js +4 -14
  332. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js +2 -0
  333. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.d.ts +2 -3
  334. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +52 -49
  335. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +3 -0
  336. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-conversion.js +2 -0
  337. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-parameters.js +46 -18
  338. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +3 -91
  339. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js +2 -0
  340. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js +2 -0
  341. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js +2 -0
  342. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-assignment.d.ts +5 -0
  343. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-assignment.js +518 -0
  344. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js +4 -113
  345. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-function-type.js +2 -0
  346. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js +2 -0
  347. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js +2 -0
  348. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-type-assertion.js +2 -0
  349. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js +2 -0
  350. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js +2 -0
  351. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-private-class-members.js +2 -0
  352. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +6 -5
  353. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +2 -0
  354. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +2 -0
  355. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-default-assignment.d.ts +1 -1
  356. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-default-assignment.js +29 -7
  357. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +2 -0
  358. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js +3 -0
  359. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-wrapper-object-types.js +2 -0
  360. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +2 -0
  361. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/only-throw-error.js +2 -0
  362. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js +2 -0
  363. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +2 -0
  364. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js +2 -0
  365. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +2 -0
  366. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js +2 -0
  367. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +2 -0
  368. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +2 -0
  369. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +2 -0
  370. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js +2 -0
  371. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js +2 -0
  372. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +4 -3
  373. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js +1 -0
  374. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js +47 -10
  375. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/checkNullishAndReport.js +1 -0
  376. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js +1 -0
  377. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js +2 -0
  378. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +2 -0
  379. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js +2 -0
  380. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js +2 -0
  381. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +2 -0
  382. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js +2 -0
  383. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +2 -0
  384. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js +2 -0
  385. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -0
  386. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js +3 -0
  387. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +2 -0
  388. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/related-getter-setter-pairs.js +2 -0
  389. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +50 -3
  390. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +2 -0
  391. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +2 -0
  392. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +2 -0
  393. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js +12 -9
  394. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js +3 -0
  395. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +2 -0
  396. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-void-return.d.ts +3 -2
  397. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-void-return.js +100 -5
  398. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +3 -1
  399. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +6 -1
  400. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +2 -0
  401. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +39 -12
  402. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.d.ts +1 -1
  403. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +75 -37
  404. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/use-unknown-in-catch-callback-variable.js +2 -0
  405. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/FunctionSignature.d.ts +15 -0
  406. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/FunctionSignature.js +123 -0
  407. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/assertionFunctionUtils.js +1 -0
  408. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js +1 -0
  409. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/baseTypeUtils.d.ts +2 -0
  410. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/baseTypeUtils.js +17 -0
  411. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/class-scope-analyzer/classScopeAnalyzer.js +1 -0
  412. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/class-scope-analyzer/extractComputedName.js +1 -0
  413. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/class-scope-analyzer/types.js +1 -0
  414. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js +11 -7
  415. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js +1 -0
  416. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js +1 -0
  417. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js +1 -0
  418. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getAwaitTokenRemovalRange.d.ts +4 -0
  419. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getAwaitTokenRemovalRange.js +15 -0
  420. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getBaseTypesOfClassMember.js +1 -0
  421. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getConstraintInfo.js +1 -0
  422. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js +1 -0
  423. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFixOrSuggest.js +1 -0
  424. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getForStatementHeadLoc.js +1 -0
  425. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js +1 -0
  426. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getMemberHeadLoc.js +1 -0
  427. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js +2 -0
  428. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParentFunctionNode.js +1 -0
  429. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js +1 -0
  430. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js +1 -0
  431. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getTextWithParentheses.js +1 -0
  432. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js +1 -0
  433. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getValueOfLiteralType.js +1 -0
  434. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js +1 -0
  435. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +1 -1
  436. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/hasOverloadSignatures.js +1 -0
  437. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.d.ts +4 -0
  438. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +5 -0
  439. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isArrayMethodCallWithPredicate.js +1 -0
  440. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isAssignee.js +1 -0
  441. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isConditionalTest.js +1 -0
  442. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isHigherPrecedenceThanAwait.js +1 -0
  443. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +1 -0
  444. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +1 -0
  445. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isPromiseAggregatorMethod.js +1 -0
  446. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfArrowFunctionBodyNeedingParentheses.d.ts +2 -0
  447. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfArrowFunctionBodyNeedingParentheses.js +30 -0
  448. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatement.js +1 -0
  449. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatementNeedingParentheses.d.ts +2 -0
  450. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isStartOfExpressionStatementNeedingParentheses.js +9 -0
  451. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeImport.js +1 -0
  452. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeOnlyReference.d.ts +4 -0
  453. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeOnlyReference.js +23 -0
  454. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +1 -0
  455. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/lazyRules.d.ts +6 -0
  456. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/lazyRules.js +18 -0
  457. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +1 -0
  458. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsPrecedingSemiColon.js +1 -0
  459. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/needsToBeAwaited.js +1 -0
  460. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js +1 -0
  461. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/promiseUtils.js +1 -0
  462. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/rangeToLoc.js +1 -0
  463. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypePredicate.js +1 -0
  464. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/referenceContainsTypeQuery.js +1 -0
  465. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/scopeUtils.js +1 -0
  466. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/skipChainExpression.js +1 -0
  467. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/truthinessUtils.js +3 -1
  468. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js +1 -0
  469. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/walkStatements.js +1 -0
  470. package/node_modules/@typescript-eslint/eslint-plugin/package.json +19 -18
  471. package/node_modules/@typescript-eslint/parser/dist/index.js +1 -0
  472. package/node_modules/@typescript-eslint/parser/dist/parser.js +1 -0
  473. package/node_modules/@typescript-eslint/parser/package.json +9 -8
  474. package/node_modules/@typescript-eslint/project-service/dist/createProjectService.js +10 -9
  475. package/node_modules/@typescript-eslint/project-service/dist/getParsedConfigFileFromTSServer.js +1 -0
  476. package/node_modules/@typescript-eslint/project-service/dist/index.js +1 -0
  477. package/node_modules/@typescript-eslint/project-service/dist/throttleOpenedFileCleanup.d.ts +7 -0
  478. package/node_modules/@typescript-eslint/project-service/dist/throttleOpenedFileCleanup.js +37 -0
  479. package/node_modules/@typescript-eslint/project-service/package.json +7 -6
  480. package/node_modules/@typescript-eslint/scope-manager/dist/ID.js +1 -0
  481. package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +1 -0
  482. package/node_modules/@typescript-eslint/scope-manager/dist/analyze.js +3 -0
  483. package/node_modules/@typescript-eslint/scope-manager/dist/assert.js +1 -0
  484. package/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js +1 -0
  485. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js +1 -0
  486. package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js +1 -0
  487. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js +1 -0
  488. package/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js +1 -0
  489. package/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js +1 -0
  490. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js +1 -0
  491. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js +1 -0
  492. package/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js +1 -0
  493. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js +1 -0
  494. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js +1 -0
  495. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js +1 -0
  496. package/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js +1 -0
  497. package/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js +1 -0
  498. package/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js +1 -0
  499. package/node_modules/@typescript-eslint/scope-manager/dist/index.js +1 -0
  500. package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js +1 -0
  501. package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js +1 -0
  502. package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js +1 -0
  503. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.asynciterable.js +1 -0
  504. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +1 -0
  505. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +1 -0
  506. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js +1 -0
  507. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js +1 -0
  508. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js +1 -0
  509. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js +1 -0
  510. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js +1 -0
  511. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js +1 -0
  512. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js +1 -0
  513. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js +1 -0
  514. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js +1 -0
  515. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +1 -0
  516. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js +1 -0
  517. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js +1 -0
  518. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.intl.js +1 -0
  519. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js +1 -0
  520. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.arraybuffer.js +1 -0
  521. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js +1 -0
  522. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js +1 -0
  523. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js +1 -0
  524. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js +1 -0
  525. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js +1 -0
  526. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js +1 -0
  527. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js +1 -0
  528. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js +1 -0
  529. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js +1 -0
  530. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js +1 -0
  531. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js +1 -0
  532. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js +1 -0
  533. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js +1 -0
  534. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js +1 -0
  535. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js +1 -0
  536. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js +1 -0
  537. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js +1 -0
  538. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js +1 -0
  539. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +1 -0
  540. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js +1 -0
  541. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js +1 -0
  542. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js +1 -0
  543. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js +1 -0
  544. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js +1 -0
  545. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js +1 -0
  546. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js +1 -0
  547. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js +1 -0
  548. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js +1 -0
  549. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js +1 -0
  550. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js +1 -0
  551. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js +1 -0
  552. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js +1 -0
  553. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js +1 -0
  554. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js +1 -0
  555. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js +1 -0
  556. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js +1 -0
  557. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js +1 -0
  558. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js +1 -0
  559. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js +1 -0
  560. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js +1 -0
  561. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js +1 -0
  562. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js +1 -0
  563. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +1 -0
  564. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js +1 -0
  565. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js +1 -0
  566. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js +1 -0
  567. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js +1 -0
  568. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js +1 -0
  569. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js +1 -0
  570. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.intl.js +1 -0
  571. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js +1 -0
  572. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.arraybuffer.js +1 -0
  573. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.collection.js +1 -0
  574. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.full.js +1 -0
  575. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.js +1 -0
  576. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.object.js +1 -0
  577. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.promise.js +1 -0
  578. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.regexp.js +1 -0
  579. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.sharedmemory.js +1 -0
  580. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2024.string.js +1 -0
  581. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.collection.js +1 -0
  582. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.float16.js +1 -0
  583. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.full.js +1 -0
  584. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.intl.js +1 -0
  585. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.iterator.js +1 -0
  586. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.js +1 -0
  587. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.promise.js +1 -0
  588. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2025.regexp.js +1 -0
  589. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +1 -0
  590. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js +1 -0
  591. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js +1 -0
  592. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js +1 -0
  593. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js +1 -0
  594. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js +1 -0
  595. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js +1 -0
  596. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.date.js +1 -0
  597. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js +1 -0
  598. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js +1 -0
  599. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.error.js +1 -0
  600. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.float16.js +1 -0
  601. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js +1 -0
  602. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js +1 -0
  603. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.iterator.js +1 -0
  604. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +1 -0
  605. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.object.js +1 -0
  606. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js +1 -0
  607. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.regexp.js +1 -0
  608. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.sharedmemory.js +1 -0
  609. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js +1 -0
  610. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js +1 -0
  611. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.temporal.js +1 -0
  612. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.typedarrays.js +1 -0
  613. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js +1 -0
  614. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +1 -0
  615. package/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js +1 -0
  616. package/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js +1 -0
  617. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.asynciterable.js +1 -0
  618. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js +1 -0
  619. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +1 -0
  620. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +1 -0
  621. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +1 -0
  622. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js +1 -0
  623. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js +1 -0
  624. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +1 -0
  625. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +1 -0
  626. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +13 -1
  627. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +1 -0
  628. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js +1 -0
  629. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js +1 -0
  630. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js +1 -0
  631. package/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js +1 -0
  632. package/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js +1 -0
  633. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js +1 -0
  634. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js +1 -0
  635. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js +1 -0
  636. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js +1 -0
  637. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js +1 -0
  638. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js +1 -0
  639. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js +1 -0
  640. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js +1 -0
  641. package/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js +1 -0
  642. package/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js +1 -0
  643. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js +1 -0
  644. package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js +1 -0
  645. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js +1 -0
  646. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js +1 -0
  647. package/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js +1 -0
  648. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js +1 -0
  649. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js +1 -0
  650. package/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js +1 -0
  651. package/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js +1 -0
  652. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js +1 -0
  653. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js +1 -0
  654. package/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js +1 -0
  655. package/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js +1 -0
  656. package/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js +1 -0
  657. package/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js +1 -0
  658. package/node_modules/@typescript-eslint/scope-manager/package.json +8 -7
  659. package/node_modules/@typescript-eslint/tsconfig-utils/dist/compilerOptions.js +1 -0
  660. package/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js +1 -0
  661. package/node_modules/@typescript-eslint/tsconfig-utils/dist/index.js +1 -0
  662. package/node_modules/@typescript-eslint/tsconfig-utils/package.json +4 -3
  663. package/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js +4 -14
  664. package/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js +1 -0
  665. package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js +1 -0
  666. package/node_modules/@typescript-eslint/type-utils/dist/discriminateAnyType.js +7 -0
  667. package/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js +1 -0
  668. package/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js +1 -0
  669. package/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js +1 -0
  670. package/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js +1 -0
  671. package/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js +1 -0
  672. package/node_modules/@typescript-eslint/type-utils/dist/index.js +1 -0
  673. package/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js +1 -0
  674. package/node_modules/@typescript-eslint/type-utils/dist/isTypeBrandedLiteralLike.js +3 -1
  675. package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +10 -5
  676. package/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js +1 -0
  677. package/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts +5 -0
  678. package/node_modules/@typescript-eslint/type-utils/dist/predicates.js +11 -0
  679. package/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js +1 -0
  680. package/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js +1 -0
  681. package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +2 -1
  682. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierNameMatches.js +1 -0
  683. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierSourceMatches.d.ts +3 -0
  684. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/specifierSourceMatches.js +19 -0
  685. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInFile.js +1 -0
  686. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInLib.js +1 -0
  687. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.d.ts +1 -1
  688. package/node_modules/@typescript-eslint/type-utils/dist/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.js +87 -9
  689. package/node_modules/@typescript-eslint/type-utils/package.json +9 -8
  690. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +3 -3
  691. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +1 -0
  692. package/node_modules/@typescript-eslint/types/dist/index.js +1 -0
  693. package/node_modules/@typescript-eslint/types/dist/lib.js +1 -0
  694. package/node_modules/@typescript-eslint/types/dist/parser-options.js +1 -0
  695. package/node_modules/@typescript-eslint/types/dist/ts-estree.js +1 -0
  696. package/node_modules/@typescript-eslint/types/package.json +8 -7
  697. package/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js +1 -0
  698. package/node_modules/@typescript-eslint/typescript-estree/dist/check-modifiers.js +7 -0
  699. package/node_modules/@typescript-eslint/typescript-estree/dist/check-syntax-errors.js +8 -0
  700. package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +3 -0
  701. package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -0
  702. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts +1 -1
  703. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +12 -2
  704. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js +1 -0
  705. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +1 -0
  706. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +1 -0
  707. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgramError.js +3 -2
  708. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +1 -0
  709. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +1 -0
  710. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js +2 -0
  711. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js +14 -6
  712. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +23 -0
  713. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +86 -1
  714. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js +1 -0
  715. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/validateDefaultProjectForFilesGlob.js +1 -0
  716. package/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js +1 -0
  717. package/node_modules/@typescript-eslint/typescript-estree/dist/getImportClausePhaseModifier.js +1 -0
  718. package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +1 -0
  719. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +1 -0
  720. package/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js +1 -0
  721. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +48 -2
  722. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +1 -0
  723. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/candidateTSConfigRootDirs.js +1 -0
  724. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +2 -0
  725. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +1 -0
  726. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js +1 -0
  727. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js +1 -0
  728. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +1 -0
  729. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +1 -0
  730. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js +1 -0
  731. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +1 -0
  732. package/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js +1 -0
  733. package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -0
  734. package/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js +1 -0
  735. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js +1 -0
  736. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js +1 -0
  737. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js +1 -0
  738. package/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js +1 -0
  739. package/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js +45 -4
  740. package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +1 -0
  741. package/node_modules/@typescript-eslint/typescript-estree/dist/version.js +1 -0
  742. package/node_modules/@typescript-eslint/typescript-estree/dist/withoutProjectParserOptions.js +1 -0
  743. package/node_modules/@typescript-eslint/typescript-estree/package.json +9 -8
  744. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js +1 -0
  745. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js +1 -0
  746. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js +1 -0
  747. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js +1 -0
  748. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js +1 -0
  749. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js +1 -0
  750. package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js +1 -0
  751. package/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js +1 -0
  752. package/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js +1 -0
  753. package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js +1 -0
  754. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js +1 -0
  755. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +2 -0
  756. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +1 -0
  757. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js +1 -0
  758. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +1 -0
  759. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js +1 -0
  760. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js +1 -0
  761. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js +1 -0
  762. package/node_modules/@typescript-eslint/utils/dist/index.js +1 -0
  763. package/node_modules/@typescript-eslint/utils/dist/json-schema.js +1 -0
  764. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js +1 -0
  765. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js +1 -0
  766. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js +1 -0
  767. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js +1 -0
  768. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js +1 -0
  769. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js +1 -0
  770. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.js +1 -0
  771. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +17 -0
  772. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js +1 -0
  773. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js +1 -0
  774. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js +1 -0
  775. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js +1 -0
  776. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/ESLintShared.js +1 -0
  777. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/FlatESLint.js +1 -0
  778. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/eslint/LegacyESLint.js +1 -0
  779. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js +1 -0
  780. package/node_modules/@typescript-eslint/utils/dist/ts-estree.js +1 -0
  781. package/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.d.ts +1 -1
  782. package/node_modules/@typescript-eslint/utils/dist/ts-utils/NoInfer.js +1 -0
  783. package/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js +1 -0
  784. package/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js +1 -0
  785. package/node_modules/@typescript-eslint/utils/package.json +7 -6
  786. package/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js +1 -0
  787. package/node_modules/@typescript-eslint/visitor-keys/dist/index.js +1 -0
  788. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +1 -0
  789. package/node_modules/@typescript-eslint/visitor-keys/package.json +6 -5
  790. package/node_modules/dependency-cruiser/node_modules/ignore/LICENSE-MIT +21 -0
  791. package/node_modules/dependency-cruiser/node_modules/ignore/README.md +452 -0
  792. package/node_modules/dependency-cruiser/node_modules/ignore/index.d.ts +81 -0
  793. package/node_modules/dependency-cruiser/node_modules/ignore/index.js +793 -0
  794. package/node_modules/dependency-cruiser/node_modules/ignore/legacy.js +690 -0
  795. package/node_modules/dependency-cruiser/node_modules/ignore/package.json +87 -0
  796. package/node_modules/get-tsconfig/dist/index.cjs +4 -4
  797. package/node_modules/get-tsconfig/dist/index.mjs +4 -4
  798. package/node_modules/get-tsconfig/package.json +1 -1
  799. package/node_modules/ignore/README.md +49 -0
  800. package/node_modules/ignore/index.js +906 -162
  801. package/node_modules/ignore/legacy.js +760 -127
  802. package/node_modules/ignore/package.json +10 -4
  803. package/node_modules/typescript-eslint/dist/compatibility-types.js +1 -0
  804. package/node_modules/typescript-eslint/dist/config-helper.js +1 -0
  805. package/node_modules/typescript-eslint/dist/getTSConfigRootDirFromStack.js +1 -0
  806. package/node_modules/typescript-eslint/dist/globs.js +1 -0
  807. package/node_modules/typescript-eslint/dist/index.js +2 -0
  808. package/node_modules/typescript-eslint/package.json +13 -20
  809. package/package.json +11 -9
  810. package/plugins/swarm/README.md +31 -14
  811. package/schema/zedbee.schema.json +12 -0
  812. /package/plugins/swarm/{skills/scan/SKILL.md → references/scan.md} +0 -0
@@ -9,7 +9,16 @@ const UNDEFINED = undefined
9
9
  const EMPTY = ''
10
10
  const SPACE = ' '
11
11
  const ESCAPE = '\\'
12
- const REGEX_TEST_BLANK_LINE = /^\s+$/
12
+
13
+ // The characters that carry a meaning of their own inside a regular
14
+ // expression, so a literal one has to be escaped before it is emitted.
15
+ const REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/
16
+ // A line of only spaces is blank -- the trailing-space trimming empties it --
17
+ // but a line holding a tab is a pattern for a tab-named path, since git
18
+ // never trims a tab.
19
+ // A leading BOM is removed during compilation, so reject a line that would
20
+ // become empty after removing it and trimming spaces.
21
+ const REGEX_TEST_BLANK_LINE = /^\uFEFF? *$/
13
22
  const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/
14
23
  const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/
15
24
  const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/
@@ -23,9 +32,10 @@ const REGEX_SPLITALL_CRLF = /\r?\n/g
23
32
  // - ..
24
33
  // Valid:
25
34
  // - .foo
26
- const REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/
35
+ const DOUBLE_SLASH = '//'
36
+ const SLASH_CODE = 47
37
+ const DOT_CODE = 46
27
38
 
28
- const REGEX_TEST_TRAILING_SLASH = /\/$/
29
39
 
30
40
  const SLASH = '/'
31
41
 
@@ -42,36 +52,307 @@ const define = (object, key, value) => {
42
52
  return value
43
53
  }
44
54
 
45
- const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g
46
-
47
55
  const RETURN_FALSE = () => false
48
56
 
49
- // Sanitize the range of a regular expression
50
- // The cases are complicated, see test cases for details
51
- const sanitizeRange = range => range.replace(
52
- REGEX_REGEXP_RANGE,
53
- (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)
54
- ? match
55
- // Invalid range (out of order) which is ok for gitignore rules but
56
- // fatal for JavaScript regular expression, so eliminate it.
57
- : EMPTY
58
- )
59
-
60
- // > An optional `!` or `^` at the start of a class negates it, so that it
61
- // > matches any character not in the set. (gitignore(5), fnmatch(3))
62
- // The leading `^` has already been escaped to `\^` by the metacharacter
63
- // escaper, so we strip the literal `!` or escaped `^` and emit a single
64
- // regex `^` which is the JavaScript negation token.
65
- const negateRange = range => range.startsWith('!') || range.startsWith('\\^')
66
- ? `^${range.slice(range[0] === '!' ? 1 : 2)}`
67
- : range
68
-
69
57
  // See fixtures #59
70
58
  const cleanRangeBackSlash = slashes => {
71
59
  const {length} = slashes
72
60
  return slashes.slice(0, length - length % 2)
73
61
  }
74
62
 
63
+ // > The range notation, e.g. [a-zA-Z],
64
+ // > can be used to match one of the characters in a range.
65
+ //
66
+ // gitignore(5) defers to fnmatch(3) for this, and git implements it in
67
+ // `wildmatch.c`. A bracket expression has a sub-grammar of its own, which
68
+ // is neither the surrounding pattern grammar nor the JavaScript one:
69
+ //
70
+ // - a `]` right after `[` or `[!` is a literal member, not the terminator
71
+ // - `[:alpha:]` names one of twelve POSIX classes
72
+ // - `\` escapes the next member, `]` included
73
+ // - `*`, `?` and `.` are plain literal members
74
+ // - an unterminated expression makes the whole pattern match nothing
75
+ //
76
+ // which means the expression can not be located -- let alone translated -- by
77
+ // a regular expression. It is scanned out of the pattern before the
78
+ // replacers below run, and put back once they are done, so that neither the
79
+ // metacharacter escaper nor the `?` / `*` replacers ever see its body.
80
+
81
+ // git classifies with its own ASCII-only ctype macros (`wildmatch.c`), never
82
+ // with the C library ones, so these must not be mapped onto `\d` / `\w` /
83
+ // `\s`, which are wider. `/` is left out of every expansion, because a
84
+ // bracket expression never matches a path separator.
85
+ const POSIX_CLASSES = {
86
+ alnum: '0-9A-Za-z',
87
+ alpha: 'A-Za-z',
88
+ blank: ' \\t',
89
+ cntrl: '\\x00-\\x1f\\x7f',
90
+ digit: '0-9',
91
+ graph: '!-.0-~',
92
+ lower: 'a-z',
93
+ print: ' -.0-~',
94
+ punct: '!-.:-@\\[-`{-~',
95
+ // git's `sane-ctype.h` classifies \v and \f as control, not space,
96
+ // unlike C's `isspace`
97
+ space: ' \\t\\n\\r',
98
+ upper: 'A-Z',
99
+ xdigit: '0-9A-Fa-f'
100
+ }
101
+
102
+ const CLASS_MEMBERS_TO_ESCAPE = '\\]^-['
103
+
104
+ const escapeMember = char => CLASS_MEMBERS_TO_ESCAPE.indexOf(char) < 0
105
+ ? char
106
+ : ESCAPE + char
107
+
108
+ // > if (matched == negated || ((flags & WM_PATHNAME) && text_ch == '/'))
109
+ // > return WM_ABORT_TO_STARSTAR; (git, `wildmatch.c`)
110
+ // A bracket expression never matches a path separator, whatever its members
111
+ // say, so a negated class gets `/` as one more excluded character, while a
112
+ // plain one -- where a literal member or a range could still let `/` in --
113
+ // is guarded with a lookahead, `/` being impossible to subtract from a
114
+ // JavaScript character class.
115
+ const NON_SLASH = '(?!\\/)'
116
+
117
+ const classSource = (negated, body) => {
118
+ if (negated) {
119
+ return `[^\\/${body}]`
120
+ }
121
+
122
+ const source = `[${body}]`
123
+
124
+ return new RegExp(source).test('/')
125
+ ? NON_SLASH + source
126
+ : source
127
+ }
128
+
129
+ // Scan the bracket expression that starts at `pattern[start] === '['`,
130
+ // mirroring the member loop of git's `wildmatch.c`.
131
+ // @returns {{end: number, source: string} | null} `null` if the expression is
132
+ // never terminated, which makes the whole pattern match nothing.
133
+ const scanBracket = (pattern, start) => {
134
+ const {length} = pattern
135
+ let index = start + 1
136
+ let negated = EMPTY
137
+
138
+ const lead = pattern[index]
139
+ if (lead === '!' || lead === '^') {
140
+ negated = '^'
141
+ index ++
142
+ }
143
+
144
+ let body = EMPTY
145
+
146
+ // The member a `-` could start a range from, or EMPTY when the previous
147
+ // member can not open one (start of the body, or a range / POSIX class
148
+ // that has just closed)
149
+ let prev = EMPTY
150
+
151
+ // git scans the members with a do-while, so the first one is consumed
152
+ // unconditionally. That is the whole reason a leading `]` is a member
153
+ // and not the terminator.
154
+ for (;;) {
155
+ const char = pattern[index]
156
+
157
+ if (char === UNDEFINED) {
158
+ return null
159
+ }
160
+
161
+ if (char === ESCAPE) {
162
+ const escaped = pattern[index + 1]
163
+ if (escaped === UNDEFINED) {
164
+ return null
165
+ }
166
+ body += escapeMember(escaped)
167
+ prev = escaped
168
+ index ++
169
+ } else if (
170
+ char === '-'
171
+ && prev
172
+ && index + 1 < length
173
+ && pattern[index + 1] !== ']'
174
+ ) {
175
+ index ++
176
+ let to = pattern[index]
177
+ if (to === ESCAPE) {
178
+ // A pattern can not end on a lone backslash -- `checkPattern` has
179
+ // already thrown it away -- so there is an upper bound to read.
180
+ to = pattern[index += 1]
181
+ }
182
+ // An out-of-order range matches nothing in git but is a syntax error in
183
+ // JavaScript, so it is dropped. Its lower bound stays: git tests it
184
+ // as a plain member before it ever looks at the `-`, so `[c-a]` does
185
+ // match `c`.
186
+ if (prev <= to) {
187
+ body += `-${escapeMember(to)}`
188
+ }
189
+ prev = EMPTY
190
+ } else if (char === '[' && pattern[index + 1] === ':') {
191
+ const nameStart = index + 2
192
+ let end = nameStart
193
+ while (end < length && pattern[end] !== ']') {
194
+ end ++
195
+ }
196
+
197
+ if (end === length) {
198
+ return null
199
+ }
200
+
201
+ if (end > nameStart && pattern[end - 1] === ':') {
202
+ const expanded = POSIX_CLASSES[pattern.slice(nameStart, end - 1)]
203
+
204
+ // An unknown class name makes the whole pattern match nothing
205
+ if (expanded === UNDEFINED) {
206
+ return null
207
+ }
208
+
209
+ body += expanded
210
+ prev = EMPTY
211
+ index = end
212
+ } else {
213
+ // No `:]` to close it, so the `[` is a plain member and scanning
214
+ // resumes right after it.
215
+ body += escapeMember('[')
216
+ prev = '['
217
+ index = nameStart - 2
218
+ }
219
+ } else {
220
+ body += escapeMember(char)
221
+ prev = char
222
+ }
223
+
224
+ index ++
225
+
226
+ if (pattern[index] === ']') {
227
+ return {
228
+ end: index,
229
+ source: classSource(negated, body)
230
+ }
231
+ }
232
+ }
233
+ }
234
+
235
+ // An empty JavaScript class can never match, which is how a pattern that git
236
+ // gives up on (`WM_ABORT_ALL`) is expressed here.
237
+ const NEVER_MATCH = '[]'
238
+
239
+ // A NUL can appear in neither a `.gitignore` line nor a path, which makes it
240
+ // the one safe placeholder character. A literal one in the pattern is
241
+ // held aside all the same, so a collision is impossible by construction.
242
+ const PLACEHOLDER = '\u0000'
243
+ const REGEX_RESTORE_PLACEHOLDER = new RegExp(
244
+ `${PLACEHOLDER}(\\d+)${PLACEHOLDER}`, 'g'
245
+ )
246
+
247
+ // The one wildcard the chain does not expand for itself is a trailing `*`. How
248
+ // it expands depends on the mode (`regex` vs `checkRegex`), so `_make` is
249
+ // left to do it, and until then the pending wildcard travels as this marker.
250
+ // That is what keeps it apart from a user-escaped literal `\*`: the unescape
251
+ // steps collapse the escaped one to the exact `\*` a wildcard would leave
252
+ // behind, so by the time `_make` runs the two are otherwise the same string
253
+ // and a literal star gets wrongly rewritten into a wildcard. This marker is a
254
+ // private-use character no compiled pattern carries, and it never survives
255
+ // into a `RegExp` -- `_make` always turns it back into a real wildcard first.
256
+ const TRAILING_WILDCARD = '\uE000'
257
+
258
+ // A trailing "/**" is deferred the same way, because `checkRegex` has to tell
259
+ // it apart from a trailing "/*" (see `checkSourceOf`). For `.ignores()` it
260
+ // still never matches the folder itself (#21).
261
+ const TRAILING_DOUBLESTAR = '\uE001'
262
+
263
+ // Replace every bracket expression with a placeholder the replacers below
264
+ // leave alone, and translate it separately.
265
+ const extractBrackets = pattern => {
266
+ const sources = []
267
+ const hold = source =>
268
+ `${PLACEHOLDER}${sources.push(source) - 1}${PLACEHOLDER}`
269
+
270
+ const {length} = pattern
271
+ let out = EMPTY
272
+ let index = 0
273
+
274
+ while (index < length) {
275
+ const char = pattern[index]
276
+
277
+ if (char === ESCAPE) {
278
+ // > Put a backslash ("\") in front of ... a character to make it literal.
279
+ // (gitignore(5) -> fnmatch(3))
280
+ // A backslash quotes the next character, whatever it is, so `\d` is a
281
+ // literal `d`, not the regex digit class, and `\?` is a literal `?`,
282
+ // not a wildcard. Held aside as its literal here, the escape never
283
+ // reaches the replacers below, which would otherwise let `\d`, `\b`,
284
+ // `\1`, `\/` keep their regular-expression meaning, and would turn a
285
+ // `\?` into `[^\/]`.
286
+ //
287
+ // Four escapes are left for the chain, each with dedicated handling it
288
+ // would be wrong to bypass: `\*` (a literal star, told apart from a
289
+ // wildcard by `TRAILING_WILDCARD` and the wildcard replacers), `\[`
290
+ // (a literal bracket, the one `[` the bracket replacer still expects),
291
+ // `\ ` (a quoted trailing space), and `\\` (a literal backslash). A
292
+ // lone trailing backslash never reaches here -- `checkPattern` throws
293
+ // it out first.
294
+ const escaped = pattern[index + 1]
295
+
296
+ if (
297
+ escaped === '*'
298
+ || escaped === '['
299
+ || escaped === SPACE
300
+ || escaped === ESCAPE
301
+ ) {
302
+ out += pattern.slice(index, index + 2)
303
+ } else {
304
+ out += hold(
305
+ REGEX_LITERAL_SPECIAL.test(escaped)
306
+ ? ESCAPE + escaped
307
+ : escaped
308
+ )
309
+ }
310
+
311
+ index += 2
312
+ } else if (char === PLACEHOLDER) {
313
+ // Hold a literal placeholder character aside as well, so that pattern
314
+ // text can never be mistaken for a placeholder we emitted.
315
+ out += hold(`[${PLACEHOLDER}]`)
316
+ index ++
317
+ } else if (char === '[') {
318
+ const scanned = scanBracket(pattern, index)
319
+
320
+ if (scanned === null) {
321
+ // git gives up on the whole pattern (`WM_ABORT_ALL`), so whatever
322
+ // follows can not make it match either.
323
+ out += hold(NEVER_MATCH)
324
+ index = length
325
+ } else {
326
+ out += hold(scanned.source)
327
+ index = scanned.end + 1
328
+ }
329
+ } else {
330
+ out += char
331
+ index ++
332
+ }
333
+ }
334
+
335
+ return {
336
+ source: out,
337
+ sources
338
+ }
339
+ }
340
+
341
+ // A step of the chain below is normally a `[matcher, replacer]` pair handed
342
+ // to `String.replace`. `DIRECT` marks the ones that are plain string work
343
+ // instead, and take `(source, pattern)`.
344
+ //
345
+ // Anchoring the two ends is exactly that -- a test of one character and a
346
+ // concatenation -- and putting it through the regular expression engine
347
+ // cost a third of this chain for nothing: 167ns where 10ns does the same
348
+ // job. The two are still steps in the same list, in the same places,
349
+ // because their position in the order is part of what they mean.
350
+ const DIRECT = null
351
+
352
+ // A separator at the beginning or in the middle of a pattern, as opposed to
353
+ // one at the very end.
354
+ const REGEX_INNER_SLASH = /\/(?!$)/
355
+
75
356
  // > If the pattern ends with a slash,
76
357
  // > it is removed for the purpose of the following description,
77
358
  // > but it would only find a match with a directory.
@@ -83,6 +364,21 @@ const cleanRangeBackSlash = slashes => {
83
364
  // you could use option `mark: true` with `glob`
84
365
 
85
366
  // '`foo/`' should not continue with the '`..`'
367
+ // The chain that turns one gitignore pattern into a regular expression
368
+ // source, in order. A step is either
369
+ //
370
+ // [matcher, replacer] handed to `String.replace`
371
+ // [matcher, replacer, required] the same, but skipped outright unless
372
+ // `required` appears in the string, which
373
+ // the matcher cannot match without
374
+ // [DIRECT, transform] plain string work, taking (source, pattern)
375
+ //
376
+ // The `required` character is only ever a shortcut: finding it does not mean
377
+ // the matcher will match, and not finding it means it cannot. It is there
378
+ // because scanning for one character costs a fraction of running a matcher
379
+ // that then finds nothing -- for the wildcard step, whose `[^\\]+`
380
+ // backtracks its way through the whole string before giving up, 11ns
381
+ // against 400ns.
86
382
  const REPLACERS = [
87
383
 
88
384
  [
@@ -90,16 +386,30 @@ const REPLACERS = [
90
386
  // TODO:
91
387
  // Other similar zero-width characters?
92
388
  /^\uFEFF/,
389
+ () => EMPTY,
390
+ '\uFEFF'
391
+ ],
392
+
393
+ [
394
+ // A trailing line terminator, left on when a whole file's contents are
395
+ // added as one pattern rather than split into lines. git never sees one
396
+ // -- it reads a `.gitignore` line by line -- so it is not part of the
397
+ // pattern and is dropped here, apart from the trailing-space trimming,
398
+ // which follows git in touching spaces and nothing else.
399
+ /[\r\n]+$/,
93
400
  () => EMPTY
94
401
  ],
95
402
 
96
403
  // > Trailing spaces are ignored unless they are quoted with backslash ("\")
97
404
  [
405
+ // Only spaces, never tabs or other whitespace: git trims a trailing run
406
+ // of `' '` and nothing else (dir.c, `trim_trailing_spaces`, a single
407
+ // `case ' '`), so a pattern ending in a tab keeps it as a literal.
98
408
  // (a\ ) -> (a )
99
409
  // (a ) -> (a)
100
410
  // (a ) -> (a)
101
411
  // (a \ ) -> (a )
102
- /((?:\\\\)*?)(\\?\s+)$/,
412
+ /((?:\\\\)*?)(\\? +)$/,
103
413
  (_, m1, m2) => m1 + (
104
414
  m2.indexOf('\\') === 0
105
415
  ? SPACE
@@ -108,11 +418,14 @@ const REPLACERS = [
108
418
  ],
109
419
 
110
420
  // Replace (\ ) with ' '
421
+ // Only a space: an escaped tab or other whitespace is already a literal by
422
+ // the time it reaches here, and a bare tab must be left as one, not turned
423
+ // into a space.
111
424
  // (\ ) -> ' '
112
425
  // (\\ ) -> '\\ '
113
426
  // (\\\ ) -> '\\ '
114
427
  [
115
- /(\\+?)\s/g,
428
+ /(\\+?) /g,
116
429
  (_, m1) => {
117
430
  const {length} = m1
118
431
  return m1.slice(0, length - length % 2) + SPACE
@@ -144,7 +457,8 @@ const REPLACERS = [
144
457
  [
145
458
  // > a question mark (?) matches a single character
146
459
  /(?!\\)\?/g,
147
- () => '[^/]'
460
+ () => '[^/]',
461
+ '?'
148
462
  ],
149
463
 
150
464
  // leading slash
@@ -154,13 +468,15 @@ const REPLACERS = [
154
468
  // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
155
469
  // A leading slash matches the beginning of the pathname
156
470
  /^\//,
157
- () => '^'
471
+ () => '^',
472
+ SLASH
158
473
  ],
159
474
 
160
475
  // replace special metacharacter slash after the leading slash
161
476
  [
162
477
  /\//g,
163
- () => '\\/'
478
+ () => '\\/',
479
+ SLASH
164
480
  ],
165
481
 
166
482
  [
@@ -173,7 +489,8 @@ const REPLACERS = [
173
489
  /^\^*(?:\\\*\\\*\\\/)+/,
174
490
 
175
491
  // '**/foo' <-> 'foo'
176
- () => '^(?:.*\\/)?'
492
+ () => '^(?:.*\\/)?',
493
+ '*'
177
494
  ],
178
495
 
179
496
  // starting
@@ -181,10 +498,15 @@ const REPLACERS = [
181
498
  // there will be no leading '/'
182
499
  // (which has been replaced by section "leading slash")
183
500
  // If starts with '**', adding a '^' to the regular expression also works
184
- /^(?=[^^])/,
185
- function startingReplacer () {
501
+ DIRECT,
502
+ (source, pattern) => {
503
+ // Nothing to anchor to, or already anchored
504
+ if (!source || source[0] === '^') {
505
+ return source
506
+ }
507
+
186
508
  // If has a slash `/` at the beginning or middle
187
- return !/\/(?!$)/.test(this)
509
+ const anchor = !REGEX_INNER_SLASH.test(pattern)
188
510
  // > Prior to 2.22.1
189
511
  // > If the pattern does not contain a slash /,
190
512
  // > Git treats it as a shell glob pattern
@@ -202,6 +524,8 @@ const REPLACERS = [
202
524
  // > Otherwise, Git treats the pattern as a shell glob suitable for
203
525
  // > consumption by fnmatch(3)
204
526
  : '^'
527
+
528
+ return anchor + source
205
529
  }
206
530
  ],
207
531
 
@@ -216,18 +540,28 @@ const REPLACERS = [
216
540
  // Check if it is not the last `'/**'`
217
541
  (_, index, str) => index + 6 < str.length
218
542
 
219
- // case: /**/
220
- // > A slash followed by two consecutive asterisks then a slash matches
221
- // > zero or more directories.
222
- // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
223
- // '/**/'
224
- ? '(?:\\/[^\\/]+)*'
543
+ // case: /**/ at the end of the pattern, i.e. a trailing `'/**/'`
544
+ // > A trailing `"/**/"` (a trailing `"/**"` restricted to directories)
545
+ // > matches everything inside, but it should not match the current
546
+ // > folder itself, so it requires at least one directory segment.
547
+ // 'a/**/' matches 'a/b/', 'a/x/y/' but not 'a/'
548
+ ? str.slice(index + 6) === '\\/'
549
+ ? '(?:\\/[^\\/]+)+'
550
+
551
+ // case: /**/
552
+ // > A slash followed by two consecutive asterisks then a slash matches
553
+ // > zero or more directories.
554
+ // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
555
+ // '/**/'
556
+ : '(?:\\/[^\\/]+)*'
225
557
 
226
558
  // case: /**
227
559
  // > A trailing `"/**"` matches everything inside.
228
560
 
229
- // #21: everything inside but it should not include the current folder
230
- : '\\/.+'
561
+ // #21: everything inside but it should not include the current folder,
562
+ // resolved by `_make`
563
+ : `\\/${TRAILING_DOUBLESTAR}`,
564
+ '*'
231
565
  ],
232
566
 
233
567
  // normal intermediate wildcards
@@ -250,7 +584,33 @@ const REPLACERS = [
250
584
  // > and will match according to the previous rules.
251
585
  const unescaped = p2.replace(/\\\*/g, '[^\\/]*')
252
586
  return p1 + unescaped
253
- }
587
+ },
588
+ '*'
589
+ ],
590
+
591
+ // trailing wildcard, held apart from a literal star
592
+ [
593
+ // The step above leaves a trailing `*` alone, so a single `\*` is all that
594
+ // can be left at the end here. Whether it is a wildcard or a literal
595
+ // turns on the backslashes the user put in front of it: the escaper has
596
+ // since doubled every one, so what stands here is those `2N` doubled
597
+ // backslashes and then the star's own escape. An even number of the
598
+ // original `N` leaves the star unescaped -- a wildcard -- and an odd
599
+ // number escapes it -- a literal. This runs while the two are still
600
+ // distinct, before the unescape steps below collapse the literal onto
601
+ // the very `\*` a wildcard leaves behind.
602
+ /(^|[^\\])((?:\\\\)*)\\\*$/,
603
+
604
+ (match, p1, p2) =>
605
+ // `p2` holds the doubled user backslashes; half of them is `N`.
606
+ (p2.length / 2) % 2 === 0
607
+ // A real wildcard: carry it to `_make` as the marker, so the unescape
608
+ // steps and the trailing-wildcard rewrite can never mistake it for a
609
+ // literal `\*` (nor the reverse).
610
+ ? p1 + p2 + TRAILING_WILDCARD
611
+ // A literal star: leave it exactly as it stands for the unescape steps.
612
+ : match,
613
+ '*'
254
614
  ],
255
615
 
256
616
  [
@@ -258,41 +618,36 @@ const REPLACERS = [
258
618
  // For example, if a user escape a '\\*',
259
619
  // after step 3, the result will be '\\\\\\*'
260
620
  /\\\\\\(?=[$.|*+(){^])/g,
261
- () => ESCAPE
621
+ () => ESCAPE,
622
+ ESCAPE + ESCAPE
262
623
  ],
263
624
 
264
625
  [
265
626
  // '\\\\' -> '\\'
266
627
  /\\\\/g,
267
- () => ESCAPE
628
+ () => ESCAPE,
629
+ ESCAPE + ESCAPE
268
630
  ],
269
631
 
270
632
  [
271
- // > The range notation, e.g. [a-zA-Z],
272
- // > can be used to match one of the characters in a range.
633
+ // Every real bracket expression -- POSIX classes included -- has already
634
+ // been held aside by `extractBrackets`, so the only `[` left in the
635
+ // pattern is an escaped, literal one.
273
636
 
274
637
  // `\` is escaped by step 3
275
- /(\\)?\[([^\]/]*?)(\\*)($|\])/g,
276
- (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE
277
- // '\\[bar]' -> '\\\\[bar\\]'
278
- ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`
279
- : close === ']'
280
- ? endEscape.length % 2 === 0
281
- // A normal case, and it is a range notation
282
- // '[bar]'
283
- // '[bar\\\\]'
284
- ? `[${negateRange(sanitizeRange(range))}${endEscape}]`
285
- // Invalid range notaton
286
- // '[bar\\]' -> '[bar\\\\]'
287
- : '[]'
288
- : '[]'
638
+ /\\\[([^\]/]*?)(\\*)($|\])/g,
639
+
640
+ // '\\[bar]' -> '\\\\[bar\\]'
641
+ (match, range, endEscape, close) =>
642
+ `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`,
643
+ '['
289
644
  ],
290
645
 
291
646
  // ending
292
647
  [
293
648
  // 'js' will not match 'js.'
294
649
  // 'ab' will not match 'abc'
295
- /(?:[^*])$/,
650
+ DIRECT,
296
651
 
297
652
  // WTF!
298
653
  // https://git-scm.com/docs/gitignore
@@ -306,58 +661,338 @@ const REPLACERS = [
306
661
  // 'js*' will not match 'a.js'
307
662
  // 'js/' will not match 'a.js'
308
663
  // 'js' will match 'a.js' and 'a.js/'
309
- match => /\/$/.test(match)
310
- // foo/ will not match 'foo'
311
- ? `${match}$`
312
- // foo matches 'foo' and 'foo/'
313
- : `${match}(?=$|\\/$)`
664
+ source => {
665
+ const last = source[source.length - 1]
666
+
667
+ // The pattern is empty, or ends in a pending marker `_make` owns --
668
+ // the trailing wildcard, or a trailing "/**". A trailing `*` that is
669
+ // not the marker is a literal star, which anchors like any other
670
+ // final character.
671
+ if (!last || last === TRAILING_WILDCARD || last === TRAILING_DOUBLESTAR) {
672
+ return source
673
+ }
674
+
675
+ return last === SLASH
676
+ // foo/ will not match 'foo'
677
+ ? `${source}$`
678
+ // foo matches 'foo' and 'foo/'
679
+ : `${source}(?=$|\\/$)`
680
+ }
314
681
  ]
315
682
  ]
316
683
 
317
- const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/
684
+ const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\uE000$/
318
685
  const MODE_IGNORE = 'regex'
319
686
  const MODE_CHECK_IGNORE = 'checkRegex'
320
687
  const UNDERSCORE = '_'
321
688
 
322
- const TRAILING_WILD_CARD_REPLACERS = {
323
- [MODE_IGNORE] (_, p1) {
324
- const prefix = p1
325
- // '\^':
326
- // '/*' does not match EMPTY
327
- // '/*' does not match everything
689
+ const replaceTrailingWildcard = (_, p1) => {
690
+ const prefix = p1
691
+ // '\^':
692
+ // '/*' does not match EMPTY
693
+ // '/*' does not match everything
328
694
 
329
- // '\\\/':
330
- // 'abc/*' does not match 'abc/'
331
- ? `${p1}[^/]+`
695
+ // '\\\/':
696
+ // 'abc/*' does not match 'abc/'
697
+ ? `${p1}[^/]+`
332
698
 
333
- // 'a*' matches 'a'
334
- // 'a*' matches 'aa'
335
- : '[^/]*'
699
+ // 'a*' matches 'a'
700
+ // 'a*' matches 'aa'
701
+ : '[^/]*'
336
702
 
337
- return `${prefix}(?=$|\\/$)`
338
- },
703
+ return `${prefix}(?=$|\\/$)`
704
+ }
339
705
 
340
- [MODE_CHECK_IGNORE] (_, p1) {
341
- // When doing `git check-ignore`
342
- const prefix = p1
343
- // '\\\/':
344
- // 'abc/*' DOES match 'abc/' !
345
- ? `${p1}[^/]*`
706
+ const REGEX_REPLACE_TRAILING_DOUBLESTAR = /\uE001$/
707
+
708
+ // 'abc/**' matches everything under 'abc', but not 'abc/' itself (#21)
709
+ const replaceTrailingDoublestar = () => '.+(?=$|\\/$)'
710
+
711
+ const WILDCARD = '[^\\/]*'
712
+
713
+ // Where a run of non-slash wildcards is split by single fixed characters --
714
+ // `[^/]*x[^/]*y...` -- the engine has many equivalent ways to lay the
715
+ // input across the wildcards, and on input that does not match it works
716
+ // through all of them, so the time grows with the number of wildcards
717
+ // rather than the length of the path. Every wildcard but the last in such a
718
+ // run can be pinned to stop at the character that follows it, which leaves
719
+ // one way to lay out the input and no rewinding, without changing which
720
+ // paths match: the fixed characters still bound the count, and the last
721
+ // wildcard still absorbs the rest.
722
+ //
723
+ // The source is read one token at a time -- a wildcard, a single-character
724
+ // piece (a literal, an escape, a class), or a parenthesised group or anchor
725
+ // that ends the run -- so only a genuine wildcard is touched.
726
+
727
+ // The fixed pieces between the wildcard at `at` and the next wildcard of the
728
+ // run, joined as they appear in the source. A run never holds two wildcards
729
+ // in a row, so there is always at least one piece.
730
+ const separatorAfter = (run, at) => {
731
+ let separator = EMPTY
732
+
733
+ for (let index = at + 1; index < run.length && !run[index].wildcard; index ++) {
734
+ separator += run[index].single
735
+ }
346
736
 
347
- // 'a*' matches 'a'
348
- // 'a*' matches 'aa'
349
- : '[^/]*'
737
+ return separator
738
+ }
350
739
 
351
- return `${prefix}(?=$|\\/$)`
740
+ const pinWildcards = source => {
741
+ if (source.indexOf(WILDCARD) < 0) {
742
+ return source
352
743
  }
744
+
745
+ const tokens = []
746
+ const {length} = source
747
+ let index = 0
748
+
749
+ while (index < length) {
750
+ const char = source[index]
751
+
752
+ if (source.startsWith(WILDCARD, index)) {
753
+ tokens.push({wildcard: true})
754
+ index += WILDCARD.length
755
+ } else if (char === '[') {
756
+ let end = index + 1
757
+
758
+ if (source[end] === '^') {
759
+ end ++
760
+ }
761
+
762
+ if (source[end] === ']') {
763
+ end ++
764
+ }
765
+
766
+ while (end < length && source[end] !== ']') {
767
+ end += source[end] === ESCAPE
768
+ ? 2
769
+ : 1
770
+ }
771
+
772
+ end ++
773
+ tokens.push({single: source.slice(index, end)})
774
+ index = end
775
+ } else if (char === ESCAPE) {
776
+ tokens.push({single: source.slice(index, index + 2)})
777
+ index += 2
778
+ } else if (char === '(') {
779
+ let depth = 0
780
+ let end = index
781
+
782
+ do {
783
+ if (source[end] === ESCAPE) {
784
+ end ++
785
+ } else if (source[end] === '(') {
786
+ depth ++
787
+ } else if (source[end] === ')') {
788
+ depth --
789
+ }
790
+
791
+ end ++
792
+ } while (end < length && depth > 0)
793
+
794
+ if ('*+?'.indexOf(source[end]) >= 0) {
795
+ end ++
796
+ }
797
+
798
+ tokens.push({boundary: source.slice(index, end)})
799
+ index = end
800
+ } else if (char === '^' || char === '$') {
801
+ tokens.push({boundary: char})
802
+ index ++
803
+ } else {
804
+ tokens.push({single: char})
805
+ index ++
806
+ }
807
+ }
808
+
809
+ let out = EMPTY
810
+ let run = []
811
+
812
+ const flush = () => {
813
+ let lastWildcard
814
+
815
+ run.forEach((token, at) => {
816
+ if (token.wildcard) {
817
+ lastWildcard = at
818
+ }
819
+ })
820
+
821
+ run.forEach((token, at) => {
822
+ if (!token.wildcard) {
823
+ out += token.single
824
+ return
825
+ }
826
+
827
+ // A wildcard that is not the last in the run is pinned to the whole
828
+ // fixed piece that separates it from the next wildcard, not just to
829
+ // that piece's first character: stopping at the first character alone
830
+ // would let the wildcard hand over at a place where the rest of the
831
+ // separator cannot follow, and the pin leaves no way back, so
832
+ // `f*o/*/*` would miss `foo/b/c` -- the first `o` of `foo` is not the
833
+ // one the `o/` after it needs. Every piece matches exactly one
834
+ // character, so pinning to the first place the whole separator fits
835
+ // is the leftmost place it can sit, and the wildcards that follow
836
+ // take up whatever is left.
837
+ out += at === lastWildcard
838
+ ? WILDCARD
839
+ : `(?:(?!${separatorAfter(run, at)})[^\\/])*`
840
+ })
841
+
842
+ run = []
843
+ }
844
+
845
+ tokens.forEach(token => {
846
+ if (token.boundary === undefined) {
847
+ run.push(token)
848
+ return
849
+ }
850
+
851
+ flush()
852
+ out += token.boundary
853
+ })
854
+
855
+ flush()
856
+
857
+ return out
353
858
  }
354
859
 
355
860
  // @param {pattern}
356
- const makeRegexPrefix = pattern => REPLACERS.reduce(
357
- (prev, [matcher, replacer]) =>
358
- prev.replace(matcher, replacer.bind(pattern)),
359
- pattern
360
- )
861
+ const makeRegexPrefix = pattern => {
862
+ const {source, sources} = extractBrackets(pattern)
863
+
864
+ const replaced = REPLACERS.reduce(
865
+ // A pass whose matcher finds nothing hands back the very string it was
866
+ // given, so asking first costs a search and saves a rewrite. Ten of the
867
+ // fifteen passes never fire for a typical .gitignore line, and between
868
+ // them they were 45% of this chain.
869
+ (prev, [matcher, replacer, required]) => {
870
+ if (matcher === DIRECT) {
871
+ return replacer(prev, pattern)
872
+ }
873
+
874
+ if (required !== UNDEFINED && prev.indexOf(required) < 0) {
875
+ return prev
876
+ }
877
+
878
+ // A pass whose matcher finds nothing hands back the very string it was
879
+ // given, so asking first costs a search and saves a rewrite.
880
+ return matcher.test(prev)
881
+ ? prev.replace(matcher, replacer.bind(pattern))
882
+ : prev
883
+ },
884
+ source
885
+ )
886
+
887
+ // Most patterns hold no bracket expression at all, and then there is
888
+ // nothing to put back.
889
+ return sources.length
890
+ ? replaced.replace(
891
+ REGEX_RESTORE_PLACEHOLDER,
892
+ (match, index) => sources[index]
893
+ )
894
+ : replaced
895
+ }
896
+
897
+ // `checkRegex` tests a path with a trailing slash, 'abc/', the way
898
+ // `git check-ignore` matches that literal string once the directory itself
899
+ // is known not to be excluded (see `checkIgnore`): a trailing '/' of the
900
+ // pattern is dropped, a basename pattern sees an empty basename, and only a
901
+ // pattern whose last segment is a pending wildcard can match what is left
902
+ // after the final slash -- 'abc/*' and 'abc/**' match 'abc/', and 'abc/**'
903
+ // also matches 'abc/d/' (#77, #169).
904
+ const checkSourceOf = (body, prefix) => {
905
+ if (body[body.length - 1] === SLASH) {
906
+ prefix = makeRegexPrefix(body.slice(0, - 1))
907
+ }
908
+
909
+ const head = prefix.slice(0, - 1)
910
+ const last = prefix[prefix.length - 1]
911
+
912
+ return last === TRAILING_WILDCARD
913
+ ? `${head}$`
914
+ : last === TRAILING_DOUBLESTAR
915
+ ? `${head}.*$`
916
+ : NEVER_MATCH
917
+ }
918
+
919
+ // A trailing slash does not stop a pattern being basename-only: it restricts
920
+ // the match to a directory, it does not let the pattern reach across one.
921
+ // Everything else a pattern can hold -- a wildcard, a character class, an
922
+ // escape -- stays inside a single path segment too, so a pattern with no
923
+ // separator in it can only ever describe the last one.
924
+ const matchesBasename = body => {
925
+ const index = body.indexOf(SLASH)
926
+
927
+ return index < 0 || index === body.length - 1
928
+ }
929
+
930
+ // The last segment of a path, keeping a trailing slash, because a pattern that
931
+ // ends in one matches only a directory.
932
+ // 'a/b/c.js' -> 'c.js'; 'a/b/' -> 'b/'; 'c.js' -> 'c.js' (no copy made)
933
+ const basenameOf = path => {
934
+ const end = path.length - 1
935
+
936
+ const index = path.lastIndexOf(
937
+ SLASH,
938
+ path[end] === SLASH
939
+ ? end - 1
940
+ : end
941
+ )
942
+
943
+ return index < 0
944
+ ? path
945
+ : path.slice(index + 1)
946
+ }
947
+
948
+ // The parent directory of a path, with its trailing separator, or EMPTY when
949
+ // the path has none.
950
+ // 'a/b/c' -> 'a/b/'; 'a/b/' -> 'a/'; 'a' -> EMPTY; 'a/' -> EMPTY
951
+ //
952
+ // A path holding an empty segment has to be taken apart, because its
953
+ // ancestors are not prefixes of it: the parent of 'a//b' is 'a/', not
954
+ // 'a//', and the parent of '/a/' is nothing at all. Both shapes reach here
955
+ // -- 'a//b' is accepted outright, and `checkIgnore` does not put the path
956
+ // it is given through the relative-path check.
957
+ //
958
+ // Every other path is a prefix of itself, and cutting one costs a fraction of
959
+ // splitting it into an array and joining that back at every level: 73ns
960
+ // against 207ns.
961
+ const parentOf = path => {
962
+ if (
963
+ path.charCodeAt(0) === SLASH_CODE
964
+ || path.indexOf(DOUBLE_SLASH) >= 0
965
+ ) {
966
+ const slices = path.split(SLASH).filter(Boolean)
967
+
968
+ slices.pop()
969
+
970
+ return slices.length
971
+ ? slices.join(SLASH) + SLASH
972
+ : EMPTY
973
+ }
974
+
975
+ const end = path.length - 1
976
+
977
+ // Look back from before a trailing separator, since that one belongs to the
978
+ // path itself.
979
+ //
980
+ // A negative place to start would be a trap here: `lastIndexOf` clamps one
981
+ // to 0 and searches there rather than reporting no match, so '/' would
982
+ // come back as its own parent and the walk would never end. It cannot
983
+ // happen -- that is the only path short enough to produce one, and the
984
+ // test above has already sent it the other way.
985
+ const cut = path.lastIndexOf(
986
+ SLASH,
987
+ path.charCodeAt(end) === SLASH_CODE
988
+ ? end - 1
989
+ : end
990
+ )
991
+
992
+ return cut < 0
993
+ ? EMPTY
994
+ : path.slice(0, cut + 1)
995
+ }
361
996
 
362
997
  const isString = subject => typeof subject === 'string'
363
998
 
@@ -392,6 +1027,15 @@ class IgnoreRule {
392
1027
  define(this, 'regexPrefix', prefix)
393
1028
  }
394
1029
 
1030
+ // Worked out on first use and kept behind an own property, the way `regex`
1031
+ // caches itself in `_regex`. Deciding it in the constructor instead would
1032
+ // add a fourth `defineProperty` to every rule ever built, which cost 4% of
1033
+ // every compile -- including the compiles of rules that are never matched
1034
+ // against anything.
1035
+ get _basenameOnly () {
1036
+ return define(this, '_basenameOnly', matchesBasename(this.body))
1037
+ }
1038
+
395
1039
  get regex () {
396
1040
  const key = UNDERSCORE + MODE_IGNORE
397
1041
 
@@ -413,11 +1057,12 @@ class IgnoreRule {
413
1057
  }
414
1058
 
415
1059
  _make (mode, key) {
416
- const str = this.regexPrefix.replace(
417
- REGEX_REPLACE_TRAILING_WILDCARD,
418
-
419
- // It does not need to bind pattern
420
- TRAILING_WILD_CARD_REPLACERS[mode]
1060
+ const str = pinWildcards(
1061
+ mode === MODE_IGNORE
1062
+ ? this.regexPrefix
1063
+ .replace(REGEX_REPLACE_TRAILING_WILDCARD, replaceTrailingWildcard)
1064
+ .replace(REGEX_REPLACE_TRAILING_DOUBLESTAR, replaceTrailingDoublestar)
1065
+ : checkSourceOf(this.body, this.regexPrefix)
421
1066
  )
422
1067
 
423
1068
  const regex = this.ignoreCase
@@ -465,12 +1110,28 @@ class RuleManager {
465
1110
  constructor (ignoreCase) {
466
1111
  this._ignoreCase = ignoreCase
467
1112
  this._rules = []
1113
+
1114
+ // How many of the rules git would tag `EXC_FLAG_NODIR`.
1115
+ //
1116
+ // The scan uses it to decide, once for the whole set, whether handing
1117
+ // those rules the basename is worth what it costs the others. The
1118
+ // shortcut saves a full-path scan on every rule it applies to and costs
1119
+ // a check on every rule it does not, so a set where almost nothing is
1120
+ // basename-only comes out behind -- a 955 pattern set with 44 of them
1121
+ // measured 19% slower with the shortcut always on.
1122
+ //
1123
+ // Deciding this by measurement rather than by meaning is safe: a
1124
+ // basename-only pattern gives the very same answer against the whole
1125
+ // path, it just takes longer to say so. The choice can only change how
1126
+ // fast the scan runs, never what it returns.
1127
+ this._basenameCount = 0
468
1128
  }
469
1129
 
470
1130
  _add (pattern) {
471
1131
  // #32
472
1132
  if (pattern && pattern[KEY_IGNORE]) {
473
1133
  this._rules = this._rules.concat(pattern._rules._rules)
1134
+ this._basenameCount += pattern._rules._basenameCount
474
1135
  this._added = true
475
1136
  return
476
1137
  }
@@ -485,6 +1146,13 @@ class RuleManager {
485
1146
  const rule = createRule(pattern, this._ignoreCase)
486
1147
  this._added = true
487
1148
  this._rules.push(rule)
1149
+
1150
+ // Deliberately not `rule._basenameOnly`: reading that would materialise
1151
+ // the rule's own copy, and the whole point of leaving it lazy is that
1152
+ // a rule which is compiled and never matched never pays for it.
1153
+ if (matchesBasename(rule.body)) {
1154
+ this._basenameCount ++
1155
+ }
488
1156
  }
489
1157
  }
490
1158
 
@@ -498,9 +1166,54 @@ class RuleManager {
498
1166
  : pattern
499
1167
  ).forEach(this._add, this)
500
1168
 
1169
+ if (this._added) {
1170
+ this._literalRules = UNDEFINED
1171
+ }
1172
+
501
1173
  return this._added
502
1174
  }
503
1175
 
1176
+ // Match the literal 'abc/' for `checkIgnore`, last rule wins. Only a rule
1177
+ // ending in a wildcard can match it (see `checkSourceOf`), so the rest
1178
+ // are left out once, rather than tested or compiled for every path.
1179
+ testLiteral (path) {
1180
+ const rules = this._literalRules || (
1181
+ this._literalRules = this._rules.filter(
1182
+ ({body}) => body[body.length - (
1183
+ body[body.length - 1] === SLASH ? 2 : 1
1184
+ )] === '*'
1185
+ )
1186
+ )
1187
+
1188
+ let ignored = false
1189
+ let unignored = false
1190
+ let matchedRule
1191
+
1192
+ for (let index = rules.length - 1; index >= 0; index --) {
1193
+ const rule = rules[index]
1194
+
1195
+ if (rule.checkRegex.test(path)) {
1196
+ ignored = !rule.negative
1197
+ unignored = rule.negative
1198
+ matchedRule = rule.negative
1199
+ ? UNDEFINED
1200
+ : rule
1201
+ break
1202
+ }
1203
+ }
1204
+
1205
+ const ret = {
1206
+ ignored,
1207
+ unignored
1208
+ }
1209
+
1210
+ if (matchedRule) {
1211
+ ret.rule = matchedRule
1212
+ }
1213
+
1214
+ return ret
1215
+ }
1216
+
504
1217
  // Test one single path without recursively checking parent directories
505
1218
  //
506
1219
  // - checkUnignored `boolean` whether should check if the path is unignored,
@@ -514,7 +1227,26 @@ class RuleManager {
514
1227
  let unignored = false
515
1228
  let matchedRule
516
1229
 
517
- this._rules.forEach(rule => {
1230
+ // Most of a .gitignore is patterns with no slash in them, and running
1231
+ // those against the whole path makes the regular expression engine walk
1232
+ // every directory name on the way to the only segment that could match.
1233
+ // Handing them the basename instead is what git does, and it is where
1234
+ // the time in a directory walk goes: the rule scan was two thirds of it.
1235
+ const rules = this._rules
1236
+ const {length} = rules
1237
+
1238
+ const shortcut = this._basenameCount * 2 >= length
1239
+
1240
+ const basename = shortcut
1241
+ ? basenameOf(path)
1242
+ : path
1243
+
1244
+ // A plain loop rather than `forEach`, so that `path`, `basename` and
1245
+ // `shortcut` are locals. As a callback they became closure variables,
1246
+ // and reaching for one of those once per rule cost 10% of a scan over a
1247
+ // large rule set -- more than the shortcut they were there to serve.
1248
+ for (let index = 0; index < length; index ++) {
1249
+ const rule = rules[index]
518
1250
  const {negative} = rule
519
1251
 
520
1252
  // | ignored : unignored
@@ -528,26 +1260,22 @@ class RuleManager {
528
1260
  // - TEST: always test
529
1261
  // - TESTIF: only test if checkUnignored
530
1262
  // - X: that never happen
531
- if (
532
- unignored === negative && ignored !== unignored
1263
+ const skip = unignored === negative && ignored !== unignored
533
1264
  || negative && !ignored && !unignored && !checkUnignored
534
- ) {
535
- return
536
- }
537
-
538
- const matched = rule[mode].test(path)
539
1265
 
540
- if (!matched) {
541
- return
1266
+ if (!skip && rule[mode].test(
1267
+ shortcut && rule._basenameOnly
1268
+ ? basename
1269
+ : path
1270
+ )) {
1271
+ ignored = !negative
1272
+ unignored = negative
1273
+
1274
+ matchedRule = negative
1275
+ ? UNDEFINED
1276
+ : rule
542
1277
  }
543
-
544
- ignored = !negative
545
- unignored = negative
546
-
547
- matchedRule = negative
548
- ? UNDEFINED
549
- : rule
550
- })
1278
+ }
551
1279
 
552
1280
  const ret = {
553
1281
  ignored,
@@ -591,7 +1319,43 @@ const checkPath = (path, originalPath, doThrow) => {
591
1319
  return true
592
1320
  }
593
1321
 
594
- const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)
1322
+ // > pathname should be a `path.relative()`d one
1323
+ //
1324
+ // The same thing `REGEX_TEST_INVALID_PATH` says, spelled out: a path is not
1325
+ // relative if it begins with a separator, or with `./` or `../`, or is
1326
+ // nothing but `.` or `..`. Every match is decided by the first three
1327
+ // characters, and this runs on every path handed to the library -- where it
1328
+ // was 55% of a cached lookup, more than the cache lookup itself.
1329
+ const isNotRelative = path => {
1330
+ const first = path.charCodeAt(0)
1331
+
1332
+ if (first === SLASH_CODE) {
1333
+ return true
1334
+ }
1335
+
1336
+ if (first !== DOT_CODE) {
1337
+ return false
1338
+ }
1339
+
1340
+ // '.'
1341
+ if (path.length === 1) {
1342
+ return true
1343
+ }
1344
+
1345
+ const second = path.charCodeAt(1)
1346
+
1347
+ // './'
1348
+ if (second === SLASH_CODE) {
1349
+ return true
1350
+ }
1351
+
1352
+ if (second !== DOT_CODE) {
1353
+ return false
1354
+ }
1355
+
1356
+ // '..' or '../'
1357
+ return path.length === 2 || path.charCodeAt(2) === SLASH_CODE
1358
+ }
595
1359
 
596
1360
  checkPath.isNotRelative = isNotRelative
597
1361
 
@@ -638,7 +1402,7 @@ class Ignore {
638
1402
  }
639
1403
 
640
1404
  // @returns {TestResult}
641
- _test (originalPath, cache, checkUnignored, slices) {
1405
+ _test (originalPath, cache, checkUnignored) {
642
1406
  const path = originalPath
643
1407
  // Supports nullable path
644
1408
  && checkPath.convert(originalPath)
@@ -651,33 +1415,30 @@ class Ignore {
651
1415
  : RETURN_FALSE
652
1416
  )
653
1417
 
654
- return this._t(path, cache, checkUnignored, slices)
1418
+ return this._t(path, cache, checkUnignored)
655
1419
  }
656
1420
 
657
1421
  checkIgnore (path) {
658
1422
  // If the path doest not end with a slash, `.ignores()` is much equivalent
659
1423
  // to `git check-ignore`
660
- if (!REGEX_TEST_TRAILING_SLASH.test(path)) {
1424
+ if (path.charCodeAt(path.length - 1) !== SLASH_CODE) {
661
1425
  return this.test(path)
662
1426
  }
663
1427
 
664
- const slices = path.split(SLASH).filter(Boolean)
665
- slices.pop()
1428
+ // Like `git check-ignore`: a directory excluded by itself or by an
1429
+ // ancestor settles it, and only then is the literal 'abc/' matched
1430
+ // against the rules (see `checkSourceOf`).
1431
+ const dir = this._t(path, this._testCache, true)
666
1432
 
667
- if (slices.length) {
668
- const parent = this._t(
669
- slices.join(SLASH) + SLASH,
670
- this._testCache,
671
- true,
672
- slices
673
- )
674
-
675
- if (parent.ignored) {
676
- return parent
677
- }
1433
+ if (dir.ignored) {
1434
+ return dir
678
1435
  }
679
1436
 
680
- return this._rules.test(path, false, MODE_CHECK_IGNORE)
1437
+ const literal = this._rules.testLiteral(path)
1438
+
1439
+ return literal.ignored || literal.unignored
1440
+ ? literal
1441
+ : dir
681
1442
  }
682
1443
 
683
1444
  _t (
@@ -688,37 +1449,20 @@ class Ignore {
688
1449
  cache,
689
1450
 
690
1451
  // Whether should check if the path is unignored
691
- checkUnignored,
692
-
693
- // The path slices
694
- slices
1452
+ checkUnignored
695
1453
  ) {
696
1454
  if (path in cache) {
697
1455
  return cache[path]
698
1456
  }
699
1457
 
700
- if (!slices) {
701
- // path/to/a.js
702
- // ['path', 'to', 'a.js']
703
- slices = path.split(SLASH).filter(Boolean)
704
- }
705
-
706
- slices.pop()
707
-
708
- // If the path has no parent directory, just test it
709
- if (!slices.length) {
710
- return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE)
711
- }
712
-
713
- const parent = this._t(
714
- slices.join(SLASH) + SLASH,
715
- cache,
716
- checkUnignored,
717
- slices
718
- )
1458
+ const parentPath = parentOf(path)
719
1459
 
720
1460
  // If the path contains a parent directory, check the parent first
721
- return cache[path] = parent.ignored
1461
+ const parent = parentPath
1462
+ ? this._t(parentPath, cache, checkUnignored)
1463
+ : UNDEFINED
1464
+
1465
+ return cache[path] = parent && parent.ignored
722
1466
  // > It is not possible to re-include a file if a parent directory of
723
1467
  // > that file is excluded.
724
1468
  ? parent