question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add numeric separator to shippedProposals in preset-env

See original GitHub issue

Feature Request

<div align="center">

Numeric Separator is Stage 3 and shipped in Chrome 75/Firefox 70/Safari 13!


![](https://example.com/you-know-how-excited-i-am.gif)

</div>

This means that it should be enabled via shippedProposals: true options in @babel/preset-env 🎉

It should be done similarly to this commit: https://github.com/babel/babel/pull/8438/commits/28bbd9fb0e010e077bf1e4c3ec4fa25098ea9430

  1. Add it to packages/babel-preset-env/src/available-plugins.js
  2. Add the compat-table mapping to packages/babel-preset-env/data/plugin-features.js (you can find the correct feature name at https://kangax.github.io/compat-table/esnext/)
  3. Add it to packages/babel-preset-env/data/shipped-proposals.js
  4. Run cd packages/preset-env and yarn build-data to update the data about the supported browser versions
  5. Add it to @babel/preset-env-standalone (packages/babel-preset-env-standalone/src/available-plugins.js)
  6. Update the test as needed (you don’t need to write new tests)
  7. PR! 🎉

If it is the first time that you contribute to Babel, follow these steps: (you need to have make and yarn available on your machine)

  1. Write a comment there to let other possible contributors know that you are working on this bug.
  2. Fork the repo
  3. Run git clone https://github.com/<YOUR_USERNAME>/babel.git && cd babel
  4. Run yarn && make bootstrap
  5. Wait ⏳
  6. Run make watch (or make build whenever you change a file)
  7. Add a test if needed (only input.js; output.js will be automatically generated)
  8. Update the code!
  9. yarn jest babel-preset-env to run the tests
    • Since you don’t need to write new tests, you can run OVERWRITE=true yarn jest babel-preset-env and they will be automatically updated.
  10. If it is working, run make test to run all the tests
  11. Run git push and open a PR!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
Wetineecommented, Dec 24, 2019

I’d like to try this out, with such detailed instructions above. 😉

2reactions
JLHwungcommented, Jan 9, 2020

@Wetinee has talked to me offline a bit. She’s working on it after the holiday seasons.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/plugin-proposal-numeric-separator
NOTE**: This plugin is included in `@babel/preset-env`, ... Binary, Hex and Octal number representations to their pre-ES2015 numeric literal form, add the ...
Read more >
@babel/plugin-proposal-numeric-separator - Package Manager
Fast, reliable, and secure dependency management.
Read more >
@babel/helper-builder-react-jsx-experimental: Versions | Openbase
babel-preset-env. #10862 Add js extension to preset-env generated polyfill imports (@JLHwung) ... #10971 Add numeric separator to shippedProposals (@Wetinee).
Read more >
babel-preset-latest-node v5.5.1 - npm.io
@babel/preset-env, especially targets.node ... shippedProposals - Enable features in stages but already available in recent ... numeric-separator, no, no ...
Read more >
Could not find plugin "proposal-numeric-separator"
The following steps work: Add the following line to package.json : "resolutions": { "@babel/preset-env": "7.5.5" },.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found