@eagleoutice/flowr 2.14.2 → 2.14.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.
- package/README.md +30 -42
- package/abstract-interpretation/absint-visitor.d.ts +45 -4
- package/abstract-interpretation/absint-visitor.js +252 -53
- package/config.d.ts +15 -8
- package/config.js +4 -1
- package/control-flow/semantic-cfg-guided-visitor.d.ts +7 -7
- package/control-flow/semantic-cfg-guided-visitor.js +23 -0
- package/dataflow/environments/default-builtin-config.d.ts +6 -0
- package/dataflow/environments/default-builtin-config.js +59 -5
- package/dataflow/eval/resolve/alias-tracking.d.ts +1 -1
- package/dataflow/eval/resolve/alias-tracking.js +1 -1
- package/dataflow/info.d.ts +1 -6
- package/dataflow/info.js +0 -17
- package/dataflow/internal/control-flow.d.ts +14 -2
- package/dataflow/internal/control-flow.js +24 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +10 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +9 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +7 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
- package/dataflow/internal/process/functions/call/known-call-handling.js +21 -17
- package/documentation/doc-readme.js +0 -12
- package/documentation/wiki-absint.js +7 -2
- package/documentation/wiki-interface.js +1 -0
- package/linter/rules/deprecated-functions.js +4 -2
- package/package.json +1 -1
- package/project/dependency-version-space.d.ts +1 -0
- package/project/dependency-version-space.js +1 -1
- package/project/flowr-analyzer-builder.d.ts +4 -4
- package/project/sigdb/reader.d.ts +6 -0
- package/project/sigdb/reader.js +2 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +7 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +7 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +5 -1
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +0 -5
- package/search/search-executor/search-enrichers.d.ts +4 -0
- package/search/search-executor/search-enrichers.js +4 -4
- package/util/objects.d.ts +15 -4
- package/util/version.js +1 -1
package/project/sigdb/reader.js
CHANGED
|
@@ -259,14 +259,14 @@ function sourceForPackage(sources, pkg) {
|
|
|
259
259
|
const having = sources.filter(s => s.has(pkg));
|
|
260
260
|
return having.length === 0 ? undefined : having.length === 1 ? having[0] : new MergedSignatureSource(having);
|
|
261
261
|
}
|
|
262
|
+
/** the {@link SigDatabase.fd} of a database that has no file behind it (see {@link SigDatabase.fromMemory}) */
|
|
263
|
+
const NoFile = -1;
|
|
262
264
|
/**
|
|
263
265
|
* Fast, partial reader for a single bundle. `open()`/`openSync()` load the string dictionary + `.idx`
|
|
264
266
|
* once (a single ranged read of the dictionary section, no full parse), then every query seeks straight
|
|
265
267
|
* to one package blob on demand. `open()` additionally decompresses a `.br`/`.gz` source into a
|
|
266
268
|
* hash-keyed cache and reuses it on later startups. Implements {@link PackageSignatureSource}.
|
|
267
269
|
*/
|
|
268
|
-
/** the {@link SigDatabase.fd} of a database that has no file behind it (see {@link SigDatabase.fromMemory}) */
|
|
269
|
-
const NoFile = -1;
|
|
270
270
|
class SigDatabase {
|
|
271
271
|
closed = false;
|
|
272
272
|
/** parsed blobs by blob index so repeated lookups skip the re-read + JSON.parse; FIFO-bounded to cap memory */
|
|
@@ -29,6 +29,13 @@ export declare const RParameter: {
|
|
|
29
29
|
* @see {@link RParameter.is} - to check whether a node is a parameter at all
|
|
30
30
|
*/
|
|
31
31
|
readonly isDotDotDotDot: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RParameter<Info>;
|
|
32
|
+
/**
|
|
33
|
+
* Type guard for a parameter that names what it is worth when a call passes nothing for it.
|
|
34
|
+
* @see {@link RParameter.is} - to check whether a node is a parameter at all
|
|
35
|
+
*/
|
|
36
|
+
readonly isWithDefault: <Info = object>(this: void, node: RNode<Info> | undefined) => node is RParameter<Info> & {
|
|
37
|
+
defaultValue: RNode<Info>;
|
|
38
|
+
};
|
|
32
39
|
readonly getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined;
|
|
33
40
|
readonly getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId;
|
|
34
41
|
readonly stableId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => string | undefined;
|
|
@@ -23,6 +23,13 @@ exports.RParameter = {
|
|
|
23
23
|
*/
|
|
24
24
|
isDotDotDotDot(node) {
|
|
25
25
|
return exports.RParameter.is(node) && node.special;
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Type guard for a parameter that names what it is worth when a call passes nothing for it.
|
|
29
|
+
* @see {@link RParameter.is} - to check whether a node is a parameter at all
|
|
30
|
+
*/
|
|
31
|
+
isWithDefault(node) {
|
|
32
|
+
return exports.RParameter.is(node) && node.defaultValue !== undefined;
|
|
26
33
|
}
|
|
27
34
|
};
|
|
28
35
|
//# sourceMappingURL=r-parameter.js.map
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { AstIdMap } from './decorate';
|
|
2
2
|
import type { DataflowGraph } from '../../../../../dataflow/graph/graph';
|
|
3
3
|
import type { BuiltInProcName } from '../../../../../dataflow/environments/built-in-proc-name';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The type of the id assigned to each node. Branded to avoid problematic usages with other string or numeric types.
|
|
6
|
+
* The default ids are numeric, but we use a branded type to avoid confusion with other numeric types.
|
|
7
|
+
* Custom ids or scoped ids can be strings, but they will be normalized to numbers if they are numeric strings.
|
|
8
|
+
*/
|
|
5
9
|
export type NodeId<T extends string | number = string | number> = T & {
|
|
6
10
|
__brand?: 'node-id';
|
|
7
11
|
};
|
|
@@ -6,11 +6,6 @@ exports.recoverContent = recoverContent;
|
|
|
6
6
|
const vertex_1 = require("../../../../../dataflow/graph/vertex");
|
|
7
7
|
const retriever_1 = require("../../../../retriever");
|
|
8
8
|
const identifier_1 = require("../../../../../dataflow/environments/identifier");
|
|
9
|
-
/**
|
|
10
|
-
* The type of the id assigned to each node. Branded to avoid problematic usages with other string or numeric types.
|
|
11
|
-
* The default ids are numeric, but we use a branded type to avoid confusion with other numeric types.
|
|
12
|
-
* Custom ids or scoped ids can be strings, but they will be normalized to numbers if they are numeric strings.
|
|
13
|
-
*/
|
|
14
9
|
/** whether the id starts as a number does, which `+id` alone does not tell: it turns a blank string into `0` */
|
|
15
10
|
function startsNumeric(id) {
|
|
16
11
|
const c = id.charCodeAt(0);
|
|
@@ -113,6 +113,10 @@ export interface QueryDataSearchContent extends MergeableRecord {
|
|
|
113
113
|
[QueryType in Query['type']]: Awaited<QueryResult<QueryType>>;
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* The registry of enrichments that are currently supported by the search.
|
|
118
|
+
* See {@link FlowrSearchBuilder.with} for more information on how to apply enrichments.
|
|
119
|
+
*/
|
|
116
120
|
export declare const Enrichments: {
|
|
117
121
|
readonly "call-targets": {
|
|
118
122
|
enrichSearch: (_search: FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, data: ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>, _args: {
|
|
@@ -25,10 +25,6 @@ var Enrichment;
|
|
|
25
25
|
Enrichment["Roxygen"] = "roxygen";
|
|
26
26
|
Enrichment["QueryData"] = "query-data";
|
|
27
27
|
})(Enrichment || (exports.Enrichment = Enrichment = {}));
|
|
28
|
-
/**
|
|
29
|
-
* The registry of enrichments that are currently supported by the search.
|
|
30
|
-
* See {@link FlowrSearchBuilder.with} for more information on how to apply enrichments.
|
|
31
|
-
*/
|
|
32
28
|
/** Roles a node can have without ever being executed on its own, which is why the control flow ignores them. */
|
|
33
29
|
const StructuralRoles = new Set([
|
|
34
30
|
"call-name" /* RoleInParent.FunctionCallName */, "arg-n" /* RoleInParent.ArgumentName */, "param-n" /* RoleInParent.ParameterName */
|
|
@@ -67,6 +63,10 @@ function isReachedByControlFlow(node, alive) {
|
|
|
67
63
|
}
|
|
68
64
|
return false;
|
|
69
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* The registry of enrichments that are currently supported by the search.
|
|
68
|
+
* See {@link FlowrSearchBuilder.with} for more information on how to apply enrichments.
|
|
69
|
+
*/
|
|
70
70
|
exports.Enrichments = {
|
|
71
71
|
[Enrichment.CallTargets]: {
|
|
72
72
|
enrichSearch: async (_search, data, _args, prev) => prev ?? {
|
package/util/objects.d.ts
CHANGED
|
@@ -40,11 +40,22 @@ export declare function compactRecord(record: undefined): undefined;
|
|
|
40
40
|
export declare function compactRecord<T extends Record<string, unknown>>(record: T | undefined): DefinedRecord<T> | undefined;
|
|
41
41
|
type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date | Function;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* What sits at the given path of `T`, the counterpart of {@link AutocompletablePaths}.
|
|
44
|
+
* `never` whenever the path names nothing.
|
|
45
45
|
*/
|
|
46
|
-
export type
|
|
47
|
-
|
|
46
|
+
export type ValueAtPath<T, Path extends string> = Path extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? ValueAtPath<NonNullable<T[Key]>, Rest> : never : Path extends keyof T ? T[Path] : never;
|
|
47
|
+
/**
|
|
48
|
+
* Every path into `T`, as a union of string literals, so that an editor can complete them.
|
|
49
|
+
*
|
|
50
|
+
* The paths are built from the leaves up rather than by carrying a prefix down: a prefix that grows with the
|
|
51
|
+
* recursion costs enough instantiations that TypeScript gives up and hands back `any`, which type-checks
|
|
52
|
+
* everything and completes nothing. `Depth` bounds it whatever the shape of `T`.
|
|
53
|
+
*/
|
|
54
|
+
type OneLess = [never, 0, 1, 2, 3, 4, 5, 6, 7];
|
|
55
|
+
export type AutocompletablePaths<T, Depth extends number = 6> = [
|
|
56
|
+
Depth
|
|
57
|
+
] extends [never] ? never : T extends Primitive | readonly unknown[] ? never : {
|
|
58
|
+
[K in keyof T & string]: K | (NonNullable<T[K]> extends Primitive | readonly unknown[] ? never : `${K}.${AutocompletablePaths<NonNullable<T[K]>, OneLess[Depth]> & string}`);
|
|
48
59
|
}[keyof T & string];
|
|
49
60
|
/**
|
|
50
61
|
* This is a version of a deep clone that preserves unclonable values (like functions, symbols, ...) by keeping the same reference to them.
|
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.14.
|
|
45
|
+
const version = '2.14.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
|
/**
|