babel / babel/website

REPL confusingly lists deprecated stage-x presets, stage-2 selected by default

Open
#2,814 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
777
Forks
1.4k
Avg merge
16h 45m
Merged PRs (30d)
3

Description

I've been confused again just now by stage-2 being selected by default. I'm wondering why is that even part of the REPL UI, given that these presets have been deprecated for five years now?

Backstory: Suppose I'm using preset-env with the default targets as recommended by the docs and want to quickly check how e.g. class properties are transpiled, so I go to https://babeljs.io/repl. I see that my class properties are transpiled, which is weird because they are not transpiled in my project. I notice the "presets" section lists some stage presets that I have never heard of, and stage-2 is enabled by default. Removing it makes the REPL work like I would expect. I wonder, maybe I should be using the stage-2 preset if it's the default in the REPL? I google it and find https://www.npmjs.com/package/@babel/preset-stage-2, which says "As of v7.0.0-beta.55, we've removed Babel's Stage presets. Please consider reading our [blog post](https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets)", and the blog post is from July 2018 and is all about why those stage-x presets shouldn't be used and are not shipped anymore. I wonder, maybe they didn't get around updating the website, but don't find any issue even talking about this, and I'm left very confused as to what is going on?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Babel REPL linked in the issue and inspect the website's REPL preset configuration. Verify which deprecated stage presets are listed and why stage-2 is enabled by default; done means the obsolete presets no longer confuse users and the default behavior matches the documented preset-env workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.