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-8/

Babel Config Summary

A utility that reports which presets and plugins Babel will apply for a given project, environment, and caller metadata.

Capabilities

Resolves active config

  • With a project root containing a .babelrc that lists a base preset ./presets/basic.js followed by a plugin ./plugins/upper.js, summarizing with that working directory returns the config path and lists basic then upper in that order with absolute file locations. @test

Applies env conditions

  • Given a config that adds ./plugins/test-only.js inside env.test, summarizing with envName set to "test" includes test-only after the base entries, while using envName set to "production" omits it. @test

Passes caller metadata

  • For a config that conditionally adds ./plugins/cli-only.js based on the caller name "cli", summarizing with caller { name: "cli" } includes that plugin, and using caller { name: "api" } leaves it out. @test

Implementation

@generates

API

export interface ResolveOptions {
  cwd: string;
  envName?: string;
  caller?: {
    name: string;
    supportsStaticESM?: boolean;
    supportsDynamicImport?: boolean;
    [key: string]: unknown;
  };
  filename?: string;
}

export interface ResolvedItem {
  name: string;
  options: unknown;
  file: string;
  type: "preset" | "plugin";
}

export interface ConfigSummary {
  configPath: string | null;
  envName: string | null;
  caller?: ResolveOptions["caller"];
  presets: ResolvedItem[];
  plugins: ResolvedItem[];
}

export function summarizeBabelConfig(options: ResolveOptions): Promise<ConfigSummary>;

Dependencies { .dependencies }

@babel/core { .dependency }

Provides the compiler and configuration resolution used to expand presets and plugins.

Version

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