@opensip-cli/graph-typescript 0.1.11 → 0.1.12
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 +2 -2
- package/dist/__tests__/body-signature-population.test.d.ts +2 -0
- package/dist/__tests__/body-signature-population.test.d.ts.map +1 -0
- package/dist/__tests__/body-signature-population.test.js +49 -0
- package/dist/__tests__/body-signature-population.test.js.map +1 -0
- package/dist/__tests__/edge-helpers/method-target.test.js +33 -1
- package/dist/__tests__/edge-helpers/method-target.test.js.map +1 -1
- package/dist/cache-key.d.ts.map +1 -1
- package/dist/cache-key.js +0 -1
- package/dist/cache-key.js.map +1 -1
- package/dist/discover.d.ts.map +1 -1
- package/dist/discover.js +0 -1
- package/dist/discover.js.map +1 -1
- package/dist/edge-helpers/find-catalog-entry.d.ts.map +1 -1
- package/dist/edge-helpers/find-catalog-entry.js +0 -1
- package/dist/edge-helpers/find-catalog-entry.js.map +1 -1
- package/dist/edge-helpers/method-target.d.ts +10 -0
- package/dist/edge-helpers/method-target.d.ts.map +1 -1
- package/dist/edge-helpers/method-target.js +83 -3
- package/dist/edge-helpers/method-target.js.map +1 -1
- package/dist/edge-resolvers/direct-call.d.ts.map +1 -1
- package/dist/edge-resolvers/direct-call.js +0 -1
- package/dist/edge-resolvers/direct-call.js.map +1 -1
- package/dist/edge-resolvers/jsx-element.d.ts.map +1 -1
- package/dist/edge-resolvers/jsx-element.js +0 -1
- package/dist/edge-resolvers/jsx-element.js.map +1 -1
- package/dist/edge-resolvers/new-expression.d.ts.map +1 -1
- package/dist/edge-resolvers/new-expression.js +0 -1
- package/dist/edge-resolvers/new-expression.js.map +1 -1
- package/dist/edge-resolvers/polymorphic.d.ts.map +1 -1
- package/dist/edge-resolvers/polymorphic.js +0 -1
- package/dist/edge-resolvers/polymorphic.js.map +1 -1
- package/dist/edge-resolvers/property-access.d.ts.map +1 -1
- package/dist/edge-resolvers/property-access.js +0 -1
- package/dist/edge-resolvers/property-access.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/inventory-helpers/classify-visibility.d.ts.map +1 -1
- package/dist/inventory-helpers/classify-visibility.js +0 -1
- package/dist/inventory-helpers/classify-visibility.js.map +1 -1
- package/dist/inventory-helpers/enclosing-class.d.ts +3 -0
- package/dist/inventory-helpers/enclosing-class.d.ts.map +1 -0
- package/dist/inventory-helpers/enclosing-class.js +12 -0
- package/dist/inventory-helpers/enclosing-class.js.map +1 -0
- package/dist/inventory-helpers/extract-decorators.d.ts.map +1 -1
- package/dist/inventory-helpers/extract-decorators.js +0 -1
- package/dist/inventory-helpers/extract-decorators.js.map +1 -1
- package/dist/inventory-helpers/extract-params.d.ts.map +1 -1
- package/dist/inventory-helpers/extract-params.js +0 -1
- package/dist/inventory-helpers/extract-params.js.map +1 -1
- package/dist/inventory-helpers/hash-body.d.ts +1 -0
- package/dist/inventory-helpers/hash-body.d.ts.map +1 -1
- package/dist/inventory-helpers/hash-body.js +3 -9
- package/dist/inventory-helpers/hash-body.js.map +1 -1
- package/dist/inventory-helpers/infer-parent-name.d.ts +3 -0
- package/dist/inventory-helpers/infer-parent-name.d.ts.map +1 -0
- package/dist/inventory-helpers/infer-parent-name.js +14 -0
- package/dist/inventory-helpers/infer-parent-name.js.map +1 -0
- package/dist/inventory-visitors/arrow-function.d.ts +1 -1
- package/dist/inventory-visitors/arrow-function.d.ts.map +1 -1
- package/dist/inventory-visitors/arrow-function.js +2 -15
- package/dist/inventory-visitors/arrow-function.js.map +1 -1
- package/dist/inventory-visitors/class-static-init.d.ts.map +1 -1
- package/dist/inventory-visitors/class-static-init.js +1 -0
- package/dist/inventory-visitors/class-static-init.js.map +1 -1
- package/dist/inventory-visitors/constructor-declaration.d.ts +1 -1
- package/dist/inventory-visitors/constructor-declaration.d.ts.map +1 -1
- package/dist/inventory-visitors/constructor-declaration.js +3 -14
- package/dist/inventory-visitors/constructor-declaration.js.map +1 -1
- package/dist/inventory-visitors/function-declaration.d.ts.map +1 -1
- package/dist/inventory-visitors/function-declaration.js +1 -0
- package/dist/inventory-visitors/function-declaration.js.map +1 -1
- package/dist/inventory-visitors/function-expression.d.ts +1 -1
- package/dist/inventory-visitors/function-expression.d.ts.map +1 -1
- package/dist/inventory-visitors/function-expression.js +2 -16
- package/dist/inventory-visitors/function-expression.js.map +1 -1
- package/dist/inventory-visitors/getter-setter.d.ts.map +1 -1
- package/dist/inventory-visitors/getter-setter.js +3 -13
- package/dist/inventory-visitors/getter-setter.js.map +1 -1
- package/dist/inventory-visitors/method-declaration.d.ts.map +1 -1
- package/dist/inventory-visitors/method-declaration.js +3 -13
- package/dist/inventory-visitors/method-declaration.js.map +1 -1
- package/dist/inventory-visitors/module-init.d.ts.map +1 -1
- package/dist/inventory-visitors/module-init.js +1 -0
- package/dist/inventory-visitors/module-init.js.map +1 -1
- package/dist/test-file.d.ts +7 -4
- package/dist/test-file.d.ts.map +1 -1
- package/dist/test-file.js +7 -39
- package/dist/test-file.js.map +1 -1
- package/package.json +7 -7
package/dist/test-file.js
CHANGED
|
@@ -1,42 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Canonical TypeScript test-file predicate
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - walk.ts (file-walker) — stamped `inTestFile` on every occurrence
|
|
9
|
-
* during stage 1+2 descent.
|
|
10
|
-
* - index.ts (RuleHints.isTestFile) — the canonical answer wired
|
|
11
|
-
* into rule evaluation, with broader recall.
|
|
12
|
-
*
|
|
13
|
-
* The 2026-05-23 audit (M-1) flagged the divergence — at the time a
|
|
14
|
-
* third copy lived in the now-removed `inventory.ts` — three
|
|
15
|
-
* predicates at three layer altitudes drifting silently. This module
|
|
16
|
-
* is the one place to extend the rule.
|
|
17
|
-
*
|
|
18
|
-
* Anchored patterns instead of one alternation; avoids catastrophic
|
|
19
|
-
* backtracking on pathological inputs.
|
|
20
|
-
*
|
|
21
|
-
* `__fixtures__/` is included: it is test scaffolding by convention (synthetic
|
|
22
|
-
* inputs for tests, e.g. the orchestrator's `__fixtures__/multi-pkg/` mini-repo),
|
|
23
|
-
* not production code. Without this, reachability/size/cycle rules treat fixture
|
|
24
|
-
* functions as real code and over-trigger (e.g. a fixture helper with no caller
|
|
25
|
-
* reads as a `graph:orphan-subtree`). A `__fixtures__/` dir nested under
|
|
26
|
-
* `__tests__/` is already covered by the first pattern; this also catches the
|
|
27
|
-
* ones that sit beside the code under test.
|
|
2
|
+
* Canonical TypeScript test-file predicate — relocated to the shared
|
|
3
|
+
* `@opensip-cli/clone-detection` substrate (ADR-0064, D1) so graph's TS walk and yagni's
|
|
4
|
+
* TS inventory stamp `inTestFile` from ONE predicate and cannot diverge. Re-exported here
|
|
5
|
+
* (via the graph engine barrel) under the existing name so every caller — `walk.ts`
|
|
6
|
+
* (`inTestFile` stamping) and `index.ts` (`RuleHints.isTestFile`) — is unchanged and the
|
|
7
|
+
* classification is byte-identical.
|
|
28
8
|
*/
|
|
29
|
-
|
|
30
|
-
const TEST_FIXTURES_DIR_RE = /(?:^|\/)__fixtures__\//;
|
|
31
|
-
const TEST_FILE_SUFFIX_RE = /\.test\.(?:ts|tsx|js|jsx)$|_test\.(?:ts|tsx|js|jsx)$/;
|
|
32
|
-
/**
|
|
33
|
-
* Returns true if `filePathProjectRel` is a TypeScript / JS test
|
|
34
|
-
* file (or test fixture) by path convention. Path is project-relative with `/`
|
|
35
|
-
* separators (the same shape `Catalog.functions[*].filePath` carries).
|
|
36
|
-
*/
|
|
37
|
-
export function isTypescriptTestFile(filePathProjectRel) {
|
|
38
|
-
return (TEST_TESTS_DIR_RE.test(filePathProjectRel) ||
|
|
39
|
-
TEST_FIXTURES_DIR_RE.test(filePathProjectRel) ||
|
|
40
|
-
TEST_FILE_SUFFIX_RE.test(filePathProjectRel));
|
|
41
|
-
}
|
|
9
|
+
export { isTestFilePath as isTypescriptTestFile } from '@opensip-cli/graph';
|
|
42
10
|
//# sourceMappingURL=test-file.js.map
|
package/dist/test-file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-file.js","sourceRoot":"","sources":["../src/test-file.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"test-file.js","sourceRoot":"","sources":["../src/test-file.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensip-cli/graph-typescript",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "TypeScript language adapter for the opensip graph engine",
|
|
6
6
|
"keywords": [
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"typescript": "~6.0.3",
|
|
40
|
-
"@opensip-cli/
|
|
41
|
-
"@opensip-cli/
|
|
42
|
-
"@opensip-cli/
|
|
40
|
+
"@opensip-cli/graph": "0.1.12",
|
|
41
|
+
"@opensip-cli/core": "0.1.12",
|
|
42
|
+
"@opensip-cli/lang-typescript": "0.1.12"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^24.13.2",
|
|
46
46
|
"vitest": "^4.1.8",
|
|
47
|
-
"@opensip-cli/datastore": "0.1.
|
|
48
|
-
"@opensip-cli/graph-rust": "0.1.
|
|
49
|
-
"@opensip-cli/graph-python": "0.1.
|
|
47
|
+
"@opensip-cli/datastore": "0.1.12",
|
|
48
|
+
"@opensip-cli/graph-rust": "0.1.12",
|
|
49
|
+
"@opensip-cli/graph-python": "0.1.12"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsc",
|