@eagleoutice/flowr 2.15.9 → 2.15.10

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 (112) hide show
  1. package/README.md +34 -25
  2. package/abstract-interpretation/absint-inference.d.ts +2 -2
  3. package/abstract-interpretation/absint-inference.js +32 -79
  4. package/benchmark/slicer.d.ts +0 -1
  5. package/benchmark/slicer.js +1 -2
  6. package/cli/repl/commands/repl-signature.js +12 -3
  7. package/config.d.ts +5 -1
  8. package/control-flow/cfg-properties.js +0 -22
  9. package/control-flow/happens-before.d.ts +2 -2
  10. package/control-flow/happens-before.js +29 -19
  11. package/dataflow/environments/apply-kill.js +6 -2
  12. package/dataflow/environments/built-in-config.d.ts +2 -0
  13. package/dataflow/environments/built-in-props.d.ts +7 -1
  14. package/dataflow/environments/built-in-props.js +8 -1
  15. package/dataflow/environments/built-in.d.ts +7 -2
  16. package/dataflow/environments/built-in.js +11 -5
  17. package/dataflow/environments/default-builtin-config.d.ts +386 -8
  18. package/dataflow/environments/default-builtin-config.js +84 -22
  19. package/dataflow/environments/define.d.ts +3 -2
  20. package/dataflow/environments/define.js +4 -3
  21. package/dataflow/environments/deprecation-info.d.ts +45 -0
  22. package/dataflow/environments/deprecation-info.js +13 -0
  23. package/dataflow/environments/environment.d.ts +1 -1
  24. package/dataflow/environments/environment.js +5 -4
  25. package/dataflow/environments/identifier.d.ts +2 -0
  26. package/dataflow/extractor.js +6 -1
  27. package/dataflow/fn/class-declaration.d.ts +0 -11
  28. package/dataflow/fn/class-declaration.js +0 -20
  29. package/dataflow/fn/higher-order-function.d.ts +9 -1
  30. package/dataflow/fn/higher-order-function.js +14 -7
  31. package/dataflow/fn/strict-function.js +8 -3
  32. package/dataflow/graph/graph.d.ts +7 -0
  33. package/dataflow/graph/graph.js +17 -0
  34. package/dataflow/graph/vertex.d.ts +1 -1
  35. package/dataflow/internal/linker.d.ts +3 -0
  36. package/dataflow/internal/linker.js +67 -6
  37. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +113 -0
  38. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +506 -0
  39. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +9 -0
  40. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -0
  41. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +22 -19
  42. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +5 -1
  43. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +21 -14
  44. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
  45. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +22 -2
  46. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -0
  47. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +4 -3
  48. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +19 -3
  49. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +7 -3
  50. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -0
  51. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.d.ts +4 -2
  52. package/dataflow/internal/process/functions/call/built-in/built-in-s-four.js +3 -5
  53. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +2 -1
  54. package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +8 -0
  55. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +2 -0
  56. package/dataflow/internal/process/functions/call/common.d.ts +3 -1
  57. package/dataflow/internal/process/functions/call/common.js +22 -4
  58. package/dataflow/internal/process/functions/call/deferred.d.ts +6 -0
  59. package/dataflow/internal/process/functions/call/deferred.js +33 -12
  60. package/dataflow/internal/process/functions/call/known-call-handling.js +1 -1
  61. package/dataflow/internal/process/functions/call/named-call-handling.js +15 -0
  62. package/dataflow/internal/process/functions/call/quoted.js +137 -24
  63. package/dataflow/internal/process/process-symbol.js +6 -2
  64. package/documentation/data/faq/faqs.js +3 -3
  65. package/documentation/data/interface/doc-writing-code.js +1 -2
  66. package/documentation/data/server/doc-data-server-messages.js +7 -7
  67. package/documentation/doc-capabilities.js +80 -34
  68. package/documentation/doc-util/doc-query.d.ts +0 -3
  69. package/documentation/doc-util/doc-query.js +4 -3
  70. package/documentation/wiki-analyzer.js +1 -1
  71. package/documentation/wiki-cfg.js +5 -6
  72. package/documentation/wiki-core.js +8 -8
  73. package/documentation/wiki-dataflow-graph.js +10 -11
  74. package/documentation/wiki-interface.js +2 -2
  75. package/documentation/wiki-linting-and-testing.js +3 -3
  76. package/documentation/wiki-overview.js +6 -6
  77. package/documentation/wiki-query.js +9 -101
  78. package/documentation/wiki-signature-database.js +1 -1
  79. package/linter/linter-rules.d.ts +1 -1
  80. package/linter/rules/deprecated-functions.d.ts +1 -45
  81. package/linter/rules/deprecated-functions.js +24 -33
  82. package/package.json +1 -1
  83. package/project/flowr-analyzer.d.ts +2 -0
  84. package/project/flowr-analyzer.js +24 -1
  85. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +0 -2
  86. package/project/plugins/file-plugins/files/flowr-rda-file.js +10 -55
  87. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +2 -1
  88. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +6 -4
  89. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  90. package/project/sigdb/build.js +4 -0
  91. package/project/sigdb/manifest.d.ts +2 -0
  92. package/project/sigdb/manifest.js +10 -1
  93. package/project/sigdb/reader.js +23 -61
  94. package/project/sigdb/sigdb-download.d.ts +29 -6
  95. package/project/sigdb/sigdb-download.js +212 -64
  96. package/queries/catalog/call-context-query/cascade-action.d.ts +3 -1
  97. package/queries/catalog/call-context-query/cascade-action.js +2 -0
  98. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +3 -0
  99. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -1
  100. package/queries/catalog/origin-query/origin-query-executor.d.ts +1 -1
  101. package/queries/catalog/origin-query/origin-query-executor.js +2 -2
  102. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -2
  103. package/queries/catalog/origin-query/origin-query-format.js +1 -1
  104. package/queries/query.d.ts +1 -1
  105. package/r-bridge/data/data.d.ts +21 -14
  106. package/r-bridge/data/data.js +28 -20
  107. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +2 -2
  108. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +11 -2
  109. package/util/files.d.ts +2 -0
  110. package/util/files.js +3 -1
  111. package/util/mermaid/mermaid.js +6 -2
  112. package/util/version.js +2 -2
@@ -128,8 +128,8 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
128
128
  name: 'Dynamic Environment Resolution',
129
129
  id: 'dynamic-environment-resolution',
130
130
  code: ['new.env'],
131
- description: `_An environment a program builds and names itself, rather than one a ${LinkTo('function-definitions', 'definition')} opens._ Covers \`new.env\`, \`assign\`/\`get\`/\`local\` with \`envir=\`, \`e$x\`, \`attach\`, \`with\`, and aliasing such an environment through a variable.`,
132
- example: (0, doc_code_1.codeBlock)('r', 'e <- new.env()\nassign("x", 3, envir = e)\nget("x", envir = e) + e$x'),
131
+ description: `_An environment a program builds and names itself, rather than one a ${LinkTo('function-definitions', 'definition')} opens._ Covers \`new.env\`, \`assign\`/\`get\`/\`local\` with \`envir=\`, \`e$x\`, \`attach\`, \`with\`, and aliasing such an environment through a variable. A write from within a function reaches the environment it names, a read of the whole environment (\`as.list(e)\`) sees every field written, and copies of an environment variable (\`g <- e\`) share its fields.`,
132
+ example: (0, doc_code_1.codeBlock)('r', 'e <- new.env()\nassign("x", 3, envir = e)\nget("x", envir = e) + e$x\nf <- function() e$y <- 4\nf()\ng <- e\ng$z <- 5\nas.list(e)'),
133
133
  capabilities: [
134
134
  {
135
135
  name: 'Environment in Control Flow',
@@ -285,8 +285,8 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
285
285
  {
286
286
  name: 'Local with Explicit Environment',
287
287
  id: 'local-envir-argument',
288
- supported: 'partially',
289
- description: '_Send `local`\'s body to a specific environment._ `new.env()` and `globalenv()` work, but inside a function that already binds the name the write lands in that frame instead.',
288
+ supported: 'fully',
289
+ description: '_Send `local`\'s body to a specific environment._ Its writes land in that environment, also inside a function that binds the same name itself.',
290
290
  example: (0, doc_code_1.codeBlock)('r', 'e <- new.env()\nlocal(y <- 2, envir = e)\nget("y", envir = e)'),
291
291
  url: [{ name: '`local`', href: 'https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/local' }]
292
292
  },
@@ -366,8 +366,8 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
366
366
  name: 'Side-Effects in Argument',
367
367
  id: 'side-effects-in-argument',
368
368
  supported: 'partially',
369
- description: `_An argument that binds a name while it is evaluated, as \`f(x <- 3)\` does._ Whether the argument is ever forced is not modelled (see ${LinkTo('formals-promises', 'promises')}), so \`f <- function(a) 1; f(x <- 3)\` still believes \`x\` is 3.`,
370
- example: (0, doc_code_1.codeBlock)('r', 'f <- function(a) a\nf(x <- 3)\nx'),
369
+ description: `_An argument that binds a name while it is evaluated, as \`f(x <- 3)\` does._ Whether the argument is ever forced is not modelled (see ${LinkTo('formals-promises', 'promises')}), so \`f <- function(a) 1; f(x <- 3)\` still believes \`x\` is 3. A call in the argument depends on the call it is handed to, so \`g(FALSE, f(4))\` keeps \`g\`.`,
370
+ example: (0, doc_code_1.codeBlock)('r', 'f <- function(a) a\nf(x <- 3)\nx\ng <- function(a, b) if(a) b else 0\ng(FALSE, print("never"))'),
371
371
  url: [RLang('Argument evaluation')]
372
372
  },
373
373
  {
@@ -416,7 +416,7 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
416
416
  name: 'Functions with global side effects',
417
417
  id: 'functions-with-global-side-effects',
418
418
  supported: 'partially',
419
- description: `_A call that changes state the rest of the program reads without naming it, as \`setwd\` changes where a path points._ Only the ${LinkTo('working-directory', 'working directory')} is interpreted, while other ambient state such as ${LinkTo('built-in-options', 'the options')} stays an unknown side effect.`,
419
+ description: `_A call that changes state the rest of the program reads without naming it, as \`setwd\` changes where a path points._ The ${LinkTo('working-directory', 'working directory')}, ${LinkTo('built-in-options', 'the options')}, and ${LinkTo('graphics-state', 'the graphics state')} are tracked, so a read links to the calls that set what it reads. Other ambient state, like environment variables or the random seed, stays an unknown side effect.`,
420
420
  example: (0, doc_code_1.codeBlock)('r', 'setwd("/tmp")\nread.csv("data.csv")')
421
421
  },
422
422
  {
@@ -590,8 +590,8 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
590
590
  id: 'assignment-functions',
591
591
  code: ['assign', 'delayedAssign'],
592
592
  supported: 'partially',
593
- description: `_Bind a name given as a string, with \`assign\`, \`delayedAssign\`, ..._ The name has to be a ${LinkTo('name-created-resolved', 'resolvable string')}, and what a delayed assignment does when forced is not modelled.`,
594
- example: (0, doc_code_1.codeBlock)('r', 'assign("x", 3)\ndelayedAssign("y", x * 2)\ny')
593
+ description: `_Bind a name given as a string, with \`assign\`, \`delayedAssign\`, ..._ The name has to be a ${LinkTo('name-created-resolved', 'resolvable string')}. A delayed expression runs where the name is first read, so it sees the bindings at that point and its own writes happen there, in the \`assign.env\` given.`,
594
+ example: (0, doc_code_1.codeBlock)('r', 'assign("x", 3)\ndelayedAssign("y", x * 2)\nx <- 5\ny')
595
595
  },
596
596
  {
597
597
  name: 'Range Assignment',
@@ -838,8 +838,16 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
838
838
  id: 'built-in-options',
839
839
  code: ['options', 'getOption'],
840
840
  supported: 'partially',
841
- description: `_The global options \`options\` sets and \`getOption\` reads._ Option values are not tracked, so \`getOption("digits")\` does not reach a preceding \`options(digits = 3)\`. Unlike the ${LinkTo('working-directory', 'working directory')} they are not interpreted at all.`,
842
- example: (0, doc_code_1.codeBlock)('r', 'old <- options(digits = 3)\ngetOption("digits")\noptions(old)')
841
+ description: '_The global options `options` sets and `getOption`, `.Options`, printing, and formatting read._ Each option is tracked by name, so `getOption("digits")` reaches the last `options(digits = 3)`, `print` and `cat` reach the printing options, and an unrelated option usually stays out of a slice. `withr::with_options` and `local_options` scope a change, and `eval` of code that sets options counts as setting them. The values themselves are not interpreted, an `options(op)` restoring an unknown list may set any option, and options that change every conversion (`scipen`, `OutDec`) stay an unknown side effect. A function flowR cannot see into may read any option.',
842
+ example: (0, doc_code_1.codeBlock)('r', 'old <- options(digits = 3)\nprint(pi)\noptions(old)\ngetOption("digits")')
843
+ },
844
+ {
845
+ name: 'Graphics State',
846
+ id: 'graphics-state',
847
+ code: ['par', 'layout', 'palette', 'dev.off', 'dev.set'],
848
+ supported: 'partially',
849
+ description: '_The graphics parameters `par` and `layout` set for the active device, the `palette` all devices share, and the devices opened and closed._ A plot reads the state of the device it draws on, so it links to the `par` calls before it, a new device starts afresh, and `dev.off()` returns to the state of the device that becomes active. `withr::with_par` and the `with_<device>` functions scope a change. Within a function the open devices are unknown, so a device call only adds to what may hold, and grid-based plots like ggplot2 ignore the parameters.',
850
+ example: (0, doc_code_1.codeBlock)('r', 'par(mfrow = c(1, 2))\npng("a.png")\npar(mar = c(1, 1, 1, 1))\nplot(1:10)\ndev.off()\nplot(2:3)')
843
851
  },
844
852
  {
845
853
  name: 'Help',
@@ -886,8 +894,8 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
886
894
  id: 'built-in-evaluation',
887
895
  code: ['eval', 'evalq', 'eval.parent'],
888
896
  supported: 'partially',
889
- description: `_Run an expression that is a value with \`eval\`, \`evalq\`, \`eval.parent\`, ..._ \`eval(expr, envir)\` runs in an ${LinkTo('dynamic-environment-resolution', 'environment')} we may not know, so it is marked an unknown side effect.`,
890
- example: (0, doc_code_1.codeBlock)('r', 'e <- quote(x + 1)\nx <- 2\neval(e)'),
897
+ description: `_Run an expression that is a value with \`eval\`, \`evalq\`, \`eval.parent\`, ..._ The captured code is linked where it is evaluated, also through a name bound once to \`quote\`, \`as.name\`, \`str2lang\`, or \`parse\`, but \`eval(expr, envir)\` with an ${LinkTo('dynamic-environment-resolution', 'environment')} we do not know stays an unknown side effect.`,
898
+ example: (0, doc_code_1.codeBlock)('r', 'e <- quote(x + 1)\nx <- 2\neval(e)\nn <- as.name("x")\neval(n)'),
891
899
  url: [RLang('Evaluation of expressions'), AdvancedR('Evaluation', 'evaluation.html')]
892
900
  },
893
901
  {
@@ -901,10 +909,10 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
901
909
  {
902
910
  name: 'Parsing',
903
911
  id: 'built-in-parsing',
904
- code: ['parse', 'deparse'],
912
+ code: ['parse', 'str2lang', 'deparse'],
905
913
  supported: 'partially',
906
- description: `_Turn text into an expression with \`parse\`, and an expression back into text with \`deparse\`._ What \`parse\` produces is only reached through ${LinkTo('built-in-evaluation', 'evaluation')}, and \`deparse\` is not modelled beyond reading its argument.`,
907
- example: (0, doc_code_1.codeBlock)('r', 'eval(parse(text = "1 + 1"))\ndeparse(quote(x + y))'),
914
+ description: `_Turn text into an expression with \`parse\` or \`str2lang\`, and an expression back into text with \`deparse\`._ What \`parse\` produces is only reached through ${LinkTo('built-in-evaluation', 'evaluation')}, and \`deparse\` is not modelled beyond reading its argument.`,
915
+ example: (0, doc_code_1.codeBlock)('r', 'eval(parse(text = "1 + 1"))\neval(str2lang("2 * 3"))\ndeparse(quote(x + y))'),
908
916
  url: [RLang('The parsing process'), RLang('Deparsing')]
909
917
  }
910
918
  ]
@@ -1082,7 +1090,7 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
1082
1090
  id: 'oop-s3-dispatch',
1083
1091
  code: ['UseMethod'],
1084
1092
  supported: 'partially',
1085
- description: `_Route a generic call to the method that runs._ \`UseMethod\` links to every ${LinkTo('function-definitions', 'definition')} named \`generic.class\` in scope, so the ${LinkTo('oop-s3-construction', 'class')} an object carries narrows the target only where it is known (heavily over-approximating).`,
1093
+ description: `_Route a generic call to the method that runs._ \`UseMethod\` and a built-in generic like \`length\` or \`toString\` link to every ${LinkTo('function-definitions', 'definition')} named \`generic.class\` in scope, so the ${LinkTo('oop-s3-construction', 'class')} an object carries narrows the target only where it is known (heavily over-approximating).`,
1086
1094
  url: [RLang('UseMethod'), RLang('Method dispatching')]
1087
1095
  },
1088
1096
  {
@@ -1090,7 +1098,7 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
1090
1098
  id: 'oop-s3-inheritance',
1091
1099
  code: ['NextMethod'],
1092
1100
  supported: 'partially',
1093
- description: `_Walk the class vector with \`NextMethod\`._ It reaches the generic's ${LinkTo('oop-s3-dispatch', 'methods')}, the one it stands in included, rather than only the next class in the vector.`,
1101
+ description: `_Walk the class vector with \`NextMethod\`._ It reaches the generic's ${LinkTo('oop-s3-dispatch', 'methods')}, the one it stands in included, rather than only the next class in the vector, and hands on the current values of the formals.`,
1094
1102
  url: [RLang('NextMethod'), RLang('Inheritance')]
1095
1103
  }
1096
1104
  ]
@@ -1113,9 +1121,9 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true, tim
1113
1121
  {
1114
1122
  name: 'Dispatch',
1115
1123
  id: 'oop-s4-dispatch',
1116
- code: ['standardGeneric', 'setGeneric', 'setMethod'],
1124
+ code: ['standardGeneric', 'setGeneric', 'setMethod', 'setReplaceMethod'],
1117
1125
  supported: 'partially',
1118
- description: `_Route a generic call to the method \`setMethod\` registered._ The generic reaches its methods through the chain they register in, but the signature does not narrow which of them runs, as ${LinkTo('types-inference', 'no type is inferred')} for the argument.`,
1126
+ description: `_Route a generic call to the method \`setMethod\` (or \`setReplaceMethod\`, for the \`<-\` generic) registered._ The generic reaches its methods through the chain they register in, but the signature does not narrow which of them runs, as ${LinkTo('types-inference', 'no type is inferred')} for the argument.`,
1119
1127
  url: [RLang('Method dispatching')]
1120
1128
  },
1121
1129
  {
@@ -5,8 +5,8 @@ import type { SyncParser, TreeSitterInformation } from '../../parser';
5
5
  import type { TreeSitterEngineConfig } from '../../../config';
6
6
  import type { ReadonlyFlowrAnalysisProvider } from '../../../project/flowr-analyzer';
7
7
  import type { FlowrAnalyzerContext } from '../../../project/context/flowr-analyzer-context';
8
- export declare const DEFAULT_TREE_SITTER_R_WASM_PATH = "./node_modules/@davisvaughan/tree-sitter-r/tree-sitter-r.wasm";
9
- export declare const DEFAULT_TREE_SITTER_WASM_PATH = "./node_modules/web-tree-sitter/tree-sitter.wasm";
8
+ export declare const DEFAULT_TREE_SITTER_R_WASM_PATH: string;
9
+ export declare const DEFAULT_TREE_SITTER_WASM_PATH: string;
10
10
  /**
11
11
  * Synchronous and (way) faster alternative to the {@link RShell} using tree-sitter.
12
12
  */
@@ -8,8 +8,17 @@ const web_tree_sitter_1 = __importDefault(require("web-tree-sitter"));
8
8
  const log_1 = require("../../../util/log");
9
9
  const fs_1 = __importDefault(require("fs"));
10
10
  const incremental_parse_1 = require("../../../project/incremental/incremental-parse/incremental-parse");
11
- exports.DEFAULT_TREE_SITTER_R_WASM_PATH = './node_modules/@davisvaughan/tree-sitter-r/tree-sitter-r.wasm';
12
- exports.DEFAULT_TREE_SITTER_WASM_PATH = './node_modules/web-tree-sitter/tree-sitter.wasm';
11
+ /** Resolves the file through the installed package so it does not depend on the working directory, and keeps the relative path where there is no package to resolve (a bundle). */
12
+ function resolveWasm(request, fallback) {
13
+ try {
14
+ return require.resolve(request);
15
+ }
16
+ catch {
17
+ return fallback;
18
+ }
19
+ }
20
+ exports.DEFAULT_TREE_SITTER_R_WASM_PATH = resolveWasm('@davisvaughan/tree-sitter-r/tree-sitter-r.wasm', './node_modules/@davisvaughan/tree-sitter-r/tree-sitter-r.wasm');
21
+ exports.DEFAULT_TREE_SITTER_WASM_PATH = resolveWasm('web-tree-sitter/tree-sitter.wasm', './node_modules/web-tree-sitter/tree-sitter.wasm');
13
22
  const wasmLog = log_1.log.getSubLogger({ name: 'tree-sitter-wasm' });
14
23
  /**
15
24
  * Synchronous and (way) faster alternative to the {@link RShell} using tree-sitter.
package/util/files.d.ts CHANGED
@@ -20,6 +20,8 @@ export declare function getAllFiles(dir: string, suffix?: RegExp, throwOnError?:
20
20
  * @see {@link getAllFiles} - for an asynchronous version.
21
21
  */
22
22
  export declare function getAllFilesSync(dir: string, suffix?: RegExp, ignoreDirs?: RegExp | undefined, relativeTo?: string, throwOnError?: boolean): Generator<string>;
23
+ /** The code files directly below a package's `R/` directory: besides `.R` and `.r`, R accepts `.S`, `.s`, and `.q` there (and nowhere else, `src/*.s` is assembler). */
24
+ export declare const rPackageSourceRegex: RegExp;
23
25
  /**
24
26
  * Retrieves all R files in a given directory (asynchronously)
25
27
  * @param input - directory-path to start the search from, can be a file as well. Will just return the file then.
package/util/files.js CHANGED
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.RPath = void 0;
39
+ exports.RPath = exports.rPackageSourceRegex = void 0;
40
40
  exports.getAllFiles = getAllFiles;
41
41
  exports.getAllFilesSync = getAllFilesSync;
42
42
  exports.allRFiles = allRFiles;
@@ -116,6 +116,8 @@ function* getAllFilesSync(dir, suffix = /.*/, ignoreDirs = undefined, relativeTo
116
116
  }
117
117
  }
118
118
  const rFileRegex = /\.[rR]$/;
119
+ /** The code files directly below a package's `R/` directory: besides `.R` and `.r`, R accepts `.S`, `.s`, and `.q` there (and nowhere else, `src/*.s` is assembler). */
120
+ exports.rPackageSourceRegex = /(^|[\\/])R[\\/][^\\/]+\.(r|s|q)$/i;
119
121
  /**
120
122
  * Retrieves all R files in a given directory (asynchronously)
121
123
  * @param input - directory-path to start the search from, can be a file as well. Will just return the file then.
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Mermaid = void 0;
4
4
  const url_encoding_1 = require("../text/url-encoding");
5
+ function charCode(c) {
6
+ return `_${c.codePointAt(0)}_`;
7
+ }
5
8
  /**
6
9
  * Global mermaid helper object with useful functions.
7
10
  * @helper output
@@ -68,9 +71,10 @@ exports.Mermaid = {
68
71
  * Escapes a string or number to be used as a mermaid node id.
69
72
  */
70
73
  escapeId(text) {
71
- text = String(text).replace(/[^a-zA-Z0-9:\-./]/g, '_');
74
+ /* each character is spelled by its code, so `built-in:{` and `built-in:+` stay apart */
75
+ text = String(text).replace(/[^\w:\-./]/g, charCode);
72
76
  /* a dash before a dash or a dot reads as the start of a link, e.g. the id of `$<-.grouped_df` would cut the line in two */
73
- text = text.replace(/-(?=[-.])/g, '_');
77
+ text = text.replace(/-(?=[-.])/g, charCode);
74
78
  return text.replace(/(^|[:\-./])([a-zA-Z0-9_]+)/g, (_m, sep, tok) => sep + (exports.Mermaid.reservedIds.has(tok) ? tok + '_' : tok));
75
79
  },
76
80
  /**
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';
45
+ const version = '2.15.10';
46
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';
47
+ const versionDate = '2026-10-04T18:32:24Z';
48
48
  /**
49
49
  * Retrieves the current flowR version as a new {@link SemVer} object.
50
50
  */