@eagleoutice/flowr 2.17.4 → 2.17.5

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 (544) hide show
  1. package/README.md +13 -52
  2. package/abstract-interpretation/absint-inference.js +1 -2
  3. package/abstract-interpretation/data-frame/arguments.d.ts +14 -3
  4. package/abstract-interpretation/data-frame/arguments.js +34 -0
  5. package/abstract-interpretation/data-frame/dataframe-semantics.js +7 -15
  6. package/abstract-interpretation/data-frame/resolve-args.d.ts +2 -2
  7. package/abstract-interpretation/data-frame/semantics.d.ts +8 -1
  8. package/abstract-interpretation/data-frame/semantics.js +14 -6
  9. package/abstract-interpretation/domains/state-abstract-domain.js +28 -18
  10. package/abstract-interpretation/domains/state-map.d.ts +43 -0
  11. package/abstract-interpretation/domains/state-map.js +147 -0
  12. package/benchmark/slicer.d.ts +1 -1
  13. package/benchmark/slicer.js +8 -7
  14. package/cli/repl/commands/repl-dataflow.js +5 -5
  15. package/cli/repl/commands/repl-execute.js +3 -2
  16. package/cli/repl/commands/repl-parse.js +2 -1
  17. package/cli/repl/print-version.d.ts +1 -1
  18. package/cli/repl/print-version.js +2 -1
  19. package/cli/repl/server/connection.d.ts +1 -1
  20. package/cli/repl/server/connection.js +7 -9
  21. package/cli/slicer-app.js +2 -1
  22. package/clones/algorithms/baxter-ast.d.ts +33 -0
  23. package/clones/algorithms/baxter-ast.js +70 -0
  24. package/clones/algorithms/greedy-string-tiling.d.ts +17 -0
  25. package/clones/algorithms/greedy-string-tiling.js +56 -0
  26. package/clones/algorithms/winnowing.d.ts +27 -0
  27. package/clones/algorithms/winnowing.js +66 -0
  28. package/clones/clone-ast.d.ts +75 -0
  29. package/clones/clone-ast.js +174 -0
  30. package/clones/clone-dataflow.d.ts +11 -0
  31. package/clones/clone-dataflow.js +83 -0
  32. package/clones/clone-detector.d.ts +116 -0
  33. package/clones/clone-detector.js +200 -0
  34. package/clones/clone-index.d.ts +54 -0
  35. package/clones/clone-index.js +56 -0
  36. package/config.d.ts +21 -2
  37. package/config.js +7 -1
  38. package/control-flow/basic-cfg-guided-visitor.js +1 -2
  39. package/control-flow/happens-before.d.ts +2 -0
  40. package/control-flow/happens-before.js +15 -9
  41. package/control-flow/simple-visitor.js +2 -4
  42. package/core/steps/all/core/00-parse.js +2 -1
  43. package/core/steps/all/core/01-parse-tree-sitter.js +2 -1
  44. package/core/steps/all/core/10-normalize.js +2 -1
  45. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -1
  46. package/core/steps/all/static-slicing/00-slice.js +2 -1
  47. package/core/steps/all/static-slicing/10-reconstruct.js +2 -1
  48. package/core/steps/pipeline/create-pipeline.js +1 -2
  49. package/core/steps/pipeline/default-pipelines.d.ts +1 -1
  50. package/core/steps/pipeline/default-pipelines.js +5 -4
  51. package/core/steps/pipeline-step.d.ts +3 -1
  52. package/core/steps/pipeline-step.js +5 -0
  53. package/data/r-base-primitives.generated.d.ts +2 -1
  54. package/dataflow/cluster.js +1 -2
  55. package/dataflow/environments/ambient-state-name.d.ts +14 -22
  56. package/dataflow/environments/ambient-state-name.js +4 -18
  57. package/dataflow/environments/apply-kill.d.ts +9 -20
  58. package/dataflow/environments/apply-kill.js +51 -25
  59. package/dataflow/environments/built-in-config.d.ts +7 -15
  60. package/dataflow/environments/built-in-config.js +15 -16
  61. package/dataflow/environments/built-in-eval-name.d.ts +5 -6
  62. package/dataflow/environments/built-in-eval-name.js +4 -5
  63. package/dataflow/environments/built-in-kinds.d.ts +111 -0
  64. package/dataflow/environments/built-in-kinds.js +35 -0
  65. package/dataflow/environments/built-in-proc-name.d.ts +4 -0
  66. package/dataflow/environments/built-in-proc-name.js +11 -0
  67. package/dataflow/environments/built-in-props.d.ts +62 -175
  68. package/dataflow/environments/built-in-props.js +42 -154
  69. package/dataflow/environments/built-in.d.ts +37 -73
  70. package/dataflow/environments/built-in.js +41 -62
  71. package/dataflow/environments/data-masking-functions.d.ts +2 -2
  72. package/dataflow/environments/default-builtin-config/base-functions.d.ts +7 -0
  73. package/dataflow/environments/default-builtin-config/base-functions.js +339 -0
  74. package/dataflow/environments/default-builtin-config/base-language.d.ts +3 -0
  75. package/dataflow/environments/default-builtin-config/base-language.js +66 -0
  76. package/dataflow/environments/default-builtin-config/base-operators.d.ts +58 -0
  77. package/dataflow/environments/default-builtin-config/base-operators.js +169 -0
  78. package/dataflow/environments/default-builtin-config/database-access.d.ts +3 -0
  79. package/dataflow/environments/default-builtin-config/database-access.js +16 -0
  80. package/dataflow/environments/default-builtin-config/define-helpers.d.ts +45 -0
  81. package/dataflow/environments/default-builtin-config/define-helpers.js +50 -0
  82. package/dataflow/environments/default-builtin-config/dev-tooling.d.ts +3 -0
  83. package/dataflow/environments/default-builtin-config/dev-tooling.js +63 -0
  84. package/dataflow/environments/default-builtin-config/file-io.d.ts +3 -0
  85. package/dataflow/environments/default-builtin-config/file-io.js +81 -0
  86. package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +3 -0
  87. package/dataflow/environments/default-builtin-config/graphics-devices.js +57 -0
  88. package/dataflow/environments/default-builtin-config/index.d.ts +18 -0
  89. package/dataflow/environments/default-builtin-config/index.js +114 -0
  90. package/dataflow/environments/default-builtin-config/media-formats.d.ts +3 -0
  91. package/dataflow/environments/default-builtin-config/media-formats.js +41 -0
  92. package/dataflow/environments/default-builtin-config/misc-packages.d.ts +3 -0
  93. package/dataflow/environments/default-builtin-config/misc-packages.js +18 -0
  94. package/dataflow/environments/default-builtin-config/network-access.d.ts +3 -0
  95. package/dataflow/environments/default-builtin-config/network-access.js +47 -0
  96. package/dataflow/environments/default-builtin-config/object-systems.d.ts +3 -0
  97. package/dataflow/environments/default-builtin-config/object-systems.js +39 -0
  98. package/dataflow/environments/default-builtin-config/package-data-table.d.ts +3 -0
  99. package/dataflow/environments/default-builtin-config/package-data-table.js +18 -0
  100. package/dataflow/environments/default-builtin-config/package-spatial.d.ts +3 -0
  101. package/dataflow/environments/default-builtin-config/package-spatial.js +32 -0
  102. package/dataflow/environments/default-builtin-config/package-tidyverse.d.ts +3 -0
  103. package/dataflow/environments/default-builtin-config/package-tidyverse.js +96 -0
  104. package/dataflow/environments/default-builtin-config/package-utils.d.ts +3 -0
  105. package/dataflow/environments/default-builtin-config/package-utils.js +35 -0
  106. package/dataflow/environments/default-builtin-config/package-withr.d.ts +3 -0
  107. package/dataflow/environments/default-builtin-config/package-withr.js +41 -0
  108. package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +3 -0
  109. package/dataflow/environments/default-builtin-config/parallel-execution.js +31 -0
  110. package/dataflow/environments/default-builtin-config/session-interactive.d.ts +3 -0
  111. package/dataflow/environments/default-builtin-config/session-interactive.js +31 -0
  112. package/dataflow/environments/default-builtin-config/shared-configs.d.ts +267 -0
  113. package/dataflow/environments/default-builtin-config/shared-configs.js +483 -0
  114. package/dataflow/environments/default-builtin-config/shared-signatures.d.ts +21 -0
  115. package/dataflow/environments/default-builtin-config/shared-signatures.js +32 -0
  116. package/dataflow/environments/default-builtin-config/statistics.d.ts +3 -0
  117. package/dataflow/environments/default-builtin-config/statistics.js +32 -0
  118. package/dataflow/environments/default-builtin-config/unit-testing.d.ts +3 -0
  119. package/dataflow/environments/default-builtin-config/unit-testing.js +13 -0
  120. package/dataflow/environments/environment.d.ts +28 -52
  121. package/dataflow/environments/environment.js +24 -71
  122. package/dataflow/environments/group-generics.d.ts +12 -19
  123. package/dataflow/environments/group-generics.js +17 -14
  124. package/dataflow/environments/identifier.d.ts +72 -427
  125. package/dataflow/environments/identifier.js +34 -145
  126. package/dataflow/environments/pkg-name.d.ts +197 -0
  127. package/dataflow/environments/pkg-name.js +3 -0
  128. package/dataflow/environments/query-fn-props.d.ts +27 -76
  129. package/dataflow/environments/query-fn-props.js +34 -95
  130. package/dataflow/environments/resolve-by-name.d.ts +6 -16
  131. package/dataflow/environments/resolve-by-name.js +23 -35
  132. package/dataflow/environments/scoping.d.ts +5 -5
  133. package/dataflow/environments/scoping.js +13 -5
  134. package/dataflow/eval/resolve/alias-tracking.d.ts +31 -68
  135. package/dataflow/eval/resolve/alias-tracking.js +611 -126
  136. package/dataflow/eval/resolve/match-arguments.d.ts +5 -3
  137. package/dataflow/eval/resolve/resolve-argument.d.ts +11 -11
  138. package/dataflow/eval/resolve/resolve-argument.js +25 -30
  139. package/dataflow/eval/resolve/resolve-field.d.ts +10 -0
  140. package/dataflow/eval/resolve/resolve-field.js +127 -0
  141. package/dataflow/eval/resolve/resolve-replacement.d.ts +10 -0
  142. package/dataflow/eval/resolve/resolve-replacement.js +80 -0
  143. package/dataflow/eval/resolve/resolve-strings.d.ts +2 -2
  144. package/dataflow/eval/resolve/resolve.d.ts +13 -10
  145. package/dataflow/eval/resolve/resolve.js +81 -32
  146. package/dataflow/eval/values/general.d.ts +6 -24
  147. package/dataflow/eval/values/general.js +12 -29
  148. package/dataflow/eval/values/lists/list-constants.d.ts +11 -0
  149. package/dataflow/eval/values/lists/list-constants.js +65 -0
  150. package/dataflow/eval/values/r-value.d.ts +20 -23
  151. package/dataflow/eval/values/r-value.js +22 -17
  152. package/dataflow/extractor.d.ts +2 -10
  153. package/dataflow/extractor.js +100 -46
  154. package/dataflow/fn/argument-roles.d.ts +2 -4
  155. package/dataflow/fn/argument-roles.js +49 -23
  156. package/dataflow/fn/class-declaration.d.ts +36 -52
  157. package/dataflow/fn/class-declaration.js +22 -56
  158. package/dataflow/fn/condition-handlers.d.ts +2 -1
  159. package/dataflow/fn/dispatch.d.ts +70 -0
  160. package/dataflow/fn/dispatch.js +434 -0
  161. package/dataflow/fn/exceptions-of-function.d.ts +1 -2
  162. package/dataflow/fn/exceptions-of-function.js +36 -106
  163. package/dataflow/fn/frame-reflection.d.ts +1 -3
  164. package/dataflow/fn/frame-reflection.js +8 -16
  165. package/dataflow/fn/function-props.d.ts +2 -5
  166. package/dataflow/fn/function-props.js +27 -36
  167. package/dataflow/fn/function-semantics.d.ts +14 -26
  168. package/dataflow/fn/function-semantics.js +4 -18
  169. package/dataflow/fn/higher-order-function.js +2 -4
  170. package/dataflow/fn/strict-function.d.ts +10 -35
  171. package/dataflow/fn/strict-function.js +126 -138
  172. package/dataflow/graph/ambient-access.d.ts +51 -0
  173. package/dataflow/graph/ambient-access.js +80 -0
  174. package/dataflow/graph/call-graph.d.ts +9 -29
  175. package/dataflow/graph/call-graph.js +17 -41
  176. package/dataflow/graph/closure-frames.d.ts +46 -0
  177. package/dataflow/graph/closure-frames.js +225 -0
  178. package/dataflow/graph/dataflowgraph-builder.d.ts +25 -96
  179. package/dataflow/graph/dataflowgraph-builder.js +29 -97
  180. package/dataflow/graph/df-helper.d.ts +48 -188
  181. package/dataflow/graph/df-helper.js +107 -208
  182. package/dataflow/graph/diff-dataflow-graph.d.ts +5 -15
  183. package/dataflow/graph/diff-dataflow-graph.js +25 -25
  184. package/dataflow/graph/edge.js +1 -1
  185. package/dataflow/graph/graph-helper.d.ts +10 -46
  186. package/dataflow/graph/graph-helper.js +16 -50
  187. package/dataflow/graph/graph.d.ts +44 -97
  188. package/dataflow/graph/graph.js +83 -79
  189. package/dataflow/graph/match-args.d.ts +21 -88
  190. package/dataflow/graph/match-args.js +284 -97
  191. package/dataflow/graph/vertex.d.ts +101 -128
  192. package/dataflow/graph/vertex.js +23 -20
  193. package/dataflow/hooks.d.ts +7 -14
  194. package/dataflow/hooks.js +15 -13
  195. package/dataflow/info.d.ts +2 -17
  196. package/dataflow/internal/dispatch-linking.d.ts +71 -0
  197. package/dataflow/internal/dispatch-linking.js +332 -0
  198. package/dataflow/internal/linker.d.ts +48 -50
  199. package/dataflow/internal/linker.js +457 -155
  200. package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -1
  201. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +2 -14
  202. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +16 -46
  203. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +7 -6
  204. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +10 -9
  205. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +23 -75
  206. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +263 -97
  207. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +10 -7
  208. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +66 -45
  209. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +15 -19
  210. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +82 -62
  211. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +4 -4
  212. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +2 -2
  213. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +2 -2
  214. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +3 -2
  215. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +15 -0
  216. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +416 -0
  217. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +37 -54
  218. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +192 -111
  219. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +4 -3
  220. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +60 -13
  221. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -3
  222. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +80 -76
  223. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +1 -7
  224. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -13
  225. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +4 -8
  226. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +436 -140
  227. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +18 -10
  228. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +90 -12
  229. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -5
  230. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +5 -14
  231. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +9 -8
  232. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +12 -7
  233. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -2
  234. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +3 -5
  235. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -6
  236. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +9 -24
  237. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +10 -6
  238. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +5 -6
  239. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -4
  240. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +1 -4
  241. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +8 -11
  242. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -5
  243. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +20 -28
  244. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +17 -4
  245. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +117 -4
  246. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +5 -3
  247. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
  248. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +8 -4
  249. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +18 -29
  250. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +7 -25
  251. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +31 -35
  252. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +4 -18
  253. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +13 -19
  254. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +18 -16
  255. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +130 -65
  256. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +2 -1
  257. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +38 -30
  258. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +584 -114
  259. package/dataflow/internal/process/functions/call/common.d.ts +8 -24
  260. package/dataflow/internal/process/functions/call/common.js +24 -24
  261. package/dataflow/internal/process/functions/call/deferred.d.ts +7 -27
  262. package/dataflow/internal/process/functions/call/deferred.js +6 -27
  263. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +6 -26
  264. package/dataflow/internal/process/functions/call/known-call-handling.js +6 -16
  265. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -4
  266. package/dataflow/internal/process/functions/call/named-call-handling.js +14 -35
  267. package/dataflow/internal/process/functions/call/nse.d.ts +2 -9
  268. package/dataflow/internal/process/functions/call/nse.js +6 -13
  269. package/dataflow/internal/process/functions/call/quoted.d.ts +4 -15
  270. package/dataflow/internal/process/functions/call/quoted.js +26 -62
  271. package/dataflow/internal/process/functions/call/unnamed-call-handling.d.ts +3 -6
  272. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +29 -11
  273. package/dataflow/internal/process/functions/process-parameter.js +1 -1
  274. package/dataflow/internal/program-order.d.ts +3 -10
  275. package/dataflow/internal/program-order.js +19 -10
  276. package/dataflow/origin/dfg-get-origin.js +2 -1
  277. package/documentation/data/faq/faqs.js +16 -1
  278. package/documentation/data/interface/doc-writing-code.js +5 -7
  279. package/documentation/doc-capabilities.js +3 -3
  280. package/documentation/doc-readme.js +1 -1
  281. package/documentation/doc-util/doc-code.d.ts +0 -5
  282. package/documentation/doc-util/doc-code.js +2 -22
  283. package/documentation/doc-util/doc-query.d.ts +1 -2
  284. package/documentation/doc-util/doc-query.js +4 -5
  285. package/documentation/doc-util/doc-search.js +1 -1
  286. package/documentation/wiki-analyzer.js +4 -3
  287. package/documentation/wiki-core.js +5 -5
  288. package/documentation/wiki-dataflow-graph.js +6 -0
  289. package/documentation/wiki-interface.js +2 -1
  290. package/documentation/wiki-linter.js +15 -3
  291. package/documentation/wiki-linting-and-testing.js +15 -2
  292. package/documentation/wiki-query.js +111 -29
  293. package/index.d.ts +3 -1
  294. package/index.js +6 -3
  295. package/linter/linter-executor.js +1 -1
  296. package/linter/linter-rules.d.ts +37 -8
  297. package/linter/linter-rules.js +8 -1
  298. package/linter/linter-util.d.ts +3 -3
  299. package/linter/linter-util.js +1 -1
  300. package/linter/rules/cmd-check/bogus-return.d.ts +2 -1
  301. package/linter/rules/cmd-check/call-arguments.d.ts +3 -2
  302. package/linter/rules/cmd-check/call-arguments.js +5 -5
  303. package/linter/rules/cmd-check/cmd-check-util.d.ts +9 -8
  304. package/linter/rules/cmd-check/dependency-declaration.d.ts +2 -1
  305. package/linter/rules/cmd-check/dependency-declaration.js +1 -1
  306. package/linter/rules/cmd-check/documentation-mismatch.d.ts +3 -2
  307. package/linter/rules/cmd-check/documentation-mismatch.js +2 -1
  308. package/linter/rules/cmd-check/file-checks.d.ts +2 -2
  309. package/linter/rules/cmd-check/foreign-function-calls.d.ts +2 -1
  310. package/linter/rules/cmd-check/global-environment-modification.d.ts +6 -5
  311. package/linter/rules/cmd-check/namespace-tampering.d.ts +2 -1
  312. package/linter/rules/cmd-check/non-ascii-code.js +1 -1
  313. package/linter/rules/cmd-check/package-files.d.ts +2 -2
  314. package/linter/rules/cmd-check/package-hooks.d.ts +5 -4
  315. package/linter/rules/cmd-check/package-runtime.js +2 -2
  316. package/linter/rules/cmd-check/rd-files.js +2 -1
  317. package/linter/rules/cmd-check/s-three-method-consistency.d.ts +3 -2
  318. package/linter/rules/cmd-check/s-three-method-consistency.js +2 -1
  319. package/linter/rules/code-clones.d.ts +57 -0
  320. package/linter/rules/code-clones.js +53 -0
  321. package/linter/rules/deprecated-functions.js +3 -6
  322. package/linter/rules/file-path-validity.js +6 -4
  323. package/linter/rules/function-finder-util.d.ts +4 -2
  324. package/linter/rules/naming-convention.d.ts +6 -5
  325. package/linter/rules/naming-convention.js +2 -3
  326. package/linter/rules/no-leaked-credentials.d.ts +2 -1
  327. package/linter/rules/no-leaked-credentials.js +1 -1
  328. package/linter/rules/overwritten-file.d.ts +2 -1
  329. package/linter/rules/problematic-inputs.d.ts +2 -1
  330. package/linter/rules/problematic-inputs.js +3 -3
  331. package/linter/rules/process-state-in-session.d.ts +7 -6
  332. package/linter/rules/process-state-in-session.js +1 -1
  333. package/linter/rules/roxygen-arguments.d.ts +1 -1
  334. package/linter/rules/secret-exfiltration.js +1 -1
  335. package/linter/rules/seeded-randomness.d.ts +3 -3
  336. package/linter/rules/unclosed-connection.js +1 -2
  337. package/linter/rules/undefined-symbol-util.d.ts +3 -2
  338. package/linter/rules/undefined-symbol.d.ts +3 -2
  339. package/linter/rules/unescaped-arguments.d.ts +1 -1
  340. package/linter/rules/unescaped-arguments.js +6 -8
  341. package/linter/rules/unused-definition.d.ts +4 -3
  342. package/linter/rules/unused-definition.js +10 -12
  343. package/linter/rules/unused-import.d.ts +6 -5
  344. package/package.json +1 -1
  345. package/project/attached-packages.d.ts +5 -4
  346. package/project/cache/flowr-analyzer-cache.d.ts +14 -1
  347. package/project/cache/flowr-analyzer-cache.js +40 -3
  348. package/project/context/flowr-analyzer-dependencies-context.d.ts +12 -12
  349. package/project/context/flowr-analyzer-environment-context.d.ts +3 -3
  350. package/project/context/flowr-analyzer-environment-context.js +3 -3
  351. package/project/context/flowr-analyzer-functions-context.d.ts +9 -7
  352. package/project/context/flowr-analyzer-gas-context.d.ts +25 -0
  353. package/project/context/flowr-analyzer-gas-context.js +34 -4
  354. package/project/dependency-version-space.d.ts +30 -29
  355. package/project/dependency-version-space.js +1 -2
  356. package/project/flowr-analyzer-builder.d.ts +2 -3
  357. package/project/flowr-analyzer.d.ts +35 -3
  358. package/project/flowr-analyzer.js +11 -5
  359. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +15 -14
  360. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +5 -4
  361. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +1 -1
  362. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +2 -1
  363. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +4 -3
  364. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +2 -1
  365. package/project/plugins/package-version-plugins/package.d.ts +6 -5
  366. package/project/sigdb/build.js +1 -1
  367. package/project/sigdb/decode.d.ts +8 -7
  368. package/project/sigdb/decode.js +1 -2
  369. package/project/sigdb/dict.d.ts +2 -1
  370. package/project/sigdb/dict.js +2 -2
  371. package/project/sigdb/index-format.d.ts +2 -1
  372. package/project/sigdb/manifest.d.ts +1 -1
  373. package/project/sigdb/memory-source.d.ts +18 -17
  374. package/project/sigdb/on-demand/package-sources.d.ts +4 -3
  375. package/project/sigdb/on-demand/recoverer.d.ts +2 -1
  376. package/project/sigdb/on-demand/remote-sources.d.ts +2 -1
  377. package/project/sigdb/reader.d.ts +85 -80
  378. package/project/sigdb/reader.js +0 -4
  379. package/project/sigdb/schema.d.ts +9 -8
  380. package/project/sigdb/signature-db.d.ts +6 -6
  381. package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +6 -0
  382. package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +50 -0
  383. package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +54 -0
  384. package/queries/catalog/ambient-access-query/ambient-access-query-format.js +45 -0
  385. package/queries/catalog/call-context-query/call-context-query-executor.d.ts +2 -1
  386. package/queries/catalog/call-context-query/call-context-query-executor.js +2 -2
  387. package/queries/catalog/call-graph-query/expand-library-internals.d.ts +3 -2
  388. package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +6 -0
  389. package/queries/catalog/code-clones-query/code-clones-query-executor.js +38 -0
  390. package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +54 -0
  391. package/queries/catalog/code-clones-query/code-clones-query-format.js +73 -0
  392. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +3 -3
  393. package/queries/catalog/dependencies-query/data-flow.d.ts +5 -4
  394. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +5 -2
  395. package/queries/catalog/dependencies-query/dependencies-query-executor.js +5 -5
  396. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +3 -2
  397. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  398. package/queries/catalog/dependencies-query/function-info/function-info.d.ts +6 -4
  399. package/queries/catalog/dependencies-query/implicit-echo.js +2 -1
  400. package/queries/catalog/dice-query/dice-query-format.d.ts +1 -0
  401. package/queries/catalog/dice-query/dice-query-format.js +1 -0
  402. package/queries/catalog/does-call-query/does-call-query-executor.js +1 -2
  403. package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -0
  404. package/queries/catalog/does-call-query/does-call-query-format.js +1 -0
  405. package/queries/catalog/function-info-query/function-info-query-format.d.ts +2 -1
  406. package/queries/catalog/function-info-query/function-origin.d.ts +3 -2
  407. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +3 -3
  408. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +5 -4
  409. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -0
  410. package/queries/catalog/happens-before-query/happens-before-query-format.js +1 -0
  411. package/queries/catalog/input-sources-query/input-sources-query-executor.js +7 -3
  412. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +9 -9
  413. package/queries/catalog/input-sources-query/simple-input-classifier.js +1 -1
  414. package/queries/catalog/linter-query/linter-query-executor.js +4 -1
  415. package/queries/catalog/linter-query/linter-query-format.js +3 -2
  416. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -0
  417. package/queries/catalog/origin-query/origin-query-format.js +1 -0
  418. package/queries/catalog/project-query/project-query-format.d.ts +2 -1
  419. package/queries/catalog/provenance-query/provenance-query-format.d.ts +1 -0
  420. package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
  421. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -0
  422. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
  423. package/queries/catalog/signature-query/signature-query-executor.d.ts +9 -6
  424. package/queries/catalog/signature-query/signature-query-executor.js +14 -15
  425. package/queries/catalog/signature-query/signature-query-format.d.ts +21 -20
  426. package/queries/catalog/signature-query/signature-query-render.js +1 -1
  427. package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
  428. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +9 -5
  429. package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
  430. package/queries/query-function-filter.d.ts +1 -1
  431. package/queries/query.d.ts +59 -8
  432. package/queries/query.js +59 -37
  433. package/r-bridge/data/data.d.ts +39 -28
  434. package/r-bridge/data/data.js +37 -28
  435. package/r-bridge/lang-4.x/ast/model/model.d.ts +10 -1
  436. package/r-bridge/lang-4.x/ast/model/model.js +30 -0
  437. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +21 -0
  438. package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +25 -2
  439. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +2 -1
  440. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -2
  441. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -2
  442. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  443. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  444. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  445. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  446. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -3
  447. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  448. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  449. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  450. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  451. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  452. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
  453. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  454. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  455. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  456. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +5 -6
  457. package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -7
  458. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  459. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -2
  460. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -2
  461. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  462. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +4 -5
  463. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +7 -2
  464. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +14 -6
  465. package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
  466. package/r-bridge/lang-4.x/ast/model/processing/visitor.js +2 -2
  467. package/r-bridge/lang-4.x/ast/model/type.d.ts +1 -1
  468. package/r-bridge/lang-4.x/ast/model/type.js +1 -1
  469. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-binary.js +2 -2
  470. package/r-bridge/lang-4.x/ast/parser/main/internal/operators/normalize-unary.js +2 -2
  471. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  472. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +3 -2
  473. package/r-bridge/parser.d.ts +8 -2
  474. package/r-bridge/parser.js +6 -0
  475. package/r-bridge/shell-executor.d.ts +2 -2
  476. package/r-bridge/shell-executor.js +3 -2
  477. package/r-bridge/shell.d.ts +2 -2
  478. package/r-bridge/shell.js +3 -2
  479. package/reconstruct/auto-select/magic-comments.js +1 -1
  480. package/reconstruct/reconstruct.d.ts +0 -5
  481. package/reconstruct/reconstruct.js +6 -5
  482. package/search/flowr-search-builder.d.ts +14 -0
  483. package/search/flowr-search-builder.js +7 -0
  484. package/search/flowr-search-executor.js +2 -2
  485. package/search/flowr-search-filters.js +8 -9
  486. package/search/flowr-search.js +1 -1
  487. package/search/search-executor/search-enrichers.d.ts +2 -0
  488. package/search/search-executor/search-enrichers.js +6 -1
  489. package/search/search-executor/search-generators.d.ts +2 -2
  490. package/search/search-executor/search-generators.js +13 -8
  491. package/search/search-executor/search-mappers.js +1 -1
  492. package/search/search-executor/search-transformer.d.ts +2 -2
  493. package/search/search-executor/search-transformer.js +6 -6
  494. package/slicing/criterion/parse.d.ts +2 -1
  495. package/slicing/criterion/parse.js +2 -1
  496. package/slicing/static/removal-slice.js +2 -1
  497. package/slicing/static/slice-call.d.ts +30 -4
  498. package/slicing/static/slice-call.js +74 -9
  499. package/slicing/static/slicer-types.d.ts +2 -1
  500. package/slicing/static/static-slicer.js +66 -11
  501. package/slicing/static/visiting-queue.d.ts +2 -0
  502. package/slicing/static/visiting-queue.js +4 -0
  503. package/taint-analysis/builder/report-template.d.ts +3 -3
  504. package/util/arg-matching.d.ts +1 -1
  505. package/util/collections/relation.d.ts +23 -0
  506. package/util/collections/relation.js +63 -0
  507. package/util/fixpoint.d.ts +65 -0
  508. package/util/fixpoint.js +216 -0
  509. package/util/flowr-version.d.ts +1 -1
  510. package/util/flowr-version.js +2 -2
  511. package/util/json.d.ts +4 -0
  512. package/util/json.js +12 -3
  513. package/util/mermaid/cfg.js +1 -2
  514. package/util/mermaid/dfg.d.ts +1 -1
  515. package/util/mermaid/dfg.js +1 -1
  516. package/util/mermaid/mermaid.d.ts +2 -1
  517. package/util/monoid.d.ts +26 -0
  518. package/util/monoid.js +31 -0
  519. package/util/prefix.d.ts +1 -1
  520. package/util/r-base-packages.d.ts +10 -7
  521. package/util/r-base-packages.js +11 -6
  522. package/util/r-package-urls.d.ts +10 -9
  523. package/util/r-value.js +2 -1
  524. package/util/r-version-order.d.ts +2 -0
  525. package/util/r-version-order.js +19 -0
  526. package/util/r-version.d.ts +2 -1
  527. package/util/r-version.js +2 -14
  528. package/util/range.d.ts +38 -29
  529. package/util/range.js +10 -5
  530. package/util/simple-df/dfg-ascii.js +2 -2
  531. package/util/text/ansi.d.ts +13 -9
  532. package/util/text/ansi.js +4 -6
  533. package/util/text/strings.d.ts +10 -3
  534. package/util/text/strings.js +10 -1
  535. package/util/version.d.ts +1 -1
  536. package/util/version.js +2 -1
  537. package/dataflow/environments/default-builtin-config.d.ts +0 -8874
  538. package/dataflow/environments/default-builtin-config.js +0 -1737
  539. package/r-bridge/lang-4.x/ast/model/operators.d.ts +0 -33
  540. package/r-bridge/lang-4.x/ast/model/operators.js +0 -54
  541. package/taint-analysis/eval/eval.d.ts +0 -1
  542. package/taint-analysis/eval/eval.js +0 -124
  543. package/taint-analysis/eval/instrumentation.d.ts +0 -59
  544. package/taint-analysis/eval/instrumentation.js +0 -124
@@ -47,6 +47,7 @@ function diceQueryCompleter(line, startingNewArg, _config) {
47
47
  exports.DiceQueryDefinition = {
48
48
  title: 'Dice Query',
49
49
  executor: dice_query_executor_1.executeDiceQuery,
50
+ perQueryResults: true,
50
51
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => (0, slice_query_options_1.summarizeSliceResults)(formatter, 'dice', queryResults, result, (_, q) => q ? `Dice from {${q.from.join(', ')}} to {${q.to.join(', ')}}` : 'Dice'),
51
52
  fromLine: diceQueryLineParser,
52
53
  completer: diceQueryCompleter,
@@ -76,8 +76,7 @@ function makeCallMatcher(constraint) {
76
76
  function findCallersMatchingConstraints(cg, start, constraints, expandDeps) {
77
77
  const visited = new Set();
78
78
  const toVisit = [start];
79
- while (toVisit.length > 0) {
80
- const cur = toVisit.pop();
79
+ for (let cur; (cur = toVisit.pop()) !== undefined;) {
81
80
  if (visited.has(cur)) {
82
81
  continue;
83
82
  }
@@ -56,6 +56,7 @@ declare function doesCallQueryLineParser(output: ReplOutput, line: readonly stri
56
56
  export declare const DoesCallQueryDefinition: {
57
57
  readonly title: "Does-Call Query";
58
58
  readonly executor: typeof executeDoesCallQuery;
59
+ readonly perQueryResults: true;
59
60
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
60
61
  readonly fromLine: typeof doesCallQueryLineParser;
61
62
  readonly syntax: "@does-call (<criterion>:$<id>|\"<name>\") <code | file://path>";
@@ -71,6 +71,7 @@ function doesCallQueryLineParser(output, line, _config) {
71
71
  exports.DoesCallQueryDefinition = {
72
72
  title: 'Does-Call Query',
73
73
  executor: does_call_query_executor_1.executeDoesCallQuery,
74
+ perQueryResults: true,
74
75
  asciiSummarizer: async (formatter, processed, queryResults, result) => {
75
76
  const out = queryResults;
76
77
  result.push(`Query: ${(0, ansi_1.bold)('does-call', formatter)} (${out['.meta'].timing.toFixed(0)}ms)`);
@@ -1,3 +1,4 @@
1
+ import type { BrandedNamespace } from '../../../dataflow/environments/identifier';
1
2
  import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
3
  import Joi from 'joi';
3
4
  import type { ParsedQueryLine } from '../../query';
@@ -17,7 +18,7 @@ export interface FunctionInfoQuery extends BaseQueryFormat {
17
18
  /** the bare function/symbol name to look up */
18
19
  readonly name: string;
19
20
  /** restrict the package list to these names; every exporting package when omitted */
20
- readonly packages?: readonly string[];
21
+ readonly packages?: readonly BrandedNamespace[];
21
22
  }
22
23
  /** what the signature database states about `name` in one exporting package */
23
24
  export interface FunctionInfoPackageHit {
@@ -1,3 +1,4 @@
1
+ import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
1
2
  import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
2
3
  /**
3
4
  * flowR's own modeling of one built-in entry naming a function, read off the built-in definitions the analyzer
@@ -7,7 +8,7 @@ import type { ReadOnlyFlowrAnalyzerContext } from '../../../project/context/flow
7
8
  export interface BuiltinModel {
8
9
  readonly kind: 'function' | 'constant' | 'replacement';
9
10
  /** the package the entry names it under, e.g. `stats` for `sd`; `undefined` for an unqualified entry like most of `base` */
10
- readonly namespace?: string;
11
+ readonly namespace?: BrandedNamespace;
11
12
  /** {@link BuiltInProcName} value, for a `function` entry */
12
13
  readonly processor?: string;
13
14
  readonly assumePrimitive: boolean;
@@ -19,4 +20,4 @@ export interface BuiltinModel {
19
20
  readonly configKeys: readonly string[];
20
21
  }
21
22
  /** every built-in the analyzer states for the bare name `name`, one entry per namespace it is declared under, empty when it states none */
22
- export declare function builtinModelsOf(name: string, ctx: ReadOnlyFlowrAnalyzerContext): readonly BuiltinModel[];
23
+ export declare function builtinModelsOf(name: BrandedIdentifier, ctx: ReadOnlyFlowrAnalyzerContext): readonly BuiltinModel[];
@@ -98,7 +98,7 @@ function mergeQueries(queries) {
98
98
  };
99
99
  }
100
100
  /** format version range string from survivors and declared constraints, honest about gaps */
101
- function rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap) {
101
+ function rangeString(survivors, { nonContiguous, unsatisfiable }, declaredRange, declaredConstraints, cap) {
102
102
  if (survivors.length === 0) {
103
103
  if (unsatisfiable) {
104
104
  return declaredConstraints.join(' ') || '<contradiction>';
@@ -127,7 +127,7 @@ function guessPackage(name, cap, surviving, evidence, { used, linkedWith, couple
127
127
  package: name,
128
128
  base: surviving.base,
129
129
  declaredConstraints,
130
- range: rangeString(survivors, nonContiguous, unsatisfiable, declaredRange, declaredConstraints, cap),
130
+ range: rangeString(survivors, { nonContiguous, unsatisfiable }, declaredRange, declaredConstraints, cap),
131
131
  minVersion: survivors.length > 0 ? survivors[0] : undefined,
132
132
  maxVersion: survivors.length > 0 ? survivors[survivors.length - 1] : undefined,
133
133
  candidateCount: survivors.length,
@@ -261,7 +261,7 @@ async function executeGuessDepVersionsQuery({ analyzer }, queries) {
261
261
  const versions = s.survivors.map(e => e.ver);
262
262
  return (0, objects_1.compactRecord)({
263
263
  package: alt,
264
- range: rangeString(versions, false, s.unsatisfiable, s.declaredRange, s.declaredConstraints, cap),
264
+ range: rangeString(versions, { nonContiguous: false, unsatisfiable: s.unsatisfiable }, s.declaredRange, s.declaredConstraints, cap),
265
265
  minVersion: versions[0],
266
266
  maxVersion: versions[versions.length - 1],
267
267
  candidateCount: versions.length,
@@ -3,6 +3,7 @@ import Joi from 'joi';
3
3
  import type { ParsedQueryLine } from '../../query';
4
4
  import { type OutputFormatter } from '../../../util/text/ansi';
5
5
  import { type VersionString } from '../../../util/r-version';
6
+ import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
6
7
  import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
7
8
  import { VersionSelection, type FlowrConfig } from '../../../config';
8
9
  import { executeGuessDepVersionsQuery } from './guess-dep-versions-query-executor';
@@ -20,7 +21,7 @@ import type { RVersionOrigin } from '../../../project/context/flowr-analyzer-con
20
21
  export interface GuessDepVersionsQuery extends BaseQueryFormat {
21
22
  readonly type: 'guess-dep-versions';
22
23
  /** restrict the guess to these packages; omit to guess for every declared and used dependency */
23
- readonly packages?: readonly string[];
24
+ readonly packages?: readonly BrandedNamespace[];
24
25
  /** only consider versions released on or before this day, written `YYYY.MM.DD` (also `YYYY` or `YYYY.MM`) */
25
26
  readonly date?: string;
26
27
  /** cap the number of candidate versions listed per dependency in the result (default {@link DefaultCandidateCap}) */
@@ -39,7 +40,7 @@ export interface GuessExplodeOptions {
39
40
  /** iterate each dependency's versions newest-first (default) or oldest-first */
40
41
  readonly order?: 'newest' | 'oldest';
41
42
  /** a version to prefer per dependency when it survives the constraints (package name to version) */
42
- readonly prefer?: Readonly<Record<string, VersionString>>;
43
+ readonly prefer?: Readonly<Record<BrandedNamespace, VersionString>>;
43
44
  /** cap the number of combinations considered; the ones that cannot be loaded together are skipped, not returned */
44
45
  readonly limit?: number;
45
46
  }
@@ -105,7 +106,7 @@ export interface GuessedDependency {
105
106
  /** set when the constraints contradict each other so that no version can satisfy them all */
106
107
  readonly unsatisfiable?: boolean;
107
108
  /** the other packages this one shares a version with, so its range is not independent of theirs */
108
- readonly linkedWith?: readonly string[];
109
+ readonly linkedWith?: readonly BrandedNamespace[];
109
110
  /**
110
111
  * The other packages whose version requirements this one's version choice interacts with, so the two cannot be
111
112
  * picked independently (`A 0.2.5` requiring `B == 0.2.1` while `A 0.3.0` requires `B == 0.3.2`). A partner marked
@@ -140,7 +141,7 @@ export interface GuessedDependency {
140
141
  */
141
142
  readonly orphan?: boolean;
142
143
  /** the undefined orphan function names that inferred this package (only set when {@link orphan}), e.g. `['ggplot']` */
143
- readonly orphanFunctions?: readonly string[];
144
+ readonly orphanFunctions?: readonly BrandedIdentifier[];
144
145
  /** per {@link orphanFunctions} entry, where the undefined call is and why it was pinned on this package */
145
146
  readonly orphanEvidence?: readonly OrphanEvidenceView[];
146
147
  /**
@@ -29,6 +29,7 @@ export declare const HappensBeforeKey: {
29
29
  export declare const HappensBeforeQueryDefinition: {
30
30
  readonly title: "Happens-Before Query";
31
31
  readonly executor: typeof executeHappensBefore;
32
+ readonly perQueryResults: true;
32
33
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
33
34
  readonly schema: Joi.ObjectSchema<any>;
34
35
  };
@@ -28,6 +28,7 @@ exports.HappensBeforeKey = {
28
28
  exports.HappensBeforeQueryDefinition = {
29
29
  title: 'Happens-Before Query',
30
30
  executor: happens_before_query_executor_1.executeHappensBefore,
31
+ perQueryResults: true,
31
32
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
32
33
  const out = queryResults;
33
34
  result.push((0, query_print_1.queryHeader)('happens-before', formatter, out['.meta'].timing));
@@ -22,8 +22,7 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
22
22
  const results = {};
23
23
  const nast = await analyzer.normalize();
24
24
  const df = await analyzer.dataflow();
25
- const ctx = analyzer.inspectContext();
26
- const defaultConfig = addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
25
+ const defaultConfig = await analyzer.derive(resolveDefaultConfig, () => resolveDefaultConfig(analyzer));
27
26
  const packages = unqualifiedPackages(analyzer, df.environment);
28
27
  for (const query of queries) {
29
28
  const criteria = Array.isArray(query.criterion)
@@ -47,6 +46,11 @@ async function executeInputSourcesQuery({ analyzer }, queries) {
47
46
  results
48
47
  };
49
48
  }
49
+ /** The default classifier config with the configured entries added, its searches (e.g. linter rules) resolved. */
50
+ async function resolveDefaultConfig(analyzer) {
51
+ const ctx = analyzer.inspectContext();
52
+ return addAll(await resolveSearches(analyzer, (0, input_sources_query_format_1.defaultInputClassifierConfig)(ctx)), await resolveSearches(analyzer, ctx.config.inputSources ?? {}));
53
+ }
50
54
  /**
51
55
  * The packages whose exports are usable without a namespace: those R has on its search path at the end of the
52
56
  * program, the ones the project declares, and the base packages R attaches on startup.
@@ -87,7 +91,7 @@ async function resolveSearches(analyzer, config) {
87
91
  }
88
92
  else if (value === undefined || Array.isArray(value)) {
89
93
  // entries may be written as `pkg::fn` strings in the configuration, which only mean the namespaced function once parsed
90
- result[key] = value?.map(e => typeof e === 'string' ? identifier_1.Identifier.parse(e) : e);
94
+ result[key] = value?.map(e => typeof e === 'string' ? identifier_1.Identifier.parse(String(e)) : e);
91
95
  }
92
96
  else {
93
97
  const searchResult = await (0, flowr_search_executor_1.runSearch)(value, analyzer);
@@ -3,7 +3,7 @@ import { InputTraceType, InputType } from './input-types';
3
3
  export { InputTraceType, InputType } from './input-types';
4
4
  import type { DataflowGraph } from '../../../dataflow/graph/graph';
5
5
  import type { MergeableRecord } from '../../../util/objects';
6
- import { Identifier } from '../../../dataflow/environments/identifier';
6
+ import { Identifier, type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
7
7
  import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
8
8
  import type { FlowrSearchLike } from '../../../search/flowr-search-builder';
9
9
  /**
@@ -13,18 +13,18 @@ import type { FlowrSearchLike } from '../../../search/flowr-search-builder';
13
13
  */
14
14
  export interface LinkedInputObject {
15
15
  /** the name of the object, e.g. `input` */
16
- readonly name: string;
16
+ readonly name: BrandedIdentifier;
17
17
  /** how reads of the object (or of its fields) are to be classified */
18
18
  readonly type: InputType;
19
19
  /**
20
20
  * If given, the object only counts as linked if the function binding it declares all of these parameters as well
21
21
  * (e.g., shiny's `function(input, output, session)`). Without this, every `input` would be treated as the framework's.
22
22
  */
23
- readonly withParams?: readonly string[];
23
+ readonly withParams?: readonly BrandedIdentifier[];
24
24
  /** the package that has to be attached for this object to exist, e.g. `shiny` */
25
25
  readonly requires?: string;
26
26
  /** if given, only these fields are inputs (`session$clientData` is, `session$userData` is not) and the object itself is none */
27
- readonly fields?: readonly string[];
27
+ readonly fields?: readonly BrandedIdentifier[];
28
28
  /** how the framework declares the entries of this object, so a read of `input$n` links to the `textInput("n", ...)` defining it */
29
29
  readonly declaredBy?: LinkedInputDeclaration;
30
30
  }
@@ -33,7 +33,7 @@ export interface LinkedInputDeclaration {
33
33
  /** the declaring calls, e.g. shiny's `textInput`, `selectInput`, ... */
34
34
  readonly calls: readonly Identifier[];
35
35
  /** the name of the argument holding the entry's name */
36
- readonly argName: string;
36
+ readonly argName: BrandedIdentifier;
37
37
  /** the index of that argument when it is passed positionally */
38
38
  readonly argIdx: number;
39
39
  }
@@ -45,7 +45,7 @@ export interface LinkedInputEntryPoint {
45
45
  /** the call taking the function, e.g. `shiny::shinyApp` */
46
46
  readonly call: Identifier;
47
47
  /** the name of the argument holding the function */
48
- readonly argName: string;
48
+ readonly argName: BrandedIdentifier;
49
49
  /** the index of that argument when it is passed positionally */
50
50
  readonly argIdx: number;
51
51
  /** which {@link LinkedInputObject} the framework binds to each parameter, by position; `undefined` leaves one alone */
@@ -55,7 +55,7 @@ export interface LinkedInputEntryPoint {
55
55
  export interface NarrowingFunction {
56
56
  readonly call: Identifier;
57
57
  /** the name of the bounding argument */
58
- readonly argName: string;
58
+ readonly argName: BrandedIdentifier;
59
59
  /** the index of the bounding argument when it is passed positionally */
60
60
  readonly argIdx: number;
61
61
  }
@@ -79,7 +79,7 @@ export interface InputSource extends MergeableRecord {
79
79
  * Argument name when this source originates from a named argument of the criterion function call,
80
80
  * or the accessed field when it originates from a {@link LinkedInputObject} (e.g. `n` for `input$n`).
81
81
  */
82
- name?: string;
82
+ name?: BrandedIdentifier;
83
83
  /** the concrete scalar value when the source is a constant or a pure alias of one */
84
84
  value?: ConstantValue;
85
85
  /** where the framework entry this source reads is declared, e.g. the `textInput("n", ...)` behind an `input$n` */
@@ -135,4 +135,4 @@ export interface InputClassifierConfig<Functions extends InputClassifierFunction
135
135
  * For the scope escape analysis, pass on the full, non-reduced DFG as `fullDfg`, and the packages attached in the
136
136
  * program as `packages` so that bare calls only match the entries of packages that are actually in scope.
137
137
  */
138
- export declare function classifyInput(id: NodeId, dfg: DataflowGraph, config: InputClassifierConfig<InputClassifierFunctionIdentifiers>, fullDfg?: DataflowGraph, packages?: ReadonlySet<string>, environment?: REnvironmentInformation): InputSources;
138
+ export declare function classifyInput(id: NodeId, dfg: DataflowGraph, config: InputClassifierConfig<InputClassifierFunctionIdentifiers>, fullDfg?: DataflowGraph, packages?: ReadonlySet<BrandedNamespace>, environment?: REnvironmentInformation): InputSources;
@@ -819,7 +819,7 @@ function isBoundAsLinkedObject(node, obj, idMap) {
819
819
  return true;
820
820
  }
821
821
  for (const fn of enclosingFunctions(node, idMap)) {
822
- const params = new Set(fn.parameters.map(p => p.name.content));
822
+ const params = new Set(fn.parameters.map(p => identifier_1.Identifier.getName(p.name.content)));
823
823
  if (params.has(obj.name)) {
824
824
  return obj.withParams.every(p => params.has(p));
825
825
  }
@@ -45,7 +45,10 @@ async function executeLinterQuery({ analyzer }, queries) {
45
45
  results.results[ruleName] = { error: new Error(`skipped due to resource pressure (gas: critical), see ${gas_1.GasWikiRef}`) };
46
46
  continue;
47
47
  }
48
- results.results[ruleName] = await (0, linter_executor_1.executeLintingRule)(ruleName, analyzer, entry?.config);
48
+ /* the first rule may be the one to compute the graph, the others share the walks for call targets in it */
49
+ const run = () => (0, linter_executor_1.executeLintingRule)(ruleName, analyzer, entry?.config);
50
+ const graph = analyzer.peekDataflow()?.graph;
51
+ results.results[ruleName] = await (graph === undefined ? run() : graph.sharingTargetWalks(run));
49
52
  }
50
53
  /* rendered here, not when printing, so an api client gets it too */
51
54
  const format = queries.map(q => q.format).find(assert_1.isNotUndefined);
@@ -46,7 +46,8 @@ function linterQueryLineParser(output, line, _config) {
46
46
  let tags = undefined;
47
47
  const rest = [...line];
48
48
  while (rest.length > 0 && [rulesPrefix, formatPrefix, tagsPrefix].some(p => rest[0].startsWith(p))) {
49
- const argument = rest.shift();
49
+ const argument = rest[0];
50
+ rest.shift();
50
51
  if (argument.startsWith(formatPrefix)) {
51
52
  format = formatFromInput(output, argument);
52
53
  continue;
@@ -173,7 +174,7 @@ exports.LinterQueryDefinition = {
173
174
  /** cap on findings shown per certainty before collapsing to a `+N more` line; the full set is in `:query*` JSON */
174
175
  const MaxFindingsShown = 10;
175
176
  function addLintingRuleResult(ruleName, results, result, formatter) {
176
- const rule = linter_rules_1.LintingRules[ruleName];
177
+ const rule = (0, linter_rules_1.getLintingRule)(ruleName);
177
178
  const header = `${(0, ansi_1.bold)(rule.info.name, formatter)} (${ruleName})`;
178
179
  if (linter_format_1.LintingResults.isError(results)) {
179
180
  result.push(` ╰ ${header}:`);
@@ -20,6 +20,7 @@ declare function originQueryLineParser(output: ReplOutput, line: readonly string
20
20
  export declare const OriginQueryDefinition: {
21
21
  readonly title: "Origin Query";
22
22
  readonly executor: typeof executeOriginQuery;
23
+ readonly perQueryResults: true;
23
24
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
24
25
  readonly fromLine: typeof originQueryLineParser;
25
26
  readonly completer: typeof criteriaQueryCompleter;
@@ -25,6 +25,7 @@ function originQueryLineParser(output, line, _config) {
25
25
  exports.OriginQueryDefinition = {
26
26
  title: 'Origin Query',
27
27
  executor: origin_query_executor_1.executeOriginQuery,
28
+ perQueryResults: true,
28
29
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
29
30
  const out = queryResults;
30
31
  result.push((0, query_print_1.queryHeader)('origin', formatter, out['.meta'].timing));
@@ -1,3 +1,4 @@
1
+ import type { BrandedNamespace } from '../../../dataflow/environments/identifier';
1
2
  import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
2
3
  import { executeProjectQuery } from './project-query-executor';
3
4
  import Joi from 'joi';
@@ -29,7 +30,7 @@ export interface ProjectDependencyStats {
29
30
  readonly covered: number;
30
31
  /** The first few runtime dependencies with the version the signature database resolved them to, if any. */
31
32
  readonly first: {
32
- name: string;
33
+ name: BrandedNamespace;
33
34
  base: boolean;
34
35
  dbVersion?: string;
35
36
  }[];
@@ -25,6 +25,7 @@ export declare function fdefBoundaryParser(argument: string): boolean;
25
25
  export declare const ProvenanceQueryDefinition: {
26
26
  readonly title: "Provenance Query";
27
27
  readonly executor: typeof executeProvenanceQuery;
28
+ readonly perQueryResults: true;
28
29
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
29
30
  readonly fromLine: (output: import("../../../cli/repl/commands/repl-main").ReplOutput, line: readonly string[], _config: import("../../..").FlowrConfig) => import("../../query").ParsedQueryLine<"provenance">;
30
31
  readonly completer: typeof criteriaQueryCompleter;
@@ -21,6 +21,7 @@ function fdefBoundaryParser(argument) {
21
21
  exports.ProvenanceQueryDefinition = {
22
22
  title: 'Provenance Query',
23
23
  executor: provenance_query_executor_1.executeProvenanceQuery,
24
+ perQueryResults: true,
24
25
  asciiSummarizer: async (formatter, analyzer, queryResults, result) => {
25
26
  const out = queryResults;
26
27
  const df = await analyzer.dataflow();
@@ -21,6 +21,7 @@ declare function resolveValueLineParser(output: ReplOutput, line: readonly strin
21
21
  export declare const ResolveValueQueryDefinition: {
22
22
  readonly title: "Resolve Value Query";
23
23
  readonly executor: typeof executeResolveValueQuery;
24
+ readonly perQueryResults: true;
24
25
  readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../..").ReadonlyFlowrAnalysisProvider<import("../../..").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
25
26
  readonly fromLine: typeof resolveValueLineParser;
26
27
  readonly completer: typeof criteriaQueryCompleter;
@@ -29,6 +29,7 @@ function resolveValueLineParser(output, line, _config) {
29
29
  exports.ResolveValueQueryDefinition = {
30
30
  title: 'Resolve Value Query',
31
31
  executor: resolve_value_query_executor_1.executeResolveValueQuery,
32
+ perQueryResults: true,
32
33
  asciiSummarizer: (formatter, _analyzer, queryResults, result) => {
33
34
  const out = queryResults;
34
35
  if (out === undefined || typeof out !== 'object' || !('.meta' in out)) {
@@ -2,24 +2,27 @@ import type { BasicQueryData } from '../../base-query-format';
2
2
  import type { SignatureQuery, SignatureQueryResult, SignaturePackageView, SignatureFunctionView } from './signature-query-format';
3
3
  import { type PackageSignatureSource } from '../../../project/sigdb/reader';
4
4
  import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
5
+ import { type BrandedIdentifier, type BrandedNamespace } from '../../../dataflow/environments/identifier';
5
6
  import type { CommandCompletions } from '../../../cli/repl/completion';
6
7
  import { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl } from '../../../util/r-package-urls';
7
8
  export { cranMirrorSourceUrl, cranPageUrl, rSourceRef, rSourceUrl };
9
+ /** where a package's documentation and sources live */
10
+ type DocOrigin = {
11
+ readonly base: boolean;
12
+ readonly cran: boolean;
13
+ };
8
14
  /**
9
15
  * Best-effort documentation link: R's own manual for a base package, rdrr.io's `/cran/<pkg>/man/<fn>` for CRAN.
10
16
  * Base R skips rdrr.io since it serves an older release, so anything R has gained since is a dead link there.
11
17
  */
12
- export declare function helpPageUrl(pkg: string, fn: string, opts: {
13
- base: boolean;
14
- cran: boolean;
15
- }): string | undefined;
18
+ export declare function helpPageUrl(pkg: BrandedNamespace, fn: BrandedIdentifier, opts: DocOrigin): string | undefined;
16
19
  /**
17
20
  * The detailed view of a single function within a package: signature, properties, definition location, call
18
21
  * graph, and for a CRAN package a deep link into the read-only mirror; `version` defaults to the source's latest.
19
22
  */
20
- export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: string, fnName: string, version?: string, env?: REnvironmentInformation): SignatureFunctionView | undefined;
23
+ export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: BrandedNamespace, fnName: BrandedIdentifier, version?: string, env?: REnvironmentInformation): SignatureFunctionView | undefined;
21
24
  /** the full view of a package: version, kind, export breakdown, dependencies, and every function's view */
22
- export declare function signaturePackageInfo(src: PackageSignatureSource, pkg: string, resolved?: string): SignaturePackageView | undefined;
25
+ export declare function signaturePackageInfo(src: PackageSignatureSource, pkg: BrandedNamespace, resolved?: string): SignaturePackageView | undefined;
23
26
  /**
24
27
  * Tab-completer for `:query \@signature` / `:signature query`: package names in the first position, a package's
25
28
  * function names in the second (and after `pkg::`). Version specs and flags are left alone. Enumerating functions
@@ -125,28 +125,28 @@ function manPageUrl(pkg, topic, version, opts) {
125
125
  return opts.cran ? (0, r_package_urls_1.cranMirrorSourceUrl)(pkg, version, `man/${topic}.Rd`) : undefined;
126
126
  }
127
127
  /** the doc links for a function: its help topic (else its name), or none when it is proven undocumented (`no-doc`) */
128
- function docUrlsFor(pkg, fn, version, base, cran) {
128
+ function docUrlsFor(pkg, fn, version, opts) {
129
129
  if (fn.props.includes('no-doc')) {
130
130
  return {};
131
131
  }
132
132
  const topic = fn.topic ?? fn.name;
133
- return (0, objects_1.compactRecord)({ docUrl: helpPageUrl(pkg, topic, { base, cran }), manUrl: manPageUrl(pkg, topic, version, { base, cran }) });
133
+ return (0, objects_1.compactRecord)({ docUrl: helpPageUrl(pkg, topic, opts), manUrl: manPageUrl(pkg, topic, version, opts) });
134
134
  }
135
135
  /** the source link of a definition: the CRAN mirror at its version tag, or the R sources mirror for a base package */
136
- function sourceUrlFor(pkg, fn, version, base, cran) {
136
+ function sourceUrlFor(pkg, fn, version, opts) {
137
137
  if (!fn.file) {
138
138
  return undefined;
139
139
  }
140
- if (base) {
140
+ if (opts.base) {
141
141
  return (0, r_package_urls_1.rSourceUrl)(pkg, version, fn.file, fn.line);
142
142
  }
143
- return cran ? (0, r_package_urls_1.cranMirrorSourceUrl)(pkg, version, fn.file, fn.line) : undefined;
143
+ return opts.cran ? (0, r_package_urls_1.cranMirrorSourceUrl)(pkg, version, fn.file, fn.line) : undefined;
144
144
  }
145
145
  /** the trailing fields shared by every function view: definition location, source link, and documentation links */
146
- function locationFields(pkg, fn, version, base, cran) {
146
+ function locationFields(pkg, fn, version, opts) {
147
147
  return {
148
- ...(0, objects_1.compactRecord)({ file: fn.file, line: fn.line >= 0 ? fn.line : undefined, sourceUrl: sourceUrlFor(pkg, fn, version, base, cran) }),
149
- ...docUrlsFor(pkg, fn, version, base, cran)
148
+ ...(0, objects_1.compactRecord)({ file: fn.file, line: fn.line >= 0 ? fn.line : undefined, sourceUrl: sourceUrlFor(pkg, fn, version, opts) }),
149
+ ...docUrlsFor(pkg, fn, version, opts)
150
150
  };
151
151
  }
152
152
  /** the view of one {@link BuiltInFnInfo}: every declared parameter with what it is used for, and what comes back */
@@ -233,7 +233,7 @@ function decodedToView(pkg, fn, version, opts) {
233
233
  properties: fn.props,
234
234
  parameters: fn.signature.map(p => (0, objects_1.compactRecord)({ name: p.name, props: p.props, default: p.default })),
235
235
  callees: fn.callees,
236
- ...locationFields(pkg, fn, version, opts.base, opts.cran)
236
+ ...locationFields(pkg, fn, version, opts)
237
237
  };
238
238
  }
239
239
  /**
@@ -366,8 +366,7 @@ function signatureCallGraphUrl(src, pkg, version, root, maxNodes) {
366
366
  const edges = [];
367
367
  const seen = new Set();
368
368
  const queue = [{ owner: pkg, ver: version, name: root, id: rootId }];
369
- while (queue.length > 0 && nodes.size < maxNodes) {
370
- const cur = queue.pop();
369
+ for (let cur = queue.pop(); cur !== undefined && nodes.size < maxNodes; cur = queue.pop()) {
371
370
  const key = `${cur.owner}::${cur.name}`;
372
371
  if (seen.has(key)) {
373
372
  continue;
@@ -456,7 +455,7 @@ function suggest(candidates, query, limit = 6) {
456
455
  const out = [];
457
456
  for (const c of candidates) {
458
457
  if (c.toLowerCase().includes(needle)) {
459
- out.push(c);
458
+ out.push(String(c));
460
459
  if (out.length >= limit) {
461
460
  break;
462
461
  }
@@ -495,13 +494,13 @@ function matchedParamPreview(fn, q) {
495
494
  return { preview, matched };
496
495
  }
497
496
  /** a compact view for a wildcard search hit (signature/call-graph omitted; the JSON dump carries those per name) */
498
- function compactMatch(pkg, fn, version, base, cran, params) {
497
+ function compactMatch(pkg, fn, version, opts, params) {
499
498
  return {
500
499
  package: pkg,
501
500
  name: fn.name,
502
501
  exported: fn.exported,
503
502
  ...(version !== undefined ? { version } : {}),
504
- ...locationFields(pkg, fn, version, base, cran),
503
+ ...locationFields(pkg, fn, version, opts),
505
504
  ...(params && params.preview.length > 0 ? { parameters: params.preview } : {}),
506
505
  ...(params && params.matched.length > 0 ? { matchedParameters: params.matched } : {})
507
506
  };
@@ -755,7 +754,7 @@ function searchSources(sources, allNames, q, literalFunction = false) {
755
754
  exports = s.lookup(pkg, v) ?? s.lookup(pkg);
756
755
  looked = true;
757
756
  }
758
- matches.push(compactMatch(pkg, fn, exports?.version, base, (exports?.cran ?? false) && !base, matchedParamPreview(fn, q)));
757
+ matches.push(compactMatch(pkg, fn, exports?.version, { base, cran: (exports?.cran ?? false) && !base }, matchedParamPreview(fn, q)));
759
758
  }
760
759
  if (truncated) {
761
760
  break;