gitnexus 1.6.6-rc.13 → 1.6.6-rc.15
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/dist/core/ingestion/languages/javascript/arity.d.ts +11 -0
- package/dist/core/ingestion/languages/javascript/arity.js +11 -0
- package/dist/core/ingestion/languages/javascript/captures.d.ts +30 -0
- package/dist/core/ingestion/languages/javascript/captures.js +655 -0
- package/dist/core/ingestion/languages/javascript/import-target.d.ts +29 -0
- package/dist/core/ingestion/languages/javascript/import-target.js +53 -0
- package/dist/core/ingestion/languages/javascript/index.d.ts +48 -0
- package/dist/core/ingestion/languages/javascript/index.js +48 -0
- package/dist/core/ingestion/languages/javascript/interpret.d.ts +29 -0
- package/dist/core/ingestion/languages/javascript/interpret.js +41 -0
- package/dist/core/ingestion/languages/javascript/merge-bindings.d.ts +16 -0
- package/dist/core/ingestion/languages/javascript/merge-bindings.js +18 -0
- package/dist/core/ingestion/languages/javascript/query.d.ts +52 -0
- package/dist/core/ingestion/languages/javascript/query.js +413 -0
- package/dist/core/ingestion/languages/javascript/scope-resolver.d.ts +37 -0
- package/dist/core/ingestion/languages/javascript/scope-resolver.js +73 -0
- package/dist/core/ingestion/languages/javascript/simple-hooks.d.ts +32 -0
- package/dist/core/ingestion/languages/javascript/simple-hooks.js +37 -0
- package/dist/core/ingestion/languages/typescript/simple-hooks.d.ts +10 -0
- package/dist/core/ingestion/languages/typescript/simple-hooks.js +4 -1
- package/dist/core/ingestion/languages/typescript.js +15 -0
- package/dist/core/ingestion/registry-primary-flag.js +1 -0
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arity compatibility for JavaScript.
|
|
3
|
+
*
|
|
4
|
+
* Delegates to `typescriptArityCompatibility` unchanged — JavaScript
|
|
5
|
+
* supports the same arity constructs (rest parameters `...args`, default
|
|
6
|
+
* parameters `p = v`) and the metadata shape (`parameterCount`,
|
|
7
|
+
* `requiredParameterCount`, `parameterTypes`) is synthesized by the same
|
|
8
|
+
* `computeTsArityMetadata` function (which understands both TS and JS
|
|
9
|
+
* parameter node types via `extractTsJsParameters`).
|
|
10
|
+
*/
|
|
11
|
+
export { typescriptArityCompatibility as jsArityCompatibility } from '../typescript/arity.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arity compatibility for JavaScript.
|
|
3
|
+
*
|
|
4
|
+
* Delegates to `typescriptArityCompatibility` unchanged — JavaScript
|
|
5
|
+
* supports the same arity constructs (rest parameters `...args`, default
|
|
6
|
+
* parameters `p = v`) and the metadata shape (`parameterCount`,
|
|
7
|
+
* `requiredParameterCount`, `parameterTypes`) is synthesized by the same
|
|
8
|
+
* `computeTsArityMetadata` function (which understands both TS and JS
|
|
9
|
+
* parameter node types via `extractTsJsParameters`).
|
|
10
|
+
*/
|
|
11
|
+
export { typescriptArityCompatibility as jsArityCompatibility } from '../typescript/arity.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `emitScopeCaptures` for JavaScript.
|
|
3
|
+
*
|
|
4
|
+
* Adapts `emitTsScopeCaptures` for the JavaScript grammar:
|
|
5
|
+
*
|
|
6
|
+
* 1. **JS grammar** — uses `tree-sitter-javascript` instead of
|
|
7
|
+
* `tree-sitter-typescript`. The JS scope query is a subset of the
|
|
8
|
+
* TypeScript one (TypeScript-only node types dropped).
|
|
9
|
+
*
|
|
10
|
+
* 2. **CJS `require()` decomposition** — `const { X } = require('./m')`
|
|
11
|
+
* and `const X = require('./m')` are walked in a post-query pass and
|
|
12
|
+
* synthesized as `@import.kind/name/alias/source` markers so that
|
|
13
|
+
* `interpretJsImport` can recover a `ParsedImport` using the same
|
|
14
|
+
* shape as the TypeScript ESM decomposer.
|
|
15
|
+
*
|
|
16
|
+
* 3. **JSDoc type bindings** — JavaScript has no static type annotations
|
|
17
|
+
* so `@type-binding.parameter` / `@type-binding.return` must be
|
|
18
|
+
* inferred from leading JSDoc comments. A lightweight regex scanner
|
|
19
|
+
* (`parseJsDocParams` / `parseJsDocReturn`) extracts `@param {T} n`
|
|
20
|
+
* and `@returns {T}` tags and emits synthetic captures positioned on
|
|
21
|
+
* the annotated function node.
|
|
22
|
+
*
|
|
23
|
+
* 4. **Shared synthesis passes** — destructuring, for-of map-tuple, and
|
|
24
|
+
* instanceof narrowing passes are duplicated from `typescript/captures.ts`
|
|
25
|
+
* (they are pure AST operations with no grammar-specific logic).
|
|
26
|
+
*
|
|
27
|
+
* Pure given the input source text. No I/O, no globals consulted.
|
|
28
|
+
*/
|
|
29
|
+
import type { CaptureMatch } from '../../../../_shared/index.js';
|
|
30
|
+
export declare function emitJsScopeCaptures(sourceText: string, filePath: string, cachedTree?: unknown): readonly CaptureMatch[];
|