@codegraft/core 0.1.0-beta.0

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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/dist/assert.d.ts +8 -0
  4. package/dist/assert.d.ts.map +1 -0
  5. package/dist/assert.js +11 -0
  6. package/dist/assert.js.map +1 -0
  7. package/dist/collection.d.ts +164 -0
  8. package/dist/collection.d.ts.map +1 -0
  9. package/dist/collection.js +570 -0
  10. package/dist/collection.js.map +1 -0
  11. package/dist/comment-attachment.d.ts +25 -0
  12. package/dist/comment-attachment.d.ts.map +1 -0
  13. package/dist/comment-attachment.js +94 -0
  14. package/dist/comment-attachment.js.map +1 -0
  15. package/dist/edit-collector.d.ts +31 -0
  16. package/dist/edit-collector.d.ts.map +1 -0
  17. package/dist/edit-collector.js +75 -0
  18. package/dist/edit-collector.js.map +1 -0
  19. package/dist/evaluate.d.ts +15 -0
  20. package/dist/evaluate.d.ts.map +1 -0
  21. package/dist/evaluate.js +95 -0
  22. package/dist/evaluate.js.map +1 -0
  23. package/dist/extensions.d.ts +3 -0
  24. package/dist/extensions.d.ts.map +1 -0
  25. package/dist/extensions.js +19 -0
  26. package/dist/extensions.js.map +1 -0
  27. package/dist/generated/node-types.d.ts +31 -0
  28. package/dist/generated/node-types.d.ts.map +1 -0
  29. package/dist/generated/node-types.js +5 -0
  30. package/dist/generated/node-types.js.map +1 -0
  31. package/dist/helpers.d.ts +13 -0
  32. package/dist/helpers.d.ts.map +1 -0
  33. package/dist/helpers.js +27 -0
  34. package/dist/helpers.js.map +1 -0
  35. package/dist/index.d.ts +6 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +4 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/internal.d.ts +6 -0
  40. package/dist/internal.d.ts.map +1 -0
  41. package/dist/internal.js +9 -0
  42. package/dist/internal.js.map +1 -0
  43. package/dist/parser.d.ts +30 -0
  44. package/dist/parser.d.ts.map +1 -0
  45. package/dist/parser.js +125 -0
  46. package/dist/parser.js.map +1 -0
  47. package/dist/resolver.d.ts +27 -0
  48. package/dist/resolver.d.ts.map +1 -0
  49. package/dist/resolver.js +241 -0
  50. package/dist/resolver.js.map +1 -0
  51. package/dist/rich-node.d.ts +5 -0
  52. package/dist/rich-node.d.ts.map +1 -0
  53. package/dist/rich-node.js +101 -0
  54. package/dist/rich-node.js.map +1 -0
  55. package/dist/types.d.ts +112 -0
  56. package/dist/types.d.ts.map +1 -0
  57. package/dist/types.js +2 -0
  58. package/dist/types.js.map +1 -0
  59. package/dist/zone-splitter.d.ts +12 -0
  60. package/dist/zone-splitter.d.ts.map +1 -0
  61. package/dist/zone-splitter.js +23 -0
  62. package/dist/zone-splitter.js.map +1 -0
  63. package/package.json +62 -0
  64. package/wasm/tree-sitter-tsx.wasm +0 -0
  65. package/wasm/tree-sitter-typescript.wasm +0 -0
  66. package/wasm/tree-sitter-yaml.wasm +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present Joël Charles
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @codegraft/core
2
+
3
+ Runtime engine for [Codegraft](../../README.md): the web-tree-sitter parser, the lazy
4
+ `RichNode` wrapper, comment attachment, zone splitting, the `Collection`, the scope
5
+ `Resolver`, and `createCodemodTransformer` (which runs a codemod as `magic-string` edits
6
+ with source maps). Compiled Codegraft codemods depend only on this package.
7
+
8
+ ```ts
9
+ import { Collection, createCodemodTransformer, evaluate } from '@codegraft/core'
10
+ ```
11
+
12
+ Grammars (`tree-sitter-javascript|typescript|html|css`) are **optional peer
13
+ dependencies** — install only the ones your targets use.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Internal invariant check. The plan favours assertions over defensive branches for
3
+ * unreachable states: a failed `assert` means a bug in Codegraft (or a misuse of an
4
+ * internal API), not a recoverable runtime condition. The `asserts` predicate also
5
+ * narrows types for the caller.
6
+ */
7
+ export declare function assert(condition: unknown, message: string): asserts condition;
8
+ //# sourceMappingURL=assert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAE7E"}
package/dist/assert.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Internal invariant check. The plan favours assertions over defensive branches for
3
+ * unreachable states: a failed `assert` means a bug in Codegraft (or a misuse of an
4
+ * internal API), not a recoverable runtime condition. The `asserts` predicate also
5
+ * narrows types for the caller.
6
+ */
7
+ export function assert(condition, message) {
8
+ if (!condition)
9
+ throw new Error(`[codegraft] ${message}`);
10
+ }
11
+ //# sourceMappingURL=assert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.js","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,SAAkB,EAAE,OAAe;IACxD,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,OAAO,EAAE,CAAC,CAAA;AAC3D,CAAC"}
@@ -0,0 +1,164 @@
1
+ import type { GrammarId, LazyTransformer, RichNode, ZoneSplitter } from './types.js';
2
+ import type { NodeTypeOf, NodeTypeAllOf, FieldNameOf } from './generated/node-types.js';
3
+ import { EditCollector } from './edit-collector.js';
4
+ import { type Resolver } from './resolver.js';
5
+ /** Shared per-transform state a {@link Collection} records edits into. */
6
+ interface Session {
7
+ collector: EditCollector;
8
+ /** The binding resolver for `node`'s zone (JS/TS/TSX), or `null` if unsupported. */
9
+ resolver(node: RichNode): Resolver | null;
10
+ }
11
+ /** A field predicate in `find(type, attrs)`: equals a field's text (`string`), matches it
12
+ * (`RegExp`), recurses into the field child (a nested `{ … }` of more matchers), or is an
13
+ * escape-hatch predicate over the whole node (`function`). The pseudo-key `text` matches the
14
+ * node's own text rather than a field. */
15
+ type AttrMatcher<G extends GrammarId = GrammarId> = string | RegExp | ((node: RichNode) => boolean) | AttrMatchers<G>;
16
+ /** Field-keyed matchers (the `text` pseudo-key matches the node's own text). The mapped type is a
17
+ * deferred position, so the recursion through {@link AttrMatcher} resolves rather than cycling. */
18
+ type AttrMatchers<G extends GrammarId = GrammarId> = {
19
+ [K in FieldNameOf<G> | 'text']?: AttrMatcher<G>;
20
+ };
21
+ /** A replacement text, or a function deriving it from the (single-node) Collection being edited. */
22
+ type TextArg<G extends GrammarId = GrammarId> = string | ((node: Collection<G>) => string);
23
+ /**
24
+ * A jscodeshift-style selection of CST nodes bound to one transform run. Query methods
25
+ * (`find`/`filter`/`closest`/`parent`/`children`/`first`/`at`) return new Collections; edit
26
+ * methods (`replaceWith`/`remove`/…) record magic-string edits and return `this`. Single-node
27
+ * accessors (`node`/`text`/`type`/`field`/`evaluate`) assert the collection holds exactly one
28
+ * node — the shape you get inside `forEach`, after `first()`/`at()`, or from `field()`.
29
+ *
30
+ * The grammar parameter `G` types the node-type and field-name strings (`NodeTypeOf<G>` etc.) and
31
+ * is carried through navigation. It defaults to every built-in grammar — annotate `root` (e.g.
32
+ * `(root: Collection<'tsx'>) => …`) to narrow `find`/`field` to one grammar's vocabulary.
33
+ */
34
+ export declare class Collection<G extends GrammarId = GrammarId> {
35
+ #private;
36
+ constructor(nodes: RichNode[], session: Session);
37
+ /** Descendants (not self) of node type `type` — a concrete type or a grammar supertype
38
+ * (e.g. `expression`), optionally filtered by field predicates. */
39
+ find(type: NodeTypeOf<G>, attrs?: AttrMatchers<G>): Collection<G>;
40
+ /** Comment nodes in the subtree (which `find`/`children` omit), optionally only those matching
41
+ * `pattern` — the entry point for transforms that act on directive comments themselves. */
42
+ findComments(pattern?: RegExp): Collection<G>;
43
+ filter(predicate: (node: Collection<G>) => boolean): Collection<G>;
44
+ /** Nearest ancestor (not self) of `type` — concrete or a grammar supertype — per selected node. */
45
+ closest(type: NodeTypeOf<G>): Collection<G>;
46
+ parent(): Collection<G>;
47
+ children(): Collection<G>;
48
+ /** All named siblings of each selected node (excluding itself). */
49
+ siblings(): Collection<G>;
50
+ nextSibling(): Collection<G>;
51
+ prevSibling(): Collection<G>;
52
+ /** Every ancestor of each selected node (innermost first), optionally of node type `type`. */
53
+ ancestors(type?: NodeTypeOf<G>): Collection<G>;
54
+ /** Nearest enclosing scope (ancestor-or-self): a function, block, loop, catch, or the program. */
55
+ closestScope(): Collection<G>;
56
+ first(): Collection<G>;
57
+ at(index: number): Collection<G>;
58
+ size(): number;
59
+ forEach(fn: (node: Collection<G>) => void): this;
60
+ map<T>(fn: (node: Collection<G>) => T): T[];
61
+ nodes(): RichNode[];
62
+ /** Whether every selected node is of `type` (concrete or supertype); false for an empty selection. */
63
+ isOfType(type: NodeTypeOf<G>): boolean;
64
+ /** The distinct node types in the selection. */
65
+ getTypes(): string[];
66
+ get node(): RichNode;
67
+ get text(): string;
68
+ get type(): NodeTypeAllOf<G>;
69
+ /** The field child as a (0-or-1) Collection, e.g. `node.field('condition')`. */
70
+ field(name: FieldNameOf<G>): Collection<G>;
71
+ /** Evaluate this node as a build-time expression against `context` (see core `evaluate`). */
72
+ evaluate(context: unknown): unknown;
73
+ /** Every occurrence (declaration + references) of the binding this node declares, or `null`
74
+ * when not confidently resolvable — the safe signal to skip a rename. */
75
+ references(): Collection<G> | null;
76
+ /** The declaration this reference resolves to, or `null` for a global / when uncertain. */
77
+ definition(): Collection<G> | null;
78
+ /** The declaration `name` resolves to from this node's position; `null` for a global / abstain. */
79
+ lookup(name: string): Collection<G> | null;
80
+ /** Every binding visible at this node (inner shadows outer), or `null` when abstaining. */
81
+ bindingsInScope(): Collection<G> | null;
82
+ /** Build a code string, interpolating values (a `Collection` contributes its text), validated
83
+ * against the grammar of the first selected node — a syntax error asserts rather than emitting
84
+ * malformed code. Validates as a standalone snippet, so build whole expressions or statements
85
+ * and let `append`/`prepend` add separators. The result feeds any insert/replace. */
86
+ code(strings: TemplateStringsArray, ...values: unknown[]): string;
87
+ /** Replace each selected node with `text`, or with the string a callback derives from it. */
88
+ replaceWith(text: TextArg<G>): this;
89
+ /** Overwrite a field child's text (literal or derived from its current text); no-op where the
90
+ * field is absent, mirroring `field()` returning an empty selection. */
91
+ setField(name: FieldNameOf<G>, text: string | ((current: string) => string)): this;
92
+ /**
93
+ * Remove each selected node.
94
+ * - `separator`: also drop the trailing `,` of a list element, leaving no array hole / dangling comma.
95
+ * - `wholeLines`: remove the whole lines the node spans (a full-line comment, a YAML entry), so no
96
+ * blank line is left; `collapseBlankBefore` additionally absorbs a blank-line separator directly above.
97
+ */
98
+ remove(options?: {
99
+ separator?: boolean;
100
+ wholeLines?: boolean;
101
+ collapseBlankBefore?: boolean;
102
+ }): this;
103
+ /**
104
+ * Narrow-delete: keep `keep` (a 0+-node selection within this node) and drop the wrapper
105
+ * around it — remove `[this.start, firstKept.start)` and `[lastKept.end, this.end)`. The
106
+ * kept range stays editable, so edits made to nodes inside it in the same pass still compose
107
+ * (this is what lets nested conditionals collapse in one pass). Empty `keep` removes the whole
108
+ * node.
109
+ */
110
+ unwrap(keep: Collection<G>): this;
111
+ /** Insert `text` (literal or derived per node) immediately before each selected node. */
112
+ insertBefore(text: TextArg<G>): this;
113
+ /** Insert `text` (literal or derived per node) immediately after each selected node. */
114
+ insertAfter(text: TextArg<G>): this;
115
+ /** Surround each selected node with `before`…`after`. */
116
+ wrap(before: string, after: string): this;
117
+ /** Append `text` as the last element of each container node (array/object/argument list/block):
118
+ * after the last element with the right separator, or just inside an empty container. */
119
+ append(text: string): this;
120
+ /** Prepend `text` as the first element of each container node. */
121
+ prepend(text: string): this;
122
+ /** Insert a top-level import once: a no-op if a statement importing the same module already
123
+ * exists. Placed after the last existing import, else before the first node. */
124
+ ensureImport(statement: string): this;
125
+ /** Insert `text` at the very start of the first selected node (typically the file). */
126
+ prependToFile(text: string): this;
127
+ /** Move this node's text to just before `target` (delete here, re-insert there). */
128
+ moveBefore(target: Collection<G>): this;
129
+ /** Move this node's text to just after `target`. */
130
+ moveAfter(target: Collection<G>): this;
131
+ /** Add a leading comment line above each selected node (pass the full comment, e.g. `// note`). */
132
+ addLeadingComment(text: string): this;
133
+ /** Add a trailing comment after each selected node, on the same line. */
134
+ addTrailingComment(text: string): this;
135
+ /** Remove each node's comments, keeping the node. Leading comments take the gap up to the node;
136
+ * trailing/inner comments are removed by their own range (residual whitespace is Prettier's job —
137
+ * note that a same-line trailing comment often attaches as an `inner` comment). */
138
+ removeComments(): this;
139
+ /** Rewrite each node's first leading comment with `fn(its text)`; no-op where there is none. */
140
+ mapLeadingComment(fn: (text: string) => string): this;
141
+ /** The first leading comment matching `pattern`, as a `RegExpMatchArray` (use a capture group
142
+ * to extract the expression), or `null`. Read it, then `dropDirective` to strip it. */
143
+ directive(pattern: RegExp): RegExpMatchArray | null;
144
+ /** Remove a matching leading directive comment (and the gap up to this node), keeping the node
145
+ * itself. Compose with `remove()` to drop both. */
146
+ dropDirective(pattern: RegExp): this;
147
+ /** Evaluate a string expression (e.g. a directive's captured text) against `context`. Parsed as
148
+ * TypeScript — available because a namespaced codemod ensures that grammar. */
149
+ evaluateExpression(expression: string, context: unknown): unknown;
150
+ }
151
+ /**
152
+ * Build a lazy transformer that runs an imperative `codemod(root, context)` against a target
153
+ * (a grammar or a {@link ZoneSplitter}): `init()` loads grammars once; the returned transformer
154
+ * is synchronous. The codemod receives a {@link Collection} over every zone's tree and records
155
+ * edits, which are emitted via magic-string.
156
+ *
157
+ * `namespace` opts into the scan-gate (a source not mentioning it is returned untouched,
158
+ * unparsed) and ensures the TypeScript grammar for `evaluate`'s string form.
159
+ */
160
+ export declare function createCodemodTransformer<Ctx extends Record<string, unknown> = Record<string, unknown>, G extends GrammarId = GrammarId>(target: GrammarId | ZoneSplitter, codemod: (root: Collection<G>, context: Ctx) => void, options?: {
161
+ namespace?: string;
162
+ }): LazyTransformer<Ctx>;
163
+ export {};
164
+ //# sourceMappingURL=collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,QAAQ,EAGR,YAAY,EACb,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAa,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAIlG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG7D,0EAA0E;AAC1E,UAAU,OAAO;IACf,SAAS,EAAE,aAAa,CAAA;IACxB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAA;CAC1C;AAED;;;2C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