@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1110) hide show
  1. package/bin/codegraph +1 -1
  2. package/bin/codegraph.cmd +1 -1
  3. package/lib/dist/.test-build-engine.json +1 -1
  4. package/lib/dist/.test-build-viewer.json +1 -1
  5. package/lib/dist/bin/codegraph.d.ts +3 -0
  6. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  7. package/lib/dist/bin/codegraph.js +507 -702
  8. package/lib/dist/bin/codegraph.js.map +1 -1
  9. package/lib/dist/bin/command-supervision.js +1 -57
  10. package/lib/dist/bin/command-supervision.js.map +1 -1
  11. package/lib/dist/bin/fatal-handler.js +0 -46
  12. package/lib/dist/bin/fatal-handler.js.map +1 -1
  13. package/lib/dist/bin/node-version-check.js +0 -33
  14. package/lib/dist/bin/node-version-check.js.map +1 -1
  15. package/lib/dist/bin/uninstall.js +0 -19
  16. package/lib/dist/bin/uninstall.js.map +1 -1
  17. package/lib/dist/bin/viewer-gate.js +0 -14
  18. package/lib/dist/bin/viewer-gate.js.map +1 -1
  19. package/lib/dist/compile-cache.d.ts +2 -0
  20. package/lib/dist/compile-cache.d.ts.map +1 -0
  21. package/lib/dist/compile-cache.js +45 -0
  22. package/lib/dist/compile-cache.js.map +1 -0
  23. package/lib/dist/context/formatter.js +3 -66
  24. package/lib/dist/context/formatter.js.map +1 -1
  25. package/lib/dist/context/index.d.ts +44 -1
  26. package/lib/dist/context/index.d.ts.map +1 -1
  27. package/lib/dist/context/index.js +123 -430
  28. package/lib/dist/context/index.js.map +1 -1
  29. package/lib/dist/context/markers.js +0 -17
  30. package/lib/dist/context/markers.js.map +1 -1
  31. package/lib/dist/db/index.d.ts +44 -1
  32. package/lib/dist/db/index.d.ts.map +1 -1
  33. package/lib/dist/db/index.js +123 -395
  34. package/lib/dist/db/index.js.map +1 -1
  35. package/lib/dist/db/migrations.d.ts +11 -1
  36. package/lib/dist/db/migrations.d.ts.map +1 -1
  37. package/lib/dist/db/migrations.js +71 -79
  38. package/lib/dist/db/migrations.js.map +1 -1
  39. package/lib/dist/db/name-substring-index.d.ts +63 -0
  40. package/lib/dist/db/name-substring-index.d.ts.map +1 -0
  41. package/lib/dist/db/name-substring-index.js +151 -0
  42. package/lib/dist/db/name-substring-index.js.map +1 -0
  43. package/lib/dist/db/node-sqlite.d.ts +19 -0
  44. package/lib/dist/db/node-sqlite.d.ts.map +1 -0
  45. package/lib/dist/db/node-sqlite.js +23 -0
  46. package/lib/dist/db/node-sqlite.js.map +1 -0
  47. package/lib/dist/db/open-error.d.ts +36 -0
  48. package/lib/dist/db/open-error.d.ts.map +1 -0
  49. package/lib/dist/db/open-error.js +63 -0
  50. package/lib/dist/db/open-error.js.map +1 -0
  51. package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
  52. package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
  53. package/lib/dist/db/parameter-flow-queries.js +168 -0
  54. package/lib/dist/db/parameter-flow-queries.js.map +1 -0
  55. package/lib/dist/db/queries.d.ts +654 -34
  56. package/lib/dist/db/queries.d.ts.map +1 -1
  57. package/lib/dist/db/queries.js +1466 -1470
  58. package/lib/dist/db/queries.js.map +1 -1
  59. package/lib/dist/db/reference-tail.d.ts +83 -0
  60. package/lib/dist/db/reference-tail.d.ts.map +1 -0
  61. package/lib/dist/db/reference-tail.js +68 -0
  62. package/lib/dist/db/reference-tail.js.map +1 -0
  63. package/lib/dist/db/schema.sql +18 -2
  64. package/lib/dist/db/sqlite-adapter.d.ts +18 -1
  65. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  66. package/lib/dist/db/sqlite-adapter.js +12 -62
  67. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  68. package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
  69. package/lib/dist/db/synthesis-stage.js +2 -6
  70. package/lib/dist/db/synthesis-stage.js.map +1 -1
  71. package/lib/dist/db/wal-valve.js +1 -153
  72. package/lib/dist/db/wal-valve.js.map +1 -1
  73. package/lib/dist/db/wsl-shared-index.js +0 -37
  74. package/lib/dist/db/wsl-shared-index.js.map +1 -1
  75. package/lib/dist/directory.d.ts +51 -0
  76. package/lib/dist/directory.d.ts.map +1 -1
  77. package/lib/dist/directory.js +76 -530
  78. package/lib/dist/directory.js.map +1 -1
  79. package/lib/dist/engine.d.ts +15 -0
  80. package/lib/dist/engine.d.ts.map +1 -0
  81. package/lib/dist/engine.js +35 -0
  82. package/lib/dist/engine.js.map +1 -0
  83. package/lib/dist/errors.d.ts +10 -0
  84. package/lib/dist/errors.d.ts.map +1 -1
  85. package/lib/dist/errors.js +8 -101
  86. package/lib/dist/errors.js.map +1 -1
  87. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  88. package/lib/dist/extraction/astro-extractor.js +11 -101
  89. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  90. package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
  91. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  92. package/lib/dist/extraction/cfml-extractor.js +70 -206
  93. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  94. package/lib/dist/extraction/commonjs-requires.js +0 -31
  95. package/lib/dist/extraction/commonjs-requires.js.map +1 -1
  96. package/lib/dist/extraction/dfm-extractor.js +0 -21
  97. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  98. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  99. package/lib/dist/extraction/extraction-version.js +1 -24
  100. package/lib/dist/extraction/extraction-version.js.map +1 -1
  101. package/lib/dist/extraction/function-ref.d.ts +40 -0
  102. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  103. package/lib/dist/extraction/function-ref.js +157 -207
  104. package/lib/dist/extraction/function-ref.js.map +1 -1
  105. package/lib/dist/extraction/generated-detection.js +0 -165
  106. package/lib/dist/extraction/generated-detection.js.map +1 -1
  107. package/lib/dist/extraction/grammars.d.ts +73 -4
  108. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  109. package/lib/dist/extraction/grammars.js +160 -431
  110. package/lib/dist/extraction/grammars.js.map +1 -1
  111. package/lib/dist/extraction/index.d.ts +208 -7
  112. package/lib/dist/extraction/index.d.ts.map +1 -1
  113. package/lib/dist/extraction/index.js +594 -1383
  114. package/lib/dist/extraction/index.js.map +1 -1
  115. package/lib/dist/extraction/kernel/decode.js +0 -16
  116. package/lib/dist/extraction/kernel/decode.js.map +1 -1
  117. package/lib/dist/extraction/kernel/index.d.ts +3 -1
  118. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  119. package/lib/dist/extraction/kernel/index.js +48 -135
  120. package/lib/dist/extraction/kernel/index.js.map +1 -1
  121. package/lib/dist/extraction/kernel/layout.js +42 -76
  122. package/lib/dist/extraction/kernel/layout.js.map +1 -1
  123. package/lib/dist/extraction/kernel/loader.d.ts +5 -1
  124. package/lib/dist/extraction/kernel/loader.d.ts.map +1 -1
  125. package/lib/dist/extraction/kernel/loader.js +0 -37
  126. package/lib/dist/extraction/kernel/loader.js.map +1 -1
  127. package/lib/dist/extraction/languages/arkts.js +0 -59
  128. package/lib/dist/extraction/languages/arkts.js.map +1 -1
  129. package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
  130. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  131. package/lib/dist/extraction/languages/c-cpp.js +789 -856
  132. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  133. package/lib/dist/extraction/languages/cfquery.js +0 -9
  134. package/lib/dist/extraction/languages/cfquery.js.map +1 -1
  135. package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
  136. package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
  137. package/lib/dist/extraction/languages/cfscript.js +80 -9
  138. package/lib/dist/extraction/languages/cfscript.js.map +1 -1
  139. package/lib/dist/extraction/languages/cobol.js +0 -114
  140. package/lib/dist/extraction/languages/cobol.js.map +1 -1
  141. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
  142. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
  143. package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
  144. package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
  145. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
  146. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
  147. package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
  148. package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
  149. package/lib/dist/extraction/languages/csharp.js +3 -55
  150. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  151. package/lib/dist/extraction/languages/dart.d.ts +129 -0
  152. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  153. package/lib/dist/extraction/languages/dart.js +517 -162
  154. package/lib/dist/extraction/languages/dart.js.map +1 -1
  155. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  156. package/lib/dist/extraction/languages/erlang.js +15 -102
  157. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  158. package/lib/dist/extraction/languages/go.d.ts +48 -0
  159. package/lib/dist/extraction/languages/go.d.ts.map +1 -1
  160. package/lib/dist/extraction/languages/go.js +102 -31
  161. package/lib/dist/extraction/languages/go.js.map +1 -1
  162. package/lib/dist/extraction/languages/index.js +0 -6
  163. package/lib/dist/extraction/languages/index.js.map +1 -1
  164. package/lib/dist/extraction/languages/java.d.ts.map +1 -1
  165. package/lib/dist/extraction/languages/java.js +67 -78
  166. package/lib/dist/extraction/languages/java.js.map +1 -1
  167. package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
  168. package/lib/dist/extraction/languages/javascript.js +2 -12
  169. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  170. package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
  171. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  172. package/lib/dist/extraction/languages/kotlin.js +43 -197
  173. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  174. package/lib/dist/extraction/languages/lua.js +2 -39
  175. package/lib/dist/extraction/languages/lua.js.map +1 -1
  176. package/lib/dist/extraction/languages/luau.js +0 -14
  177. package/lib/dist/extraction/languages/luau.js.map +1 -1
  178. package/lib/dist/extraction/languages/nix.js +0 -16
  179. package/lib/dist/extraction/languages/nix.js.map +1 -1
  180. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  181. package/lib/dist/extraction/languages/objc.js +5 -16
  182. package/lib/dist/extraction/languages/objc.js.map +1 -1
  183. package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
  184. package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
  185. package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
  186. package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
  187. package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
  188. package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
  189. package/lib/dist/extraction/languages/pascal-system.js +23 -0
  190. package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
  191. package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
  192. package/lib/dist/extraction/languages/pascal.js +3 -4
  193. package/lib/dist/extraction/languages/pascal.js.map +1 -1
  194. package/lib/dist/extraction/languages/php.d.ts +9 -0
  195. package/lib/dist/extraction/languages/php.d.ts.map +1 -1
  196. package/lib/dist/extraction/languages/php.js +207 -44
  197. package/lib/dist/extraction/languages/php.js.map +1 -1
  198. package/lib/dist/extraction/languages/python.js +2 -20
  199. package/lib/dist/extraction/languages/python.js.map +1 -1
  200. package/lib/dist/extraction/languages/r.js +8 -78
  201. package/lib/dist/extraction/languages/r.js.map +1 -1
  202. package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
  203. package/lib/dist/extraction/languages/ruby.js +17 -25
  204. package/lib/dist/extraction/languages/ruby.js.map +1 -1
  205. package/lib/dist/extraction/languages/rust-macro-calls.d.ts +32 -0
  206. package/lib/dist/extraction/languages/rust-macro-calls.d.ts.map +1 -0
  207. package/lib/dist/extraction/languages/rust-macro-calls.js +306 -0
  208. package/lib/dist/extraction/languages/rust-macro-calls.js.map +1 -0
  209. package/lib/dist/extraction/languages/rust.d.ts +10 -0
  210. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  211. package/lib/dist/extraction/languages/rust.js +15 -47
  212. package/lib/dist/extraction/languages/rust.js.map +1 -1
  213. package/lib/dist/extraction/languages/scala.js +5 -41
  214. package/lib/dist/extraction/languages/scala.js.map +1 -1
  215. package/lib/dist/extraction/languages/solidity.js +1 -82
  216. package/lib/dist/extraction/languages/solidity.js.map +1 -1
  217. package/lib/dist/extraction/languages/swift.js +3 -47
  218. package/lib/dist/extraction/languages/swift.js.map +1 -1
  219. package/lib/dist/extraction/languages/terraform.js +6 -152
  220. package/lib/dist/extraction/languages/terraform.js.map +1 -1
  221. package/lib/dist/extraction/languages/typescript.d.ts +64 -0
  222. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  223. package/lib/dist/extraction/languages/typescript.js +73 -49
  224. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  225. package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
  226. package/lib/dist/extraction/languages/vbnet.js +9 -42
  227. package/lib/dist/extraction/languages/vbnet.js.map +1 -1
  228. package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
  229. package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
  230. package/lib/dist/extraction/lazy-frameworks.js +8 -0
  231. package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
  232. package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
  233. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  234. package/lib/dist/extraction/liquid-extractor.js +89 -148
  235. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  236. package/lib/dist/extraction/mybatis-extractor.js +0 -78
  237. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  238. package/lib/dist/extraction/parse-budget.d.ts +42 -7
  239. package/lib/dist/extraction/parse-budget.d.ts.map +1 -1
  240. package/lib/dist/extraction/parse-budget.js +39 -15
  241. package/lib/dist/extraction/parse-budget.js.map +1 -1
  242. package/lib/dist/extraction/parse-pool.d.ts +29 -17
  243. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  244. package/lib/dist/extraction/parse-pool.js +49 -193
  245. package/lib/dist/extraction/parse-pool.js.map +1 -1
  246. package/lib/dist/extraction/parse-worker.d.ts +1 -1
  247. package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
  248. package/lib/dist/extraction/parse-worker.js +5 -58
  249. package/lib/dist/extraction/parse-worker.js.map +1 -1
  250. package/lib/dist/extraction/razor-extractor.d.ts +9 -0
  251. package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
  252. package/lib/dist/extraction/razor-extractor.js +45 -69
  253. package/lib/dist/extraction/razor-extractor.js.map +1 -1
  254. package/lib/dist/extraction/razor-script.d.ts +23 -0
  255. package/lib/dist/extraction/razor-script.d.ts.map +1 -0
  256. package/lib/dist/extraction/razor-script.js +244 -0
  257. package/lib/dist/extraction/razor-script.js.map +1 -0
  258. package/lib/dist/extraction/sfc-script.d.ts +42 -0
  259. package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
  260. package/lib/dist/extraction/sfc-script.js +32 -31
  261. package/lib/dist/extraction/sfc-script.js.map +1 -1
  262. package/lib/dist/extraction/store-worker.d.ts +1 -1
  263. package/lib/dist/extraction/store-worker.d.ts.map +1 -1
  264. package/lib/dist/extraction/store-worker.js +1 -38
  265. package/lib/dist/extraction/store-worker.js.map +1 -1
  266. package/lib/dist/extraction/store-writer.js +2 -34
  267. package/lib/dist/extraction/store-writer.js.map +1 -1
  268. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  269. package/lib/dist/extraction/svelte-extractor.js +11 -87
  270. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  271. package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
  272. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
  273. package/lib/dist/extraction/syntax-tokens.js +4 -152
  274. package/lib/dist/extraction/syntax-tokens.js.map +1 -1
  275. package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
  276. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  277. package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
  278. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  279. package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
  280. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  281. package/lib/dist/extraction/tree-sitter-types.js +0 -7
  282. package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
  283. package/lib/dist/extraction/tree-sitter.d.ts +518 -10
  284. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  285. package/lib/dist/extraction/tree-sitter.js +2118 -2554
  286. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  287. package/lib/dist/extraction/vue-extractor.d.ts +13 -0
  288. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  289. package/lib/dist/extraction/vue-extractor.js +52 -92
  290. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  291. package/lib/dist/extraction/vue-options-api.js +0 -32
  292. package/lib/dist/extraction/vue-options-api.js.map +1 -1
  293. package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
  294. package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
  295. package/lib/dist/extraction/vue-template-calls.js +497 -0
  296. package/lib/dist/extraction/vue-template-calls.js.map +1 -0
  297. package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  298. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  299. package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  300. package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  301. package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
  302. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  303. package/lib/dist/extraction/wasm-runtime-flags.js +18 -89
  304. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  305. package/lib/dist/file-limits.d.ts +8 -0
  306. package/lib/dist/file-limits.d.ts.map +1 -1
  307. package/lib/dist/file-limits.js +13 -28
  308. package/lib/dist/file-limits.js.map +1 -1
  309. package/lib/dist/graph/branch-guards.d.ts.map +1 -1
  310. package/lib/dist/graph/branch-guards.js +4 -251
  311. package/lib/dist/graph/branch-guards.js.map +1 -1
  312. package/lib/dist/graph/call-sites.d.ts +12 -0
  313. package/lib/dist/graph/call-sites.d.ts.map +1 -0
  314. package/lib/dist/graph/call-sites.js +17 -0
  315. package/lib/dist/graph/call-sites.js.map +1 -0
  316. package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
  317. package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
  318. package/lib/dist/graph/cobol-copybooks.js +45 -0
  319. package/lib/dist/graph/cobol-copybooks.js.map +1 -0
  320. package/lib/dist/graph/dead-code.d.ts +26 -4
  321. package/lib/dist/graph/dead-code.d.ts.map +1 -1
  322. package/lib/dist/graph/dead-code.js +157 -311
  323. package/lib/dist/graph/dead-code.js.map +1 -1
  324. package/lib/dist/graph/dynamic-boundary-report.js +1 -88
  325. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
  326. package/lib/dist/graph/file-cycles.d.ts +20 -0
  327. package/lib/dist/graph/file-cycles.d.ts.map +1 -0
  328. package/lib/dist/graph/file-cycles.js +79 -0
  329. package/lib/dist/graph/file-cycles.js.map +1 -0
  330. package/lib/dist/graph/file-drift.d.ts +35 -0
  331. package/lib/dist/graph/file-drift.d.ts.map +1 -0
  332. package/lib/dist/graph/file-drift.js +46 -0
  333. package/lib/dist/graph/file-drift.js.map +1 -0
  334. package/lib/dist/graph/go-package.d.ts +27 -0
  335. package/lib/dist/graph/go-package.d.ts.map +1 -0
  336. package/lib/dist/graph/go-package.js +49 -0
  337. package/lib/dist/graph/go-package.js.map +1 -0
  338. package/lib/dist/graph/index.d.ts +2 -0
  339. package/lib/dist/graph/index.d.ts.map +1 -1
  340. package/lib/dist/graph/index.js +4 -6
  341. package/lib/dist/graph/index.js.map +1 -1
  342. package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
  343. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
  344. package/lib/dist/graph/named-symbol-flow.js +82 -223
  345. package/lib/dist/graph/named-symbol-flow.js.map +1 -1
  346. package/lib/dist/graph/owning-package.d.ts +59 -0
  347. package/lib/dist/graph/owning-package.d.ts.map +1 -0
  348. package/lib/dist/graph/owning-package.js +120 -0
  349. package/lib/dist/graph/owning-package.js.map +1 -0
  350. package/lib/dist/graph/queries.d.ts +6 -3
  351. package/lib/dist/graph/queries.d.ts.map +1 -1
  352. package/lib/dist/graph/queries.js +4 -137
  353. package/lib/dist/graph/queries.js.map +1 -1
  354. package/lib/dist/graph/symbol-lookup.d.ts +15 -3
  355. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
  356. package/lib/dist/graph/symbol-lookup.js +47 -89
  357. package/lib/dist/graph/symbol-lookup.js.map +1 -1
  358. package/lib/dist/graph/symbol-references.d.ts +86 -0
  359. package/lib/dist/graph/symbol-references.d.ts.map +1 -0
  360. package/lib/dist/graph/symbol-references.js +304 -0
  361. package/lib/dist/graph/symbol-references.js.map +1 -0
  362. package/lib/dist/graph/synthesized-hop.d.ts +37 -0
  363. package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
  364. package/lib/dist/graph/synthesized-hop.js +62 -0
  365. package/lib/dist/graph/synthesized-hop.js.map +1 -0
  366. package/lib/dist/graph/test-code.d.ts +33 -0
  367. package/lib/dist/graph/test-code.d.ts.map +1 -0
  368. package/lib/dist/graph/test-code.js +104 -0
  369. package/lib/dist/graph/test-code.js.map +1 -0
  370. package/lib/dist/graph/traversal.d.ts +31 -2
  371. package/lib/dist/graph/traversal.d.ts.map +1 -1
  372. package/lib/dist/graph/traversal.js +96 -226
  373. package/lib/dist/graph/traversal.js.map +1 -1
  374. package/lib/dist/graph/type-hierarchy.js +0 -138
  375. package/lib/dist/graph/type-hierarchy.js.map +1 -1
  376. package/lib/dist/index.d.ts +214 -26
  377. package/lib/dist/index.d.ts.map +1 -1
  378. package/lib/dist/index.js +736 -1112
  379. package/lib/dist/index.js.map +1 -1
  380. package/lib/dist/installer/beta-signup.js +0 -39
  381. package/lib/dist/installer/beta-signup.js.map +1 -1
  382. package/lib/dist/installer/config-writer.js +0 -24
  383. package/lib/dist/installer/config-writer.js.map +1 -1
  384. package/lib/dist/installer/index.d.ts +13 -6
  385. package/lib/dist/installer/index.d.ts.map +1 -1
  386. package/lib/dist/installer/index.js +27 -160
  387. package/lib/dist/installer/index.js.map +1 -1
  388. package/lib/dist/installer/instructions-template.d.ts +16 -1
  389. package/lib/dist/installer/instructions-template.d.ts.map +1 -1
  390. package/lib/dist/installer/instructions-template.js +10 -38
  391. package/lib/dist/installer/instructions-template.js.map +1 -1
  392. package/lib/dist/installer/targets/antigravity.js +0 -113
  393. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  394. package/lib/dist/installer/targets/bob.d.ts +20 -0
  395. package/lib/dist/installer/targets/bob.d.ts.map +1 -0
  396. package/lib/dist/installer/targets/bob.js +83 -0
  397. package/lib/dist/installer/targets/bob.js.map +1 -0
  398. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  399. package/lib/dist/installer/targets/claude.js +1 -185
  400. package/lib/dist/installer/targets/claude.js.map +1 -1
  401. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  402. package/lib/dist/installer/targets/codex.js +17 -109
  403. package/lib/dist/installer/targets/codex.js.map +1 -1
  404. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  405. package/lib/dist/installer/targets/copilot-cli.js +2 -54
  406. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  407. package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
  408. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
  409. package/lib/dist/installer/targets/copilot-vscode.js +0 -58
  410. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
  411. package/lib/dist/installer/targets/cursor.js +7 -88
  412. package/lib/dist/installer/targets/cursor.js.map +1 -1
  413. package/lib/dist/installer/targets/droid.d.ts +18 -0
  414. package/lib/dist/installer/targets/droid.d.ts.map +1 -0
  415. package/lib/dist/installer/targets/droid.js +92 -0
  416. package/lib/dist/installer/targets/droid.js.map +1 -0
  417. package/lib/dist/installer/targets/dsh.d.ts +35 -0
  418. package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
  419. package/lib/dist/installer/targets/dsh.js +267 -0
  420. package/lib/dist/installer/targets/dsh.js.map +1 -0
  421. package/lib/dist/installer/targets/gemini.js +0 -37
  422. package/lib/dist/installer/targets/gemini.js.map +1 -1
  423. package/lib/dist/installer/targets/grok.d.ts +25 -0
  424. package/lib/dist/installer/targets/grok.d.ts.map +1 -0
  425. package/lib/dist/installer/targets/grok.js +96 -0
  426. package/lib/dist/installer/targets/grok.js.map +1 -0
  427. package/lib/dist/installer/targets/hermes.d.ts +19 -7
  428. package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
  429. package/lib/dist/installer/targets/hermes.js +218 -214
  430. package/lib/dist/installer/targets/hermes.js.map +1 -1
  431. package/lib/dist/installer/targets/json-config.d.ts +45 -0
  432. package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
  433. package/lib/dist/installer/targets/json-config.js +128 -0
  434. package/lib/dist/installer/targets/json-config.js.map +1 -0
  435. package/lib/dist/installer/targets/kimi.d.ts +21 -0
  436. package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
  437. package/lib/dist/installer/targets/kimi.js +97 -0
  438. package/lib/dist/installer/targets/kimi.js.map +1 -0
  439. package/lib/dist/installer/targets/kiro.js +1 -41
  440. package/lib/dist/installer/targets/kiro.js.map +1 -1
  441. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  442. package/lib/dist/installer/targets/opencode.js +1 -103
  443. package/lib/dist/installer/targets/opencode.js.map +1 -1
  444. package/lib/dist/installer/targets/pi.d.ts +24 -0
  445. package/lib/dist/installer/targets/pi.d.ts.map +1 -0
  446. package/lib/dist/installer/targets/pi.js +100 -0
  447. package/lib/dist/installer/targets/pi.js.map +1 -0
  448. package/lib/dist/installer/targets/qoder.d.ts +23 -0
  449. package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
  450. package/lib/dist/installer/targets/qoder.js +83 -0
  451. package/lib/dist/installer/targets/qoder.js.map +1 -0
  452. package/lib/dist/installer/targets/qwen.d.ts +21 -0
  453. package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
  454. package/lib/dist/installer/targets/qwen.js +115 -0
  455. package/lib/dist/installer/targets/qwen.js.map +1 -0
  456. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  457. package/lib/dist/installer/targets/registry.js +18 -25
  458. package/lib/dist/installer/targets/registry.js.map +1 -1
  459. package/lib/dist/installer/targets/shared.d.ts +83 -13
  460. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  461. package/lib/dist/installer/targets/shared.js +201 -131
  462. package/lib/dist/installer/targets/shared.js.map +1 -1
  463. package/lib/dist/installer/targets/toml.d.ts +82 -6
  464. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  465. package/lib/dist/installer/targets/toml.js +318 -112
  466. package/lib/dist/installer/targets/toml.js.map +1 -1
  467. package/lib/dist/installer/targets/types.d.ts +1 -1
  468. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  469. package/lib/dist/installer/targets/types.js +0 -13
  470. package/lib/dist/installer/targets/types.js.map +1 -1
  471. package/lib/dist/installer/targets/windsurf.d.ts +22 -0
  472. package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
  473. package/lib/dist/installer/targets/windsurf.js +90 -0
  474. package/lib/dist/installer/targets/windsurf.js.map +1 -0
  475. package/lib/dist/lazy-engine.d.ts +22 -0
  476. package/lib/dist/lazy-engine.d.ts.map +1 -0
  477. package/lib/dist/lazy-engine.js +16 -0
  478. package/lib/dist/lazy-engine.js.map +1 -0
  479. package/lib/dist/mcp/answer-freshness.js +0 -6
  480. package/lib/dist/mcp/answer-freshness.js.map +1 -1
  481. package/lib/dist/mcp/daemon-manager.js +2 -23
  482. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  483. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  484. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  485. package/lib/dist/mcp/daemon-paths.js +9 -85
  486. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  487. package/lib/dist/mcp/daemon-proof.d.ts +19 -0
  488. package/lib/dist/mcp/daemon-proof.d.ts.map +1 -0
  489. package/lib/dist/mcp/daemon-proof.js +126 -0
  490. package/lib/dist/mcp/daemon-proof.js.map +1 -0
  491. package/lib/dist/mcp/daemon-registry.d.ts +47 -2
  492. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  493. package/lib/dist/mcp/daemon-registry.js +188 -139
  494. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  495. package/lib/dist/mcp/daemon.d.ts +69 -0
  496. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  497. package/lib/dist/mcp/daemon.js +186 -376
  498. package/lib/dist/mcp/daemon.js.map +1 -1
  499. package/lib/dist/mcp/dynamic-boundaries.js +4 -78
  500. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  501. package/lib/dist/mcp/early-ppid.js +0 -24
  502. package/lib/dist/mcp/early-ppid.js.map +1 -1
  503. package/lib/dist/mcp/engine.d.ts +24 -0
  504. package/lib/dist/mcp/engine.d.ts.map +1 -1
  505. package/lib/dist/mcp/engine.js +47 -152
  506. package/lib/dist/mcp/engine.js.map +1 -1
  507. package/lib/dist/mcp/explore-dedup.js +0 -108
  508. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  509. package/lib/dist/mcp/explore-diagnostics.d.ts +6 -0
  510. package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -1
  511. package/lib/dist/mcp/explore-diagnostics.js +8 -116
  512. package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
  513. package/lib/dist/mcp/explore-one-symbol.d.ts +77 -0
  514. package/lib/dist/mcp/explore-one-symbol.d.ts.map +1 -0
  515. package/lib/dist/mcp/explore-one-symbol.js +431 -0
  516. package/lib/dist/mcp/explore-one-symbol.js.map +1 -0
  517. package/lib/dist/mcp/explore-session-state.js +0 -129
  518. package/lib/dist/mcp/explore-session-state.js.map +1 -1
  519. package/lib/dist/mcp/hook-client.d.ts +44 -0
  520. package/lib/dist/mcp/hook-client.d.ts.map +1 -0
  521. package/lib/dist/mcp/hook-client.js +202 -0
  522. package/lib/dist/mcp/hook-client.js.map +1 -0
  523. package/lib/dist/mcp/index-freshness-worker.js +1 -6
  524. package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
  525. package/lib/dist/mcp/index-freshness.js +0 -15
  526. package/lib/dist/mcp/index-freshness.js.map +1 -1
  527. package/lib/dist/mcp/index-version-warning.d.ts +21 -0
  528. package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
  529. package/lib/dist/mcp/index-version-warning.js +38 -0
  530. package/lib/dist/mcp/index-version-warning.js.map +1 -0
  531. package/lib/dist/mcp/index.d.ts +29 -1
  532. package/lib/dist/mcp/index.d.ts.map +1 -1
  533. package/lib/dist/mcp/index.js +131 -300
  534. package/lib/dist/mcp/index.js.map +1 -1
  535. package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
  536. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  537. package/lib/dist/mcp/liveness-watchdog.js +106 -121
  538. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  539. package/lib/dist/mcp/opencode-tool-names.d.ts +32 -0
  540. package/lib/dist/mcp/opencode-tool-names.d.ts.map +1 -0
  541. package/lib/dist/mcp/opencode-tool-names.js +24 -0
  542. package/lib/dist/mcp/opencode-tool-names.js.map +1 -0
  543. package/lib/dist/mcp/ppid-watchdog.js +0 -24
  544. package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
  545. package/lib/dist/mcp/process-identity.d.ts +42 -0
  546. package/lib/dist/mcp/process-identity.d.ts.map +1 -0
  547. package/lib/dist/mcp/process-identity.js +130 -0
  548. package/lib/dist/mcp/process-identity.js.map +1 -0
  549. package/lib/dist/mcp/project-lifecycle.d.ts +6 -0
  550. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
  551. package/lib/dist/mcp/project-lifecycle.js +70 -19
  552. package/lib/dist/mcp/project-lifecycle.js.map +1 -1
  553. package/lib/dist/mcp/prompt-explore.d.ts +19 -0
  554. package/lib/dist/mcp/prompt-explore.d.ts.map +1 -0
  555. package/lib/dist/mcp/prompt-explore.js +6 -0
  556. package/lib/dist/mcp/prompt-explore.js.map +1 -0
  557. package/lib/dist/mcp/proxy.d.ts +25 -7
  558. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  559. package/lib/dist/mcp/proxy.js +145 -274
  560. package/lib/dist/mcp/proxy.js.map +1 -1
  561. package/lib/dist/mcp/query-pool.d.ts +52 -3
  562. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  563. package/lib/dist/mcp/query-pool.js +114 -123
  564. package/lib/dist/mcp/query-pool.js.map +1 -1
  565. package/lib/dist/mcp/query-worker.js +24 -36
  566. package/lib/dist/mcp/query-worker.js.map +1 -1
  567. package/lib/dist/mcp/server-instructions.d.ts +18 -0
  568. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  569. package/lib/dist/mcp/server-instructions.js +12 -32
  570. package/lib/dist/mcp/server-instructions.js.map +1 -1
  571. package/lib/dist/mcp/session.d.ts +46 -0
  572. package/lib/dist/mcp/session.d.ts.map +1 -1
  573. package/lib/dist/mcp/session.js +70 -132
  574. package/lib/dist/mcp/session.js.map +1 -1
  575. package/lib/dist/mcp/startup-handshake.js +1 -48
  576. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  577. package/lib/dist/mcp/stdin-teardown.js +0 -28
  578. package/lib/dist/mcp/stdin-teardown.js.map +1 -1
  579. package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
  580. package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
  581. package/lib/dist/mcp/stdout-teardown.js +20 -0
  582. package/lib/dist/mcp/stdout-teardown.js.map +1 -0
  583. package/lib/dist/mcp/tools.d.ts +157 -18
  584. package/lib/dist/mcp/tools.d.ts.map +1 -1
  585. package/lib/dist/mcp/tools.js +797 -3621
  586. package/lib/dist/mcp/tools.js.map +1 -1
  587. package/lib/dist/mcp/transport.d.ts.map +1 -1
  588. package/lib/dist/mcp/transport.js +4 -96
  589. package/lib/dist/mcp/transport.js.map +1 -1
  590. package/lib/dist/mcp/version.d.ts +13 -1
  591. package/lib/dist/mcp/version.d.ts.map +1 -1
  592. package/lib/dist/mcp/version.js +19 -21
  593. package/lib/dist/mcp/version.js.map +1 -1
  594. package/lib/dist/mcp/writer-lock.d.ts +11 -0
  595. package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
  596. package/lib/dist/mcp/writer-lock.js +49 -46
  597. package/lib/dist/mcp/writer-lock.js.map +1 -1
  598. package/lib/dist/project-config.d.ts +20 -0
  599. package/lib/dist/project-config.d.ts.map +1 -1
  600. package/lib/dist/project-config.js +31 -140
  601. package/lib/dist/project-config.js.map +1 -1
  602. package/lib/dist/resolution/alias-binding.d.ts +7 -0
  603. package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
  604. package/lib/dist/resolution/alias-binding.js +7 -56
  605. package/lib/dist/resolution/alias-binding.js.map +1 -1
  606. package/lib/dist/resolution/ambient-modules.d.ts +185 -0
  607. package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
  608. package/lib/dist/resolution/ambient-modules.js +732 -0
  609. package/lib/dist/resolution/ambient-modules.js.map +1 -0
  610. package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
  611. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
  612. package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
  613. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
  614. package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
  615. package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
  616. package/lib/dist/resolution/c-feature-variants.js +249 -0
  617. package/lib/dist/resolution/c-feature-variants.js.map +1 -0
  618. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  619. package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
  620. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  621. package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
  622. package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
  623. package/lib/dist/resolution/c-macro-renames.js +95 -0
  624. package/lib/dist/resolution/c-macro-renames.js.map +1 -0
  625. package/lib/dist/resolution/callback-synthesizer.d.ts +19 -5
  626. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  627. package/lib/dist/resolution/callback-synthesizer.js +1395 -1343
  628. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  629. package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
  630. package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
  631. package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
  632. package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
  633. package/lib/dist/resolution/cooperative-yield.js +0 -27
  634. package/lib/dist/resolution/cooperative-yield.js.map +1 -1
  635. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
  636. package/lib/dist/resolution/cpp-constructor.js +15 -17
  637. package/lib/dist/resolution/cpp-constructor.js.map +1 -1
  638. package/lib/dist/resolution/cpp-includers.d.ts +46 -0
  639. package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
  640. package/lib/dist/resolution/cpp-includers.js +153 -0
  641. package/lib/dist/resolution/cpp-includers.js.map +1 -0
  642. package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
  643. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
  644. package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
  645. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
  646. package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
  647. package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
  648. package/lib/dist/resolution/cpp-namespaces.js +151 -0
  649. package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
  650. package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
  651. package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
  652. package/lib/dist/resolution/cpp-raw-strings.js +167 -0
  653. package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
  654. package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
  655. package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
  656. package/lib/dist/resolution/cpp-supertypes.js +322 -0
  657. package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
  658. package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
  659. package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
  660. package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
  661. package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
  662. package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
  663. package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
  664. package/lib/dist/resolution/cpp-type-aliases.js +648 -0
  665. package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
  666. package/lib/dist/resolution/dart-libraries.d.ts +75 -0
  667. package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
  668. package/lib/dist/resolution/dart-libraries.js +721 -0
  669. package/lib/dist/resolution/dart-libraries.js.map +1 -0
  670. package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
  671. package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
  672. package/lib/dist/resolution/dart-local-scope.js +565 -0
  673. package/lib/dist/resolution/dart-local-scope.js.map +1 -0
  674. package/lib/dist/resolution/event-emitter-synthesizer.d.ts +39 -0
  675. package/lib/dist/resolution/event-emitter-synthesizer.d.ts.map +1 -0
  676. package/lib/dist/resolution/event-emitter-synthesizer.js +656 -0
  677. package/lib/dist/resolution/event-emitter-synthesizer.js.map +1 -0
  678. package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
  679. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
  680. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
  681. package/lib/dist/resolution/frameworks/angular-router.js +41 -208
  682. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
  683. package/lib/dist/resolution/frameworks/aspnet-routes.d.ts +62 -0
  684. package/lib/dist/resolution/frameworks/aspnet-routes.d.ts.map +1 -0
  685. package/lib/dist/resolution/frameworks/aspnet-routes.js +382 -0
  686. package/lib/dist/resolution/frameworks/aspnet-routes.js.map +1 -0
  687. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  688. package/lib/dist/resolution/frameworks/astro.js +4 -60
  689. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  690. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
  691. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
  692. package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
  693. package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
  694. package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
  695. package/lib/dist/resolution/frameworks/cics.js +7 -33
  696. package/lib/dist/resolution/frameworks/cics.js.map +1 -1
  697. package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
  698. package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
  699. package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
  700. package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
  701. package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
  702. package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
  703. package/lib/dist/resolution/frameworks/component-folder.js +11 -0
  704. package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
  705. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  706. package/lib/dist/resolution/frameworks/csharp.js +85 -102
  707. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  708. package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
  709. package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
  710. package/lib/dist/resolution/frameworks/drupal.js +377 -142
  711. package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
  712. package/lib/dist/resolution/frameworks/elysia.d.ts +38 -0
  713. package/lib/dist/resolution/frameworks/elysia.d.ts.map +1 -0
  714. package/lib/dist/resolution/frameworks/elysia.js +683 -0
  715. package/lib/dist/resolution/frameworks/elysia.js.map +1 -0
  716. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  717. package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
  718. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  719. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
  720. package/lib/dist/resolution/frameworks/expo-router.js +9 -190
  721. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
  722. package/lib/dist/resolution/frameworks/express.d.ts +48 -1
  723. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  724. package/lib/dist/resolution/frameworks/express.js +193 -199
  725. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  726. package/lib/dist/resolution/frameworks/fabric.js +1 -104
  727. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  728. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  729. package/lib/dist/resolution/frameworks/go.js +14 -43
  730. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  731. package/lib/dist/resolution/frameworks/goframe.js +1 -55
  732. package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
  733. package/lib/dist/resolution/frameworks/index.d.ts +14 -0
  734. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  735. package/lib/dist/resolution/frameworks/index.js +16 -50
  736. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  737. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  738. package/lib/dist/resolution/frameworks/java.js +203 -129
  739. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  740. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
  741. package/lib/dist/resolution/frameworks/laravel.js +71 -136
  742. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  743. package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
  744. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
  745. package/lib/dist/resolution/frameworks/nestjs.js +2 -199
  746. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  747. package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
  748. package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
  749. package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
  750. package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
  751. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
  752. package/lib/dist/resolution/frameworks/nextjs.js +10 -66
  753. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
  754. package/lib/dist/resolution/frameworks/object-literal.js +0 -21
  755. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
  756. package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
  757. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
  758. package/lib/dist/resolution/frameworks/package-deps.js +35 -26
  759. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
  760. package/lib/dist/resolution/frameworks/page-component.js +0 -14
  761. package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
  762. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  763. package/lib/dist/resolution/frameworks/play.js +26 -34
  764. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  765. package/lib/dist/resolution/frameworks/python.js +5 -102
  766. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  767. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  768. package/lib/dist/resolution/frameworks/react-native.js +1 -166
  769. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  770. package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
  771. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
  772. package/lib/dist/resolution/frameworks/react-router.js +10 -82
  773. package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
  774. package/lib/dist/resolution/frameworks/react.d.ts +57 -0
  775. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  776. package/lib/dist/resolution/frameworks/react.js +1449 -191
  777. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  778. package/lib/dist/resolution/frameworks/ruby.js +1 -61
  779. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  780. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  781. package/lib/dist/resolution/frameworks/rust.js +35 -56
  782. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  783. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  784. package/lib/dist/resolution/frameworks/svelte.js +7 -75
  785. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  786. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
  787. package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
  788. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
  789. package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
  790. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
  791. package/lib/dist/resolution/frameworks/swift.js +0 -97
  792. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  793. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
  794. package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
  795. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
  796. package/lib/dist/resolution/frameworks/terraform.js +1 -85
  797. package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
  798. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
  799. package/lib/dist/resolution/frameworks/vue-router.js +11 -134
  800. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
  801. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  802. package/lib/dist/resolution/frameworks/vue.js +42 -114
  803. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  804. package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
  805. package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
  806. package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
  807. package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
  808. package/lib/dist/resolution/go-module.d.ts +23 -7
  809. package/lib/dist/resolution/go-module.d.ts.map +1 -1
  810. package/lib/dist/resolution/go-module.js +21 -24
  811. package/lib/dist/resolution/go-module.js.map +1 -1
  812. package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
  813. package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
  814. package/lib/dist/resolution/go-stdlib-methods.js +224 -0
  815. package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
  816. package/lib/dist/resolution/goframe-synthesizer.js +2 -53
  817. package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
  818. package/lib/dist/resolution/import-resolver.d.ts +278 -29
  819. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  820. package/lib/dist/resolution/import-resolver.js +1825 -1396
  821. package/lib/dist/resolution/import-resolver.js.map +1 -1
  822. package/lib/dist/resolution/index.d.ts +517 -6
  823. package/lib/dist/resolution/index.d.ts.map +1 -1
  824. package/lib/dist/resolution/index.js +1604 -1042
  825. package/lib/dist/resolution/index.js.map +1 -1
  826. package/lib/dist/resolution/js-builtins.d.ts +23 -0
  827. package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
  828. package/lib/dist/resolution/js-builtins.js +34 -14
  829. package/lib/dist/resolution/js-builtins.js.map +1 -1
  830. package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
  831. package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
  832. package/lib/dist/resolution/js-class-expressions.js +25 -0
  833. package/lib/dist/resolution/js-class-expressions.js.map +1 -0
  834. package/lib/dist/resolution/js-super-calls.d.ts +18 -0
  835. package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
  836. package/lib/dist/resolution/js-super-calls.js +94 -0
  837. package/lib/dist/resolution/js-super-calls.js.map +1 -0
  838. package/lib/dist/resolution/jsx-code.d.ts +28 -0
  839. package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
  840. package/lib/dist/resolution/jsx-code.js +459 -0
  841. package/lib/dist/resolution/jsx-code.js.map +1 -0
  842. package/lib/dist/resolution/lru-cache.d.ts +5 -13
  843. package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
  844. package/lib/dist/resolution/lru-cache.js +43 -32
  845. package/lib/dist/resolution/lru-cache.js.map +1 -1
  846. package/lib/dist/resolution/memory-budget.js +0 -52
  847. package/lib/dist/resolution/memory-budget.js.map +1 -1
  848. package/lib/dist/resolution/module-importers.d.ts +210 -0
  849. package/lib/dist/resolution/module-importers.d.ts.map +1 -0
  850. package/lib/dist/resolution/module-importers.js +673 -0
  851. package/lib/dist/resolution/module-importers.js.map +1 -0
  852. package/lib/dist/resolution/name-matcher.d.ts +986 -7
  853. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  854. package/lib/dist/resolution/name-matcher.js +24176 -6745
  855. package/lib/dist/resolution/name-matcher.js.map +1 -1
  856. package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
  857. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
  858. package/lib/dist/resolution/next-router-synthesizer.js +46 -28
  859. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
  860. package/lib/dist/resolution/override-parameters.d.ts +40 -0
  861. package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
  862. package/lib/dist/resolution/override-parameters.js +339 -0
  863. package/lib/dist/resolution/override-parameters.js.map +1 -0
  864. package/lib/dist/resolution/parameter-flow.d.ts +218 -0
  865. package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
  866. package/lib/dist/resolution/parameter-flow.js +474 -0
  867. package/lib/dist/resolution/parameter-flow.js.map +1 -0
  868. package/lib/dist/resolution/pascal-scope.d.ts +91 -0
  869. package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
  870. package/lib/dist/resolution/pascal-scope.js +961 -0
  871. package/lib/dist/resolution/pascal-scope.js.map +1 -0
  872. package/lib/dist/resolution/path-aliases.d.ts +32 -4
  873. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  874. package/lib/dist/resolution/path-aliases.js +43 -110
  875. package/lib/dist/resolution/path-aliases.js.map +1 -1
  876. package/lib/dist/resolution/php-web-root.d.ts +39 -0
  877. package/lib/dist/resolution/php-web-root.d.ts.map +1 -0
  878. package/lib/dist/resolution/php-web-root.js +141 -0
  879. package/lib/dist/resolution/php-web-root.js.map +1 -0
  880. package/lib/dist/resolution/project-scans.d.ts +38 -0
  881. package/lib/dist/resolution/project-scans.d.ts.map +1 -0
  882. package/lib/dist/resolution/project-scans.js +30 -0
  883. package/lib/dist/resolution/project-scans.js.map +1 -0
  884. package/lib/dist/resolution/python-overloads.d.ts +10 -0
  885. package/lib/dist/resolution/python-overloads.d.ts.map +1 -0
  886. package/lib/dist/resolution/python-overloads.js +75 -0
  887. package/lib/dist/resolution/python-overloads.js.map +1 -0
  888. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
  889. package/lib/dist/resolution/react-router-synthesizer.js +3 -55
  890. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
  891. package/lib/dist/resolution/resolver-pool.d.ts +23 -2
  892. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  893. package/lib/dist/resolution/resolver-pool.js +43 -111
  894. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  895. package/lib/dist/resolution/resolver-worker.d.ts +1 -1
  896. package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
  897. package/lib/dist/resolution/resolver-worker.js +8 -37
  898. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  899. package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
  900. package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
  901. package/lib/dist/resolution/resurrect-ref.js +19 -0
  902. package/lib/dist/resolution/resurrect-ref.js.map +1 -0
  903. package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
  904. package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
  905. package/lib/dist/resolution/ruby-constant-paths.js +255 -0
  906. package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
  907. package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
  908. package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
  909. package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
  910. package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
  911. package/lib/dist/resolution/rust-scopes.d.ts +120 -0
  912. package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
  913. package/lib/dist/resolution/rust-scopes.js +730 -0
  914. package/lib/dist/resolution/rust-scopes.js.map +1 -0
  915. package/lib/dist/resolution/shopify-themes.d.ts +10 -0
  916. package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
  917. package/lib/dist/resolution/shopify-themes.js +19 -0
  918. package/lib/dist/resolution/shopify-themes.js.map +1 -0
  919. package/lib/dist/resolution/strip-comments.d.ts +20 -1
  920. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  921. package/lib/dist/resolution/strip-comments.js +164 -119
  922. package/lib/dist/resolution/strip-comments.js.map +1 -1
  923. package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
  924. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
  925. package/lib/dist/resolution/swift-objc-bridge.js +0 -160
  926. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
  927. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
  928. package/lib/dist/resolution/swift-type-visibility.js +62 -104
  929. package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
  930. package/lib/dist/resolution/synth-utils.js +1 -22
  931. package/lib/dist/resolution/synth-utils.js.map +1 -1
  932. package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
  933. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
  934. package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
  935. package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
  936. package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
  937. package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
  938. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
  939. package/lib/dist/resolution/tier-synthesizer.js +35 -177
  940. package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
  941. package/lib/dist/resolution/type-parameters.d.ts +23 -0
  942. package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
  943. package/lib/dist/resolution/type-parameters.js +52 -54
  944. package/lib/dist/resolution/type-parameters.js.map +1 -1
  945. package/lib/dist/resolution/types.d.ts +192 -11
  946. package/lib/dist/resolution/types.d.ts.map +1 -1
  947. package/lib/dist/resolution/types.js +0 -47
  948. package/lib/dist/resolution/types.js.map +1 -1
  949. package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
  950. package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
  951. package/lib/dist/resolution/vbnet-receivers.js +1482 -0
  952. package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
  953. package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
  954. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
  955. package/lib/dist/resolution/workspace-packages.d.ts +206 -15
  956. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
  957. package/lib/dist/resolution/workspace-packages.js +573 -152
  958. package/lib/dist/resolution/workspace-packages.js.map +1 -1
  959. package/lib/dist/search/identifier-segments.js +2 -93
  960. package/lib/dist/search/identifier-segments.js.map +1 -1
  961. package/lib/dist/search/query-parser.js +0 -54
  962. package/lib/dist/search/query-parser.js.map +1 -1
  963. package/lib/dist/search/query-paths.js +0 -167
  964. package/lib/dist/search/query-paths.js.map +1 -1
  965. package/lib/dist/search/query-utils.d.ts +44 -0
  966. package/lib/dist/search/query-utils.d.ts.map +1 -1
  967. package/lib/dist/search/query-utils.js +120 -198
  968. package/lib/dist/search/query-utils.js.map +1 -1
  969. package/lib/dist/sync/git-hooks.d.ts +14 -5
  970. package/lib/dist/sync/git-hooks.d.ts.map +1 -1
  971. package/lib/dist/sync/git-hooks.js +118 -65
  972. package/lib/dist/sync/git-hooks.js.map +1 -1
  973. package/lib/dist/sync/index.js +0 -14
  974. package/lib/dist/sync/index.js.map +1 -1
  975. package/lib/dist/sync/watch-policy.js +0 -45
  976. package/lib/dist/sync/watch-policy.js.map +1 -1
  977. package/lib/dist/sync/watcher.d.ts +29 -11
  978. package/lib/dist/sync/watcher.d.ts.map +1 -1
  979. package/lib/dist/sync/watcher.js +83 -487
  980. package/lib/dist/sync/watcher.js.map +1 -1
  981. package/lib/dist/sync/worktree.d.ts +7 -2
  982. package/lib/dist/sync/worktree.d.ts.map +1 -1
  983. package/lib/dist/sync/worktree.js +24 -97
  984. package/lib/dist/sync/worktree.js.map +1 -1
  985. package/lib/dist/telemetry/index.d.ts.map +1 -1
  986. package/lib/dist/telemetry/index.js +15 -135
  987. package/lib/dist/telemetry/index.js.map +1 -1
  988. package/lib/dist/types.d.ts +46 -0
  989. package/lib/dist/types.d.ts.map +1 -1
  990. package/lib/dist/types.js +15 -44
  991. package/lib/dist/types.js.map +1 -1
  992. package/lib/dist/ui/color.js +0 -19
  993. package/lib/dist/ui/color.js.map +1 -1
  994. package/lib/dist/ui/glyphs.js +2 -45
  995. package/lib/dist/ui/glyphs.js.map +1 -1
  996. package/lib/dist/ui/shimmer-progress.js +0 -21
  997. package/lib/dist/ui/shimmer-progress.js.map +1 -1
  998. package/lib/dist/ui/shimmer-worker.js +0 -22
  999. package/lib/dist/ui/shimmer-worker.js.map +1 -1
  1000. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
  1001. package/lib/dist/ui-server/api/deadcode.js +2 -31
  1002. package/lib/dist/ui-server/api/deadcode.js.map +1 -1
  1003. package/lib/dist/ui-server/api/effects.js +0 -111
  1004. package/lib/dist/ui-server/api/effects.js.map +1 -1
  1005. package/lib/dist/ui-server/api/entrypoints.js +0 -142
  1006. package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
  1007. package/lib/dist/ui-server/api/events.js +0 -145
  1008. package/lib/dist/ui-server/api/events.js.map +1 -1
  1009. package/lib/dist/ui-server/api/file.js +0 -80
  1010. package/lib/dist/ui-server/api/file.js.map +1 -1
  1011. package/lib/dist/ui-server/api/filecode.js +0 -95
  1012. package/lib/dist/ui-server/api/filecode.js.map +1 -1
  1013. package/lib/dist/ui-server/api/flow.js +0 -149
  1014. package/lib/dist/ui-server/api/flow.js.map +1 -1
  1015. package/lib/dist/ui-server/api/hierarchy.js +0 -28
  1016. package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
  1017. package/lib/dist/ui-server/api/index.js +0 -88
  1018. package/lib/dist/ui-server/api/index.js.map +1 -1
  1019. package/lib/dist/ui-server/api/map.d.ts.map +1 -1
  1020. package/lib/dist/ui-server/api/map.js +4 -317
  1021. package/lib/dist/ui-server/api/map.js.map +1 -1
  1022. package/lib/dist/ui-server/api/node.js +0 -111
  1023. package/lib/dist/ui-server/api/node.js.map +1 -1
  1024. package/lib/dist/ui-server/api/nodes.js +0 -16
  1025. package/lib/dist/ui-server/api/nodes.js.map +1 -1
  1026. package/lib/dist/ui-server/api/program.js +0 -90
  1027. package/lib/dist/ui-server/api/program.js.map +1 -1
  1028. package/lib/dist/ui-server/api/respond.js +0 -60
  1029. package/lib/dist/ui-server/api/respond.js.map +1 -1
  1030. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
  1031. package/lib/dist/ui-server/api/route-roots.js +2 -44
  1032. package/lib/dist/ui-server/api/route-roots.js.map +1 -1
  1033. package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
  1034. package/lib/dist/ui-server/api/routes.js +4 -60
  1035. package/lib/dist/ui-server/api/routes.js.map +1 -1
  1036. package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
  1037. package/lib/dist/ui-server/api/screens.js +4 -174
  1038. package/lib/dist/ui-server/api/screens.js.map +1 -1
  1039. package/lib/dist/ui-server/api/search.js +0 -62
  1040. package/lib/dist/ui-server/api/search.js.map +1 -1
  1041. package/lib/dist/ui-server/api/session.js +0 -58
  1042. package/lib/dist/ui-server/api/session.js.map +1 -1
  1043. package/lib/dist/ui-server/api/source.d.ts.map +1 -1
  1044. package/lib/dist/ui-server/api/source.js +0 -161
  1045. package/lib/dist/ui-server/api/source.js.map +1 -1
  1046. package/lib/dist/ui-server/api/stats.js +0 -58
  1047. package/lib/dist/ui-server/api/stats.js.map +1 -1
  1048. package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
  1049. package/lib/dist/ui-server/api/steps.js +5 -381
  1050. package/lib/dist/ui-server/api/steps.js.map +1 -1
  1051. package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
  1052. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
  1053. package/lib/dist/ui-server/api/trail-store.js +24 -106
  1054. package/lib/dist/ui-server/api/trail-store.js.map +1 -1
  1055. package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
  1056. package/lib/dist/ui-server/api/trails.js +19 -94
  1057. package/lib/dist/ui-server/api/trails.js.map +1 -1
  1058. package/lib/dist/ui-server/api/when.js +0 -36
  1059. package/lib/dist/ui-server/api/when.js.map +1 -1
  1060. package/lib/dist/ui-server/api/wire.js +0 -58
  1061. package/lib/dist/ui-server/api/wire.js.map +1 -1
  1062. package/lib/dist/ui-server/assets.js +0 -35
  1063. package/lib/dist/ui-server/assets.js.map +1 -1
  1064. package/lib/dist/ui-server/constants.js +0 -26
  1065. package/lib/dist/ui-server/constants.js.map +1 -1
  1066. package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
  1067. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
  1068. package/lib/dist/ui-server/highlight/index.js +1 -132
  1069. package/lib/dist/ui-server/highlight/index.js.map +1 -1
  1070. package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
  1071. package/lib/dist/ui-server/highlight/languages.js +0 -31
  1072. package/lib/dist/ui-server/highlight/languages.js.map +1 -1
  1073. package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
  1074. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
  1075. package/lib/dist/ui-server/index.d.ts +25 -0
  1076. package/lib/dist/ui-server/index.d.ts.map +1 -1
  1077. package/lib/dist/ui-server/index.js +35 -103
  1078. package/lib/dist/ui-server/index.js.map +1 -1
  1079. package/lib/dist/ui-server/open-browser.js +0 -34
  1080. package/lib/dist/ui-server/open-browser.js.map +1 -1
  1081. package/lib/dist/ui-server/security.d.ts +5 -0
  1082. package/lib/dist/ui-server/security.d.ts.map +1 -1
  1083. package/lib/dist/ui-server/security.js +11 -147
  1084. package/lib/dist/ui-server/security.js.map +1 -1
  1085. package/lib/dist/ui-server/static.js +0 -41
  1086. package/lib/dist/ui-server/static.js.map +1 -1
  1087. package/lib/dist/upgrade/index.d.ts +18 -5
  1088. package/lib/dist/upgrade/index.d.ts.map +1 -1
  1089. package/lib/dist/upgrade/index.js +73 -229
  1090. package/lib/dist/upgrade/index.js.map +1 -1
  1091. package/lib/dist/upgrade/remove-binary.js +2 -67
  1092. package/lib/dist/upgrade/remove-binary.js.map +1 -1
  1093. package/lib/dist/upgrade/update-check.js +1 -81
  1094. package/lib/dist/upgrade/update-check.js.map +1 -1
  1095. package/lib/dist/utils.d.ts +69 -1
  1096. package/lib/dist/utils.d.ts.map +1 -1
  1097. package/lib/dist/utils.js +224 -266
  1098. package/lib/dist/utils.js.map +1 -1
  1099. package/lib/dist/worker-teardown.js +0 -47
  1100. package/lib/dist/worker-teardown.js.map +1 -1
  1101. package/lib/kernel/codegraph-kernel.node +2 -2
  1102. package/lib/node_modules/.package-lock.json +4 -4
  1103. package/lib/node_modules/ignore/README.md +138 -8
  1104. package/lib/node_modules/ignore/index.d.ts +56 -20
  1105. package/lib/node_modules/ignore/index.js +1033 -221
  1106. package/lib/node_modules/ignore/legacy.js +871 -178
  1107. package/lib/node_modules/ignore/package.json +10 -4
  1108. package/lib/package.json +14 -8
  1109. package/node.exe +2 -2
  1110. package/package.json +1 -1
@@ -1,19 +1,17 @@
1
1
  "use strict";
2
2
 
3
- var _TRAILING_WILD_CARD_R;
4
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
7
6
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
12
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
13
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
15
  // A simple implementation of make-array
18
16
  function makeArray(subject) {
19
17
  return Array.isArray(subject) ? subject : [subject];
@@ -22,8 +20,14 @@ var UNDEFINED = undefined;
22
20
  var EMPTY = '';
23
21
  var SPACE = ' ';
24
22
  var ESCAPE = '\\';
25
- var REGEX_TEST_BLANK_LINE = /^\s+$/;
23
+
24
+ // The characters that carry a meaning of their own inside a regular
25
+ // expression, so a literal one has to be escaped before it is emitted.
26
+ var REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
27
+ var BOM = "\uFEFF";
26
28
  var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
29
+ // A run of two or more asterisks is a globstar (#175)
30
+ var REGEX_ANCHORED_GLOBSTAR = /^\/\*{2,}$/;
27
31
  var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
28
32
  var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
29
33
  var REGEX_SPLITALL_CRLF = /\r?\n/g;
@@ -36,8 +40,9 @@ var REGEX_SPLITALL_CRLF = /\r?\n/g;
36
40
  // - ..
37
41
  // Valid:
38
42
  // - .foo
39
- var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/;
40
- var REGEX_TEST_TRAILING_SLASH = /\/$/;
43
+ var DOUBLE_SLASH = '//';
44
+ var SLASH_CODE = 47;
45
+ var DOT_CODE = 46;
41
46
  var SLASH = '/';
42
47
 
43
48
  // Do not use ternary expression here, since "istanbul ignore next" is buggy
@@ -53,28 +58,295 @@ var define = function define(object, key, value) {
53
58
  });
54
59
  return value;
55
60
  };
56
- var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
57
61
  var RETURN_FALSE = function RETURN_FALSE() {
58
62
  return false;
59
63
  };
60
64
 
61
- // Sanitize the range of a regular expression
62
- // The cases are complicated, see test cases for details
63
- var sanitizeRange = function sanitizeRange(range) {
64
- return range.replace(REGEX_REGEXP_RANGE, function (match, from, to) {
65
- return from.charCodeAt(0) <= to.charCodeAt(0) ? match
66
- // Invalid range (out of order) which is ok for gitignore rules but
67
- // fatal for JavaScript regular expression, so eliminate it.
68
- : EMPTY;
69
- });
65
+ // > The range notation, e.g. [a-zA-Z],
66
+ // > can be used to match one of the characters in a range.
67
+ //
68
+ // gitignore(5) defers to fnmatch(3) for this, and git implements it in
69
+ // `wildmatch.c`. A bracket expression has a sub-grammar of its own, which
70
+ // is neither the surrounding pattern grammar nor the JavaScript one:
71
+ //
72
+ // - a `]` right after `[` or `[!` is a literal member, not the terminator
73
+ // - `[:alpha:]` names one of twelve POSIX classes
74
+ // - `\` escapes the next member, `]` included
75
+ // - `*`, `?` and `.` are plain literal members
76
+ // - an unterminated expression makes the whole pattern match nothing
77
+ //
78
+ // which means the expression can not be located -- let alone translated -- by
79
+ // a regular expression. It is scanned out of the pattern before the
80
+ // replacers below run, and put back once they are done, so that neither the
81
+ // metacharacter escaper nor the `?` / `*` replacers ever see its body.
82
+
83
+ // git classifies with its own ASCII-only ctype macros (`wildmatch.c`), never
84
+ // with the C library ones, so these must not be mapped onto `\d` / `\w` /
85
+ // `\s`, which are wider. `/` is left out of every expansion, because a
86
+ // bracket expression never matches a path separator.
87
+ var POSIX_CLASSES = {
88
+ alnum: '0-9A-Za-z',
89
+ alpha: 'A-Za-z',
90
+ blank: ' \\t',
91
+ cntrl: '\\x00-\\x1f\\x7f',
92
+ digit: '0-9',
93
+ graph: '!-.0-~',
94
+ lower: 'a-z',
95
+ print: ' -.0-~',
96
+ punct: '!-.:-@\\[-`{-~',
97
+ // git's `sane-ctype.h` classifies \v and \f as control, not space,
98
+ // unlike C's `isspace`
99
+ space: ' \\t\\n\\r',
100
+ upper: 'A-Z',
101
+ xdigit: '0-9A-Fa-f'
102
+ };
103
+ var CLASS_MEMBERS_TO_ESCAPE = '\\]^-[';
104
+ var escapeMember = function escapeMember(_char) {
105
+ return CLASS_MEMBERS_TO_ESCAPE.indexOf(_char) < 0 ? _char : ESCAPE + _char;
106
+ };
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
+ var NON_SLASH = '(?!\\/)';
116
+ var classSource = function classSource(negated, body) {
117
+ if (negated) {
118
+ return "[^\\/".concat(body, "]");
119
+ }
120
+ var source = "[".concat(body, "]");
121
+ return new RegExp(source).test('/') ? NON_SLASH + source : source;
122
+ };
123
+
124
+ // Scan the bracket expression that starts at `pattern[start] === '['`,
125
+ // mirroring the member loop of git's `wildmatch.c`.
126
+ // @returns {{end: number, source: string} | null} `null` if the expression is
127
+ // never terminated, which makes the whole pattern match nothing.
128
+ var scanBracket = function scanBracket(pattern, start) {
129
+ var length = pattern.length;
130
+ var index = start + 1;
131
+ var negated = EMPTY;
132
+ var lead = pattern[index];
133
+ if (lead === '!' || lead === '^') {
134
+ negated = '^';
135
+ index++;
136
+ }
137
+ var body = EMPTY;
138
+
139
+ // The member a `-` could start a range from, or EMPTY when the previous
140
+ // member can not open one (start of the body, or a range / POSIX class
141
+ // that has just closed)
142
+ var prev = EMPTY;
143
+
144
+ // git scans the members with a do-while, so the first one is consumed
145
+ // unconditionally. That is the whole reason a leading `]` is a member
146
+ // and not the terminator.
147
+ for (;;) {
148
+ var _char2 = pattern[index];
149
+ if (_char2 === UNDEFINED) {
150
+ return null;
151
+ }
152
+ if (_char2 === ESCAPE) {
153
+ var escaped = pattern[index + 1];
154
+ if (escaped === UNDEFINED) {
155
+ return null;
156
+ }
157
+ body += escapeMember(escaped);
158
+ prev = escaped;
159
+ index++;
160
+ } else if (_char2 === '-' && prev && index + 1 < length && pattern[index + 1] !== ']') {
161
+ index++;
162
+ var to = pattern[index];
163
+ if (to === ESCAPE) {
164
+ // A pattern can not end on a lone backslash -- `checkPattern` has
165
+ // already thrown it away -- so there is an upper bound to read.
166
+ to = pattern[index += 1];
167
+ }
168
+ // An out-of-order range matches nothing in git but is a syntax error in
169
+ // JavaScript, so it is dropped. Its lower bound stays: git tests it
170
+ // as a plain member before it ever looks at the `-`, so `[c-a]` does
171
+ // match `c`.
172
+ if (prev <= to) {
173
+ body += "-".concat(escapeMember(to));
174
+ }
175
+ prev = EMPTY;
176
+ } else if (_char2 === '[' && pattern[index + 1] === ':') {
177
+ var nameStart = index + 2;
178
+ var end = nameStart;
179
+ while (end < length && pattern[end] !== ']') {
180
+ end++;
181
+ }
182
+ if (end === length) {
183
+ return null;
184
+ }
185
+ if (end > nameStart && pattern[end - 1] === ':') {
186
+ var name = pattern.slice(nameStart, end - 1);
187
+
188
+ // An unknown class name makes the whole pattern match nothing
189
+ if (!Object.prototype.hasOwnProperty.call(POSIX_CLASSES, name)) {
190
+ return null;
191
+ }
192
+ body += POSIX_CLASSES[name];
193
+ prev = EMPTY;
194
+ index = end;
195
+ } else {
196
+ // No `:]` to close it, so the `[` is a plain member and scanning
197
+ // resumes right after it.
198
+ body += escapeMember('[');
199
+ prev = '[';
200
+ index = nameStart - 2;
201
+ }
202
+ } else {
203
+ body += escapeMember(_char2);
204
+ prev = _char2;
205
+ }
206
+ index++;
207
+ if (pattern[index] === ']') {
208
+ return {
209
+ end: index,
210
+ source: classSource(negated, body)
211
+ };
212
+ }
213
+ }
214
+ };
215
+
216
+ // An empty JavaScript class can never match, which is how a pattern that git
217
+ // gives up on (`WM_ABORT_ALL`) is expressed here.
218
+ var NEVER_MATCH = '[]';
219
+
220
+ // A NUL can appear in neither a `.gitignore` line nor a path, which makes it
221
+ // the one safe placeholder character. A literal one in the pattern is
222
+ // held aside all the same, so a collision is impossible by construction.
223
+ var PLACEHOLDER = "\0";
224
+ var REGEX_RESTORE_PLACEHOLDER = new RegExp("".concat(PLACEHOLDER, "(\\d+)").concat(PLACEHOLDER), 'g');
225
+
226
+ // The one wildcard the chain does not expand for itself is a trailing `*`. How
227
+ // it expands depends on the mode (`regex` vs `checkRegex`), so `_make` is
228
+ // left to do it, and until then the pending wildcard travels as this marker.
229
+ // That is what keeps it apart from a user-escaped literal `\*`: the unescape
230
+ // steps collapse the escaped one to the exact `\*` a wildcard would leave
231
+ // behind, so by the time `_make` runs the two are otherwise the same string
232
+ // and a literal star gets wrongly rewritten into a wildcard. The marker is a
233
+ // private-use character, and `extractBrackets` keeps one that came out of the
234
+ // pattern apart from it, so the only marker `_make` ever turns back into a
235
+ // real wildcard is the one this chain put there itself.
236
+ var TRAILING_WILDCARD = "\uE000";
237
+
238
+ // A trailing "/**" is deferred the same way, because `checkRegex` has to tell
239
+ // it apart from a trailing "/*" (see `checkSourceOf`). For `.ignores()` it
240
+ // still never matches the folder itself (#21).
241
+ var TRAILING_DOUBLESTAR = "\uE001";
242
+
243
+ // The three characters above mean something to the chain that builds the
244
+ // source rather than to the path, so one that came out of the pattern is
245
+ // held aside like a bracket expression instead of going straight out. Being
246
+ // held is what makes it safe: the restore runs after the step that anchors
247
+ // the source, so the character comes back in the middle of the source and
248
+ // not at its end, which is the one place `_make` and `checkSourceOf` look
249
+ // for a marker. Without it a pattern's own character lands where a pending
250
+ // marker sits, and `_make` turns it into a real trailing wildcard.
251
+ //
252
+ // It is held as a one-member class rather than bare, in both of the branches
253
+ // a reserved character can reach, so that the property can be
254
+ // read off this function alone -- a reserved character never goes out on
255
+ // its own -- rather than depending on where in the chain the restore
256
+ // happens to run. In the expression built here `[x]` matches exactly what
257
+ // `x` matches, none of the three being special to a regular expression or
258
+ // inside a class, so no test can tell the two apart: the class is insurance,
259
+ // and the paragraph above is the reason it is not needed.
260
+ var isReserved = function isReserved(_char3) {
261
+ return _char3 === PLACEHOLDER || _char3 === TRAILING_WILDCARD || _char3 === TRAILING_DOUBLESTAR;
70
262
  };
71
263
 
72
- // See fixtures #59
73
- var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) {
74
- var length = slashes.length;
75
- return slashes.slice(0, length - length % 2);
264
+ // Replace every bracket expression with a placeholder the replacers below
265
+ // leave alone, and translate it separately.
266
+ var extractBrackets = function extractBrackets(pattern) {
267
+ var sources = [];
268
+ var hold = function hold(source) {
269
+ return "".concat(PLACEHOLDER).concat(sources.push(source) - 1).concat(PLACEHOLDER);
270
+ };
271
+ var length = pattern.length;
272
+ var out = EMPTY;
273
+ var index = 0;
274
+ while (index < length) {
275
+ var _char4 = pattern[index];
276
+ if (_char4 === ESCAPE) {
277
+ // > Put a backslash ("\") in front of ... a character to make it literal.
278
+ // (gitignore(5) -> fnmatch(3))
279
+ // A backslash quotes the next character, whatever it is, so `\d` is a
280
+ // literal `d`, not the regex digit class, and `\?` is a literal `?`,
281
+ // not a wildcard. Held aside as its literal here, the escape never
282
+ // reaches the replacers below, which would otherwise let `\d`, `\b`,
283
+ // `\1`, `\/` keep their regular-expression meaning, and would turn a
284
+ // `\?` into `[^\/]`.
285
+ //
286
+ // Three escapes are still left for the chain: `\*` (a literal star,
287
+ // told apart from a wildcard by `TRAILING_WILDCARD` and the wildcard
288
+ // replacers), `\[` (a literal bracket, the one `[` the bracket
289
+ // replacer still expects), and `\ ` (a quoted space, which one pass
290
+ // below rewrites in bulk -- holding each one aside instead costs more
291
+ // on a pattern built out of them). A lone trailing backslash can reach
292
+ // here after line-ending cleanup.
293
+ //
294
+ // A quoted backslash is not among them. The chain doubles every
295
+ // backslash, then takes the doubling back out again, and a quoted one
296
+ // standing next to a character the chain also escapes left the two
297
+ // counts sharing a run, so one of the escapes was lost. Held here as
298
+ // the literal it means, it never joins that run.
299
+ var escaped = pattern[index + 1];
300
+ if (escaped === UNDEFINED || escaped === SLASH && index + 2 === length) {
301
+ // Git removes a final directory slash before matching. An escape
302
+ // without a character after that removal makes the pattern invalid.
303
+ out += hold(NEVER_MATCH);
304
+ } else if (escaped === '*' || escaped === '[' || escaped === SPACE) {
305
+ out += pattern.slice(index, index + 2);
306
+ } else {
307
+ out += hold(REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : isReserved(escaped) ? "[".concat(escaped, "]") : escaped);
308
+ }
309
+ index += 2;
310
+ } else if (isReserved(_char4)) {
311
+ out += hold("[".concat(_char4, "]"));
312
+ index++;
313
+ } else if (_char4 === '[') {
314
+ var scanned = scanBracket(pattern, index);
315
+ if (scanned === null) {
316
+ // git gives up on the whole pattern (`WM_ABORT_ALL`), so whatever
317
+ // follows can not make it match either.
318
+ out += hold(NEVER_MATCH);
319
+ index = length;
320
+ } else {
321
+ out += hold(scanned.source);
322
+ index = scanned.end + 1;
323
+ }
324
+ } else {
325
+ out += _char4;
326
+ index++;
327
+ }
328
+ }
329
+ return {
330
+ source: out,
331
+ sources: sources
332
+ };
76
333
  };
77
334
 
335
+ // A step of the chain below is normally a `[matcher, replacer]` pair handed
336
+ // to `String.replace`. `DIRECT` marks the ones that are plain string work
337
+ // instead, and take `(source, pattern)`.
338
+ //
339
+ // Anchoring the two ends is exactly that -- a test of one character and a
340
+ // concatenation -- and putting it through the regular expression engine
341
+ // cost a third of this chain for nothing: 167ns where 10ns does the same
342
+ // job. The two are still steps in the same list, in the same places,
343
+ // because their position in the order is part of what they mean.
344
+ var DIRECT = null;
345
+
346
+ // A separator at the beginning or in the middle of a pattern, as opposed to
347
+ // one at the very end.
348
+ var REGEX_INNER_SLASH = /\/(?!$)/;
349
+
78
350
  // > If the pattern ends with a slash,
79
351
  // > it is removed for the purpose of the following description,
80
352
  // > but it would only find a match with a directory.
@@ -86,30 +358,48 @@ var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) {
86
358
  // you could use option `mark: true` with `glob`
87
359
 
88
360
  // '`foo/`' should not continue with the '`..`'
89
- var REPLACERS = [[
90
- // Remove BOM
91
- // TODO:
92
- // Other similar zero-width characters?
93
- /^\uFEFF/, function () {
94
- return EMPTY;
95
- }],
96
- // > Trailing spaces are ignored unless they are quoted with backslash ("\")
97
- [
98
- // (a\ ) -> (a )
99
- // (a ) -> (a)
100
- // (a ) -> (a)
101
- // (a \ ) -> (a )
102
- /((?:\\\\)*?)(\\?\s+)$/, function (_, m1, m2) {
103
- return m1 + (m2.indexOf('\\') === 0 ? SPACE : EMPTY);
104
- }],
361
+ // The chain that turns one gitignore pattern into a regular expression
362
+ // source, in order. A step is either
363
+ //
364
+ // [matcher, replacer] handed to `String.replace`
365
+ // [matcher, replacer, required] the same, but skipped outright unless
366
+ // `required` appears in the string, which
367
+ // the matcher cannot match without
368
+ // [DIRECT, transform] plain string work, taking (source, pattern)
369
+ //
370
+ // The `required` character is only ever a shortcut: finding it does not mean
371
+ // the matcher will match, and not finding it means it cannot. It is there
372
+ // because scanning for one character costs a fraction of running a matcher
373
+ // that then finds nothing -- for the wildcard step, whose `[^\\]+`
374
+ // backtracks its way through the whole string before giving up, 11ns
375
+ // against 400ns.
376
+ var REPLACERS = [
105
377
  // Replace (\ ) with ' '
378
+ // Only a space: an escaped tab or other whitespace is already a literal by
379
+ // the time it reaches here, and a bare tab must be left as one, not turned
380
+ // into a space.
106
381
  // (\ ) -> ' '
107
382
  // (\\ ) -> '\\ '
108
383
  // (\\\ ) -> '\\ '
109
- [/(\\+?)\s/g, function (_, m1) {
110
- var length = m1.length;
111
- return m1.slice(0, length - length % 2) + SPACE;
112
- }],
384
+ [
385
+ // A run of backslashes is taken whole, from its first one, so no match
386
+ // ever starts again inside it -- `(\\+?) ` did, which made a long run
387
+ // quadratic.
388
+ /(\\+)( ?)/g, function (_, run, space) {
389
+ return space ? run.slice(0, run.length - run.length % 2) + SPACE : run;
390
+ }, ESCAPE + SPACE],
391
+ // git's wildmatch() reads a run of two or more asterisks as one globstar
392
+ // whenever the run fills a path segment: it starts the pattern or follows
393
+ // a `/`, and it ends the pattern or comes before a `/`. A run of two is
394
+ // already `**`; a longer one is folded into `**` here, so the steps
395
+ // below only ever have to know `**`.
396
+ // `***/foo` -> `**/foo`, `a/***/b` -> `a/**/b`, `a/***` -> `a/**`
397
+ // git also takes a run beside a literal prefix (`a***/b`) or beside an
398
+ // escaped slash (`***\/b`) as a globstar, and this does not; the README
399
+ // lists both, under "A run of asterisks".
400
+ [/(^|\/)\*{3,}(?=\/|$)/g, function (_, start) {
401
+ return "".concat(start, "**");
402
+ }, '*'],
113
403
  // Escape metacharacters
114
404
  // which is written down by users but means special for regular expressions.
115
405
 
@@ -133,7 +423,7 @@ var REPLACERS = [[
133
423
  // > a question mark (?) matches a single character
134
424
  /(?!\\)\?/g, function () {
135
425
  return '[^/]';
136
- }],
426
+ }, '?'],
137
427
  // leading slash
138
428
  [
139
429
  // > A leading slash matches the beginning of the pathname.
@@ -141,30 +431,35 @@ var REPLACERS = [[
141
431
  // A leading slash matches the beginning of the pathname
142
432
  /^\//, function () {
143
433
  return '^';
144
- }],
434
+ }, SLASH],
145
435
  // replace special metacharacter slash after the leading slash
146
436
  [/\//g, function () {
147
437
  return '\\/';
148
- }], [
438
+ }, SLASH], [
149
439
  // > A leading "**" followed by a slash means match in all directories.
150
440
  // > For example, "**/foo" matches file or directory "foo" anywhere,
151
441
  // > the same as pattern "foo".
152
442
  // > "**/foo/bar" matches file or directory "bar" anywhere that is directly
153
443
  // > under directory "foo".
154
444
  // Notice that the '*'s have been replaced as '\\*'
155
- /^\^*\\\*\\\*\\\//,
445
+ /^\^*(?:\\\*\\\*\\\/)+/,
156
446
  // '**/foo' <-> 'foo'
157
447
  function () {
158
448
  return '^(?:.*\\/)?';
159
- }],
449
+ }, '*'],
160
450
  // starting
161
451
  [
162
452
  // there will be no leading '/'
163
453
  // (which has been replaced by section "leading slash")
164
454
  // If starts with '**', adding a '^' to the regular expression also works
165
- /^(?=[^^])/, function startingReplacer() {
455
+ DIRECT, function (source, pattern) {
456
+ // Nothing to anchor to, or already anchored
457
+ if (!source || source[0] === '^') {
458
+ return source;
459
+ }
460
+
166
461
  // If has a slash `/` at the beginning or middle
167
- return !/\/(?!$)/.test(this)
462
+ var anchor = !REGEX_INNER_SLASH.test(pattern)
168
463
  // > Prior to 2.22.1
169
464
  // > If the pattern does not contain a slash /,
170
465
  // > Git treats it as a shell glob pattern
@@ -182,6 +477,7 @@ function () {
182
477
  // > Otherwise, Git treats the pattern as a shell glob suitable for
183
478
  // > consumption by fnmatch(3)
184
479
  : '^';
480
+ return anchor + source;
185
481
  }],
186
482
  // two globstars
187
483
  [
@@ -194,19 +490,27 @@ function () {
194
490
  function (_, index, str) {
195
491
  return index + 6 < str.length
196
492
 
493
+ // case: /**/ at the end of the pattern, i.e. a trailing `'/**/'`
494
+ // > A trailing `"/**/"` (a trailing `"/**"` restricted to directories)
495
+ // > matches everything inside, but it should not match the current
496
+ // > folder itself, so it requires at least one directory segment.
497
+ // 'a/**/' matches 'a/b/', 'a/x/y/' but not 'a/'
498
+ ? str.slice(index + 6) === '\\/' ? '(?:\\/[^\\/]+)+'
499
+
197
500
  // case: /**/
198
501
  // > A slash followed by two consecutive asterisks then a slash matches
199
502
  // > zero or more directories.
200
503
  // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
201
504
  // '/**/'
202
- ? '(?:\\/[^\\/]+)*'
505
+ : '(?:\\/[^\\/]+)*'
203
506
 
204
507
  // case: /**
205
508
  // > A trailing `"/**"` matches everything inside.
206
509
 
207
- // #21: everything inside but it should not include the current folder
208
- : '\\/.+';
209
- }],
510
+ // #21: everything inside but it should not include the current folder,
511
+ // resolved by `_make`
512
+ : "\\/".concat(TRAILING_DOUBLESTAR);
513
+ }, '*'],
210
514
  // normal intermediate wildcards
211
515
  [
212
516
  // Never replace escaped '*'
@@ -226,37 +530,54 @@ function (_, p1, p2) {
226
530
  // > and will match according to the previous rules.
227
531
  var unescaped = p2.replace(/\\\*/g, '[^\\/]*');
228
532
  return p1 + unescaped;
229
- }], [
533
+ }, '*'],
534
+ // trailing wildcard, held apart from a literal star
535
+ [
536
+ // The step above leaves a trailing `*` alone, so a single `\*` is all that
537
+ // can be left at the end here, and what stands in front of it says which
538
+ // kind it is. A wildcard arrives as the escaper wrote it, `\*` with
539
+ // nothing before it; a literal arrives as the user's own escape, which
540
+ // the escaper doubled, and then the star's own -- `\\` and then `\*`.
541
+ // There is no third case: every backslash still reaching the chain is
542
+ // one `\*`, `\[` or `\ ` carries itself, and each is followed by its
543
+ // own character, so a longer run can never form. This runs while the
544
+ // two are still distinct, before the unescape steps below collapse the
545
+ // literal onto the very `\*` a wildcard leaves behind.
546
+ /(^|[^\\])((?:\\\\)*)\\\*$/, function (match, p1, p2) {
547
+ return p2 === EMPTY
548
+ // A real wildcard: carry it to `_make` as the marker, so the unescape
549
+ // steps and the trailing-wildcard rewrite can never mistake it for a
550
+ // literal `\*` (nor the reverse).
551
+ ? p1 + TRAILING_WILDCARD
552
+ // A literal star: leave it exactly as it stands for the unescape steps.
553
+ : match;
554
+ }, '*'], [
230
555
  // unescape, revert step 3 except for back slash
231
556
  // For example, if a user escape a '\\*',
232
557
  // after step 3, the result will be '\\\\\\*'
233
558
  /\\\\\\(?=[$.|*+(){^])/g, function () {
234
559
  return ESCAPE;
235
- }], [
560
+ }, ESCAPE + ESCAPE], [
236
561
  // '\\\\' -> '\\'
237
562
  /\\\\/g, function () {
238
563
  return ESCAPE;
239
- }], [
240
- // > The range notation, e.g. [a-zA-Z],
241
- // > can be used to match one of the characters in a range.
564
+ }, ESCAPE + ESCAPE], [
565
+ // Every real bracket expression -- POSIX classes included -- has already
566
+ // been held aside by `extractBrackets`, so the only `[` left in the
567
+ // pattern is an escaped, literal one.
242
568
 
243
- // `\` is escaped by step 3
244
- /(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) {
245
- return leadEscape === ESCAPE
246
- // '\\[bar]' -> '\\\\[bar\\]'
247
- ? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0
248
- // A normal case, and it is a range notation
249
- // '[bar]'
250
- // '[bar\\\\]'
251
- ? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton
252
- // '[bar\\]' -> '[bar\\\\]'
253
- : '[]' : '[]';
254
- }],
569
+ // A backslash could only stand at the end of the range if it quoted the
570
+ // `]`, and `\]` is held aside long before this.
571
+ /\\\[([^\]/]*?)($|\])/g,
572
+ // '\\[bar]' -> '\\\\[bar]'
573
+ function (match, range, close) {
574
+ return "\\[".concat(range).concat(close);
575
+ }, '['],
255
576
  // ending
256
577
  [
257
578
  // 'js' will not match 'js.'
258
579
  // 'ab' will not match 'abc'
259
- /(?:[^*])$/,
580
+ DIRECT,
260
581
  // WTF!
261
582
  // https://git-scm.com/docs/gitignore
262
583
  // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
@@ -269,17 +590,26 @@ function (_, p1, p2) {
269
590
  // 'js*' will not match 'a.js'
270
591
  // 'js/' will not match 'a.js'
271
592
  // 'js' will match 'a.js' and 'a.js/'
272
- function (match) {
273
- return /\/$/.test(match)
593
+ function (source) {
594
+ var last = source[source.length - 1];
595
+
596
+ // The pattern is empty, or ends in a pending marker `_make` owns --
597
+ // the trailing wildcard, or a trailing "/**". A trailing `*` that is
598
+ // not the marker is a literal star, which anchors like any other
599
+ // final character.
600
+ if (!last || last === TRAILING_WILDCARD || last === TRAILING_DOUBLESTAR) {
601
+ return source;
602
+ }
603
+ return last === SLASH
274
604
  // foo/ will not match 'foo'
275
- ? "".concat(match, "$") // foo matches 'foo' and 'foo/'
276
- : "".concat(match, "(?=$|\\/$)");
605
+ ? "".concat(source, "$") // foo matches 'foo' and 'foo/'
606
+ : "".concat(source, "(?=$|\\/$)");
277
607
  }]];
278
- var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
608
+ var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\uE000$/;
279
609
  var MODE_IGNORE = 'regex';
280
610
  var MODE_CHECK_IGNORE = 'checkRegex';
281
611
  var UNDERSCORE = '_';
282
- var TRAILING_WILD_CARD_REPLACERS = (_TRAILING_WILD_CARD_R = {}, _defineProperty(_TRAILING_WILD_CARD_R, MODE_IGNORE, function (_, p1) {
612
+ var replaceTrailingWildcard = function replaceTrailingWildcard(_, p1) {
283
613
  var prefix = p1
284
614
  // '\^':
285
615
  // '/*' does not match EMPTY
@@ -291,36 +621,268 @@ var TRAILING_WILD_CARD_REPLACERS = (_TRAILING_WILD_CARD_R = {}, _defineProperty(
291
621
  // 'a*' matches 'aa'
292
622
  : '[^/]*';
293
623
  return "".concat(prefix, "(?=$|\\/$)");
294
- }), _defineProperty(_TRAILING_WILD_CARD_R, MODE_CHECK_IGNORE, function (_, p1) {
295
- // When doing `git check-ignore`
296
- var prefix = p1
297
- // '\\\/':
298
- // 'abc/*' DOES match 'abc/' !
299
- ? "".concat(p1, "[^/]*") // 'a*' matches 'a'
300
- // 'a*' matches 'aa'
301
- : '[^/]*';
302
- return "".concat(prefix, "(?=$|\\/$)");
303
- }), _TRAILING_WILD_CARD_R);
624
+ };
625
+ var REGEX_REPLACE_TRAILING_DOUBLESTAR = /\uE001$/;
626
+
627
+ // 'abc/**' matches everything under 'abc', but not 'abc/' itself (#21)
628
+ var replaceTrailingDoublestar = function replaceTrailingDoublestar() {
629
+ return '.+(?=$|\\/$)';
630
+ };
631
+ var WILDCARD = '[^\\/]*';
632
+
633
+ // The fixed piece between the wildcard at `at` and the next wildcard of the
634
+ // run: the tokens that separate them, joined as they appear in the source.
635
+ // A run never holds two wildcards in a row, so there is always at least one
636
+ // token.
637
+ var separatorAfter = function separatorAfter(run, at) {
638
+ var separator = EMPTY;
639
+ for (var index = at + 1; index < run.length && !run[index].wildcard; index++) {
640
+ separator += run[index].single;
641
+ }
642
+ return separator;
643
+ };
644
+
645
+ // Where a run of non-slash wildcards is split by fixed pieces --
646
+ // `[^/]*ab[^/]*cd...` -- the engine has many equivalent ways to lay the
647
+ // input across the wildcards, and on input that does not match it works
648
+ // through all of them, so the time grows with the number of wildcards
649
+ // rather than the length of the path. Every wildcard but the last in such a
650
+ // run can be pinned to stop where the piece after it begins, which leaves
651
+ // one way to lay out the input and no rewinding, without changing which
652
+ // paths match: the fixed pieces still bound the count, and the last
653
+ // wildcard still absorbs the rest.
654
+ //
655
+ // A wildcard is pinned to the whole piece, never to the piece's first
656
+ // character. The pin leaves no way back, so a wildcard that stopped at that
657
+ // first character would hand over wherever the character happens to turn
658
+ // up, including the places the rest of the piece cannot follow -- which is
659
+ // how `f*o/*/*` came to miss `foo/b/c`, the first `o` of `foo` not being
660
+ // the one the `o/` after it needs. Every token of a piece matches exactly
661
+ // one character, so the first place the whole piece fits is the leftmost
662
+ // place it can sit, and whatever is left over goes to the wildcards that
663
+ // follow.
664
+ //
665
+ // The source is read one token at a time -- a wildcard, a single-character
666
+ // piece (a literal, an escape, a class), or a parenthesised group or anchor
667
+ // that ends the run -- so only a genuine wildcard is touched.
668
+ var pinWildcards = function pinWildcards(source) {
669
+ if (source.indexOf(WILDCARD) < 0) {
670
+ return source;
671
+ }
672
+ var tokens = [];
673
+ var length = source.length;
674
+ var index = 0;
675
+ while (index < length) {
676
+ var _char5 = source[index];
677
+ if (source.startsWith(WILDCARD, index)) {
678
+ tokens.push({
679
+ wildcard: true
680
+ });
681
+ index += WILDCARD.length;
682
+ } else if (_char5 === '[') {
683
+ var end = index + 1;
684
+ if (source[end] === '^') {
685
+ end++;
686
+ }
687
+ if (source[end] === ']') {
688
+ end++;
689
+ }
690
+ while (end < length && source[end] !== ']') {
691
+ end += source[end] === ESCAPE ? 2 : 1;
692
+ }
693
+ end++;
694
+ tokens.push({
695
+ single: source.slice(index, end)
696
+ });
697
+ index = end;
698
+ } else if (_char5 === ESCAPE) {
699
+ tokens.push({
700
+ single: source.slice(index, index + 2)
701
+ });
702
+ index += 2;
703
+ } else if (_char5 === '(') {
704
+ var depth = 0;
705
+ var _end = index;
706
+ do {
707
+ if (source[_end] === ESCAPE) {
708
+ _end++;
709
+ } else if (source[_end] === '(') {
710
+ depth++;
711
+ } else if (source[_end] === ')') {
712
+ depth--;
713
+ }
714
+ _end++;
715
+ } while (_end < length && depth > 0);
716
+ if ('*+?'.indexOf(source[_end]) >= 0) {
717
+ _end++;
718
+ }
719
+ tokens.push({
720
+ boundary: source.slice(index, _end)
721
+ });
722
+ index = _end;
723
+ } else if (_char5 === '^' || _char5 === '$') {
724
+ tokens.push({
725
+ boundary: _char5
726
+ });
727
+ index++;
728
+ } else {
729
+ tokens.push({
730
+ single: _char5
731
+ });
732
+ index++;
733
+ }
734
+ }
735
+ var out = EMPTY;
736
+ var run = [];
737
+ var flush = function flush() {
738
+ var lastWildcard;
739
+ run.forEach(function (token, at) {
740
+ if (token.wildcard) {
741
+ lastWildcard = at;
742
+ }
743
+ });
744
+ run.forEach(function (token, at) {
745
+ if (!token.wildcard) {
746
+ out += token.single;
747
+ return;
748
+ }
749
+
750
+ // Every wildcard but the last is pinned to the whole piece that
751
+ // follows it, for the reason set out above this function. The last
752
+ // one stays as it is and takes up the rest.
753
+ out += at === lastWildcard ? WILDCARD : "(?:(?!".concat(separatorAfter(run, at), ")[^\\/])*");
754
+ });
755
+ run = [];
756
+ };
757
+ tokens.forEach(function (token) {
758
+ if (token.boundary === undefined) {
759
+ run.push(token);
760
+ return;
761
+ }
762
+ flush();
763
+ out += token.boundary;
764
+ });
765
+ flush();
766
+ return out;
767
+ };
304
768
 
305
769
  // @param {pattern}
306
770
  var makeRegexPrefix = function makeRegexPrefix(pattern) {
307
- return REPLACERS.reduce(function (prev, _ref) {
308
- var _ref2 = _slicedToArray(_ref, 2),
771
+ // `/**` matches every path, as `**` does. The translation below only finds
772
+ // a globstar beside a slash it keeps, and the leading one is turned into
773
+ // an anchor, so `/**` would come out as `/*` and match one level only.
774
+ // Here rather than in `createRule`, so that `checkSourceOf`, which
775
+ // compiles `/**/` again without its trailing slash, gets it too.
776
+ if (REGEX_ANCHORED_GLOBSTAR.test(pattern)) {
777
+ pattern = '**';
778
+ }
779
+ var _extractBrackets = extractBrackets(pattern),
780
+ source = _extractBrackets.source,
781
+ sources = _extractBrackets.sources;
782
+ var replaced = REPLACERS.reduce(
783
+ // A pass whose matcher finds nothing hands back the very string it was
784
+ // given, so asking first costs a search and saves a rewrite. Ten of the
785
+ // fifteen passes never fire for a typical .gitignore line, and between
786
+ // them they were 45% of this chain.
787
+ function (prev, _ref) {
788
+ var _ref2 = _slicedToArray(_ref, 3),
309
789
  matcher = _ref2[0],
310
- replacer = _ref2[1];
311
- return prev.replace(matcher, replacer.bind(pattern));
312
- }, pattern);
790
+ replacer = _ref2[1],
791
+ required = _ref2[2];
792
+ if (matcher === DIRECT) {
793
+ return replacer(prev, pattern);
794
+ }
795
+ if (required !== UNDEFINED && prev.indexOf(required) < 0) {
796
+ return prev;
797
+ }
798
+
799
+ // A pass whose matcher finds nothing hands back the very string it was
800
+ // given, so asking first costs a search and saves a rewrite.
801
+ return matcher.test(prev) ? prev.replace(matcher, replacer.bind(pattern)) : prev;
802
+ }, source);
803
+
804
+ // Most patterns hold no bracket expression at all, and then there is
805
+ // nothing to put back.
806
+ return sources.length ? replaced.replace(REGEX_RESTORE_PLACEHOLDER, function (match, index) {
807
+ return sources[index];
808
+ }) : replaced;
809
+ };
810
+
811
+ // `checkRegex` tests a path with a trailing slash, 'abc/', the way
812
+ // `git check-ignore` matches that literal string once the directory itself
813
+ // is known not to be excluded (see `checkIgnore`): a trailing '/' of the
814
+ // pattern is dropped, a basename pattern sees an empty basename, and only a
815
+ // pattern whose last segment is a pending wildcard can match what is left
816
+ // after the final slash -- 'abc/*' and 'abc/**' match 'abc/', and 'abc/**'
817
+ // also matches 'abc/d/' (#77, #169).
818
+ var checkSourceOf = function checkSourceOf(body, prefix) {
819
+ if (body[body.length - 1] === SLASH) {
820
+ prefix = makeRegexPrefix(body.slice(0, -1));
821
+ }
822
+ var head = prefix.slice(0, -1);
823
+ var last = prefix[prefix.length - 1];
824
+ return last === TRAILING_WILDCARD ? "".concat(head, "$") : last === TRAILING_DOUBLESTAR ? "".concat(head, ".*$") : NEVER_MATCH;
825
+ };
826
+
827
+ // A trailing slash does not stop a pattern being basename-only: it restricts
828
+ // the match to a directory, it does not let the pattern reach across one.
829
+ // Everything else a pattern can hold -- a wildcard, a character class, an
830
+ // escape -- stays inside a single path segment too, so a pattern with no
831
+ // separator in it can only ever describe the last one.
832
+ var matchesBasename = function matchesBasename(body) {
833
+ var index = body.indexOf(SLASH);
834
+ return index < 0 || index === body.length - 1;
835
+ };
836
+
837
+ // The last segment of a path, keeping a trailing slash, because a pattern that
838
+ // ends in one matches only a directory.
839
+ // 'a/b/c.js' -> 'c.js'; 'a/b/' -> 'b/'; 'c.js' -> 'c.js' (no copy made)
840
+ var basenameOf = function basenameOf(path) {
841
+ var end = path.length - 1;
842
+ var index = path.lastIndexOf(SLASH, path[end] === SLASH ? end - 1 : end);
843
+ return index < 0 ? path : path.slice(index + 1);
844
+ };
845
+
846
+ // The parent directory of a path, with its trailing separator, or EMPTY when
847
+ // the path has none.
848
+ // 'a/b/c' -> 'a/b/'; 'a/b/' -> 'a/'; 'a' -> EMPTY; 'a/' -> EMPTY
849
+ //
850
+ // A path holding an empty segment has to be taken apart, because its
851
+ // ancestors are not prefixes of it: the parent of 'a//b' is 'a/', not
852
+ // 'a//', and the parent of '/a/' is nothing at all. Both shapes reach here
853
+ // -- 'a//b' is accepted outright, and `checkIgnore` does not put the path
854
+ // it is given through the relative-path check.
855
+ //
856
+ // Every other path is a prefix of itself, and cutting one costs a fraction of
857
+ // splitting it into an array and joining that back at every level: 73ns
858
+ // against 207ns.
859
+ var parentOf = function parentOf(path) {
860
+ if (path.charCodeAt(0) === SLASH_CODE || path.indexOf(DOUBLE_SLASH) >= 0) {
861
+ var slices = path.split(SLASH).filter(Boolean);
862
+ slices.pop();
863
+ return slices.length ? slices.join(SLASH) + SLASH : EMPTY;
864
+ }
865
+ var end = path.length - 1;
866
+
867
+ // Look back from before a trailing separator, since that one belongs to the
868
+ // path itself.
869
+ //
870
+ // A negative place to start would be a trap here: `lastIndexOf` clamps one
871
+ // to 0 and searches there rather than reporting no match, so '/' would
872
+ // come back as its own parent and the walk would never end. It cannot
873
+ // happen -- that is the only path short enough to produce one, and the
874
+ // test above has already sent it the other way.
875
+ var cut = path.lastIndexOf(SLASH, path.charCodeAt(end) === SLASH_CODE ? end - 1 : end);
876
+ return cut < 0 ? EMPTY : path.slice(0, cut + 1);
313
877
  };
314
878
  var isString = function isString(subject) {
315
879
  return typeof subject === 'string';
316
880
  };
317
881
 
318
- // > A blank line matches no files, so it can serve as a separator for readability.
882
+ // Blank lines and comments are told by `createRule`, once the pattern is
883
+ // normalized.
319
884
  var checkPattern = function checkPattern(pattern) {
320
- return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
321
-
322
- // > A line starting with # serves as a comment.
323
- && pattern.indexOf('#') !== 0;
885
+ return pattern && isString(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern);
324
886
  };
325
887
  var splitPattern = function splitPattern(pattern) {
326
888
  return pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
@@ -335,7 +897,18 @@ var IgnoreRule = /*#__PURE__*/function () {
335
897
  define(this, 'ignoreCase', ignoreCase);
336
898
  define(this, 'regexPrefix', prefix);
337
899
  }
900
+
901
+ // Worked out on first use and kept behind an own property, the way `regex`
902
+ // caches itself in `_regex`. Deciding it in the constructor instead would
903
+ // add a fourth `defineProperty` to every rule ever built, which cost 4% of
904
+ // every compile -- including the compiles of rules that are never matched
905
+ // against anything.
338
906
  _createClass(IgnoreRule, [{
907
+ key: "_basenameOnly",
908
+ get: function get() {
909
+ return define(this, '_basenameOnly', matchesBasename(this.body));
910
+ }
911
+ }, {
339
912
  key: "regex",
340
913
  get: function get() {
341
914
  var key = UNDERSCORE + MODE_IGNORE;
@@ -356,25 +929,73 @@ var IgnoreRule = /*#__PURE__*/function () {
356
929
  }, {
357
930
  key: "_make",
358
931
  value: function _make(mode, key) {
359
- var str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD,
360
- // It does not need to bind pattern
361
- TRAILING_WILD_CARD_REPLACERS[mode]);
932
+ var str = pinWildcards(mode === MODE_IGNORE ? this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, replaceTrailingWildcard).replace(REGEX_REPLACE_TRAILING_DOUBLESTAR, replaceTrailingDoublestar) : checkSourceOf(this.body, this.regexPrefix));
362
933
  var regex = this.ignoreCase ? new RegExp(str, 'i') : new RegExp(str);
363
934
  return define(this, key, regex);
364
935
  }
365
936
  }]);
366
937
  return IgnoreRule;
367
938
  }();
939
+ var isLineEnd = function isLineEnd(_char6) {
940
+ return _char6 === '\r' || _char6 === '\n';
941
+ };
942
+
943
+ // Drop a line terminator, which can remain when patterns are passed as an
944
+ // array, and then the trailing spaces. Git trims spaces only, and a space
945
+ // escaped by an odd run of backslashes stays, unescaped, as the last one.
946
+ // Scanned from the end: a regular expression can only try each start in
947
+ // turn, which is quadratic over a long run of spaces or backslashes.
948
+ // 'a ' -> 'a'; 'a\ ' -> 'a '; 'a\\ ' -> 'a\\'; 'a\t' -> 'a\t'
949
+ var trimEnd = function trimEnd(body) {
950
+ var end = body.length;
951
+ while (end && isLineEnd(body[end - 1])) {
952
+ end--;
953
+ }
954
+ var lineEnd = end;
955
+ while (end && body[end - 1] === SPACE) {
956
+ end--;
957
+ }
958
+ if (end === lineEnd) {
959
+ return body.slice(0, end);
960
+ }
961
+ var backslashes = 0;
962
+ while (backslashes < end && body[end - backslashes - 1] === ESCAPE) {
963
+ backslashes++;
964
+ }
965
+ return backslashes % 2 ? body.slice(0, end - 1) + SPACE : body.slice(0, end);
966
+ };
368
967
  var createRule = function createRule(_ref3, ignoreCase) {
369
968
  var pattern = _ref3.pattern,
370
969
  mark = _ref3.mark;
970
+ // Git drops a BOM before it reads the first line, so before anything else.
971
+ var body = pattern[0] === BOM ? pattern.slice(1) : pattern;
972
+
973
+ // > A line starting with # serves as a comment.
974
+ if (body[0] === '#') {
975
+ return;
976
+ }
371
977
  var negative = false;
372
- var body = pattern;
373
978
 
374
979
  // > An optional prefix "!" which negates the pattern;
375
- if (body.indexOf('!') === 0) {
980
+ if (body[0] === '!') {
376
981
  negative = true;
377
- body = body.substr(1);
982
+ body = body.slice(1);
983
+ }
984
+
985
+ // Normalize the body before checking which slashes anchor the pattern.
986
+ // Otherwise `bar/ ` is mistaken for a pattern containing an inner slash.
987
+ // Only a body ending in a space or a line terminator has anything to trim.
988
+ var last = body[body.length - 1];
989
+ if (last === SPACE || last === '\r' || last === '\n') {
990
+ body = trimEnd(body);
991
+ }
992
+
993
+ // > A blank line matches no files, so it can serve as a separator for
994
+ // > readability.
995
+ // Nor does a lone "!", or anything else left empty here: an empty pattern
996
+ // would compile to a regex matching every path.
997
+ if (!body) {
998
+ return;
378
999
  }
379
1000
  body = body
380
1001
  // > Put a backslash ("\") in front of the first "!" for patterns that
@@ -391,6 +1012,21 @@ var RuleManager = /*#__PURE__*/function () {
391
1012
  _classCallCheck(this, RuleManager);
392
1013
  this._ignoreCase = ignoreCase;
393
1014
  this._rules = [];
1015
+
1016
+ // How many of the rules git would tag `EXC_FLAG_NODIR`.
1017
+ //
1018
+ // The scan uses it to decide, once for the whole set, whether handing
1019
+ // those rules the basename is worth what it costs the others. The
1020
+ // shortcut saves a full-path scan on every rule it applies to and costs
1021
+ // a check on every rule it does not, so a set where almost nothing is
1022
+ // basename-only comes out behind -- a 955 pattern set with 44 of them
1023
+ // measured 19% slower with the shortcut always on.
1024
+ //
1025
+ // Deciding this by measurement rather than by meaning is safe: a
1026
+ // basename-only pattern gives the very same answer against the whole
1027
+ // path, it just takes longer to say so. The choice can only change how
1028
+ // fast the scan runs, never what it returns.
1029
+ this._basenameCount = 0;
394
1030
  }
395
1031
  _createClass(RuleManager, [{
396
1032
  key: "_add",
@@ -398,6 +1034,7 @@ var RuleManager = /*#__PURE__*/function () {
398
1034
  // #32
399
1035
  if (pattern && pattern[KEY_IGNORE]) {
400
1036
  this._rules = this._rules.concat(pattern._rules._rules);
1037
+ this._basenameCount += pattern._rules._basenameCount;
401
1038
  this._added = true;
402
1039
  return;
403
1040
  }
@@ -406,10 +1043,17 @@ var RuleManager = /*#__PURE__*/function () {
406
1043
  pattern: pattern
407
1044
  };
408
1045
  }
409
- if (checkPattern(pattern.pattern)) {
410
- var rule = createRule(pattern, this._ignoreCase);
1046
+ var rule = checkPattern(pattern.pattern) && createRule(pattern, this._ignoreCase);
1047
+ if (rule) {
411
1048
  this._added = true;
412
1049
  this._rules.push(rule);
1050
+
1051
+ // Deliberately not `rule._basenameOnly`: reading that would materialise
1052
+ // the rule's own copy, and the whole point of leaving it lazy is that
1053
+ // a rule which is compiled and never matched never pays for it.
1054
+ if (matchesBasename(rule.body)) {
1055
+ this._basenameCount++;
1056
+ }
413
1057
  }
414
1058
  }
415
1059
 
@@ -419,48 +1063,34 @@ var RuleManager = /*#__PURE__*/function () {
419
1063
  value: function add(pattern) {
420
1064
  this._added = false;
421
1065
  makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this);
1066
+ if (this._added) {
1067
+ this._literalRules = UNDEFINED;
1068
+ }
422
1069
  return this._added;
423
1070
  }
424
1071
 
425
- // Test one single path without recursively checking parent directories
426
- //
427
- // - checkUnignored `boolean` whether should check if the path is unignored,
428
- // setting `checkUnignored` to `false` could reduce additional
429
- // path matching.
430
- // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
431
-
432
- // @returns {TestResult} true if a file is ignored
1072
+ // Match the literal 'abc/' for `checkIgnore`, last rule wins. Only a rule
1073
+ // ending in a wildcard can match it (see `checkSourceOf`), so the rest
1074
+ // are left out once, rather than tested or compiled for every path.
433
1075
  }, {
434
- key: "test",
435
- value: function test(path, checkUnignored, mode) {
1076
+ key: "testLiteral",
1077
+ value: function testLiteral(path) {
1078
+ var rules = this._literalRules || (this._literalRules = this._rules.filter(function (_ref4) {
1079
+ var body = _ref4.body;
1080
+ return body[body.length - (body[body.length - 1] === SLASH ? 2 : 1)] === '*';
1081
+ }));
436
1082
  var ignored = false;
437
1083
  var unignored = false;
438
1084
  var matchedRule;
439
- this._rules.forEach(function (rule) {
440
- var negative = rule.negative;
441
-
442
- // | ignored : unignored
443
- // -------- | ---------------------------------------
444
- // negative | 0:0 | 0:1 | 1:0 | 1:1
445
- // -------- | ------- | ------- | ------- | --------
446
- // 0 | TEST | TEST | SKIP | X
447
- // 1 | TESTIF | SKIP | TEST | X
448
-
449
- // - SKIP: always skip
450
- // - TEST: always test
451
- // - TESTIF: only test if checkUnignored
452
- // - X: that never happen
453
- if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
454
- return;
455
- }
456
- var matched = rule[mode].test(path);
457
- if (!matched) {
458
- return;
1085
+ for (var index = rules.length - 1; index >= 0; index--) {
1086
+ var rule = rules[index];
1087
+ if (rule.checkRegex.test(path)) {
1088
+ ignored = !rule.negative;
1089
+ unignored = rule.negative;
1090
+ matchedRule = rule.negative ? UNDEFINED : rule;
1091
+ break;
459
1092
  }
460
- ignored = !negative;
461
- unignored = negative;
462
- matchedRule = negative ? UNDEFINED : rule;
463
- });
1093
+ }
464
1094
  var ret = {
465
1095
  ignored: ignored,
466
1096
  unignored: unignored
@@ -470,6 +1100,51 @@ var RuleManager = /*#__PURE__*/function () {
470
1100
  }
471
1101
  return ret;
472
1102
  }
1103
+
1104
+ // Test one single path without recursively checking parent directories
1105
+ //
1106
+ // - mode `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
1107
+
1108
+ // @returns {TestResult}
1109
+ }, {
1110
+ key: "test",
1111
+ value: function test(path, mode) {
1112
+ // Most of a .gitignore is patterns with no slash in them, and running
1113
+ // those against the whole path makes the regular expression engine walk
1114
+ // every directory name on the way to the only segment that could match.
1115
+ // Handing them the basename instead is what git does, and it is where
1116
+ // the time in a directory walk goes: the rule scan was two thirds of it.
1117
+ var rules = this._rules;
1118
+ var length = rules.length;
1119
+ var shortcut = this._basenameCount * 2 >= length;
1120
+ var basename = shortcut ? basenameOf(path) : path;
1121
+
1122
+ // The last rule to match decides, as in git, and it is the rule
1123
+ // `git check-ignore -v` reports, so the scan runs from the end and stops
1124
+ // at the first match.
1125
+ // A plain loop rather than `forEach`, so that `path`, `basename` and
1126
+ // `shortcut` are locals. As a callback they became closure variables,
1127
+ // and reaching for one of those once per rule cost 10% of a scan over a
1128
+ // large rule set -- more than the shortcut they were there to serve.
1129
+ for (var index = length - 1; index >= 0; index--) {
1130
+ var rule = rules[index];
1131
+ if (rule[mode].test(shortcut && rule._basenameOnly ? basename : path)) {
1132
+ var negative = rule.negative;
1133
+ var ret = {
1134
+ ignored: !negative,
1135
+ unignored: negative
1136
+ };
1137
+ if (!negative) {
1138
+ ret.rule = rule;
1139
+ }
1140
+ return ret;
1141
+ }
1142
+ }
1143
+ return {
1144
+ ignored: false,
1145
+ unignored: false
1146
+ };
1147
+ }
473
1148
  }]);
474
1149
  return RuleManager;
475
1150
  }();
@@ -493,8 +1168,39 @@ var checkPath = function checkPath(path, originalPath, doThrow) {
493
1168
  }
494
1169
  return true;
495
1170
  };
1171
+
1172
+ // > pathname should be a `path.relative()`d one
1173
+ //
1174
+ // The same thing `REGEX_TEST_INVALID_PATH` says, spelled out: a path is not
1175
+ // relative if it begins with a separator, or with `./` or `../`, or is
1176
+ // nothing but `.` or `..`. Every match is decided by the first three
1177
+ // characters, and this runs on every path handed to the library -- where it
1178
+ // was 55% of a cached lookup, more than the cache lookup itself.
496
1179
  var isNotRelative = function isNotRelative(path) {
497
- return REGEX_TEST_INVALID_PATH.test(path);
1180
+ var first = path.charCodeAt(0);
1181
+ if (first === SLASH_CODE) {
1182
+ return true;
1183
+ }
1184
+ if (first !== DOT_CODE) {
1185
+ return false;
1186
+ }
1187
+
1188
+ // '.'
1189
+ if (path.length === 1) {
1190
+ return true;
1191
+ }
1192
+ var second = path.charCodeAt(1);
1193
+
1194
+ // './'
1195
+ if (second === SLASH_CODE) {
1196
+ return true;
1197
+ }
1198
+ if (second !== DOT_CODE) {
1199
+ return false;
1200
+ }
1201
+
1202
+ // '..' or '../'
1203
+ return path.length === 2 || path.charCodeAt(2) === SLASH_CODE;
498
1204
  };
499
1205
  checkPath.isNotRelative = isNotRelative;
500
1206
 
@@ -505,13 +1211,13 @@ checkPath.convert = function (p) {
505
1211
  };
506
1212
  var Ignore = /*#__PURE__*/function () {
507
1213
  function Ignore() {
508
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
509
- _ref4$ignorecase = _ref4.ignorecase,
510
- ignorecase = _ref4$ignorecase === void 0 ? true : _ref4$ignorecase,
511
- _ref4$ignoreCase = _ref4.ignoreCase,
512
- ignoreCase = _ref4$ignoreCase === void 0 ? ignorecase : _ref4$ignoreCase,
513
- _ref4$allowRelativePa = _ref4.allowRelativePaths,
514
- allowRelativePaths = _ref4$allowRelativePa === void 0 ? false : _ref4$allowRelativePa;
1214
+ var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1215
+ _ref5$ignorecase = _ref5.ignorecase,
1216
+ ignorecase = _ref5$ignorecase === void 0 ? true : _ref5$ignorecase,
1217
+ _ref5$ignoreCase = _ref5.ignoreCase,
1218
+ ignoreCase = _ref5$ignoreCase === void 0 ? ignorecase : _ref5$ignoreCase,
1219
+ _ref5$allowRelativePa = _ref5.allowRelativePaths,
1220
+ allowRelativePaths = _ref5$allowRelativePa === void 0 ? false : _ref5$allowRelativePa;
515
1221
  _classCallCheck(this, Ignore);
516
1222
  define(this, KEY_IGNORE, true);
517
1223
  this._rules = new RuleManager(ignoreCase);
@@ -549,30 +1255,31 @@ var Ignore = /*#__PURE__*/function () {
549
1255
  // @returns {TestResult}
550
1256
  }, {
551
1257
  key: "_test",
552
- value: function _test(originalPath, cache, checkUnignored, slices) {
1258
+ value: function _test(originalPath, cache) {
553
1259
  var path = originalPath
554
1260
  // Supports nullable path
555
1261
  && checkPath.convert(originalPath);
556
1262
  checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
557
- return this._t(path, cache, checkUnignored, slices);
1263
+ return this._t(path, cache);
558
1264
  }
559
1265
  }, {
560
1266
  key: "checkIgnore",
561
1267
  value: function checkIgnore(path) {
562
1268
  // If the path doest not end with a slash, `.ignores()` is much equivalent
563
1269
  // to `git check-ignore`
564
- if (!REGEX_TEST_TRAILING_SLASH.test(path)) {
1270
+ if (path.charCodeAt(path.length - 1) !== SLASH_CODE) {
565
1271
  return this.test(path);
566
1272
  }
567
- var slices = path.split(SLASH).filter(Boolean);
568
- slices.pop();
569
- if (slices.length) {
570
- var parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
571
- if (parent.ignored) {
572
- return parent;
573
- }
1273
+
1274
+ // Like `git check-ignore`: a directory excluded by itself or by an
1275
+ // ancestor settles it, and only then is the literal 'abc/' matched
1276
+ // against the rules (see `checkSourceOf`).
1277
+ var dir = this._t(path, this._testCache);
1278
+ if (dir.ignored) {
1279
+ return dir;
574
1280
  }
575
- return this._rules.test(path, false, MODE_CHECK_IGNORE);
1281
+ var literal = this._rules.testLiteral(path);
1282
+ return literal.ignored || literal.unignored ? literal : dir;
576
1283
  }
577
1284
  }, {
578
1285
  key: "_t",
@@ -580,37 +1287,23 @@ var Ignore = /*#__PURE__*/function () {
580
1287
  // The path to be tested
581
1288
  path,
582
1289
  // The cache for the result of a certain checking
583
- cache,
584
- // Whether should check if the path is unignored
585
- checkUnignored,
586
- // The path slices
587
- slices) {
1290
+ cache) {
588
1291
  if (path in cache) {
589
1292
  return cache[path];
590
1293
  }
591
- if (!slices) {
592
- // path/to/a.js
593
- // ['path', 'to', 'a.js']
594
- slices = path.split(SLASH).filter(Boolean);
595
- }
596
- slices.pop();
597
-
598
- // If the path has no parent directory, just test it
599
- if (!slices.length) {
600
- return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE);
601
- }
602
- var parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
1294
+ var parentPath = parentOf(path);
603
1295
 
604
1296
  // If the path contains a parent directory, check the parent first
605
- return cache[path] = parent.ignored
1297
+ var parent = parentPath ? this._t(parentPath, cache) : UNDEFINED;
1298
+ return cache[path] = parent && parent.ignored
606
1299
  // > It is not possible to re-include a file if a parent directory of
607
1300
  // > that file is excluded.
608
- ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
1301
+ ? parent : this._rules.test(path, MODE_IGNORE);
609
1302
  }
610
1303
  }, {
611
1304
  key: "ignores",
612
1305
  value: function ignores(path) {
613
- return this._test(path, this._ignoreCache, false).ignored;
1306
+ return this._test(path, this._ignoreCache).ignored;
614
1307
  }
615
1308
  }, {
616
1309
  key: "createFilter",
@@ -630,7 +1323,7 @@ var Ignore = /*#__PURE__*/function () {
630
1323
  }, {
631
1324
  key: "test",
632
1325
  value: function test(path) {
633
- return this._test(path, this._testCache, true);
1326
+ return this._test(path, this._testCache);
634
1327
  }
635
1328
  }]);
636
1329
  return Ignore;