@dunx/transform 2.3.1 → 2.5.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.
|
@@ -145,11 +145,15 @@ Object.defineProperty(${name}, ${DEPS_KEY}, {
|
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
// src/plugin.ts
|
|
148
|
+
var read = async (path) => {
|
|
149
|
+
const module = await import(`${path}?`, { with: { type: "text" } });
|
|
150
|
+
return module.default;
|
|
151
|
+
};
|
|
148
152
|
var depsPlugin = {
|
|
149
153
|
name: "dunx-deps",
|
|
150
154
|
setup(build) {
|
|
151
155
|
build.onLoad({ filter: /\.tsx?$/ }, async ({ path }) => {
|
|
152
|
-
const source = await
|
|
156
|
+
const source = await read(path);
|
|
153
157
|
const loader = path.endsWith(".tsx") ? "tsx" : "ts";
|
|
154
158
|
if (path.includes("/node_modules/"))
|
|
155
159
|
return { contents: source, loader };
|
|
@@ -161,6 +165,3 @@ var depsPlugin = {
|
|
|
161
165
|
};
|
|
162
166
|
|
|
163
167
|
export { applyEdits, transform, depsPlugin };
|
|
164
|
-
|
|
165
|
-
//# debugId=F0BBD6F24C3F42BE64756E2164756E21
|
|
166
|
-
//# sourceMappingURL=chunk-zz09k8xj.js.map
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,9 @@ import {
|
|
|
3
3
|
applyEdits,
|
|
4
4
|
depsPlugin,
|
|
5
5
|
transform
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-41at0m5d.js";
|
|
7
7
|
export {
|
|
8
8
|
applyEdits,
|
|
9
9
|
depsPlugin,
|
|
10
10
|
transform
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
//# debugId=65A4CA6728FEECA064756E2164756E21
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
package/dist/preload.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
depsPlugin
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-41at0m5d.js";
|
|
5
5
|
|
|
6
6
|
// src/preload.ts
|
|
7
7
|
var {plugin } = globalThis.Bun;
|
|
8
8
|
await plugin(depsPlugin);
|
|
9
|
-
|
|
10
|
-
//# debugId=3E4DE15278F056A464756E2164756E21
|
|
11
|
-
//# sourceMappingURL=preload.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dunx/transform",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Load-time transform that records constructor dependencies for the dunx container",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
|
-
"bun": ">=1.
|
|
63
|
+
"bun": ">=1.4.0"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/edits.ts", "../src/deps.ts", "../src/ast.ts", "../src/erased.ts", "../src/plugin.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"export interface Edit {\n readonly start: number;\n readonly end: number;\n readonly text: string;\n}\n\n/**\n * Splices edits into the original text rather than reprinting the AST, so\n * everything untouched keeps its exact bytes - comments, formatting, and the\n * line numbers stack traces point at.\n */\nexport const applyEdits = (source: string, edits: readonly Edit[]): string => {\n const sorted = [...edits].sort(\n (left, right) => left.start - right.start || left.end - right.end,\n );\n\n let out = '';\n let cursor = 0;\n\n for (const edit of sorted) {\n if (edit.start < cursor) {\n throw new Error(\n `Overlapping edit at ${edit.start}..${edit.end}; the previous edit ended ` +\n `at ${cursor}.`,\n );\n }\n out += source.slice(cursor, edit.start) + edit.text;\n cursor = edit.end;\n }\n\n return out + source.slice(cursor);\n};\n",
|
|
6
|
-
"import { parseSync } from 'oxc-parser';\nimport {\n isClassDeclaration,\n isIdentifier,\n isMethodDefinition,\n isParameterProperty,\n isTypeReference,\n nameOf,\n walk,\n type ClassNode,\n type Node,\n} from './ast.js';\nimport { applyEdits, type Edit } from './edits.js';\nimport {\n collectTypeOnlyNames,\n erasedNames,\n type ErasureCause,\n} from './erased.js';\n\n/**\n * `Symbol.for`, not `Symbol`: two copies of `@dunx/core` in one dependency tree\n * still agree on the key. Same technique as module and route markers.\n */\nconst DEPS_KEY = \"Symbol.for('dunx.deps')\";\n\nexport interface TransformResult {\n readonly code: string;\n readonly changed: boolean;\n /** Classes that received dependency metadata, in source order. */\n readonly annotated: readonly string[];\n}\n\nconst slice = (source: string, node: Node): string =>\n source.slice(node.start, node.end);\n\nconst constructorParams = (klass: ClassNode): readonly Node[] => {\n const found = klass.body.body.find(\n (member) =>\n isMethodDefinition(member) && nameOf(member.key) === 'constructor',\n );\n return isMethodDefinition(found) ? found.value.params : [];\n};\n\n/** The declared type of a parameter, unwrapping `private readonly x: X`. */\nconst annotationOf = (param: Node): Node | undefined => {\n const inner = isParameterProperty(param) ? param.parameter : param;\n if (!isIdentifier(inner)) return undefined;\n return inner.typeAnnotation?.typeAnnotation;\n};\n\n/**\n * One entry per constructor parameter. A parameter whose type names something\n * that exists at runtime becomes that expression; anything else becomes an\n * `unresolved` descriptor so the container can name it precisely at boot instead\n * of constructing a broken object.\n */\nconst entryFor = (\n source: string,\n param: Node,\n erased: ReadonlyMap<string, ErasureCause>,\n): string => {\n const text = JSON.stringify(slice(source, param));\n const unresolved = `{ unresolved: ${text} }`;\n const annotation = annotationOf(param);\n\n if (!annotation || !isTypeReference(annotation)) return unresolved;\n\n const token = slice(source, annotation.typeName);\n // A qualified name (`ns.Thing`) is a runtime value; a bare erased name is not.\n const cause = erased.get(token);\n if (cause === undefined) return token;\n\n // The annotation reads the same whether the name was imported with\n // `import type` or declared as an interface, so the one case with a one-line\n // fix carries the identifier for the boot error to name.\n return cause === 'import-type'\n ? `{ unresolved: ${text}, typeOnly: ${JSON.stringify(token)} }`\n : unresolved;\n};\n\n/**\n * Records each class's constructor dependencies, and each decorated field's\n * declared type, as thunks on the class itself.\n *\n * A thunk, not a literal: the body is evaluated when the record is read rather\n * than when the module is defined, so a dependency declared later in the file -\n * or in a circular import - is not a temporal-dead-zone crash. That is what\n * removes the need for a `forwardRef` escape hatch, and it is also why a class decorator\n * cannot read the field record while it runs: the statement is appended after the\n * class, which is after decoration.\n */\nexport const transform = (\n source: string,\n filename = 'input.ts',\n): TransformResult => {\n const parsed = parseSync(filename, source);\n\n if (parsed.errors.length > 0) {\n const detail = parsed.errors\n .slice(0, 3)\n .map((error) => error.message)\n .join('; ');\n throw new Error(`${filename}: could not parse - ${detail}`);\n }\n\n const program = parsed.program;\n const typeOnly = collectTypeOnlyNames(program);\n const edits: Edit[] = [];\n const annotated: string[] = [];\n\n walk(program, (node) => {\n if (!isClassDeclaration(node)) return;\n\n const name = node.id?.name;\n if (name === undefined) return;\n\n const erased = erasedNames(typeOnly, node);\n const params = constructorParams(node);\n\n if (params.length > 0) {\n const entries = params.map((param) => entryFor(source, param, erased));\n annotated.push(name);\n edits.push({\n start: node.end,\n end: node.end,\n text:\n `\\nObject.defineProperty(${name}, ${DEPS_KEY}, {\\n` +\n ` value: () => [${entries.join(', ')}],\\n});`,\n });\n }\n });\n\n const code = applyEdits(source, edits);\n return { code, changed: code !== source, annotated };\n};\n",
|
|
7
|
-
"/**\n * Minimal structural views over oxc's ESTree output - only the node shapes the\n * dependency transform reads. Verified against real `oxc-parser` output.\n */\nexport interface Node {\n readonly type: string;\n readonly start: number;\n readonly end: number;\n}\n\nexport interface Identifier extends Node {\n readonly type: 'Identifier';\n readonly name: string;\n readonly typeAnnotation?: TSTypeAnnotation | null;\n}\n\nexport interface ClassBody extends Node {\n readonly type: 'ClassBody';\n readonly body: readonly Node[];\n}\n\n/** `ClassDeclaration` and `ClassExpression` share every field read here. */\nexport interface ClassNode extends Node {\n readonly id: Identifier | null;\n readonly typeParameters: Node | null;\n readonly body: ClassBody;\n}\n\nexport interface FunctionExpression extends Node {\n readonly params: readonly Node[];\n}\n\nexport interface MethodDefinition extends Node {\n readonly type: 'MethodDefinition';\n readonly key: Node;\n readonly value: FunctionExpression;\n}\n\nexport interface TSParameterProperty extends Node {\n readonly type: 'TSParameterProperty';\n readonly parameter: Node;\n}\n\nexport interface TSTypeAnnotation extends Node {\n readonly type: 'TSTypeAnnotation';\n readonly typeAnnotation: Node;\n}\n\nexport interface TSTypeReference extends Node {\n readonly type: 'TSTypeReference';\n readonly typeName: Node;\n}\n\nexport interface ImportDeclaration extends Node {\n readonly type: 'ImportDeclaration';\n readonly specifiers: readonly Node[];\n readonly importKind: 'value' | 'type';\n}\n\nexport interface ImportSpecifier extends Node {\n readonly type: 'ImportSpecifier';\n readonly local: Identifier;\n readonly importKind: 'value' | 'type';\n}\n\nconst guard =\n <T extends Node>(type: T['type']) =>\n (node: Node | null | undefined): node is T =>\n node?.type === type;\n\nexport const isIdentifier = guard<Identifier>('Identifier');\nexport const isMethodDefinition = guard<MethodDefinition>('MethodDefinition');\nexport const isTypeReference = guard<TSTypeReference>('TSTypeReference');\nexport const isImportDeclaration =\n guard<ImportDeclaration>('ImportDeclaration');\nexport const isImportSpecifier = guard<ImportSpecifier>('ImportSpecifier');\nexport const isParameterProperty = guard<TSParameterProperty>(\n 'TSParameterProperty',\n);\n\n/**\n * Declarations only. A `ClassExpression`'s own name is bound inside the class\n * body, not outside it, so a statement appended after `const X = class Foo {}`\n * could not reference `Foo` - it would be a ReferenceError at load.\n */\nexport const isClassDeclaration = (node: Node): node is ClassNode =>\n node.type === 'ClassDeclaration';\n\n/**\n * Depth-first over every object in the tree. oxc's ESTree output is a plain\n * object graph with no parent links, so recursing every own value is safe and\n * needs no visitor-key table.\n */\nexport const walk = (root: unknown, visit: (node: Node) => void): void => {\n if (Array.isArray(root)) {\n for (const child of root) walk(child, visit);\n return;\n }\n if (root === null || typeof root !== 'object') return;\n\n const candidate = root as Partial<Node>;\n if (\n typeof candidate.type === 'string' &&\n typeof candidate.start === 'number' &&\n typeof candidate.end === 'number'\n ) {\n visit(root as Node);\n }\n\n for (const child of Object.values(root)) walk(child, visit);\n};\n\nexport const nameOf = (node: Node | null | undefined): string | undefined =>\n isIdentifier(node) ? node.name : undefined;\n",
|
|
8
|
-
"import {\n isImportDeclaration,\n isImportSpecifier,\n nameOf,\n walk,\n type ClassNode,\n type Node,\n} from './ast.js';\n\n/**\n * Why a name cannot be used in a value position. Kept apart because only one of\n * these has a one-line fix: an `import type` becomes a value import, whereas an\n * interface has no runtime counterpart to import at all. The boot error quotes\n * the annotation, which reads identically either way, so without this the\n * message points at a line that is already correct.\n */\nexport type ErasureCause = 'import-type' | 'declared-type';\n\n/**\n * Names that exist only in the type system, so emitting them in a value position\n * would be a `ReferenceError` at runtime. Collected per file: type-only imports,\n * inline `type` specifiers, local interfaces and type aliases.\n */\nexport const collectTypeOnlyNames = (\n program: Node,\n): ReadonlyMap<string, ErasureCause> => {\n const names = new Map<string, ErasureCause>();\n\n walk(program, (node) => {\n if (isImportDeclaration(node)) {\n for (const specifier of node.specifiers) {\n if (!isImportSpecifier(specifier)) continue;\n if (node.importKind === 'type' || specifier.importKind === 'type') {\n names.set(specifier.local.name, 'import-type');\n }\n }\n return;\n }\n\n if (\n node.type === 'TSInterfaceDeclaration' ||\n node.type === 'TSTypeAliasDeclaration'\n ) {\n const declared = (node as { id?: Node }).id;\n const name = nameOf(declared);\n if (name !== undefined) names.set(name, 'declared-type');\n }\n });\n\n return names;\n};\n\n/** A class's own type parameters are erased, so `T` is never a usable token. */\nexport const collectTypeParameters = (\n klass: ClassNode,\n): ReadonlySet<string> => {\n const names = new Set<string>();\n if (klass.typeParameters === null) return names;\n\n walk(klass.typeParameters, (node) => {\n if (node.type !== 'TSTypeParameter') return;\n const name = nameOf((node as { name?: Node }).name);\n if (name !== undefined) names.add(name);\n });\n\n return names;\n};\n\n/** Every name in this file that a value position cannot use. */\nexport const erasedNames = (\n typeOnly: ReadonlyMap<string, ErasureCause>,\n klass: ClassNode,\n): ReadonlyMap<string, ErasureCause> =>\n new Map<string, ErasureCause>([\n ...typeOnly,\n // A type parameter is erased for the same reason an interface is: there is\n // nothing to import.\n ...[...collectTypeParameters(klass)].map(\n (name) => [name, 'declared-type'] as const,\n ),\n ]);\n",
|
|
9
|
-
"import type { BunPlugin } from 'bun';\nimport { transform } from './deps.js';\n\n/**\n * Rewrites TypeScript as it is loaded so the container can read constructor\n * dependencies. Usable in three places, all the same object:\n *\n * - `bunfig.toml` -> `preload = [\"@dunx/transform/preload\"]` for `bun run`\n * - `Bun.build({ plugins: [depsPlugin] })` for a production build\n * - `Bun.plugin(depsPlugin)` from a test preload\n *\n * Dependencies are skipped: a published package was already transformed by its\n * own build, and re-parsing `node_modules` on every load is pure cost.\n */\nexport const depsPlugin: BunPlugin = {\n name: 'dunx-deps',\n setup(build) {\n // A runtime plugin's onLoad must always return a result - there is no\n // \"decline and fall through\", so untransformed files are handed back as-is.\n build.onLoad({ filter: /\\.tsx?$/ }, async ({ path }) => {\n const source = await Bun.file(path).text();\n const loader = path.endsWith('.tsx') ? 'tsx' : 'ts';\n\n if (path.includes('/node_modules/')) return { contents: source, loader };\n\n /**\n * A file with no `class` substring cannot contain a class declaration, so\n * the transform cannot change it - and parsing it is the whole cost. The\n * check is a native string scan against an `oxc-parser` pass, which is why\n * it is worth doing before deciding.\n *\n * Sound rather than heuristic: the transform only ever appends a statement\n * after a class *declaration*, and `class Foo`, `export class Foo`,\n * `export default class`, `abstract class` all contain it. Verified across\n * every tracked file in this repo - 200 class-free files, none of which the\n * transform altered. A false positive (`className` in a `.tsx`, the word in\n * a comment) just falls through to the parse, which is the current\n * behaviour.\n *\n * Measured on `examples/full` plus core and http: 117 loaded files, 29 of\n * them class-free, 8.3 ms of 33.8 ms of parse time saved. The check itself\n * costs 0.03 ms across all 117.\n */\n if (!source.includes('class')) return { contents: source, loader };\n\n return { contents: transform(source, path).code, loader };\n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,SAAS,OAAO;AAAA,QAAG,OAAO,EAAE,UAAU,QAAQ,OAAO;AAAA,MAEjE,OAAO,EAAE,UAAU,UAAU,QAAQ,IAAI,EAAE,MAAM,OAAO;AAAA,KACzD;AAAA;AAEL;",
|
|
12
|
-
"debugId": "F0BBD6F24C3F42BE64756E2164756E21",
|
|
13
|
-
"names": []
|
|
14
|
-
}
|
package/dist/index.js.map
DELETED
package/dist/preload.js.map
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/preload.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { plugin } from 'bun';\nimport { depsPlugin } from './plugin.js';\n\n// Side-effect entrypoint for `bunfig.toml`:\n// preload = [\"@dunx/transform/preload\"]\n//\n// Awaited, not fire-and-forget: registration has to finish before the entrypoint\n// is loaded, or the first modules through would miss the transform.\nawait plugin(depsPlugin);\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;AAAA;AAQA,MAAM,OAAO,UAAU;",
|
|
8
|
-
"debugId": "3E4DE15278F056A464756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|