@eagleoutice/flowr 2.13.16 → 2.14.1

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 (253) hide show
  1. package/README.md +36 -25
  2. package/abstract-interpretation/absint-visitor.js +1 -1
  3. package/abstract-interpretation/data-frame/mappers/access-mapper.js +4 -4
  4. package/abstract-interpretation/data-frame/mappers/arguments.js +7 -4
  5. package/abstract-interpretation/data-frame/mappers/function-mapper.js +18 -17
  6. package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +6 -6
  7. package/abstract-interpretation/data-frame/resolve-args.d.ts +9 -4
  8. package/abstract-interpretation/data-frame/resolve-args.js +10 -5
  9. package/benchmark/calibration.d.ts +16 -7
  10. package/benchmark/calibration.js +44 -17
  11. package/benchmark/slicer.d.ts +3 -2
  12. package/benchmark/slicer.js +9 -5
  13. package/benchmark/stats/size-of.js +1 -1
  14. package/benchmark/summarizer/first-phase/process.d.ts +2 -0
  15. package/benchmark/summarizer/first-phase/process.js +2 -0
  16. package/cli/benchmark-app.js +4 -1
  17. package/cli/benchmark-helper-app.d.ts +1 -0
  18. package/cli/benchmark-helper-app.js +2 -2
  19. package/cli/common/options.d.ts +5 -31
  20. package/cli/common/options.js +2 -8
  21. package/cli/common/scripts-info.d.ts +5 -38
  22. package/cli/common/scripts-info.js +0 -8
  23. package/cli/repl/core.js +1 -1
  24. package/cli/repl/execute.d.ts +2 -2
  25. package/cli/repl/execute.js +2 -2
  26. package/cli/repl/parser/slice-query-parser.js +1 -1
  27. package/cli/repl/print-version.js +2 -2
  28. package/config.d.ts +16 -0
  29. package/config.js +83 -5
  30. package/control-flow/extract-cfg.js +1 -1
  31. package/control-flow/semantic-cfg-guided-visitor.d.ts +1 -1
  32. package/control-flow/semantic-cfg-guided-visitor.js +1 -1
  33. package/control-flow/useless-loop.js +1 -1
  34. package/core/print/slice-diff-ansi.js +1 -1
  35. package/core/steps/pipeline/create-pipeline.js +1 -1
  36. package/dataflow/cluster.js +2 -2
  37. package/dataflow/environments/apply-kill.js +1 -1
  38. package/dataflow/environments/built-in-props.d.ts +13 -2
  39. package/dataflow/environments/built-in-props.js +23 -1
  40. package/dataflow/environments/built-in.d.ts +7 -1
  41. package/dataflow/environments/built-in.js +42 -3
  42. package/dataflow/environments/default-builtin-config.d.ts +518 -11
  43. package/dataflow/environments/default-builtin-config.js +218 -23
  44. package/dataflow/environments/environment.d.ts +10 -2
  45. package/dataflow/environments/environment.js +25 -7
  46. package/dataflow/environments/identifier.d.ts +8 -2
  47. package/dataflow/environments/identifier.js +6 -1
  48. package/dataflow/environments/query-fn-props.d.ts +6 -0
  49. package/dataflow/environments/query-fn-props.js +22 -2
  50. package/dataflow/environments/reference-to-maybe.js +5 -5
  51. package/dataflow/environments/resolve-by-name.d.ts +3 -0
  52. package/dataflow/environments/resolve-by-name.js +44 -7
  53. package/dataflow/environments/resolve-helper.d.ts +6 -0
  54. package/dataflow/environments/resolve-helper.js +6 -0
  55. package/dataflow/eval/resolve/alias-tracking.d.ts +5 -0
  56. package/dataflow/eval/resolve/alias-tracking.js +21 -14
  57. package/dataflow/eval/resolve/node-value.d.ts +6 -0
  58. package/dataflow/eval/resolve/node-value.js +15 -9
  59. package/dataflow/eval/resolve/resolve-argument.js +2 -2
  60. package/dataflow/eval/resolve/resolve-numbers.js +2 -2
  61. package/dataflow/eval/resolve/resolve-operators.js +5 -4
  62. package/dataflow/eval/resolve/resolve-strings.js +3 -3
  63. package/dataflow/eval/resolve/resolve-working-directory.d.ts +1 -1
  64. package/dataflow/eval/resolve/resolve-working-directory.js +3 -3
  65. package/dataflow/eval/resolve/resolve.d.ts +5 -5
  66. package/dataflow/eval/resolve/resolve.js +10 -11
  67. package/dataflow/eval/values/general.d.ts +4 -1
  68. package/dataflow/eval/values/general.js +1 -1
  69. package/dataflow/extractor.js +2 -1
  70. package/dataflow/fn/exceptions-of-function.d.ts +3 -1
  71. package/dataflow/fn/exceptions-of-function.js +87 -39
  72. package/dataflow/fn/higher-order-function.js +5 -4
  73. package/dataflow/fn/strict-function.d.ts +40 -0
  74. package/dataflow/fn/strict-function.js +337 -0
  75. package/dataflow/graph/call-graph.js +14 -14
  76. package/dataflow/graph/df-helper.d.ts +24 -1
  77. package/dataflow/graph/df-helper.js +29 -7
  78. package/dataflow/graph/diff-dataflow-graph.js +6 -6
  79. package/dataflow/graph/edge.d.ts +27 -0
  80. package/dataflow/graph/edge.js +33 -0
  81. package/dataflow/graph/graph-helper.d.ts +3 -4
  82. package/dataflow/graph/graph-helper.js +4 -5
  83. package/dataflow/graph/graph.d.ts +39 -3
  84. package/dataflow/graph/graph.js +75 -7
  85. package/dataflow/graph/vertex.d.ts +42 -6
  86. package/dataflow/graph/vertex.js +42 -6
  87. package/dataflow/info.d.ts +26 -0
  88. package/dataflow/info.js +28 -1
  89. package/dataflow/internal/linker.d.ts +1 -0
  90. package/dataflow/internal/linker.js +11 -9
  91. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -2
  92. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  93. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +6 -5
  94. package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +2 -2
  95. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +6 -7
  96. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +7 -6
  97. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +1 -0
  98. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +19 -18
  99. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +6 -1
  100. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  101. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +2 -2
  102. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +2 -2
  103. package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +5 -5
  104. package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +1 -1
  105. package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +3 -3
  106. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +3 -3
  107. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -0
  108. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +29 -3
  109. package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +3 -3
  110. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +1 -1
  111. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +3 -3
  112. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +3 -1
  113. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +44 -20
  114. package/dataflow/internal/process/functions/call/common.d.ts +9 -1
  115. package/dataflow/internal/process/functions/call/common.js +17 -6
  116. package/dataflow/internal/process/functions/call/deferred.js +2 -1
  117. package/dataflow/internal/process/functions/call/known-call-handling.d.ts +3 -1
  118. package/dataflow/internal/process/functions/call/known-call-handling.js +6 -3
  119. package/dataflow/internal/process/functions/call/named-call-handling.js +44 -12
  120. package/dataflow/internal/process/functions/call/nse.d.ts +33 -5
  121. package/dataflow/internal/process/functions/call/nse.js +113 -6
  122. package/dataflow/internal/process/functions/call/quoted.d.ts +5 -0
  123. package/dataflow/internal/process/functions/call/quoted.js +21 -9
  124. package/dataflow/origin/dfg-get-origin.d.ts +1 -0
  125. package/dataflow/origin/dfg-get-origin.js +9 -6
  126. package/documentation/data/faq/faqs.js +88 -88
  127. package/documentation/data/faq/recommended-configs.js +1 -1
  128. package/documentation/data/faq/wiki-faq-store.js +1 -1
  129. package/documentation/doc-capabilities.js +1 -1
  130. package/documentation/doc-readme.js +1 -1
  131. package/documentation/doc-util/doc-auto-gen.js +6 -2
  132. package/documentation/doc-util/doc-functions.js +1 -1
  133. package/documentation/wiki-cfg.js +2 -2
  134. package/documentation/wiki-core.js +1 -1
  135. package/documentation/wiki-create-linting-rules.js +45 -45
  136. package/documentation/wiki-dataflow-graph.js +18 -18
  137. package/documentation/wiki-linter.js +1 -0
  138. package/documentation/wiki-linting-and-testing.js +93 -5
  139. package/documentation/wiki-mk/doc-maker.js +1 -1
  140. package/documentation/wiki-overview.js +12 -1
  141. package/documentation/wiki-query.js +53 -0
  142. package/documentation/wiki-signature-database.js +3 -0
  143. package/linter/linter-output.js +1 -1
  144. package/linter/linter-rules.d.ts +24 -0
  145. package/linter/linter-rules.js +3 -1
  146. package/linter/rules/file-path-validity.js +1 -1
  147. package/linter/rules/function-finder-util.js +1 -1
  148. package/linter/rules/naming-convention.js +1 -1
  149. package/linter/rules/network-functions.d.ts +1 -1
  150. package/linter/rules/no-leaked-credentials.js +2 -1
  151. package/linter/rules/stop-with-call-arg.js +4 -4
  152. package/linter/rules/unclosed-connection.d.ts +44 -0
  153. package/linter/rules/unclosed-connection.js +200 -0
  154. package/linter/rules/undefined-symbol-util.d.ts +1 -1
  155. package/linter/rules/undefined-symbol-util.js +5 -4
  156. package/linter/rules/undefined-symbol.js +3 -3
  157. package/linter/rules/unused-definition.js +2 -1
  158. package/package.json +38 -51
  159. package/project/context/flowr-analyzer-environment-context.d.ts +23 -0
  160. package/project/context/flowr-analyzer-environment-context.js +25 -0
  161. package/project/dependency-version-space.d.ts +3 -3
  162. package/project/dependency-version-space.js +3 -4
  163. package/project/flowr-analyzer.js +1 -1
  164. package/project/plugins/file-plugins/files/flowr-description-file.d.ts +1 -1
  165. package/project/plugins/file-plugins/files/flowr-description-file.js +1 -1
  166. package/project/plugins/file-plugins/files/flowr-namespace-file.d.ts +1 -1
  167. package/project/plugins/file-plugins/files/flowr-namespace-file.js +1 -1
  168. package/project/plugins/file-plugins/files/flowr-news-file.d.ts +1 -1
  169. package/project/plugins/file-plugins/files/flowr-news-file.js +1 -1
  170. package/project/plugins/file-plugins/files/flowr-rda-file.d.ts +1 -1
  171. package/project/plugins/file-plugins/files/flowr-rda-file.js +4 -4
  172. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +2 -2
  173. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +5 -5
  174. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +36 -7
  175. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +2 -2
  176. package/project/sigdb/build.js +16 -16
  177. package/project/sigdb/codec.d.ts +1 -1
  178. package/project/sigdb/codec.js +13 -13
  179. package/project/sigdb/decompress.d.ts +1 -1
  180. package/project/sigdb/decompress.js +33 -33
  181. package/project/sigdb/index-format.js +2 -2
  182. package/project/sigdb/manifest.d.ts +3 -1
  183. package/project/sigdb/manifest.js +68 -27
  184. package/project/sigdb/memory-source.d.ts +64 -0
  185. package/project/sigdb/memory-source.js +133 -0
  186. package/project/sigdb/reader.js +14 -14
  187. package/project/sigdb/schema.d.ts +2 -2
  188. package/project/sigdb/schema.js +2 -2
  189. package/queries/catalog/call-context-query/call-context-query-executor.js +1 -1
  190. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +2 -2
  191. package/queries/catalog/dependencies-query/dependencies-query-executor.js +2 -2
  192. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  193. package/queries/catalog/dependencies-query/link-devices.js +3 -9
  194. package/queries/catalog/does-call-query/does-call-query-executor.js +2 -1
  195. package/queries/catalog/input-sources-query/simple-input-classifier.js +4 -4
  196. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -1
  197. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -0
  198. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.d.ts +6 -0
  199. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.js +25 -0
  200. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.d.ts +31 -0
  201. package/queries/catalog/inspect-strictness-query/inspect-strictness-query-format.js +56 -0
  202. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  203. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  204. package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -0
  205. package/queries/catalog/signature-query/signature-query-executor.js +3 -2
  206. package/queries/catalog/slice-query-options.d.ts +1 -1
  207. package/queries/catalog/slice-query-options.js +1 -1
  208. package/queries/query-function-filter.d.ts +8 -2
  209. package/queries/query-function-filter.js +11 -1
  210. package/queries/query.d.ts +11 -1
  211. package/queries/query.js +2 -0
  212. package/r-bridge/lang-4.x/ast/model/model.d.ts +4 -4
  213. package/r-bridge/lang-4.x/ast/model/model.js +4 -4
  214. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +3 -3
  215. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-call.js +1 -1
  216. package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-definition.js +1 -1
  217. package/r-bridge/retriever.d.ts +2 -1
  218. package/r-bridge/retriever.js +3 -2
  219. package/r-bridge/roxygen2/documentation-provider.d.ts +1 -0
  220. package/r-bridge/roxygen2/documentation-provider.js +1 -0
  221. package/r-bridge/roxygen2/roxygen-parse.d.ts +1 -1
  222. package/r-bridge/roxygen2/roxygen-parse.js +1 -1
  223. package/search/flowr-search-filters.d.ts +1 -1
  224. package/search/flowr-search-filters.js +2 -14
  225. package/search/search-executor/search-enrichers.js +4 -4
  226. package/search/search-executor/search-generators.js +1 -1
  227. package/slicing/criterion/parse.d.ts +2 -2
  228. package/slicing/criterion/parse.js +5 -5
  229. package/slicing/static/fingerprint.js +1 -1
  230. package/slicing/static/slice-call.d.ts +1 -1
  231. package/slicing/static/slice-call.js +2 -2
  232. package/slicing/static/static-slicer.js +4 -3
  233. package/util/assert.js +1 -1
  234. package/util/log.d.ts +4 -1
  235. package/util/log.js +15 -2
  236. package/util/logic.js +2 -2
  237. package/util/mermaid/cfg.js +1 -1
  238. package/util/mermaid/dfg.js +6 -6
  239. package/util/mermaid/mermaid.js +3 -1
  240. package/util/objects.d.ts +12 -0
  241. package/util/objects.js +48 -0
  242. package/util/quads.js +19 -6
  243. package/util/schema.js +2 -2
  244. package/util/simple-df/dfg-ascii.js +14 -3
  245. package/util/text/ansi.d.ts +2 -0
  246. package/util/text/ansi.js +8 -0
  247. package/util/text/name-rank.d.ts +29 -0
  248. package/util/text/name-rank.js +39 -0
  249. package/util/text/url-encoding.d.ts +15 -0
  250. package/util/text/url-encoding.js +59 -0
  251. package/util/version.js +1 -1
  252. package/cli/export-quads-app.d.ts +0 -7
  253. package/cli/export-quads-app.js +0 -44
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.WikiLintingAndTesting = void 0;
4
7
  const log_1 = require("../util/log");
@@ -6,7 +9,19 @@ const doc_code_1 = require("./doc-util/doc-code");
6
9
  const doc_files_1 = require("./doc-util/doc-files");
7
10
  const doc_structure_1 = require("./doc-util/doc-structure");
8
11
  const doc_cli_option_1 = require("./doc-util/doc-cli-option");
12
+ const patterns_1 = __importDefault(require("@eagleoutice/eslint-config-flowr/patterns"));
13
+ const edge_1 = require("../dataflow/graph/edge");
14
+ const resolve_helper_1 = require("../dataflow/environments/resolve-helper");
15
+ const node_id_1 = require("../r-bridge/lang-4.x/ast/model/processing/node-id");
9
16
  const doc_maker_1 = require("./wiki-mk/doc-maker");
17
+ /** the default patterns of `flowr/replacement-pattern`, rendered so the wiki cannot drift from the configuration */
18
+ /** two of the default patterns, kept generated so the wiki cannot drift from the configuration */
19
+ function patternExamples() {
20
+ const shown = ['edge-is-only-type', 'vertex-is'];
21
+ const cell = (text) => text.replaceAll('|', '\\|');
22
+ const rows = patterns_1.default.filter(p => p.id !== undefined && shown.includes(p.id)).map(p => `| \`${p.id}\` | ${cell(p.message ?? '')} | \`${cell(p.replace)}\` |`);
23
+ return ['| id | what it says | replacement |', '| :-- | :-- | :-- |', ...rows].join('\n');
24
+ }
10
25
  /**
11
26
  * https://github.com/flowr-analysis/flowr/wiki/Linting-and-Testing
12
27
  */
@@ -33,6 +48,11 @@ for the latest benchmark results, see the ${ctx.linkPage('flowr:benchmarks', 'be
33
48
  - [🪈 CI Pipeline](#ci-pipeline)
34
49
  - [🧹 Linting](#linting)
35
50
  - [Oh no, the linter fails](#oh-no-the-linter-fails)
51
+ - [flowR-Specific Rules](#flowr-specific-rules)
52
+ - [Pointing at a Helper with \`@useInstead\`](#pointing-at-a-helper-with-useinstead)
53
+ - [Replacement Patterns](#replacement-patterns)
54
+ - [Suppressing a Rule](#suppressing-a-rule)
55
+ - [A Part of unicorn](#a-part-of-unicorn)
36
56
  - [License Checker](#license-checker)
37
57
  - [🐛 Debugging](#debugging)
38
58
  - [VS Code](#vs-code-1)
@@ -71,7 +91,7 @@ ${(0, doc_code_1.codeBlock)('shell', 'npm run test -- --no-watch')}
71
91
 
72
92
  To run all tests, including a coverage report and label summary, run:
73
93
 
74
- ${(0, doc_code_1.codeBlock)('shell', 'npm run test-full')}
94
+ ${(0, doc_code_1.codeBlock)('shell', 'npm run test:full')}
75
95
 
76
96
  However, depending on your local version of R, your network connection, and other factors (each test may have a set of criteria),
77
97
  some tests may be skipped automatically as they do not apply to your current system setup (or cannot be tested with the current prerequisites).
@@ -93,8 +113,12 @@ ${(0, doc_structure_1.block)({
93
113
  type: 'WARNING',
94
114
  content: `
95
115
  We name all test files using the \`.test.ts\` suffix and try to run them in parallel.
96
- Whenever this is impossible (e.g., when using ${ctx.link('withShell')}), please use _\`describe.sequential\`_
97
- to disable parallel execution for the respective test (otherwise, such tests are flaky).
116
+ Whenever this is impossible (e.g., when using ${ctx.link('withShell')}), pass \`{ concurrent: false }\` to the
117
+ \`describe\` to disable parallel execution for the respective test (otherwise, such tests are flaky):
118
+
119
+ ${(0, doc_code_1.codeBlock)('typescript', 'describe(\'my suite\', { concurrent: false }, withShell(shell => { /* ... */ }));')}
120
+
121
+ Vitest deprecated the \`describe.sequential\` form in favour of that option, so please do not reintroduce it.
98
122
  `
99
123
  })}
100
124
 
@@ -177,7 +201,7 @@ Although we measure wall time in the CI (which is subject to rather large variat
177
201
  Furthermore, the respective scripts can be used locally as well.
178
202
  To run them, issue:
179
203
 
180
- ${(0, doc_code_1.codeBlock)('shell', 'npm run performance-test')}
204
+ ${(0, doc_code_1.codeBlock)('shell', 'npm run test:performance')}
181
205
 
182
206
  See ${(0, doc_files_1.linkFlowRSourceFile)('test/performance')} for more information on the suites, how to run them, and their results. If you are interested in the results of the benchmarks, see ${ctx.linkPage('flowr:benchmarks', 'here')}.
183
207
 
@@ -248,7 +272,71 @@ it is usually best if you (when necessary) read the respective description and f
248
272
  Rules in this project cover general JavaScript issues [using regular ESLint](https://eslint.org/docs/latest/rules), TypeScript-specific issues [using typescript-eslint](https://typescript-eslint.io/rules/), and code formatting [with ESLint Stylistic](https://eslint.style/packages/default#rules).
249
273
 
250
274
  However, in case you think that the linter is wrong, please do not hesitate to open a [new issue](${doc_files_1.FlowrGithubBaseRef}/flowr/issues/new/choose).
251
-
275
+
276
+ <a id='flowr-specific-rules'></a>
277
+ ### 🧭 flowR-Specific Rules
278
+
279
+ flowR groups its functions in helper objects (${ctx.link(edge_1.DfEdge)}, ${ctx.link(resolve_helper_1.Resolve)}, ${ctx.link(node_id_1.NodeId)}, and
280
+ friends) so that there is one obvious entry point per topic. Two rules of the
281
+ [\`flowr\` plugin](${doc_files_1.FlowrGithubBaseRef}/flowr-lint) keep the code on those entry points, both part of \`npm run lint\`.
282
+ Each is fixed on the spot where the replacement is already imported, and offered as an editor suggestion otherwise.
283
+
284
+ <a id='pointing-at-a-helper-with-useinstead'></a>
285
+ #### Pointing at a Helper with \`@useInstead\`
286
+
287
+ A function that only exists to be wired into a helper object names its replacement, and every reference outside its own
288
+ file is then reported:
289
+
290
+ ${(0, doc_code_1.codeBlock)('ts', `/**
291
+ * Every definition the identifier may refer to.
292
+ * @useInstead {@link Resolve.byName}
293
+ */
294
+ export function resolveByNameAnyType(/* ... */) { /* ... */ }`)}
295
+
296
+ Never reported are the references that make the replacement exist: the wiring in an object literal
297
+ (${ctx.linkO(resolve_helper_1.Resolve, 'byName')} pointing at \`resolveByNameAnyType\`), re-exports, and files declaring the helper itself.
298
+
299
+ <a id='replacement-patterns'></a>
300
+ #### Replacement Patterns
301
+
302
+ Some replacements are a shape of code rather than a renamed function, such as \`edge.types === EdgeType.Reads\`, which
303
+ reads like "has this type" (${ctx.linkO(edge_1.DfEdge, 'includesType')}) but holds only if it is the *only* type
304
+ (${ctx.linkO(edge_1.DfEdge, 'isOnlyType')}). These are matched with [esquery](https://github.com/estools/esquery) selectors,
305
+ the language \`no-restricted-syntax\` uses. Two of the ${patterns_1.default.length} that ship, the rest are in
306
+ [\`patterns.ts\`](${doc_files_1.FlowrGithubBaseRef}/flowr-lint/blob/main/patterns.ts):
307
+
308
+ ${patternExamples()}
309
+
310
+ The [flowr-lint README](${doc_files_1.FlowrGithubBaseRef}/flowr-lint#flowrreplacement-pattern) documents the fields of a pattern,
311
+ and \`npx eslint\` names the id of whichever one fires.
312
+ To propose a new pattern or a change to any of them, open an issue with the replacement pattern template in
313
+ [that repository](${doc_files_1.FlowrGithubBaseRef}/flowr-lint/issues/new/choose).
314
+
315
+ <a id='suppressing-a-rule'></a>
316
+ #### Suppressing a Rule
317
+
318
+ A tag on a declaration covers everything below it, a header comment above the imports covers the whole file.
319
+
320
+ | | silences |
321
+ | :-- | :-- |
322
+ | \`// eslint-disable-next-line\` | the next line, as usual |
323
+ | \`@lintIgnore <ids>\` | the named rules or pattern ids, all of them when given none |
324
+
325
+ Put the reason in the prose above the tag, a hot path that has to keep the raw form is as good a reason as any.
326
+
327
+ <a id='a-part-of-unicorn'></a>
328
+ #### A Part of unicorn
329
+
330
+ The configuration also enables a hand-picked part of [unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn):
331
+ the rules naming a shape with a clearer equivalent (\`prefer-includes\`, \`prefer-string-slice\`, and friends), not its
332
+ opinions on naming or style. Three are left out on purpose:
333
+
334
+ - \`prefer-array-flat\` rewrites \`.flatMap(f => f)\` on an iterator, which has no \`.flat()\`.
335
+ - \`prefer-structured-clone\` does not know that a \`JSON\` round-trip is sometimes the point.
336
+ - \`prefer-node-protocol\` is inverted, \`no-restricted-imports\` forbids the \`node:\` prefix instead: flowR is bundled for
337
+ the browser as well (the web build of the ${ctx.linkPage('flowr:vscode', 'VS Code extension')}), where the core modules
338
+ are swapped for polyfills by their bare name, and a \`node:\` specifier matches none of those bundler keys.
339
+
252
340
  <a id='license-checker'></a>
253
341
  ### 🪪 License Checker
254
342
 
@@ -84,7 +84,7 @@ class DocMaker {
84
84
  async make(args) {
85
85
  this.currentArgs = args;
86
86
  this.writtenSubfiles = new Set();
87
- const newText = normalizeLineEndings((this.printHeader ? (await args.ctx.header(this.filename, this.purpose)) + '\n' : '') + await this.text(args));
87
+ const newText = normalizeLineEndings((this.printHeader ? (await args.ctx.header(this.filename, this.purpose)) + '\n\n' : '') + await this.text(args));
88
88
  if (args.force || this.didUpdate(this.target, newText, args.readFileSync(this.target)?.toString()) === WikiChangeType.Changed) {
89
89
  args.writeFileSync(this.target, newText);
90
90
  return true;
@@ -6,6 +6,8 @@ const doc_files_1 = require("./doc-util/doc-files");
6
6
  const shell_1 = require("../r-bridge/shell");
7
7
  const graph_1 = require("../dataflow/graph/graph");
8
8
  const flowr_analyzer_1 = require("../project/flowr-analyzer");
9
+ const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
10
+ const doc_code_1 = require("./doc-util/doc-code");
9
11
  /**
10
12
  * https://github.com/flowr-analysis/flowr/wiki/Overview
11
13
  */
@@ -39,7 +41,16 @@ Its subcomponents (like the custom ${ctx.link(shell_1.RShell)}) or the internals
39
41
  are not important if you simply wish to use _flowR_.
40
42
  If you wish to use _flowR_, check out one of its extensions (e.g., the ${ctx.linkPage('flowr:vscode', 'VS Code extension')}),
41
43
  the [REPL and server interfaces](#using-flowr-from-the-outside) or its coding API with the
42
- ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)}.
44
+ ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)}, which you build with the ${ctx.link(flowr_analyzer_builder_1.FlowrAnalyzerBuilder)}:
45
+
46
+ ${(0, doc_code_1.codeBlock)('ts', `
47
+ const analyzer = await new FlowrAnalyzerBuilder()
48
+ .setParser(new TreeSitterExecutor())
49
+ .build();
50
+ analyzer.addRequest({ request: 'file', content: 'survey.R' });
51
+ const result = await analyzer.query([{ type: 'dependencies' }]);
52
+ `)}
53
+
43
54
 
44
55
  The benchmark module is only of interest if you want to benchmark/measure the runtime performance and reduction of the slicer.
45
56
  It is available with the [\`benchmark\`](#benchmark-the-slicer) script.
@@ -35,6 +35,7 @@ const doc_maker_1 = require("./wiki-mk/doc-maker");
35
35
  const files_query_executor_1 = require("../queries/catalog/files-query/files-query-executor");
36
36
  const call_graph_query_executor_1 = require("../queries/catalog/call-graph-query/call-graph-query-executor");
37
37
  const inspect_recursion_query_executor_1 = require("../queries/catalog/inspect-recursion-query/inspect-recursion-query-executor");
38
+ const inspect_strictness_query_executor_1 = require("../queries/catalog/inspect-strictness-query/inspect-strictness-query-executor");
38
39
  const does_call_query_executor_1 = require("../queries/catalog/does-call-query/does-call-query-executor");
39
40
  const inspect_exception_query_executor_1 = require("../queries/catalog/inspect-exceptions-query/inspect-exception-query-executor");
40
41
  const slice_direction_1 = require("../util/slice-direction");
@@ -314,6 +315,58 @@ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
314
315
  `;
315
316
  }
316
317
  });
318
+ (0, doc_query_1.registerQueryDocumentation)('inspect-strictness', {
319
+ type: 'active',
320
+ shortDescription: 'Determine whether functions force their arguments',
321
+ functionName: inspect_strictness_query_executor_1.executeStrictnessQuery.name,
322
+ functionFile: '../queries/catalog/inspect-strictness-query/inspect-strictness-query-executor.ts',
323
+ buildExplanation: async (shell, ctx) => {
324
+ const exampleCode = 'f <- function(a, b, c) { print(a); if(runif(1) > .5) print(b); 42 }';
325
+ return `
326
+ R hands arguments over as promises, so a parameter is only evaluated once something reads it.
327
+ With this query you can find out which functions rely on that: a function is \`always\` strict if every call
328
+ forces every one of its parameters, \`never\` strict if no call forces all of them, and \`conditionally\`
329
+ strict if it depends on the path taken, on the caller, or on a function flowR could not resolve.
330
+ The result carries the same verdict per parameter, keyed by the id of the parameter's name.
331
+
332
+ Please note that a read that only hands the parameter to another function does not force it by itself.
333
+ Whether it is forced then depends on the function receiving it, which is resolved through the call graph.
334
+ A read within a nested function definition, within a loop, or under a condition leaves the parameter
335
+ \`conditionally\` strict, as does a call whose target flowR does not know.
336
+
337
+ What a built-in does with an argument is taken from what flowR states about it rather than from its name: an
338
+ argument declared as quoted or as one whose presence alone matters (\`quote(expr)\`, \`missing(x)\`) is never
339
+ evaluated, one declared as forced (\`force(x)\`) always is, and the calls that reach an argument only on the
340
+ way the run happens to take are the ones flowR hands to the processor saying so (\`switch\` picking a branch,
341
+ \`tryCatch\` reaching a handler, \`on.exit\` running at exit, and the short-circuiting \`&&\`/\`||\`).
342
+ A definition of your own shadowing such a name is judged by its own body instead, as R would.
343
+ A parameter read only in the default of another parameter is \`conditionally\` strict, as that default is
344
+ evaluated only when the argument is left out.
345
+
346
+ A generic mentions none of its arguments, so its verdict comes from the methods that S3 dispatch reaches: if
347
+ they agree the answer is theirs, otherwise the parameter is \`conditionally\` strict. The object the dispatch
348
+ is on is forced by the dispatch itself, which also covers \`standardGeneric\`. A \`NextMethod\` carries the
349
+ question on to the methods it reaches, matched by the position the parameter is written in, and an argument
350
+ travelling in \`...\` is followed to the parameter it binds to. The method of an object flowR cannot resolve,
351
+ such as \`obj$m(x)\`, leaves the parameter \`conditionally\` strict:
352
+ ${await (0, doc_query_1.showQuery)(shell, 'f <- function(x, y) UseMethod("f")\nf.default <- function(x, y) x\nf.numeric <- function(x, y) y', [{
353
+ type: 'inspect-strictness',
354
+ }], { showCode: true, collapseQuery: true, ctx })}
355
+
356
+ Using the example code \`${exampleCode}\` the following query returns the information for all identified
357
+ function definitions whether they are strict:
358
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
359
+ type: 'inspect-strictness',
360
+ }], { showCode: true, collapseQuery: true, ctx })}
361
+
362
+ This query also supports a slicing criterion based query mode that only returns information for functions matching the given criteria:
363
+ ${await (0, doc_query_1.showQuery)(shell, exampleCode, [{
364
+ type: 'inspect-strictness',
365
+ filter: ['1@function']
366
+ }], { showCode: true, shorthand: (0, doc_query_1.sliceQueryShorthand)(['1@function'], (0, doc_escape_1.escapeNewline)(exampleCode)), ctx })}
367
+ `;
368
+ }
369
+ });
317
370
  (0, doc_query_1.registerQueryDocumentation)('inspect-exception', {
318
371
  type: 'active',
319
372
  shortDescription: 'Determine whether functions throw exceptions (known to flowR)',
@@ -216,6 +216,9 @@ After \`library(ggplot2)\`, a call to \`ggplot()\` resolves to \`ggplot2::ggplot
216
216
  qualifies bare names and backs various components like the ${ctx.linkPage('wiki/Query API', 'dependencies and call-context queries')}
217
217
  as well as the ${ctx.linkPage('wiki/Linter', 'undefined symbol')} rule.
218
218
 
219
+ You can search what it knows at [flowr-analysis.github.io/flowr/wiki/sigdb](https://flowr-analysis.github.io/flowr/wiki/sigdb/),
220
+ a static page listing every exported name, generated from this database by \`npm run gen:landing\`.
221
+
219
222
  ## What is stored
220
223
 
221
224
  Every function is a ${ctx.link('DecodedFunction')}:
@@ -88,7 +88,7 @@ function lintsToSarif(results, flowrVersion) {
88
88
  }
89
89
  /** GitHub has no 'note' */
90
90
  const githubCommand = { error: 'error', warning: 'warning', note: 'notice' };
91
- /** `%`, `\r` and `\n` would end the workflow command */
91
+ /** `%`, `\r`, and `\n` would end the workflow command */
92
92
  function escapeGithubData(text) {
93
93
  return text.replaceAll('%', '%25').replaceAll('\r', '%0D').replaceAll('\n', '%0A');
94
94
  }
@@ -400,6 +400,30 @@ export declare const LintingRules: {
400
400
  };
401
401
  };
402
402
  };
403
+ readonly 'unclosed-connection': {
404
+ readonly createSearch: () => import("../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, Promise<import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, [] | import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>>>;
405
+ readonly processSearchResult: (elements: import("../search/flowr-search").FlowrSearchElements<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../search/flowr-search").FlowrSearchElement<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>[]>, config: import("./rules/unclosed-connection").UnclosedConnectionConfig, data: import("../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>) => Promise<{
406
+ results: import("./linter-format").LintingResult[];
407
+ '.meta': {
408
+ totalOpened: number;
409
+ totalClosed: number;
410
+ };
411
+ }>;
412
+ readonly prettyPrint: {
413
+ readonly query: (result: import("./linter-format").LintingResult) => string;
414
+ readonly full: (result: import("./linter-format").LintingResult) => string;
415
+ };
416
+ readonly info: {
417
+ readonly name: "Unclosed Connection";
418
+ readonly tags: readonly [import("./linter-tags").LintingRuleTag.Robustness, import("./linter-tags").LintingRuleTag.Smell];
419
+ readonly certainty: import("./linter-format").LintingRuleCertainty.BestEffort;
420
+ readonly description: "Flags connections that are opened but not closed on every path opening them.";
421
+ readonly defaultConfig: {
422
+ readonly openFns: readonly [];
423
+ readonly closeFns: readonly [];
424
+ };
425
+ };
426
+ };
403
427
  };
404
428
  export type LintingRuleNames = keyof typeof LintingRules;
405
429
  export type LintingRuleMetadata<Name extends LintingRuleNames> = typeof LintingRules[Name] extends LintingRule<infer _Result, infer Metadata, infer _Config, infer _Info, infer _Elements> ? Metadata : never;
@@ -19,6 +19,7 @@ const software_has_tests_1 = require("./rules/software-has-tests");
19
19
  const no_leaked_credentials_1 = require("./rules/no-leaked-credentials");
20
20
  const undefined_symbol_1 = require("./rules/undefined-symbol");
21
21
  const syntactically_valid_1 = require("./rules/syntactically-valid");
22
+ const unclosed_connection_1 = require("./rules/unclosed-connection");
22
23
  /**
23
24
  * The registry of currently supported linting rules.
24
25
  * A linting rule can be executed on a dataflow pipeline result using {@link executeLintingRule}.
@@ -41,6 +42,7 @@ exports.LintingRules = {
41
42
  'software-has-tests': software_has_tests_1.SOFTWARE_HAS_TESTS,
42
43
  'no-leaked-credentials': no_leaked_credentials_1.NO_LEAKED_CREDENTIALS,
43
44
  'undefined-symbol': undefined_symbol_1.UNDEFINED_SYMBOL,
44
- 'syntactically-valid': syntactically_valid_1.SYNTACTICALLY_VALID
45
+ 'syntactically-valid': syntactically_valid_1.SYNTACTICALLY_VALID,
46
+ 'unclosed-connection': unclosed_connection_1.UNCLOSED_CONNECTION
45
47
  };
46
48
  //# sourceMappingURL=linter-rules.js.map
@@ -108,7 +108,7 @@ exports.FILE_PATH_VALIDITY = {
108
108
  // check if any write to the same file happens before the read, and exclude this case if so
109
109
  const writesToFile = results.write.filter(r => samePath(r.value, matchingRead.value, data.flowrConfig.solver.resolveSource?.ignoreCapitalization));
110
110
  const writesBefore = writesToFile.map(w => (0, happens_before_1.happensBefore)(cfg, w.nodeId, element.node.info.id));
111
- if (writesBefore.some(w => w === logic_1.Ternary.Always)) {
111
+ if (writesBefore.includes(logic_1.Ternary.Always)) {
112
112
  metadata.totalWritesBeforeAlways++;
113
113
  return [];
114
114
  }
@@ -87,7 +87,7 @@ exports.functionFinderUtil = {
87
87
  else if (argValues.some(v => requireValue instanceof RegExp ? requireValue.test(v) : v === requireValue)) {
88
88
  return logic_1.Ternary.Always;
89
89
  }
90
- else if (argValues.some(v => v === dependencies_query_format_1.Unknown)) {
90
+ else if (argValues.includes(dependencies_query_format_1.Unknown)) {
91
91
  return logic_1.Ternary.Maybe;
92
92
  }
93
93
  }
@@ -104,7 +104,7 @@ function fixCasing(identifier, convention, ignorePrefix) {
104
104
  if (s.length < 1) {
105
105
  return s.toUpperCase();
106
106
  }
107
- return `${s[0].toUpperCase()}${s.substring(1)}`;
107
+ return `${s[0].toUpperCase()}${s.slice(1)}`;
108
108
  };
109
109
  switch (convention) {
110
110
  case CasingConvention.CamelCase: // camelCase
@@ -19,7 +19,7 @@ export interface NetworkFunction extends MergeableRecord {
19
19
  name: Identifier;
20
20
  /**
21
21
  * The {@link FunctionInfo} to use for querying the argument whose value should match {@link onlyTriggerWithArgument}.
22
- * If this is not specified, flowR's default database of functions ({@link ReadFunctions}, {@link SourceFunctions} and {@link WriteFunctions}) is queried for appropriate information on the function's read argument.
22
+ * If this is not specified, flowR's default database of functions ({@link ReadFunctions}, {@link SourceFunctions}, and {@link WriteFunctions}) is queried for appropriate information on the function's read argument.
23
23
  */
24
24
  info?: Omit<FunctionInfo, 'name'>;
25
25
  /**
@@ -8,6 +8,7 @@ const linter_tags_1 = require("../linter-tags");
8
8
  const vertex_1 = require("../../dataflow/graph/vertex");
9
9
  const edge_1 = require("../../dataflow/graph/edge");
10
10
  const r_string_1 = require("../../r-bridge/lang-4.x/ast/model/nodes/r-string");
11
+ const graph_1 = require("../../dataflow/graph/graph");
11
12
  const defaultCredentialNamePattern = '(?:password|passwd|pwd|secret|api[_.]?key|api[_.]?token|access[_.]?token|auth[_.]?token|bearer[_.]?token|private[_.]?key|credential)';
12
13
  const defaultCredentialValuePattern = '^(?:AKIA|AIPA|ASIA|AROA)[A-Z0-9]{16}' + // AWS access key IDs (exact 20-char format)
13
14
  '|^gh[psoar]_[A-Za-z0-9_]{10,}' + // GitHub Classic/App/OAuth/Actions tokens
@@ -38,7 +39,7 @@ exports.NO_LEAKED_CREDENTIALS = {
38
39
  return [];
39
40
  }
40
41
  const nameMatches = namePattern.test(name);
41
- for (const [targetId, edge] of dfg.outgoingEdges(element.node.info.id) ?? []) {
42
+ for (const [targetId, edge] of dfg.outgoingEdges(element.node.info.id) ?? graph_1.NoEdges) {
42
43
  if (!edge_1.DfEdge.includesType(edge, edge_1.EdgeType.DefinedBy)) {
43
44
  continue;
44
45
  }
@@ -7,10 +7,10 @@ const flowr_search_builder_1 = require("../../search/flowr-search-builder");
7
7
  const linter_tags_1 = require("../linter-tags");
8
8
  const assert_1 = require("../../util/assert");
9
9
  const vertex_1 = require("../../dataflow/graph/vertex");
10
- const alias_tracking_1 = require("../../dataflow/eval/resolve/alias-tracking");
11
- const dfg_get_origin_1 = require("../../dataflow/origin/dfg-get-origin");
12
10
  const linker_1 = require("../../dataflow/internal/linker");
13
11
  const general_1 = require("../../dataflow/eval/values/general");
12
+ const resolve_helper_1 = require("../../dataflow/environments/resolve-helper");
13
+ const df_helper_1 = require("../../dataflow/graph/df-helper");
14
14
  exports.STOP_WITH_CALL_ARG = {
15
15
  createSearch: () => flowr_search_builder_1.Q.var('stop').filter(vertex_1.VertexType.FunctionCall),
16
16
  processSearchResult: async (elements, _config, data) => {
@@ -22,7 +22,7 @@ exports.STOP_WITH_CALL_ARG = {
22
22
  results: elements.getElements()
23
23
  .filter(element => {
24
24
  //only built-in functions
25
- const origins = (0, dfg_get_origin_1.getOriginInDfg)(dataflow.graph, element.node.info.id);
25
+ const origins = df_helper_1.Dataflow.origin(dataflow.graph, element.node.info.id);
26
26
  if ((0, assert_1.isNotUndefined)(origins)) {
27
27
  const builtIn = origins.every(e => e.type === 3 /* OriginType.BuiltInFunctionOrigin */);
28
28
  if (!builtIn) {
@@ -39,7 +39,7 @@ exports.STOP_WITH_CALL_ARG = {
39
39
  const mapping = (0, linker_1.pMatch)(fCall.args, stopParamMap);
40
40
  const mappedToStop = mapping.get('call.') ?? [];
41
41
  for (const argId of mappedToStop) {
42
- const res = (0, alias_tracking_1.resolveIdToValue)(argId, { graph: dataflow.graph, environment: fCall.environment, ctx: data.inspectContext() });
42
+ const res = resolve_helper_1.Resolve.toValue(argId, { graph: dataflow.graph, environment: fCall.environment, ctx: data.inspectContext() });
43
43
  const values = (0, general_1.valueSetGuard)(res);
44
44
  if (values?.type === 'set' && values.elements.length !== 0) {
45
45
  if (values.elements[0].type === 'logical') {
@@ -0,0 +1,44 @@
1
+ import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
2
+ import { Identifier } from '../../dataflow/environments/identifier';
3
+ import type { MergeableRecord } from '../../util/objects';
4
+ import type { LintingResult } from '../linter-format';
5
+ import { LintingRuleCertainty } from '../linter-format';
6
+ import { LintingRuleTag } from '../linter-tags';
7
+ import type { FlowrSearchElement } from '../../search/flowr-search';
8
+ export type UnclosedConnectionResult = LintingResult;
9
+ export interface UnclosedConnectionMetadata extends MergeableRecord {
10
+ /** the number of calls opening a connection */
11
+ totalOpened: number;
12
+ /** the number of calls closing a connection */
13
+ totalClosed: number;
14
+ }
15
+ export interface UnclosedConnectionConfig extends MergeableRecord {
16
+ /** functions opening a connection, besides the ones flowR states {@link CallProp.Opens} for */
17
+ openFns: readonly Identifier[];
18
+ /** functions closing the connection they are handed, besides the ones flowR states {@link CallProp.Closes} for */
19
+ closeFns: readonly Identifier[];
20
+ }
21
+ export declare const UNCLOSED_CONNECTION: {
22
+ readonly createSearch: () => import("../../search/flowr-search-builder").FlowrSearchBuilder<"all", ["filter"], ParentInformation, Promise<import("../../search/flowr-search").FlowrSearchElements<ParentInformation, [] | FlowrSearchElement<ParentInformation>[]>>>;
23
+ readonly processSearchResult: (elements: import("../../search/flowr-search").FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, config: UnclosedConnectionConfig, data: import("../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>) => Promise<{
24
+ results: LintingResult[];
25
+ '.meta': {
26
+ totalOpened: number;
27
+ totalClosed: number;
28
+ };
29
+ }>;
30
+ readonly prettyPrint: {
31
+ readonly query: (result: LintingResult) => string;
32
+ readonly full: (result: LintingResult) => string;
33
+ };
34
+ readonly info: {
35
+ readonly name: "Unclosed Connection";
36
+ readonly tags: readonly [LintingRuleTag.Robustness, LintingRuleTag.Smell];
37
+ readonly certainty: LintingRuleCertainty.BestEffort;
38
+ readonly description: "Flags connections that are opened but not closed on every path opening them.";
39
+ readonly defaultConfig: {
40
+ readonly openFns: readonly [];
41
+ readonly closeFns: readonly [];
42
+ };
43
+ };
44
+ };