25 Commits

Author SHA1 Message Date
Nicolò Ribaudo
4887d81929 Remove bindings of removed paths from scope 2018-02-06 23:59:12 +01:00
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
Henry Zhu
73e64c6cb0 v7.0.0-beta.39 2018-01-30 15:27:19 -05:00
Nicolò Ribaudo
252ea5a966 Fix reused nodes - part 2 (#7149) 2018-01-29 22:59:06 +01:00
Mateusz Burzyński
912bcc186d Fix reused nodes - part 1 (#7149) 2018-01-29 22:59:06 +01:00
Nicolò Ribaudo
63ae923987 Add t.cloneNode and deprecate t.clone and t.cloneDeep (#7149) 2018-01-29 22:59:06 +01:00
Henry Zhu
b5d20ab171 v7.0.0-beta.38 2018-01-17 11:31:32 -05:00
Nicolò Ribaudo
8659e1a88c Remove old expected.{js,json} files (#7187) 2018-01-09 13:10:30 -06:00
Raja Sekar
0f42accb87 Renamed files 2018-01-09 15:36:42 +01:00
Henry Zhu
7c99f4653f v7.0.0-beta.37 2018-01-08 11:02:14 -05:00
Henry Zhu
7d798952d2 v7.0.0-beta.36 2017-12-25 14:04:08 -05:00
Henry Zhu
8a4124b2ff v7.0.0-beta.35 2017-12-14 16:47:27 -05:00
Henry Zhu
a7c9264c79 v7.0.0-beta.34 2017-12-02 09:38:52 -05:00
Henry Zhu
413aa79711 v7.0.0-beta.33 2017-12-01 09:27:57 -05:00
Steven Hargrove
cee9ae48e0 [skip ci] removed shorthand usage of official babel scoped presets & plugins from README.md's (#6820) 2017-11-16 22:51:23 -05:00
Henry Zhu
4e6cd298c7 v7.0.0-beta.32 2017-11-12 08:32:53 -05:00
Logan Smyth
e7c57ae85a Move a few more references to plugin options to the top level. 2017-11-08 23:07:56 -08:00
Logan Smyth
b19b66d94b Use peerDep rather than plugin param for common APIs. 2017-11-06 11:32:47 -08:00
Henry Zhu
f76ac0b197 v7.0.0-beta.31 2017-11-03 16:03:01 -04:00
Logan Smyth
2d7685bdeb Explicitly declare devDependency to satisfy peerDep on babel-core. 2017-10-31 17:00:55 -07:00
Henry Zhu
690d6465d8 v7.0.0-beta.5 2017-10-30 16:55:46 -04:00
Henry Zhu
624f00f23c
Fix peerDep to ^ for beta only (#6644) 2017-10-30 16:24:42 -04:00
Henry Zhu
38f984f956 v7.0.0-beta.4 2017-10-30 14:33:56 -04:00
Henry Zhu
9ac326b075
remove es20xx prefixes from plugins and rename folders (#6575) 2017-10-28 20:43:15 -04:00
Henry Zhu
c41abd79a1
Rename all proposal plugins to -proposal- from -transform- (#6570) 2017-10-27 15:26:38 -04:00