CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 16:42:42 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/MatAtBread/nodent-transform.git
etag: W/"f90ca715b3d7c38bc8bb32e41a340a47"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=Glg4TwblzQ73DE7y2D6oRNdwZl718dv3TCPbAOkl2mRk88hhDIV1F0o8R5zRaKpumoVl0svMNU2qOfKy1JkaeDjzkGF6kcPs8liUIMrIf%2FzuUs3YfOz8DcGH7TW5sixEw630P2Ul%2Fgdw57QiSlIaRtpV3bO8t1DcBUAcOxjSABVkPLk8sW90tXgFCO869SXFsqzv8tORlLQFSquXrmBw9Vb29%2FgHJkqSU0U8LhobcByeWLURg2hiVfz7ydbxYt%2B01kDVtcXmHR0ArlHbxaFOmQ%3D%3D--w9hxJkV%2FpIeOybVV--qtSfBFpQ48JtP%2Fu%2FE%2BiDvg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.29534019.1752943361; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 16:42:41 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 16:42:41 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: AC12:10A6BA:6A33C9:851049:687BCB01
Fix for https://github.com/MatAtBread/nodent/issues/108 · MatAtBread/nodent-transform@5fa3d01 · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit 5fa3d01
committed
Fix for MatAtBread/nodent#108
This change assumes loop blocks have scope (they do in ES6), which means
it "fixes" (i.e. changes) the pre-ES6 behaviour of `const` declarations
within loops. Whilst this is "correct", it differs from the previous
behaviour and so early JS engines that previously returned "incorrect"
results will now return "correct" results: specifically `const` in a
loop is local and can be deferenced in a callback with it's loop value
rather than it's terminal value.
This change affects NodeJS versions before 6.x, Chrome until approx v48,
Safari 9 and possibly 10 (I've not verified which browser versions are
actually affected). These engine will run generate "correct" ES6 results
for loops like:
```
async function nop(x) { return x }
var resolve,p = new Promise(function(r){resolve = r}) ;
var i = 0, x = 0, s = 1 ;
while (i<5) {
const j = i+1 ;
await nop() ;
setTimeout(function(){
x += 1 ;
s *= j ; // REFERS to "j"
if (x===5) {
resolve(s) ;
}
}, 0);
i++ ;
}
return await p ;
```1 parent 3ee467c commit 5fa3d01Copy full SHA for 5fa3d01
File tree
Expand file treeCollapse file tree
2 files changed
+21
-24
lines changedFilter options
Expand file treeCollapse file tree
2 files changed
+21
-24
lines changed+20-23Lines changed: 20 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
108 |
| - | |
| 108 | + | |
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| |||
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
| 186 | + | |
186 | 187 |
| |
187 | 188 |
| |
188 | 189 |
| |
| |||
429 | 430 |
| |
430 | 431 |
| |
431 | 432 |
| |
432 |
| - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
433 | 439 |
| |
434 | 440 |
| |
435 | 441 |
| |
| |||
454 | 460 |
| |
455 | 461 |
| |
456 | 462 |
| |
457 |
| - | |
458 |
| - | |
459 |
| - | |
460 |
| - | |
461 |
| - | |
462 |
| - | |
463 |
| - | |
464 |
| - | |
465 |
| - | |
466 |
| - | |
467 |
| - | |
468 | 463 |
| |
| 464 | + | |
469 | 465 |
| |
470 | 466 |
| |
471 | 467 |
| |
| |||
1956 | 1952 |
| |
1957 | 1953 |
| |
1958 | 1954 |
| |
| 1955 | + | |
1959 | 1956 |
| |
1960 | 1957 |
| |
1961 | 1958 |
| |
| |||
1964 | 1961 |
| |
1965 | 1962 |
| |
1966 | 1963 |
| |
1967 |
| - | |
1968 |
| - | |
1969 |
| - | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
1970 | 1969 |
| |
1971 | 1970 |
| |
1972 | 1971 |
| |
| |||
2249 | 2248 |
| |
2250 | 2249 |
| |
2251 | 2250 |
| |
2252 |
| - | |
| 2251 | + | |
2253 | 2252 |
| |
2254 | 2253 |
| |
2255 | 2254 |
| |
| |||
2275 | 2274 |
| |
2276 | 2275 |
| |
2277 | 2276 |
| |
2278 |
| - | |
| 2277 | + | |
| 2278 | + | |
2279 | 2279 |
| |
2280 | 2280 |
| |
2281 | 2281 |
| |
2282 |
| - | |
| 2282 | + | |
2283 | 2283 |
| |
2284 | 2284 |
| |
2285 | 2285 |
| |
| |||
2650 | 2650 |
| |
2651 | 2651 |
| |
2652 | 2652 |
| |
2653 |
| - | |
2654 |
| - | |
2655 |
| - | |
2656 | 2653 |
| |
2657 | 2654 |
| |
2658 | 2655 |
| |
| |||
2667 | 2664 |
| |
2668 | 2665 |
| |
2669 | 2666 |
| |
2670 |
| - | |
| 2667 | + | |
2671 | 2668 |
| |
2672 | 2669 |
| |
2673 | 2670 |
| |
|
+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
|
You can’t perform that action at this time.
0 commit comments