fix(block-scoping): deconflicts blocks in switch-statement and parent…#240
fix(block-scoping): deconflicts blocks in switch-statement and parent…#240vitorveiga wants to merge 4 commits into
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
nvariable is declared twice, oneconst n = 12in function body and, anotherconst n = 12inside switch statementBuble transpiles to
nvariable is wrongly replace inconst o = nandswitch(n).