CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-babel--preset-stage-0

tessl install tessl/npm-babel--preset-stage-0@7.8.0

Deprecated 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%

task.mdevals/scenario-7/

Runtime Helper Transpilation Toolkit

A small tool that compiles JavaScript code while delegating helper functions to a shared runtime library, and can emit an external helpers bundle for script-tag usage.

Capabilities

Shared helper imports for modern features

  • Transpiling an async function includes imports from a shared runtime helper library instead of inline helper definitions, and no helper bodies appear in the output. @test
  • Transpiling two separate modules that use the same feature results in identical helper import statements per file without duplicated inline helper definitions. @test

Configurable module format

  • When requesting CommonJS output, helper access uses require-based runtime imports; when requesting ESM output, helper access uses import statements. @test

External helpers bundle

  • Generating an external helpers bundle for given feature names returns a single script string that defines helpers only once and exposes them under a chosen global name. @test

Implementation

@generates

API

export type ModuleFormat = "esm" | "cjs";

export interface TranspileOptions {
  filename?: string;
  format?: ModuleFormat;
  sourceMaps?: boolean;
}

export interface TranspileResult {
  code: string;
  map?: object;
  helpers: string[];
}

export function transpileWithRuntime(source: string, options?: TranspileOptions): Promise<TranspileResult>;

export function transpileBatch(sources: Record<string, string>, options?: TranspileOptions): Promise<Record<string, TranspileResult>>;

export interface ExternalHelpersOptions {
  helpers: string[];
  globalName?: string;
  format?: "iife" | "umd";
}

export function buildExternalHelpersBundle(options: ExternalHelpersOptions): string;

Dependencies { .dependencies }

Babel compiler { .dependency }

Provides parsing, transformation, and helper management for JavaScript sources. @satisfied-by

Babel runtime helpers { .dependency }

Importable helper modules that replace inlined helper code in transpiled output. @satisfied-by

Babel runtime transform plugin { .dependency }

Plugin that rewrites helper usage to pull from the runtime helper package with configurable module formats. @satisfied-by

Babel external helper builder { .dependency }

Generates a standalone helper library string for non-module environments. @satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@babel/preset-stage-0@7.8.x
tile.json