REPL: default to preset-env that matches babel version
- Dominant language
- TypeScript
- Stars
- 777
- Forks
- 1.4k
- Avg merge
- 16h 45m
- Merged PRs (30d)
- 3
Description
Some followup to https://github.com/babel/website/pull/1415.
If I load the repl with the following (no presets enabled, babel@7.0.0-beta.38):
http://babeljs.io/repl#?babili=false&browsers=&build=&builtIns=false&code_lz=MYGwhgzhAEBCYCMCmJoG8C-Q&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=true&lineWrap=true&presets=&prettier=false&targets=&version=7.0.0-beta.38
And then click preset-env, it loads preset-env@7.0.0-beta.32.
Another example, (preset to env, babel@7.0.0-beta.38, no env version stated):
http://babeljs.io/repl#?babili=false&browsers=&build=&builtIns=false&code_lz=MYGwhgzhAEBCYCMCmJoG8C-Q&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=true&lineWrap=true&presets=env&prettier=false&targets=&version=7.0.0-beta.38
In both of these cases, I think it should load a matching preset-env version (if possible)?
Also, right now we're always writing the env version to the query string... I feel like we should support it without.
/cc: @yavorsky
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Babel website REPL entry point and inspect how the version and preset query parameters select preset-env. Compare the loaded preset-env version with the Babel version, including URLs where the env version is omitted. Done means the REPL selects a matching preset-env version when possible and supports omitting that version from the query string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100