or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

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

Deprecated Babel preset for stage 0 plugins that provides migration guidelines to explicit plugin configurations

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

To install, run

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

index.mddocs/

@babel/preset-stage-0

@babel/preset-stage-0 is a deprecated Babel preset that was used for stage 0 JavaScript language proposals. As of Babel v7.0.0-beta.55, this preset has been intentionally disabled and now serves as a migration guide, throwing an informative error with detailed instructions for transitioning to explicit plugin configurations.

Package Information

  • Package Name: @babel/preset-stage-0
  • Package Type: npm
  • Language: JavaScript
  • Installation: npm install @babel/preset-stage-0
  • Status: Deprecated (throws error when used)

Core Imports

// ES Modules
import presetStage0 from "@babel/preset-stage-0";

// CommonJS
const presetStage0 = require("@babel/preset-stage-0");

Basic Usage

Important: This preset no longer provides functional behavior. Any attempt to use it will result in an error with migration instructions.

import presetStage0 from "@babel/preset-stage-0";

// This will throw an error
const preset = presetStage0();

Migration Information

This preset previously included plugins for experimental JavaScript features across different proposal stages. The error message provides complete migration paths including:

  • Automatic migration using babel-upgrade tool
  • Manual plugin configuration examples
  • Custom preset creation guidance

Capabilities

Default Export Function

The main and only export of this package that provides migration guidance.

/**
 * Deprecated preset function that throws an error with migration instructions
 * @returns {never} Always throws an Error
 * @throws {Error} Detailed migration instructions and replacement plugin configurations
 */
export default function(): never;

Error Message Contents:

  • Explanation of stage preset removal in Babel v7.0.0-beta.55
  • Link to official blog post about the decision
  • Instructions for using babel-upgrade tool for automatic migration
  • Complete replacement plugin configuration examples
  • Custom preset creation guidance

Historical Plugin Information

This preset previously included the following plugins, now available as individual packages:

Stage 0 Plugins

  • @babel/plugin-proposal-function-bind

Stage 1 Plugins

  • @babel/plugin-proposal-export-default-from
  • @babel/plugin-proposal-logical-assignment-operators
  • @babel/plugin-proposal-optional-chaining
  • @babel/plugin-proposal-pipeline-operator
  • @babel/plugin-proposal-nullish-coalescing-operator
  • @babel/plugin-proposal-do-expressions

Stage 2 Plugins

  • @babel/plugin-proposal-decorators
  • @babel/plugin-proposal-function-sent
  • @babel/plugin-proposal-export-namespace-from
  • @babel/plugin-proposal-numeric-separator
  • @babel/plugin-proposal-throw-expressions

Stage 3 Plugins

  • @babel/plugin-syntax-dynamic-import
  • @babel/plugin-syntax-import-meta
  • @babel/plugin-proposal-class-properties
  • @babel/plugin-proposal-json-strings

Replacement Configuration

The error message includes this complete replacement configuration:

{
  "plugins": [
    "@babel/plugin-proposal-function-bind",
    "@babel/plugin-proposal-export-default-from",
    "@babel/plugin-proposal-logical-assignment-operators",
    ["@babel/plugin-proposal-optional-chaining", { "loose": false }],
    ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
    ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],
    "@babel/plugin-proposal-do-expressions",
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
    "@babel/plugin-proposal-function-sent",
    "@babel/plugin-proposal-export-namespace-from",
    "@babel/plugin-proposal-numeric-separator",
    "@babel/plugin-proposal-throw-expressions",
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    ["@babel/plugin-proposal-class-properties", { "loose": false }],
    "@babel/plugin-proposal-json-strings"
  ]
}

Migration Tools

  • Automatic Migration: Use npx babel-upgrade for automatic configuration conversion
  • Manual Migration: Replace preset usage with explicit plugin configurations
  • Custom Presets: Create your own preset combining desired plugins

Error Handling

This package will always throw an Error when its default export function is called. The error contains:

  • Detailed explanation of the deprecation
  • Links to documentation and blog posts
  • Complete migration instructions
  • Example configurations for manual migration
  • Guidance for creating custom presets