tessl install tessl/npm-babel--preset-stage-0@7.8.0Deprecated Babel preset for stage 0 plugins that provides migration guidelines to explicit plugin configurations
Agent Success
Agent success rate when using this tile
80%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.21x
Baseline
Agent success rate without this tile
66%
Transforms an existing Babel-format AST of an ES module without reparsing the source. Rewrites logging, promotes an anonymous default export into a named handler, and returns generated code (and an optional source map) derived from the provided tree. When inserting or reusing logging helpers, default to a module specifier of "reporter" unless overridden.
const msg = "hi"; console.log(msg); export default () => msg;, the emitted code uses reporter.log(msg) instead of console.log(msg) while leaving other statements intact, adding a single default import for the reporter module when none exists. @testexport const handler = <original default export> and export default handler; while preserving the original function body. @testimport reporter from "reporter";, the transformed code reuses the existing import and still rewrites log calls without adding a second import. @testincludeSourceMap: true and filename: "example.js" plus the AST described above, returns a non-null map whose file is "example.js" and whose mappings align with the transformed output length. @test@generates
export interface TransformResult {
code: string;
map?: object | null;
}
export interface TransformOptions {
filename?: string;
reporterModule?: string;
includeSourceMap?: boolean;
}
export async function transformPreparsedModule(
ast: object,
sourceCode?: string,
options?: TransformOptions
): Promise<TransformResult>;Runs a plugin pipeline against an existing AST and emits code and source maps without reparsing the input.