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

Syntax-Only Feature Passthrough

Create a minimal compiler wrapper that accepts selected experimental language syntax without performing any transforms, returning the original code and parse artifacts for downstream tooling.

Capabilities

Parses whitelisted experimental syntax

  • When the compiler is created with an allowlist that includes pipeline operators, compiling const result = value |> double |> (x => x + 1); returns the identical code string. @test
  • Compiling code that uses a do expression while the allowlist includes do-expressions succeeds and exposes an AST object with the expected top-level type marker. @test

Blocks unlisted syntax

  • Compiling pipeline operator code without including pipeline-operator in the allowlist fails with a clear error that names the missing feature. @test

Supports per-call feature selection

  • Two compilers created with different allowlists (e.g., one with pipeline-operator, one with do-expressions) operate independently; enabling a feature in one does not make it available in the other. @test

Exposes enabled features

  • The compile result includes the list of syntax feature identifiers that were enabled for that run without duplicating entries. @test

Implementation

@generates

API

/**
 * Creates a syntax-only compiler that accepts selected experimental language features and leaves code unchanged.
 *
 * @param {string[]} features - Identifiers for syntax features to enable (e.g., "pipeline-operator", "do-expressions").
 * @returns {(source: string) => { code: string, ast: object, enabled: string[] }}
 */
export function createSyntaxOnlyCompiler(features);

Dependencies { .dependencies }

@babel/core { .dependency }

Provides parsing and code generation infrastructure. @satisfied-by

@babel/plugin-syntax-* { .dependency }

Enables parsing of experimental syntax without applying transforms. @satisfied-by

Version

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