@eagleoutice/flowr 2.15.9 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/README.md +47 -41
  2. package/abstract-interpretation/absint-inference.d.ts +2 -2
  3. package/abstract-interpretation/absint-inference.js +32 -79
  4. package/abstract-interpretation/data-frame/arguments.js +11 -7
  5. package/benchmark/slicer.d.ts +0 -1
  6. package/benchmark/slicer.js +1 -2
  7. package/cli/repl/commands/repl-signature.js +12 -3
  8. package/config.d.ts +5 -1
  9. package/control-flow/cfg-properties.js +0 -22
  10. package/control-flow/happens-before.d.ts +7 -2
  11. package/control-flow/happens-before.js +55 -31
  12. package/control-flow/useless-loop.d.ts +1 -1
  13. package/control-flow/useless-loop.js +29 -42
  14. package/dataflow/environments/apply-kill.js +6 -2
  15. package/dataflow/environments/built-in-config.d.ts +2 -0
  16. package/dataflow/environments/built-in-props.d.ts +16 -1
  17. package/dataflow/environments/built-in-props.js +33 -20
  18. package/dataflow/environments/built-in.d.ts +8 -3
  19. package/dataflow/environments/built-in.js +52 -82
  20. package/dataflow/environments/default-builtin-config.d.ts +551 -21
  21. package/dataflow/environments/default-builtin-config.js +121 -45
  22. package/dataflow/environments/define.d.ts +3 -2
  23. package/dataflow/environments/define.js +4 -3
  24. package/dataflow/environments/deprecation-info.d.ts +45 -0
  25. package/dataflow/environments/deprecation-info.js +13 -0
  26. package/dataflow/environments/environment.d.ts +7 -5
  27. package/dataflow/environments/environment.js +55 -121
  28. package/dataflow/environments/identifier.d.ts +6 -2
  29. package/dataflow/environments/identifier.js +23 -69
  30. package/dataflow/environments/reference-to-maybe.d.ts +9 -0
  31. package/dataflow/environments/reference-to-maybe.js +23 -51
  32. package/dataflow/environments/resolve-by-name.js +37 -76
  33. package/dataflow/eval/resolve/resolve-argument.d.ts +3 -1
  34. package/dataflow/eval/resolve/resolve-argument.js +61 -64
  35. package/dataflow/eval/resolve/resolve-working-directory.d.ts +8 -2
  36. package/dataflow/eval/resolve/resolve-working-directory.js +12 -20
  37. package/dataflow/eval/resolve/resolve.d.ts +4 -0
  38. package/dataflow/eval/resolve/resolve.js +23 -14
  39. package/dataflow/extractor.js +180 -58
  40. package/dataflow/fn/class-declaration.d.ts +8 -13
  41. package/dataflow/fn/class-declaration.js +95 -116
  42. package/dataflow/fn/exceptions-of-function.js +68 -37
  43. package/dataflow/fn/frame-reflection.d.ts +12 -4
  44. package/dataflow/fn/frame-reflection.js +51 -41
  45. package/dataflow/fn/function-props.js +15 -33
  46. package/dataflow/fn/function-semantics.d.ts +11 -3
  47. package/dataflow/fn/function-semantics.js +6 -0
  48. package/dataflow/fn/higher-order-function.d.ts +9 -1
  49. package/dataflow/fn/higher-order-function.js +27 -24
  50. package/dataflow/fn/strict-function.d.ts +13 -0
  51. package/dataflow/fn/strict-function.js +291 -123
  52. package/dataflow/graph/call-graph.d.ts +7 -6
  53. package/dataflow/graph/call-graph.js +35 -46
  54. package/dataflow/graph/graph.d.ts +13 -1
  55. package/dataflow/graph/graph.js +74 -66
  56. package/dataflow/graph/vertex.d.ts +1 -1
  57. package/dataflow/info.d.ts +8 -1
  58. package/dataflow/info.js +24 -30
  59. package/dataflow/internal/control-flow.d.ts +31 -4
  60. package/dataflow/internal/control-flow.js +61 -39
  61. package/dataflow/internal/linker.d.ts +17 -8
  62. package/dataflow/internal/linker.js +286 -213
  63. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +179 -0
  64. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +874 -0
  65. package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +3 -1
  66. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +60 -48
  67. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +4 -2
  68. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +135 -198
  69. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +7 -9
  70. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +5 -1
  71. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +21 -14
  72. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
  73. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +1 -1
  74. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +141 -146
  75. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +56 -24
  76. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +292 -253
  77. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
  78. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +30 -32
  79. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +68 -67
  80. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +91 -129
  81. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +1 -3
  82. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +16 -12
  83. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +4 -4
  84. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -35
  85. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -0
  86. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +8 -3
  87. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +5 -3
  88. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +13 -31
  89. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +1 -1
  90. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +42 -119
  91. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -3
  92. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +21 -21
  93. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -0
  94. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +93 -102
  95. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +7 -3
  96. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +173 -114
  97. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +1 -3
  98. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +23 -26
  99. package/dataflow/internal/process/functions/call/built-in/built-in-with.d.ts +1 -1
  100. package/dataflow/internal/process/functions/call/built-in/built-in-with.js +34 -9
  101. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +1 -1
  102. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +119 -93
  103. package/dataflow/internal/process/functions/call/common.d.ts +4 -4
  104. package/dataflow/internal/process/functions/call/common.js +49 -71
  105. package/dataflow/internal/process/functions/call/deferred.d.ts +12 -2
  106. package/dataflow/internal/process/functions/call/deferred.js +81 -63
  107. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +4 -2
  108. package/dataflow/internal/process/functions/call/known-call-handling.js +65 -68
  109. package/dataflow/internal/process/functions/call/named-call-handling.d.ts +3 -5
  110. package/dataflow/internal/process/functions/call/named-call-handling.js +48 -19
  111. package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
  112. package/dataflow/internal/process/functions/call/quoted.js +257 -154
  113. package/dataflow/internal/process/functions/call/unnamed-call-handling.js +17 -38
  114. package/dataflow/internal/process/functions/process-parameter.js +25 -32
  115. package/dataflow/internal/process/process-symbol.js +4 -3
  116. package/dataflow/internal/program-order.d.ts +26 -0
  117. package/dataflow/internal/program-order.js +49 -0
  118. package/documentation/data/faq/faqs.js +3 -3
  119. package/documentation/data/interface/doc-writing-code.js +1 -2
  120. package/documentation/data/server/doc-data-server-messages.js +7 -7
  121. package/documentation/doc-capabilities.js +80 -34
  122. package/documentation/doc-util/doc-query.d.ts +0 -3
  123. package/documentation/doc-util/doc-query.js +4 -3
  124. package/documentation/wiki-analyzer.js +1 -1
  125. package/documentation/wiki-cfg.js +5 -6
  126. package/documentation/wiki-core.js +8 -8
  127. package/documentation/wiki-dataflow-graph.js +10 -11
  128. package/documentation/wiki-interface.js +2 -2
  129. package/documentation/wiki-linting-and-testing.js +3 -3
  130. package/documentation/wiki-overview.js +6 -6
  131. package/documentation/wiki-query.js +9 -101
  132. package/documentation/wiki-setup.js +23 -0
  133. package/documentation/wiki-signature-database.js +1 -1
  134. package/linter/linter-rules.d.ts +18 -9
  135. package/linter/rules/absolute-path.js +63 -87
  136. package/linter/rules/deprecated-functions.d.ts +1 -45
  137. package/linter/rules/deprecated-functions.js +24 -33
  138. package/linter/rules/file-path-validity.d.ts +4 -2
  139. package/linter/rules/file-path-validity.js +114 -80
  140. package/linter/rules/namespace-access.js +21 -33
  141. package/linter/rules/naming-convention.d.ts +1 -1
  142. package/linter/rules/naming-convention.js +60 -48
  143. package/linter/rules/network-functions.js +11 -7
  144. package/linter/rules/no-leaked-credentials.js +15 -18
  145. package/linter/rules/problematic-inputs.d.ts +2 -1
  146. package/linter/rules/problematic-inputs.js +39 -59
  147. package/linter/rules/roxygen-arguments.d.ts +9 -4
  148. package/linter/rules/roxygen-arguments.js +29 -48
  149. package/linter/rules/seeded-randomness.d.ts +7 -4
  150. package/linter/rules/seeded-randomness.js +128 -89
  151. package/linter/rules/stop-with-call-arg.d.ts +4 -2
  152. package/linter/rules/stop-with-call-arg.js +25 -22
  153. package/linter/rules/unclosed-connection.js +31 -24
  154. package/linter/rules/undefined-symbol.d.ts +4 -6
  155. package/linter/rules/undefined-symbol.js +58 -75
  156. package/linter/rules/unescaped-arguments.js +18 -44
  157. package/linter/rules/unused-definition.d.ts +6 -0
  158. package/linter/rules/unused-definition.js +105 -145
  159. package/linter/rules/unused-import.d.ts +3 -0
  160. package/linter/rules/unused-import.js +25 -43
  161. package/package.json +5 -2
  162. package/project/flowr-analyzer.d.ts +2 -0
  163. package/project/flowr-analyzer.js +28 -1
  164. package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +2 -2
  165. package/project/plugins/file-plugins/files/flowr-jupyter-file.js +8 -12
  166. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -2
  167. package/project/plugins/file-plugins/files/flowr-rda-file.js +10 -55
  168. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +7 -5
  169. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +34 -56
  170. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -1
  171. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +22 -45
  172. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  173. package/project/sigdb/build.js +4 -0
  174. package/project/sigdb/manifest.d.ts +2 -0
  175. package/project/sigdb/manifest.js +10 -1
  176. package/project/sigdb/reader.js +23 -61
  177. package/project/sigdb/sigdb-download.d.ts +29 -6
  178. package/project/sigdb/sigdb-download.js +212 -64
  179. package/queries/base-query-format.js +1 -2
  180. package/queries/catalog/absint-query/absint-query-format.js +1 -1
  181. package/queries/catalog/call-context-query/cascade-action.d.ts +3 -1
  182. package/queries/catalog/call-context-query/cascade-action.js +2 -0
  183. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +3 -0
  184. package/queries/catalog/dataflow-query/dataflow-query-executor.js +2 -2
  185. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +2 -0
  186. package/queries/catalog/dataflow-query/dataflow-query-format.js +4 -7
  187. package/queries/catalog/dependencies-query/dependencies-query-executor.js +50 -114
  188. package/queries/catalog/dependencies-query/function-info/library-functions.d.ts +5 -9
  189. package/queries/catalog/dependencies-query/function-info/library-functions.js +6 -0
  190. package/queries/catalog/dependencies-query/function-info/read-functions.js +1 -1
  191. package/queries/catalog/dependencies-query/function-info/write-functions.js +7 -3
  192. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +4 -4
  193. package/queries/catalog/input-sources-query/simple-input-classifier.js +192 -301
  194. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -1
  195. package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
  196. package/queries/catalog/origin-query/origin-query-executor.js +2 -2
  197. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -2
  198. package/queries/catalog/origin-query/origin-query-format.js +1 -1
  199. package/queries/query.d.ts +1 -1
  200. package/r-bridge/data/data.d.ts +21 -14
  201. package/r-bridge/data/data.js +28 -20
  202. package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -1
  203. package/r-bridge/lang-4.x/ast/model/model.js +19 -43
  204. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +1 -0
  205. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -0
  206. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +5 -12
  207. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +1 -0
  208. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +1 -0
  209. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +1 -0
  210. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +1 -0
  211. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +1 -0
  212. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +1 -0
  213. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +1 -0
  214. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +1 -0
  215. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +1 -0
  216. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +1 -0
  217. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +1 -0
  218. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +1 -0
  219. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +1 -0
  220. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +1 -0
  221. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +1 -0
  222. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +1 -0
  223. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +1 -0
  224. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +1 -0
  225. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +1 -0
  226. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  227. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +11 -2
  228. package/r-bridge/roxygen2/roxygen-parse.js +28 -42
  229. package/r-bridge/shell.js +6 -0
  230. package/search/search-executor/search-enrichers.js +25 -37
  231. package/slicing/static/slice-call.d.ts +4 -3
  232. package/slicing/static/slice-call.js +56 -88
  233. package/slicing/static/static-slicer.js +115 -79
  234. package/slicing/static/visiting-queue.d.ts +4 -6
  235. package/slicing/static/visiting-queue.js +9 -13
  236. package/util/files.d.ts +2 -0
  237. package/util/files.js +3 -1
  238. package/util/mermaid/mermaid.js +6 -2
  239. package/util/proc.js +2 -1
  240. package/util/r-base-packages.d.ts +2 -0
  241. package/util/r-base-packages.js +23 -13
  242. package/util/text/playground-link.d.ts +12 -3
  243. package/util/text/playground-link.js +18 -27
  244. package/util/version.js +4 -10
package/util/proc.js CHANGED
@@ -15,6 +15,7 @@ function exitSafe(code = 0) {
15
15
  };
16
16
  process.stdout.write('', done);
17
17
  process.stderr.write('', done);
18
- setTimeout(() => process.exit(code), 60_000).unref();
18
+ /* a browser's timer is a plain number that cannot be unreferenced */
19
+ setTimeout(() => process.exit(code), 60_000).unref?.();
19
20
  }
20
21
  //# sourceMappingURL=proc.js.map
@@ -7,6 +7,8 @@
7
7
  * for the version-aware view, as a release cannot attach a package it did not ship.
8
8
  */
9
9
  export declare const AttachedBasePackages: readonly string[];
10
+ /** The data sets of `datasets` (R 4.6), always in scope as lazy data, which its namespace does not export. */
11
+ export declare const BaseDatasets: ReadonlySet<string>;
10
12
  /** {@link AttachedBasePackages} for membership tests, which happen far more often than iteration. */
11
13
  export declare const AttachedBasePackageSet: ReadonlySet<string>;
12
14
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AttachedBasePackageSet = exports.AttachedBasePackages = void 0;
3
+ exports.AttachedBasePackageSet = exports.BaseDatasets = exports.AttachedBasePackages = void 0;
4
4
  exports.baseRPackages = baseRPackages;
5
5
  exports.attachedBasePackages = attachedBasePackages;
6
6
  exports.baseRExportOwner = baseRExportOwner;
@@ -8,6 +8,7 @@ exports.isBaseRPackage = isBaseRPackage;
8
8
  const r_base_packages_generated_1 = require("../data/r-base-packages.generated");
9
9
  const r_base_primitives_generated_1 = require("../data/r-base-primitives.generated");
10
10
  const r_version_1 = require("./r-version");
11
+ const defaultmap_1 = require("./collections/defaultmap");
11
12
  /**
12
13
  * The base packages R attaches to the search path on startup, so their exports are usable without a `library` call.
13
14
  *
@@ -17,14 +18,32 @@ const r_version_1 = require("./r-version");
17
18
  * for the version-aware view, as a release cannot attach a package it did not ship.
18
19
  */
19
20
  exports.AttachedBasePackages = ['base', 'stats', 'graphics', 'grDevices', 'utils', 'datasets', 'methods'];
21
+ /** The data sets of `datasets` (R 4.6), always in scope as lazy data, which its namespace does not export. */
22
+ exports.BaseDatasets = new Set([
23
+ 'ability.cov', 'airmiles', 'AirPassengers', 'airquality', 'anscombe', 'attenu', 'attitude', 'austres', 'beaver1', 'beaver2', 'BJsales',
24
+ 'BJsales.lead', 'BOD', 'cars', 'ChickWeight', 'chickwts', 'co2', 'CO2', 'crimtab', 'discoveries', 'DNase', 'esoph', 'euro', 'euro.cross',
25
+ 'eurodist', 'EuStockMarkets', 'faithful', 'fdeaths', 'Formaldehyde', 'freeny', 'freeny.x', 'freeny.y', 'gait', 'HairEyeColor',
26
+ 'Harman23.cor', 'Harman74.cor', 'Indometh', 'infert', 'InsectSprays', 'iris', 'iris3', 'islands', 'JohnsonJohnson', 'LakeHuron', 'ldeaths',
27
+ 'lh', 'LifeCycleSavings', 'Loblolly', 'longley', 'lynx', 'mdeaths', 'morley', 'mtcars', 'nhtemp', 'Nile', 'nottem', 'npk',
28
+ 'occupationalStatus', 'Orange', 'OrchardSprays', 'penguins', 'penguins_raw', 'PlantGrowth', 'precip', 'presidents', 'pressure', 'Puromycin',
29
+ 'quakes', 'randu', 'rivers', 'rock', 'Seatbelts', 'sleep', 'stack.loss', 'stack.x', 'stackloss', 'state.abb', 'state.area', 'state.center',
30
+ 'state.division', 'state.name', 'state.region', 'state.x77', 'sunspot.m2014', 'sunspot.month', 'sunspot.year', 'sunspots', 'swiss',
31
+ 'Theoph', 'Titanic', 'ToothGrowth', 'treering', 'trees', 'UCBAdmissions', 'UKDriverDeaths', 'UKgas', 'USAccDeaths', 'USArrests',
32
+ 'UScitiesD', 'USJudgeRatings', 'USPersonalExpenditure', 'uspop', 'VADeaths', 'volcano', 'warpbreaks', 'women', 'WorldPhones', 'WWWusage'
33
+ ]);
20
34
  /** {@link AttachedBasePackages} for membership tests, which happen far more often than iteration. */
21
35
  exports.AttachedBasePackageSet = new Set(exports.AttachedBasePackages);
22
36
  /** clamp `rVersion` to the newest R release the store knows about (so a future R version stays answerable) */
23
37
  function effective(rVersion) {
24
38
  return r_version_1.RVersion.compare(rVersion, r_base_packages_generated_1.RBasePackageStore.newestRVersion) > 0 ? r_base_packages_generated_1.RBasePackageStore.newestRVersion : rVersion;
25
39
  }
26
- /** memoized results per assumed R version, so the list is computed at most once per version (never per lookup) */
27
- const cache = new Map();
40
+ /** memoized per assumed R version, so the list is computed at most once per version (never per lookup) */
41
+ const basePackagesAt = (0, defaultmap_1.memoize)((rVersion) => {
42
+ const eff = effective(rVersion);
43
+ return Object.entries(r_base_packages_generated_1.RBasePackageStore.packages)
44
+ .filter(([, [first, last]]) => r_version_1.RVersion.compare(first, eff) <= 0 && r_version_1.RVersion.compare(last, eff) >= 0)
45
+ .map(([name]) => name);
46
+ });
28
47
  /**
29
48
  * The base packages available at the assumed R version (all of them if omitted). A package counts as
30
49
  * available when that R release lies within the range it was part of core; e.g. `parallel` (added in R
@@ -38,16 +57,7 @@ function baseRPackages(rVersion) {
38
57
  if (rVersion === undefined || rVersion === r_base_packages_generated_1.RBasePackageStore.newestRVersion || r_version_1.RVersion.compare(rVersion, r_base_packages_generated_1.RBasePackageStore.newestRVersion) >= 0) {
39
58
  return r_base_packages_generated_1.RBasePackageStore.current; // the current base set, precomputed at bundle time
40
59
  }
41
- const cached = cache.get(rVersion);
42
- if (cached !== undefined) {
43
- return cached;
44
- }
45
- const eff = effective(rVersion);
46
- const result = Object.entries(r_base_packages_generated_1.RBasePackageStore.packages)
47
- .filter(([, [first, last]]) => r_version_1.RVersion.compare(first, eff) <= 0 && r_version_1.RVersion.compare(last, eff) >= 0)
48
- .map(([name]) => name);
49
- cache.set(rVersion, result);
50
- return result;
60
+ return basePackagesAt(rVersion);
51
61
  }
52
62
  /**
53
63
  * The base packages attached at the assumed R version: {@link AttachedBasePackages} without the ones that
@@ -19,11 +19,18 @@ export declare enum PlaygroundBox {
19
19
  * - a {@link PlaygroundBox} is one of the boxes of the page itself
20
20
  * @see {@link Mark.isValid} to check one, {@link Mark.compress} to shorten a list
21
21
  */
22
- export type PlaygroundMark = `${number}` | `${number}-${number}` | `${number}:${number}` | `${number}@${string}` | `lint:${string}` | `dep:${string}` | PlaygroundBox;
22
+ export type PlaygroundMark = `${number}` | `${number}-${number}` | `${number}:${number}` | `${number}@${string}` | `${number}(${string})` | `lint:${string}` | `dep:${string}` | PlaygroundBox;
23
23
  /** everything a link can say about the page it opens; whatever is left out the page fills in itself */
24
24
  export interface PlaygroundLinkParts {
25
25
  /** the script the page opens with; left out, the page keeps its own sample */
26
26
  readonly code?: string;
27
+ /** the file name of that script, `main.R` when left out */
28
+ readonly name?: string;
29
+ /** the other files of the project, in the order flowR loads them, all before the opened one */
30
+ readonly files?: readonly {
31
+ name: string;
32
+ code: string;
33
+ }[];
27
34
  /** what the page marks when it opens, and what alt-click toggles from there on */
28
35
  readonly marks?: readonly PlaygroundMark[];
29
36
  /** the boxes that open folded away, for whatever the example is not about */
@@ -59,6 +66,8 @@ export declare const Playground: {
59
66
  name: string;
60
67
  /** where the page these links point at is served from */
61
68
  BaseRef: string;
69
+ /** the name of the file a link opens on when it names none */
70
+ MainFile: string;
62
71
  /** what a link can point at */
63
72
  Mark: {
64
73
  /**
@@ -90,8 +99,8 @@ export declare const Playground: {
90
99
  /** The keys back out of that field, which older links wrote out plainly and which is read either way. */
91
100
  unpackConfig(this: void, field: string | null | undefined): string[];
92
101
  /**
93
- * Everything a fragment does not carry as itself is escaped, so a configuration's brackets, braces and
94
- * quotes travel as `%5B`, `%7B` and `%22` rather than as characters a chat client, a markdown reader or
102
+ * The non-empty fields as a fragment. Everything a fragment does not carry as itself is escaped, so a
103
+ * configuration's brackets, braces and quotes travel as `%5B`, `%7B` and `%22` rather than as characters a chat client, a markdown reader or
95
104
  * a terminal cuts the address at. What is left is what {@link FragmentSafe} lists: a fragment is not a
96
105
  * query, so `,`, `:` and `;` stand in it as they are and keep a link readable. `&` and `+` are escaped
97
106
  * beyond that, the first because it separates the fields here and the second because a reader takes it
@@ -15,8 +15,8 @@ var PlaygroundBox;
15
15
  /** what the linter found */
16
16
  PlaygroundBox["Lints"] = "lints";
17
17
  })(PlaygroundBox || (exports.PlaygroundBox = PlaygroundBox = {}));
18
- /** a mark that stands for a place in the script: a line, a range, a column, or a name on a line */
19
- const CodeMarkPattern = /^\d+(:\d+|-\d+|@.+)?$/;
18
+ /** a mark that stands for a place in the script: a line, a range, a column, or a name on a line, in another file with a `(file-regex)` */
19
+ const CodeMarkPattern = /^\d+(:\d+|-\d+|@.+)?(\(.+\))?$/;
20
20
  /** a mark that stands for what an analysis found: `lint:<rule>[@<line>]`, `dep:<kind>[@<line>]` */
21
21
  const FoundMarkPattern = /^(lint|dep):[^@,]+(@\d+)?$/;
22
22
  /** how many lines one range may stand for, so a hand-written link cannot ask for a million marks */
@@ -94,6 +94,8 @@ exports.Playground = {
94
94
  name: 'Playground',
95
95
  /** where the page these links point at is served from */
96
96
  BaseRef: 'https://flowr-analysis.github.io/flowr/wiki/playground/',
97
+ /** the name of the file a link opens on when it names none */
98
+ MainFile: 'main.R',
97
99
  /** what a link can point at */
98
100
  Mark,
99
101
  /** the boxes of the page a mark can point at */
@@ -103,23 +105,8 @@ exports.Playground = {
103
105
  * sits, and how the page is laid out.
104
106
  */
105
107
  link(parts) {
106
- const { code, marks = [], collapsed = [], at, forward, dim, replOpen, wholeSlice, config = [], split, repl } = parts;
108
+ const { code, name, files = [], marks = [], collapsed = [], at, forward, dim, replOpen, wholeSlice, config = [], split, repl } = parts;
107
109
  const base = parts.base ?? exports.Playground.BaseRef;
108
- const fields = [];
109
- if (code !== undefined && code.length > 0) {
110
- fields.push(['c', (0, url_encoding_1.packForUrl)(code)]);
111
- }
112
- if (config.length > 0) {
113
- fields.push(['k', exports.Playground.packConfig(config)]);
114
- }
115
- const kept = Mark.compress(marks);
116
- if (kept.length > 0) {
117
- fields.push(['h', kept.join(',')]);
118
- }
119
- const folded = (0, arrays_1.uniqueArray)(collapsed).filter(box => Object.values(PlaygroundBox).includes(box));
120
- if (folded.length > 0) {
121
- fields.push(['f', folded.join(',')]);
122
- }
123
110
  /* one field for everything about the layout, with the trailing empty parts dropped */
124
111
  const view = [
125
112
  split === undefined ? '' : String(split),
@@ -129,15 +116,19 @@ exports.Playground = {
129
116
  while (view.length > 0 && view[view.length - 1].length === 0) {
130
117
  view.pop();
131
118
  }
132
- if (view.length > 0) {
133
- fields.push(['v', view.join(',')]);
134
- }
135
119
  const position = at === undefined ? undefined
136
120
  : code === undefined ? (/^\d+:\d+$/.test(at) ? at : undefined) : exports.Playground.positionOf(code, at);
137
- if (position !== undefined) {
138
- fields.push(['p', position]);
139
- }
140
- const hash = exports.Playground.hash(fields);
121
+ /* an empty field is left out of the link */
122
+ const hash = exports.Playground.hash([
123
+ ['c', code ? (0, url_encoding_1.packForUrl)(code) : ''],
124
+ ['n', name !== undefined && name !== exports.Playground.MainFile ? name : ''],
125
+ ['o', files.length > 0 ? (0, url_encoding_1.packForUrl)(JSON.stringify(files.map(f => [f.name, f.code]))) : ''],
126
+ ['k', config.length > 0 ? exports.Playground.packConfig(config) : ''],
127
+ ['h', Mark.compress(marks).join(',')],
128
+ ['f', (0, arrays_1.uniqueArray)(collapsed).filter(box => Object.values(PlaygroundBox).includes(box)).join(',')],
129
+ ['v', view.join(',')],
130
+ ['p', position ?? '']
131
+ ]);
141
132
  return hash.length > 0 ? `${base}#${hash}` : base;
142
133
  },
143
134
  /**
@@ -157,8 +148,8 @@ exports.Playground = {
157
148
  return text.split(';').filter(key => key.length > 0);
158
149
  },
159
150
  /**
160
- * Everything a fragment does not carry as itself is escaped, so a configuration's brackets, braces and
161
- * quotes travel as `%5B`, `%7B` and `%22` rather than as characters a chat client, a markdown reader or
151
+ * The non-empty fields as a fragment. Everything a fragment does not carry as itself is escaped, so a
152
+ * configuration's brackets, braces and quotes travel as `%5B`, `%7B` and `%22` rather than as characters a chat client, a markdown reader or
162
153
  * a terminal cuts the address at. What is left is what {@link FragmentSafe} lists: a fragment is not a
163
154
  * query, so `,`, `:` and `;` stand in it as they are and keep a link readable. `&` and `+` are escaped
164
155
  * beyond that, the first because it separates the fields here and the second because a reader takes it
package/util/version.js CHANGED
@@ -42,9 +42,9 @@ const assert_1 = require("./assert");
42
42
  const sigdb_download_1 = require("../project/sigdb/sigdb-download");
43
43
  const doc_files_1 = require("../documentation/doc-util/doc-files");
44
44
  // this is automatically replaced with the current version by release-it
45
- const version = '2.15.9';
46
- // this is automatically replaced with the release date by release-it (regex-bumper, see package.json)
47
- const versionDate = '2026-09-17T20:12:23Z';
45
+ const version = '2.16.0';
46
+ // this is automatically replaced with the release date by release-it (scripts/bump-version.ts)
47
+ const versionDate = '2026-10-14T08:59:37Z';
48
48
  /**
49
49
  * Retrieves the current flowR version as a new {@link SemVer} object.
50
50
  */
@@ -116,13 +116,7 @@ async function printVersionInformation(output, input, engineOnly = false) {
116
116
  // plugin/dataflow graph) into `util/version`, which `util/assert` depends on
117
117
  const { BuiltInPlugins } = await Promise.resolve().then(() => __importStar(require('../project/plugins/plugin-registry')));
118
118
  const keyByClass = new Map(BuiltInPlugins.map(([key, producer]) => [producer.name, key]));
119
- const activated = new Set();
120
- for (const cls of ctx.activatedPlugins) {
121
- const key = keyByClass.get(cls);
122
- if (key !== undefined) {
123
- activated.add(key);
124
- }
125
- }
119
+ const activated = new Set(ctx.activatedPlugins.values().map(cls => keyByClass.get(cls)));
126
120
  const render = (full, suffix) => trace && !activated.has(full) ? dim(suffix) : suffix;
127
121
  const labelWidth = Math.max(...[...byPrefix.keys()].map(p => p.length));
128
122
  const header = `registered plugins (${names.length})`;