Ben Newman 22555cd15d Failing test involving object rest/spread and clearScope().
This failing test case demonstrates a regression between 7.0.0-beta.38 and
7.0.0-beta.39 in the @babel/plugin-proposal-object-rest-spread package.

I distilled this test case from a larger configuration of plugins in my
application, one of which calls api.traverse.cache.clearScope(). Although
calling clearScope() is an uncommon thing for a plugin to do, it was a
reliable way to reproduce the problem. If I can find other reliable
reproductions, I'll push some additional failing tests to this PR.
Regardless of how common it is, clearing the scope cache should be a safe
operation that only slows down the transform (because scopes have to be
recreated and re-crawled). Crashing due to a spurious duplicate
declaration seems like a bug worth fixing.

My hunch is that [these two lines](eb38ea2b10/packages/babel-plugin-proposal-object-rest-spread/src/index.js (L75-L76))
(which were changed in `7.0.0-beta.39`) are not actually removing the
original rest element as a binding from the enclosing `Scope`, in certain
circumstances, so the new variable declaration ends up colliding with the
old (removed) binding.

Possibly related: #7304 (reported by @julien-f)
2018-02-06 23:59:12 +01:00
2017-11-10 13:39:48 +01:00
2018-01-30 23:13:40 +01:00
2017-11-21 20:03:16 -05:00
2018-01-30 23:13:40 +01:00
2017-11-21 20:03:16 -05:00
2017-11-21 20:03:16 -05:00
2016-10-17 10:51:49 -04:00
2017-11-24 15:18:13 +02:00
2017-11-21 20:03:16 -05:00
2017-11-21 20:03:16 -05:00
2018-01-09 15:09:47 -05:00
2018-01-30 23:13:40 +01:00
2018-01-30 15:27:19 -05:00
2018-01-04 20:35:43 -06:00
2018-01-30 23:13:40 +01:00
2018-01-30 22:59:00 -05:00
2018-01-30 22:59:00 -05:00

babel

The compiler for writing next generation JavaScript.

Travis Status CircleCI Status Coverage Status Slack Status npm Downloads

Supporting Babel

Backers on Open Collective Sponsors on Open Collective Business Strategy Status

Babel is community-driven and thus mostly maintained by a group of volunteers. It has a lot of companies and projects using it but almost no sponsors/people funded to work on it. If you'd like to help maintain the future of the project, please consider:

Intro

Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.

In

// ES2015 arrow function
[1, 2, 3].map((n) => n + 1);

Out

[1, 2, 3].map(function(n) {
  return n + 1;
});

Try it out at our REPL.

FAQ

Who maintains Babel?

Mostly a handful of volunteers! Please check out our team page!

Looking for support?

For questions and support please visit join our Slack Community, ask a question on Stack Overflow, or ping us on Twitter.

Is there a Babel song?

I'm so glad you asked: Hallelujah —— In Praise of Babel by @angus-c. Tweet us your recordings!

Where are the docs?

Check out our website: babeljs.io, and report issues/features at babel/website.

Want to report a bug or request a feature?

Please read through our CONTRIBUTING.md and fill out the issue template at babel/issues!

Want to contribute to Babel?

Check out our CONTRIBUTING.md to get started with setting up the repo.

  • If you have already joined Slack, join our #development channel and say hi!
  • Check out the issues with the good first issue and help wanted label. We suggest also looking at the closed ones to get a sense of the kinds of issues you can tackle.
  • Our discussions/notes/roadmap: babel/notes
  • Our progress on TC39 proposals: babel/proposals

How is the repo structured?

The Babel repo is managed as a monorepo that is composed of many npm packages.

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

MIT

Description
No description provided
Readme 79 MiB
Languages
JavaScript 99.5%
Makefile 0.3%
HTML 0.1%