@eagleoutice/flowr 2.13.1 → 2.13.3

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 (158) hide show
  1. package/README.md +46 -44
  2. package/abstract-interpretation/data-frame/mappers/access-mapper.js +1 -0
  3. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +1 -1
  4. package/abstract-interpretation/data-frame/mappers/function-mapper.js +3 -0
  5. package/abstract-interpretation/domains/state-domain-like.d.ts +1 -1
  6. package/cli/flowr.js +21 -5
  7. package/cli/repl/commands/repl-commands.js +11 -9
  8. package/cli/repl/commands/repl-query.js +1 -1
  9. package/cli/repl/commands/repl-signature.js +8 -1
  10. package/cli/repl/core.js +13 -10
  11. package/cli/repl/print-version.js +1 -1
  12. package/cli/repl/server/connection.d.ts +1 -1
  13. package/cli/repl/server/net.js +15 -0
  14. package/config.d.ts +37 -0
  15. package/config.js +63 -3
  16. package/control-flow/control-flow-graph.js +2 -1
  17. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  18. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +1 -1
  19. package/data/sigdb/sigdb.remote.json +1 -1
  20. package/dataflow/environments/append.d.ts +1 -1
  21. package/dataflow/environments/clone.d.ts +1 -1
  22. package/dataflow/environments/environment.d.ts +28 -4
  23. package/dataflow/environments/environment.js +66 -11
  24. package/dataflow/environments/identifier.d.ts +9 -8
  25. package/dataflow/environments/identifier.js +21 -13
  26. package/dataflow/environments/overwrite.d.ts +1 -1
  27. package/dataflow/eval/resolve/alias-tracking.d.ts +1 -1
  28. package/dataflow/eval/resolve/resolve-working-directory.d.ts +29 -0
  29. package/dataflow/eval/resolve/resolve-working-directory.js +168 -0
  30. package/dataflow/extractor.js +2 -1
  31. package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
  32. package/dataflow/graph/df-helper.d.ts +3 -2
  33. package/dataflow/graph/df-helper.js +11 -15
  34. package/dataflow/graph/diff-dataflow-graph.js +1 -1
  35. package/dataflow/graph/graph-helper.js +2 -6
  36. package/dataflow/graph/graph.d.ts +24 -0
  37. package/dataflow/graph/graph.js +25 -1
  38. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +1 -1
  39. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +1 -1
  40. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -0
  41. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +51 -0
  42. package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +1 -1
  43. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +1 -1
  44. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -1
  45. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +5 -2
  46. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +15 -9
  47. package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +1 -1
  48. package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
  49. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +1 -1
  50. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.d.ts +1 -1
  51. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +7 -1
  52. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +9 -2
  53. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +1 -1
  54. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +2 -2
  55. package/dataflow/internal/process/functions/call/built-in/built-in-vector.d.ts +1 -1
  56. package/documentation/doc-readme.js +14 -12
  57. package/documentation/doc-util/doc-normalized-ast.d.ts +1 -1
  58. package/documentation/wiki-dataflow-graph.js +4 -24
  59. package/documentation/wiki-linter.js +1 -0
  60. package/documentation/wiki-mk/doc-context.d.ts +10 -0
  61. package/documentation/wiki-mk/doc-context.js +3 -0
  62. package/documentation/wiki-query.js +47 -0
  63. package/documentation/wiki-signature-database.js +18 -7
  64. package/linter/linter-rules.d.ts +24 -2
  65. package/linter/linter-rules.js +3 -1
  66. package/linter/rules/absolute-path.d.ts +4 -4
  67. package/linter/rules/absolute-path.js +7 -5
  68. package/linter/rules/dataframe-access-validation.d.ts +1 -1
  69. package/linter/rules/file-path-validity.d.ts +1 -1
  70. package/linter/rules/file-path-validity.js +48 -8
  71. package/linter/rules/function-finder-util.d.ts +2 -1
  72. package/linter/rules/syntactically-valid.d.ts +58 -0
  73. package/linter/rules/syntactically-valid.js +203 -0
  74. package/linter/rules/undefined-symbol-util.js +3 -1
  75. package/linter/rules/undefined-symbol.js +6 -6
  76. package/package.json +25 -12
  77. package/project/context/classify-project-kind.d.ts +40 -0
  78. package/project/context/classify-project-kind.js +76 -0
  79. package/project/context/flowr-analyzer-context.d.ts +4 -4
  80. package/project/context/flowr-analyzer-context.js +3 -3
  81. package/project/context/flowr-analyzer-dependencies-context.d.ts +34 -9
  82. package/project/context/flowr-analyzer-dependencies-context.js +30 -3
  83. package/project/context/flowr-analyzer-files-context.d.ts +10 -8
  84. package/project/context/flowr-analyzer-files-context.js +26 -67
  85. package/project/context/flowr-analyzer-meta-context.d.ts +1 -0
  86. package/project/context/flowr-file.d.ts +5 -0
  87. package/project/context/flowr-file.js +5 -0
  88. package/project/dependency-version-space.d.ts +118 -26
  89. package/project/dependency-version-space.js +343 -87
  90. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +4 -0
  91. package/project/plugins/file-plugins/files/flowr-description-file.js +8 -1
  92. package/project/plugins/file-plugins/files/flowr-rda-file.js +27 -25
  93. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.d.ts +12 -4
  94. package/project/plugins/file-plugins/flowr-analyzer-rprofile-file-plugin.js +25 -10
  95. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +1 -1
  96. package/project/plugins/file-plugins/notebooks/flowr-analyzer-sweave-file-plugin.d.ts +1 -1
  97. package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +2 -1
  98. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +1 -1
  99. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +4 -4
  100. package/project/plugins/package-version-plugins/package.d.ts +27 -10
  101. package/project/plugins/package-version-plugins/package.js +50 -25
  102. package/project/plugins/plugin-registry.d.ts +2 -1
  103. package/project/plugins/plugin-registry.js +4 -1
  104. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.d.ts +57 -2
  105. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +150 -28
  106. package/project/sigdb/decompress.d.ts +1 -1
  107. package/project/sigdb/decompress.js +4 -1
  108. package/project/sigdb/manifest.js +60 -26
  109. package/project/sigdb/reader.d.ts +26 -16
  110. package/project/sigdb/reader.js +52 -21
  111. package/project/sigdb/sigdb-download.d.ts +6 -7
  112. package/project/sigdb/sigdb-download.js +30 -9
  113. package/queries/catalog/dependencies-query/dependencies-query-executor.js +1 -1
  114. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +2 -12
  115. package/queries/catalog/dependencies-query/dependencies-query-format.js +2 -108
  116. package/queries/catalog/does-call-query/does-call-query-format.d.ts +1 -1
  117. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +39 -77
  118. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +12 -0
  119. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +54 -24
  120. package/queries/catalog/input-sources-query/input-source-functions.d.ts +13 -0
  121. package/queries/catalog/input-sources-query/input-source-functions.js +96 -1
  122. package/queries/catalog/input-sources-query/input-sources-query-executor.js +40 -4
  123. package/queries/catalog/input-sources-query/input-sources-query-format.js +21 -3
  124. package/queries/catalog/input-sources-query/input-types.d.ts +58 -0
  125. package/queries/catalog/input-sources-query/input-types.js +64 -0
  126. package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +62 -52
  127. package/queries/catalog/input-sources-query/simple-input-classifier.js +334 -101
  128. package/queries/catalog/linter-query/linter-query-format.js +9 -2
  129. package/queries/catalog/project-query/project-query-executor.js +1 -1
  130. package/queries/catalog/signature-query/signature-query-executor.d.ts +7 -1
  131. package/queries/catalog/signature-query/signature-query-executor.js +115 -39
  132. package/queries/catalog/signature-query/signature-query-format.d.ts +5 -1
  133. package/queries/catalog/signature-query/signature-query-format.js +1 -1
  134. package/queries/catalog/signature-query/signature-query-render.js +12 -7
  135. package/queries/query.js +9 -2
  136. package/r-bridge/data/data.d.ts +5 -0
  137. package/r-bridge/data/data.js +6 -0
  138. package/r-bridge/lang-4.x/ast/parser/json/format.js +1 -1
  139. package/r-bridge/retriever.d.ts +1 -1
  140. package/r-bridge/retriever.js +6 -1
  141. package/r-bridge/shell.js +5 -0
  142. package/search/flowr-search-filters.d.ts +2 -1
  143. package/search/flowr-search-printer.js +10 -8
  144. package/slicing/static/static-slicer.d.ts +2 -2
  145. package/util/files.d.ts +6 -4
  146. package/util/files.js +30 -8
  147. package/util/mermaid/dfg.js +1 -1
  148. package/util/objects.js +6 -4
  149. package/util/r-base-packages.d.ts +2 -0
  150. package/util/r-base-packages.js +3 -0
  151. package/util/r-license.js +1 -4
  152. package/util/r-version.d.ts +12 -0
  153. package/util/r-version.js +16 -0
  154. package/util/range.d.ts +6 -2
  155. package/util/range.js +33 -15
  156. package/util/text/ansi.d.ts +7 -3
  157. package/util/text/ansi.js +8 -5
  158. package/util/version.js +4 -4
package/util/objects.js CHANGED
@@ -87,7 +87,7 @@ function deepMergeObjectInPlace(base, addon) {
87
87
  }
88
88
  else if (baseIsArray && addonIsArray) {
89
89
  for (const item of addon) {
90
- base.push(item);
90
+ (base).push(item);
91
91
  }
92
92
  }
93
93
  else {
@@ -175,9 +175,11 @@ function looselyCompareObjects(obj, expected, arrayMatch, logger) {
175
175
  return false;
176
176
  }
177
177
  }
178
- // for anything else, we match with our regular expression or string
179
- if (expectedValue instanceof RegExp) {
180
- if (!expectedValue.test(typeof realValue === 'string' ? realValue : String(realValue))) {
178
+ else if (expectedValue instanceof RegExp) {
179
+ // for anything else, we match with our regular expression or string
180
+ // (arrays and objects are handled above, so only primitives reach this point)
181
+ const realPrimitive = realValue;
182
+ if (!expectedValue.test(typeof realPrimitive === 'string' ? realPrimitive : String(realPrimitive))) {
181
183
  (0, log_1.expensiveTrace)(logger, () => `Value ${JSON.stringify(realValue)} does not match expected regular expression ${expectedValue}`);
182
184
  return false;
183
185
  }
@@ -1,3 +1,5 @@
1
+ /** the base packages R attaches to the search path on startup, so their exports are usable without a `library` call */
2
+ export declare const AttachedBasePackages: readonly string[];
1
3
  /**
2
4
  * The base packages available at the assumed R version (all of them if omitted). A package counts as
3
5
  * available when that R release lies within the range it was part of core; e.g. `parallel` (added in R
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AttachedBasePackages = void 0;
3
4
  exports.baseRPackages = baseRPackages;
4
5
  exports.baseRExportOwner = baseRExportOwner;
5
6
  exports.isBaseRPackage = isBaseRPackage;
6
7
  const r_base_packages_generated_1 = require("../data/r-base-packages.generated");
7
8
  const r_base_primitives_generated_1 = require("../data/r-base-primitives.generated");
8
9
  const r_version_1 = require("./r-version");
10
+ /** the base packages R attaches to the search path on startup, so their exports are usable without a `library` call */
11
+ exports.AttachedBasePackages = ['base', 'stats', 'graphics', 'grDevices', 'utils', 'datasets', 'methods'];
9
12
  /** clamp `rVersion` to the newest R release the store knows about (so a future R version stays answerable) */
10
13
  function effective(rVersion) {
11
14
  return r_version_1.RVersion.compare(rVersion, r_base_packages_generated_1.RBasePackageStore.newestRVersion) > 0 ? r_base_packages_generated_1.RBasePackageStore.newestRVersion : rVersion;
package/util/r-license.js CHANGED
@@ -66,15 +66,12 @@ function skipWhitespace({ remInput, position }) {
66
66
  function consumeLicenseName(info) {
67
67
  info = skipWhitespace(info);
68
68
  let licenseName = '';
69
- let isAtWhitespace = false;
70
69
  for (let i = 0; i < info.remInput.length; i++) {
71
70
  const char = info.remInput[i];
72
71
  if (/[()<>~!=,&|+]/.test(char)) {
73
72
  break;
74
73
  }
75
- else {
76
- isAtWhitespace = /\s/.test(char);
77
- }
74
+ const isAtWhitespace = /\s/.test(char);
78
75
  if (isAtWhitespace) {
79
76
  if (/^\s*(with|and|or)\s+/i.test(info.remInput.slice(i))) {
80
77
  break;
@@ -54,4 +54,16 @@ export declare const RRange: {
54
54
  * (never throws), so a malformed version/constraint simply does not match.
55
55
  */
56
56
  readonly satisfies: (this: void, version: string, range: Range | string) => boolean;
57
+ /**
58
+ * The range every one of `ranges` allows (semver reads a space-separated list as a conjunction). `undefined` if
59
+ * none were given or the combination is unparseable; it may still be a range no version satisfies, which
60
+ * {@link RVersion.parse|minVersion} reports.
61
+ */
62
+ readonly intersect: (this: void, ranges: readonly Range[]) => (Range & {
63
+ str: string;
64
+ }) | undefined;
65
+ /** how a set of alternative requirements reads, in semver's `a || b` form (for reporting, not for parsing back) */
66
+ readonly formatAlternatives: (this: void, ranges: readonly Range[]) => string;
67
+ /** whether `version` satisfies at least one of `ranges` (an empty list constrains nothing, so it does) */
68
+ readonly satisfiesAny: (this: void, version: string, ranges: readonly Range[]) => boolean;
57
69
  };
package/util/r-version.js CHANGED
@@ -190,6 +190,22 @@ exports.RRange = {
190
190
  }
191
191
  const r = typeof range === 'string' ? exports.RRange.parse(range) : range;
192
192
  return r !== undefined && (0, semver_1.satisfies)(v, r, { loose: true, includePrerelease: true });
193
+ },
194
+ /**
195
+ * The range every one of `ranges` allows (semver reads a space-separated list as a conjunction). `undefined` if
196
+ * none were given or the combination is unparseable; it may still be a range no version satisfies, which
197
+ * {@link RVersion.parse|minVersion} reports.
198
+ */
199
+ intersect(ranges) {
200
+ return ranges.length > 0 ? exports.RRange.parse(ranges.map(r => r.raw).join(' ')) : undefined;
201
+ },
202
+ /** how a set of alternative requirements reads, in semver's `a || b` form (for reporting, not for parsing back) */
203
+ formatAlternatives(ranges) {
204
+ return ranges.map(r => r.raw).join(' || ');
205
+ },
206
+ /** whether `version` satisfies at least one of `ranges` (an empty list constrains nothing, so it does) */
207
+ satisfiesAny(version, ranges) {
208
+ return ranges.length === 0 || ranges.some(r => exports.RRange.satisfies(version, r));
193
209
  }
194
210
  };
195
211
  //# sourceMappingURL=r-version.js.map
package/util/range.d.ts CHANGED
@@ -93,7 +93,7 @@ export declare const SourceRange: {
93
93
  readonly invalid: (this: void) => SourceRange;
94
94
  /**
95
95
  * Merges multiple source ranges into a single source range that spans from the earliest start to the latest end.
96
- * If you are interested in combining overlapping ranges into a minimal set of ranges, see {@link combineRanges}.
96
+ * If you are interested in reducing a set of ranges to those none of the others contains, see {@link combineRanges}.
97
97
  * @throws if no ranges are provided
98
98
  */
99
99
  readonly merge: (this: void, rs: (SourceRange | undefined)[]) => SourceRange;
@@ -131,7 +131,8 @@ export declare const SourceRange: {
131
131
  */
132
132
  readonly isStrictSubsetOf: (this: void, r1: SourceRange, r2: SourceRange) => boolean;
133
133
  /**
134
- * Combines overlapping or subset ranges into a minimal set of ranges.
134
+ * Reduces the ranges to those no other one contains, keeping the first of any duplicates. Ranges that merely
135
+ * overlap are both kept, as neither contains the other. A non-empty input always yields a non-empty result.
135
136
  * @see {@link SourceRange.merge} for merging multiple ranges into a single range.
136
137
  */
137
138
  readonly combineRanges: (this: void, ...ranges: SourceRange[]) => SourceRange[];
@@ -147,6 +148,9 @@ export declare const SourceRange: {
147
148
  * Nodes may share a range (a function call and the symbol naming it do), so `treatChildAsInner` decides that
148
149
  * tie: with it, a node sharing its parent's range counts as the inner one and the parent drops out; without
149
150
  * it, both are kept and the caller may pick between them (e.g. by node type).
151
+ *
152
+ * A non-empty input always yields a non-empty result: enclosure is a strict order so some node is always minimal,
153
+ * and a node carrying no range at all is kept rather than dropped.
150
154
  * @see {@link SourceRange.nodesContaining} which this usually narrows down
151
155
  */
152
156
  readonly innermostNodes: <OtherInfo>(this: void, nodes: readonly RNodeWithParent<OtherInfo>[], treatChildAsInner?: boolean) => RNodeWithParent<OtherInfo>[];
package/util/range.js CHANGED
@@ -109,7 +109,7 @@ exports.SourceRange = {
109
109
  },
110
110
  /**
111
111
  * Merges multiple source ranges into a single source range that spans from the earliest start to the latest end.
112
- * If you are interested in combining overlapping ranges into a minimal set of ranges, see {@link combineRanges}.
112
+ * If you are interested in reducing a set of ranges to those none of the others contains, see {@link combineRanges}.
113
113
  * @throws if no ranges are provided
114
114
  */
115
115
  merge(rs) {
@@ -187,11 +187,13 @@ exports.SourceRange = {
187
187
  return exports.SourceRange.isSubsetOf(r1, r2) && !exports.SourceRange.equals(r1, r2);
188
188
  },
189
189
  /**
190
- * Combines overlapping or subset ranges into a minimal set of ranges.
190
+ * Reduces the ranges to those no other one contains, keeping the first of any duplicates. Ranges that merely
191
+ * overlap are both kept, as neither contains the other. A non-empty input always yields a non-empty result.
191
192
  * @see {@link SourceRange.merge} for merging multiple ranges into a single range.
192
193
  */
193
194
  combineRanges(...ranges) {
194
- return ranges.filter(range => !ranges.some(other => range !== other && exports.SourceRange.isSubsetOf(range, other)));
195
+ return ranges.filter((range, i) => !ranges.some((other, j) => i !== j
196
+ && (exports.SourceRange.isStrictSubsetOf(range, other) || (j < i && exports.SourceRange.equals(range, other)))));
195
197
  },
196
198
  fromNode(node) {
197
199
  return node?.info.fullRange ?? node?.location;
@@ -215,25 +217,41 @@ exports.SourceRange = {
215
217
  * Nodes may share a range (a function call and the symbol naming it do), so `treatChildAsInner` decides that
216
218
  * tie: with it, a node sharing its parent's range counts as the inner one and the parent drops out; without
217
219
  * it, both are kept and the caller may pick between them (e.g. by node type).
220
+ *
221
+ * A non-empty input always yields a non-empty result: enclosure is a strict order so some node is always minimal,
222
+ * and a node carrying no range at all is kept rather than dropped.
218
223
  * @see {@link SourceRange.nodesContaining} which this usually narrows down
219
224
  */
220
225
  innermostNodes(nodes, treatChildAsInner = true) {
221
- if (nodes.length <= 1) {
222
- return [...nodes];
223
- }
224
- return nodes.filter(node => {
226
+ const result = [];
227
+ for (const node of nodes) {
225
228
  const range = exports.SourceRange.fromNode(node);
226
- return range !== undefined && !nodes.some(other => {
229
+ if (!range) {
230
+ result.push(node);
231
+ continue;
232
+ }
233
+ let inner = false;
234
+ for (const other of nodes) {
227
235
  if (other === node) {
228
- return false;
229
- }
230
- else if (treatChildAsInner && other.info.parent === node.info.id) {
231
- return true;
236
+ continue;
232
237
  }
233
238
  const otherRange = exports.SourceRange.fromNode(other);
234
- return otherRange !== undefined && exports.SourceRange.isStrictSubsetOf(otherRange, range);
235
- });
236
- });
239
+ if (!otherRange) {
240
+ continue;
241
+ }
242
+ if (exports.SourceRange.isStrictSubsetOf(otherRange, range) ||
243
+ (treatChildAsInner &&
244
+ other.info.parent === node.info.id &&
245
+ exports.SourceRange.equals(otherRange, range))) {
246
+ inner = true;
247
+ break;
248
+ }
249
+ }
250
+ if (!inner) {
251
+ result.push(node);
252
+ }
253
+ }
254
+ return result.length > 0 ? result : nodes.slice();
237
255
  }
238
256
  };
239
257
  /**
@@ -32,8 +32,12 @@ export interface OutputFormatter {
32
32
  format(input: string, options?: FormatOptions): string;
33
33
  getFormatString(options?: FormatOptions): string;
34
34
  reset(): string;
35
- /** render `text` as a link to `url` in whatever form this output supports (OSC 8, markdown, or plain text) */
36
- hyperlink(text: string, url: string): string;
35
+ /**
36
+ * Render `text` as a link to `url` in whatever form this output supports (OSC 8, markdown, or plain text).
37
+ * When a live hyperlink cannot be rendered, the raw `url` is shown so the target is not lost; pass
38
+ * `force` to always emit just the short `text` label instead.
39
+ */
40
+ hyperlink(text: string, url: string, force?: boolean): string;
37
41
  }
38
42
  export declare const voidFormatter: OutputFormatter;
39
43
  export declare const markdownFormatter: OutputFormatter;
@@ -63,7 +67,7 @@ export declare const escape = "\u001B[";
63
67
  export declare function supportsHyperlinks(): boolean;
64
68
  export declare const ansiFormatter: {
65
69
  reset(): string;
66
- hyperlink(text: string, url: string): string;
70
+ hyperlink(text: string, url: string, force?: boolean): string;
67
71
  format(input: string, options?: FormatOptions): string;
68
72
  getFormatString(options?: FormatOptions): string;
69
73
  };
package/util/text/ansi.js CHANGED
@@ -24,8 +24,8 @@ exports.voidFormatter = new class {
24
24
  reset() {
25
25
  return '';
26
26
  }
27
- hyperlink(text, _url) {
28
- return text;
27
+ hyperlink(text, url, force = false) {
28
+ return force ? text : url;
29
29
  }
30
30
  }();
31
31
  exports.markdownFormatter = new class {
@@ -57,7 +57,7 @@ exports.markdownFormatter = new class {
57
57
  reset() {
58
58
  return '';
59
59
  }
60
- hyperlink(text, url) {
60
+ hyperlink(text, url, _force = false) {
61
61
  return `[${text}](${url})`;
62
62
  }
63
63
  }();
@@ -114,8 +114,11 @@ exports.ansiFormatter = {
114
114
  reset() {
115
115
  return `${exports.escape}0${colorSuffix}`;
116
116
  },
117
- hyperlink(text, url) {
118
- return supportsHyperlinks() ? `\x1b]8;;${url}\x07${text}\x1b]8;;\x07` : text;
117
+ hyperlink(text, url, force = false) {
118
+ if (supportsHyperlinks()) {
119
+ return `\x1b]8;;${url}\x07${text}\x1b]8;;\x07`;
120
+ }
121
+ return force ? text : url;
119
122
  },
120
123
  format(input, options) {
121
124
  return `${this.getFormatString(options)}${input}${this.reset()}`;
package/util/version.js CHANGED
@@ -42,7 +42,7 @@ 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.13.1';
45
+ const version = '2.13.3';
46
46
  // this is automatically replaced with the release date by release-it (regex-bumper, see package.json)
47
47
  const versionDate = '2026-07-15T07:13:44Z';
48
48
  /**
@@ -81,7 +81,7 @@ async function printVersionInformation(output, input, engineOnly = false) {
81
81
  const rReason = r === 'none' ? ' (no R interpreter available)'
82
82
  : r === 'unknown' ? (engine === 'tree-sitter' ? ' (not queried, using the tree-sitter engine)' : ' (could not be determined)')
83
83
  : '';
84
- const flowrValue = versionRegex.test(flowr) ? output.formatter.hyperlink(flowr, `https://github.com/flowr-analysis/flowr/releases/tag/v${flowr}`) : flowr;
84
+ const flowrValue = versionRegex.test(flowr) ? output.formatter.hyperlink(flowr, `https://github.com/flowr-analysis/flowr/releases/tag/v${flowr}`, true) : flowr;
85
85
  const rows = [];
86
86
  const pluginLines = [];
87
87
  if (!engineOnly) {
@@ -97,7 +97,7 @@ async function printVersionInformation(output, input, engineOnly = false) {
97
97
  const sigDbUrl = (0, sigdb_download_1.sigDbRemoteRelease)()?.url;
98
98
  const describe = (d) => {
99
99
  const entry = `${d.scope} (v${d.version}, ${d.date}${d.format ? `, ${d.format}` : ''})`;
100
- return sigDbUrl ? output.formatter.hyperlink(entry, sigDbUrl) : entry;
100
+ return sigDbUrl ? output.formatter.hyperlink(entry, sigDbUrl, true) : entry;
101
101
  };
102
102
  rows.push(['databases', dbs.length === 0 ? 'none' : dbs.map(describe).join(', '), dbs.length === 0]);
103
103
  // the registered plugins, grouped by prefix; collected here and printed after the table (below) so the
@@ -127,7 +127,7 @@ async function printVersionInformation(output, input, engineOnly = false) {
127
127
  const labelWidth = Math.max(...[...byPrefix.keys()].map(p => p.length));
128
128
  const header = `registered plugins (${names.length})`;
129
129
  const hint = trace ? ' (faint = did not activate)' : ' (set +repl.showPlugins=true to track activation)';
130
- pluginLines.push(`${(0, ansi_1.bold)(osc8 ? output.formatter.hyperlink(header, wiki) : header, output.formatter)}:${dim(hint)}`);
130
+ pluginLines.push(`${(0, ansi_1.bold)(output.formatter.hyperlink(header, wiki, true), output.formatter)}:${dim(hint)}`);
131
131
  for (const [prefix, suffixes] of [...byPrefix].sort((a, b) => a[0].localeCompare(b[0]))) {
132
132
  pluginLines.push(` ${(0, ansi_1.bold)(prefix, output.formatter)}:${' '.repeat(labelWidth - prefix.length)} ${[...suffixes].sort((a, b) => a.localeCompare(b)).map(s => render(`${prefix}:${s}`, s)).join(', ')}`);
133
133
  }