-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(block-scoping): deconflicts blocks in switch-statement and parent… #240
base: master
Are you sure you want to change the base?
Conversation
Seems to fail in 262 tests... var probeParam, probeBlock;
let x = 'outside';
try {
throw [];
} catch ([_ = probeParam = function() { return x; }]) {
probeBlock = function() { return x; };
let x = 'inside';
}
assert.sameValue(probeParam(), 'outside');
assert.sameValue(probeBlock(), 'inside'); Checking that... |
Node:6 and node:4 don't use Fixing magic-string version at package.json level (using same version as in package-lock), resolves that issue in the node:6 and node:4. However, another testing fail appear in |
Let's keep the PR open — the change is definitely very welcome. I haven't been able to figure the test failure yet though, and it seems to happen in other PRs too like those from @luiscubal. @adrianheine maybe you would have some pointers on how to fix the failures? |
I know it's been talked about before, but Node 8 is reaching the end of Maintenance this month. Node 4 and Node 6 have been many years past EOL. I've worked on a few PRs to keep Buble going, and it's a bit depressing to have changes that work perfectly on Node 8 and above but break on Node 4. Possibly because other libraries have dropped support for Node 4? I'm a huge proponent of keeping as wide a range of compatibility, but it's something to consider, especially with the maintenance status of the project. |
@nathancahill yes, I believe now's the time to make the plunge. Before it was more of a hypothetical consideration, but now it severely affects maintainability of the project. |
Hello, I recently closed this PR because i found some one bug that not occurs in buble master In the following code class e {
run() {
if(this instanceof e) {
for(let e = 0; e < 1; e++) console.log('here');
}
}
}
new e().run(); it wrongly transpiles to class e {
run() {
if(this instanceof e) {
for(var e = 0; e < 1; e++) console.log('here');
}
}
}
new e().run(); variable Adding this test case to the PR. |
… function scope
In the following snippet, the
n
variable is declared twice, oneconst n = 12
in function body and, anotherconst n = 12
inside switch statementBuble transpiles to
n
variable is wrongly replace inconst o = n
andswitch(n)
.