diff options
author | 2022-02-22 15:47:11 -0800 | |
---|---|---|
committer | 2022-02-22 15:47:11 -0800 | |
commit | dfa3e19cbf1a4fefcad424b7a5a50569ce3d6864 (patch) | |
tree | 094f1617823b84956710a1a8c8a8d055e17f9a3d | |
parent | fbac824975d425dde279cd4b618aceb49c889d0d (diff) | |
download | bun-dfa3e19cbf1a4fefcad424b7a5a50569ce3d6864.tar.gz bun-dfa3e19cbf1a4fefcad424b7a5a50569ce3d6864.tar.zst bun-dfa3e19cbf1a4fefcad424b7a5a50569ce3d6864.zip |
snaspshots
42 files changed, 113 insertions, 94 deletions
diff --git a/integration/snapshots/bundled-entry-point.debug.js b/integration/snapshots/bundled-entry-point.debug.js index 512d886be..0c47403d6 100644 --- a/integration/snapshots/bundled-entry-point.debug.js +++ b/integration/snapshots/bundled-entry-point.debug.js @@ -2,8 +2,8 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var hello = null ?? "world"; - export function test() { return testDone(import.meta.url); + } + diff --git a/integration/snapshots/bundled-entry-point.hmr.debug.js b/integration/snapshots/bundled-entry-point.hmr.debug.js index d08f23138..c8d19dee5 100644 --- a/integration/snapshots/bundled-entry-point.hmr.debug.js +++ b/integration/snapshots/bundled-entry-point.hmr.debug.js @@ -15,7 +15,6 @@ Bun.activate(true); var hmr = new FastHMR(3012834585, "bundled-entry-point.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { - var hello = null ?? "world"; function test() { return testDone(import.meta.url); } diff --git a/integration/snapshots/bundled-entry-point.hmr.js b/integration/snapshots/bundled-entry-point.hmr.js index 071e573e8..b542b713e 100644 --- a/integration/snapshots/bundled-entry-point.hmr.js +++ b/integration/snapshots/bundled-entry-point.hmr.js @@ -15,7 +15,6 @@ Bun.activate(false); var hmr = new FastHMR(3012834585, "bundled-entry-point.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { - var hello = null ?? "world"; function test() { return testDone(import.meta.url); } diff --git a/integration/snapshots/bundled-entry-point.js b/integration/snapshots/bundled-entry-point.js index 512d886be..0c47403d6 100644 --- a/integration/snapshots/bundled-entry-point.js +++ b/integration/snapshots/bundled-entry-point.js @@ -2,8 +2,8 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var hello = null ?? "world"; - export function test() { return testDone(import.meta.url); + } + diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js index 783769a85..30348f9a0 100644 --- a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js +++ b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.debug.js @@ -9,4 +9,5 @@ export {_login as login}; export function test() { return testDone(import.meta.url); } -export let foo, bar; +export let foo; +export let bar; diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js index f8455b5dd..f549ad406 100644 --- a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js +++ b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.debug.js @@ -19,7 +19,8 @@ var hmr = new FastHMR(3878252498, "cjs-transform-shouldnt-have-static-imports-in function test() { return testDone(import.meta.url); } - var foo, bar; + var foo; + var bar; hmr.exportAll({ login: () => _login, test: () => test, diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js index 5b492fffc..ea8584f99 100644 --- a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js +++ b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js @@ -19,7 +19,8 @@ var hmr = new FastHMR(3878252498, "cjs-transform-shouldnt-have-static-imports-in function test() { return testDone(import.meta.url); } - var foo, bar; + var foo; + var bar; hmr.exportAll({ login: () => _login, test: () => test, diff --git a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js index 783769a85..30348f9a0 100644 --- a/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js +++ b/integration/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js @@ -9,4 +9,5 @@ export {_login as login}; export function test() { return testDone(import.meta.url); } -export let foo, bar; +export let foo; +export let bar; diff --git a/integration/snapshots/code-simplification-neql-define.debug.js b/integration/snapshots/code-simplification-neql-define.debug.js index 8c3ef20df..f9d5e8013 100644 --- a/integration/snapshots/code-simplification-neql-define.debug.js +++ b/integration/snapshots/code-simplification-neql-define.debug.js @@ -3,10 +3,9 @@ const invariant = () => { testFailed = true; }; var $$m = (arg) => { - var module = {exports: {} }, exports = module.exports; + var module = { exports: {} }, exports = module.exports; return arg(module, exports); }; -var size = 100, ttl = 3600; export var $f332019d = $$m({ "relay-runtime/lib/network/RelayQueryResponseCache.js": (module, exports) => { var RelayQueryResponseCache = function() { @@ -15,7 +14,7 @@ export var $f332019d = $$m({ !(size > 0) && invariant(false, "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + "`%s`.", size); !(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl); }; - foo({size: 100, ttl: 3600 }); + foo({ size: 100, ttl: 3600 }); }; RelayQueryResponseCache(); } diff --git a/integration/snapshots/code-simplification-neql-define.hmr.debug.js b/integration/snapshots/code-simplification-neql-define.hmr.debug.js index 8ffe01c87..9328d4bc6 100644 --- a/integration/snapshots/code-simplification-neql-define.hmr.debug.js +++ b/integration/snapshots/code-simplification-neql-define.hmr.debug.js @@ -16,10 +16,9 @@ var hmr = new FastHMR(726376257, "code-simplification-neql-define.js", FastRefre testFailed = true; }; var $$m = (arg) => { - var module = {exports: {} }, exports = module.exports; + var module = { exports: {} }, exports = module.exports; return arg(module, exports); }; - var size = 100, ttl = 3600; var $f332019d = $$m({ "relay-runtime/lib/network/RelayQueryResponseCache.js": (module, exports) => { var RelayQueryResponseCache = function() { @@ -28,7 +27,7 @@ var hmr = new FastHMR(726376257, "code-simplification-neql-define.js", FastRefre !(size > 0) && invariant(false, "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + "`%s`.", size); !(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl); }; - foo({size: 100, ttl: 3600 }); + foo({ size: 100, ttl: 3600 }); }; RelayQueryResponseCache(); } diff --git a/integration/snapshots/code-simplification-neql-define.hmr.js b/integration/snapshots/code-simplification-neql-define.hmr.js index 14e2292e5..0716ae0fb 100644 --- a/integration/snapshots/code-simplification-neql-define.hmr.js +++ b/integration/snapshots/code-simplification-neql-define.hmr.js @@ -16,10 +16,9 @@ var hmr = new FastHMR(726376257, "code-simplification-neql-define.js", FastRefre testFailed = true; }; var $$m = (arg) => { - var module = {exports: {} }, exports = module.exports; + var module = { exports: {} }, exports = module.exports; return arg(module, exports); }; - var size = 100, ttl = 3600; var $f332019d = $$m({ "relay-runtime/lib/network/RelayQueryResponseCache.js": (module, exports) => { var RelayQueryResponseCache = function() { @@ -28,7 +27,7 @@ var hmr = new FastHMR(726376257, "code-simplification-neql-define.js", FastRefre !(size > 0) && invariant(false, "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + "`%s`.", size); !(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl); }; - foo({size: 100, ttl: 3600 }); + foo({ size: 100, ttl: 3600 }); }; RelayQueryResponseCache(); } diff --git a/integration/snapshots/code-simplification-neql-define.js b/integration/snapshots/code-simplification-neql-define.js index 8c3ef20df..f9d5e8013 100644 --- a/integration/snapshots/code-simplification-neql-define.js +++ b/integration/snapshots/code-simplification-neql-define.js @@ -3,10 +3,9 @@ const invariant = () => { testFailed = true; }; var $$m = (arg) => { - var module = {exports: {} }, exports = module.exports; + var module = { exports: {} }, exports = module.exports; return arg(module, exports); }; -var size = 100, ttl = 3600; export var $f332019d = $$m({ "relay-runtime/lib/network/RelayQueryResponseCache.js": (module, exports) => { var RelayQueryResponseCache = function() { @@ -15,7 +14,7 @@ export var $f332019d = $$m({ !(size > 0) && invariant(false, "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + "`%s`.", size); !(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl); }; - foo({size: 100, ttl: 3600 }); + foo({ size: 100, ttl: 3600 }); }; RelayQueryResponseCache(); } diff --git a/integration/snapshots/custom-emotion-jsx/file.debug.jsx b/integration/snapshots/custom-emotion-jsx/file.debug.jsx index b86650863..338ef99de 100644 --- a/integration/snapshots/custom-emotion-jsx/file.debug.jsx +++ b/integration/snapshots/custom-emotion-jsx/file.debug.jsx @@ -8,7 +8,7 @@ var jsx = require(JSX).jsxDEV; import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js"; var ReactDOM = require($5b3cea55); export const Foo = () => jsx("div", { - css: {content: '"it worked!"' } + css: { content: '"it worked!"' } }, undefined, false, undefined, this); export function test() { diff --git a/integration/snapshots/custom-emotion-jsx/file.hmr.debug.jsx b/integration/snapshots/custom-emotion-jsx/file.hmr.debug.jsx index bf1477672..742d08ae4 100644 --- a/integration/snapshots/custom-emotion-jsx/file.hmr.debug.jsx +++ b/integration/snapshots/custom-emotion-jsx/file.hmr.debug.jsx @@ -21,7 +21,7 @@ Bun.activate(true); var hmr = new FastHMR(2497996991, "custom-emotion-jsx/file.jsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { var Foo = () => jsx("div", { - css: {content: '"it worked!"' } + css: { content: '"it worked!"' } }, undefined, false, undefined, this); function test() { const element = document.createElement("div"); diff --git a/integration/snapshots/custom-emotion-jsx/file.hmr.jsx b/integration/snapshots/custom-emotion-jsx/file.hmr.jsx index b68d5fe48..75913c6c7 100644 --- a/integration/snapshots/custom-emotion-jsx/file.hmr.jsx +++ b/integration/snapshots/custom-emotion-jsx/file.hmr.jsx @@ -21,7 +21,7 @@ Bun.activate(false); var hmr = new FastHMR(2497996991, "custom-emotion-jsx/file.jsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { var Foo = () => jsx("div", { - css: {content: '"it worked!"' } + css: { content: '"it worked!"' } }, undefined, false, undefined, this); function test() { const element = document.createElement("div"); diff --git a/integration/snapshots/custom-emotion-jsx/file.jsx b/integration/snapshots/custom-emotion-jsx/file.jsx index b86650863..338ef99de 100644 --- a/integration/snapshots/custom-emotion-jsx/file.jsx +++ b/integration/snapshots/custom-emotion-jsx/file.jsx @@ -8,7 +8,7 @@ var jsx = require(JSX).jsxDEV; import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js"; var ReactDOM = require($5b3cea55); export const Foo = () => jsx("div", { - css: {content: '"it worked!"' } + css: { content: '"it worked!"' } }, undefined, false, undefined, this); export function test() { diff --git a/integration/snapshots/forbid-in-is-correct.debug.js b/integration/snapshots/forbid-in-is-correct.debug.js index 2d36946ea..90fbeaef4 100644 --- a/integration/snapshots/forbid-in-is-correct.debug.js +++ b/integration/snapshots/forbid-in-is-correct.debug.js @@ -1,5 +1,5 @@ var foo = () => { - var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports); + var D = (i, r) => () => (r || i((r = { exports: {} }).exports, r), r.exports); return D; }; export function test() { diff --git a/integration/snapshots/forbid-in-is-correct.hmr.debug.js b/integration/snapshots/forbid-in-is-correct.hmr.debug.js index d7dd7a5bb..66d57db56 100644 --- a/integration/snapshots/forbid-in-is-correct.hmr.debug.js +++ b/integration/snapshots/forbid-in-is-correct.hmr.debug.js @@ -12,7 +12,7 @@ Bun.activate(true); var hmr = new FastHMR(346837007, "forbid-in-is-correct.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var foo = () => { - var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports); + var D = (i, r) => () => (r || i((r = { exports: {} }).exports, r), r.exports); return D; }; function test() { diff --git a/integration/snapshots/forbid-in-is-correct.hmr.js b/integration/snapshots/forbid-in-is-correct.hmr.js index 5101cde52..34248f66b 100644 --- a/integration/snapshots/forbid-in-is-correct.hmr.js +++ b/integration/snapshots/forbid-in-is-correct.hmr.js @@ -12,7 +12,7 @@ Bun.activate(false); var hmr = new FastHMR(346837007, "forbid-in-is-correct.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var foo = () => { - var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports); + var D = (i, r) => () => (r || i((r = { exports: {} }).exports, r), r.exports); return D; }; function test() { diff --git a/integration/snapshots/forbid-in-is-correct.js b/integration/snapshots/forbid-in-is-correct.js index 2d36946ea..90fbeaef4 100644 --- a/integration/snapshots/forbid-in-is-correct.js +++ b/integration/snapshots/forbid-in-is-correct.js @@ -1,5 +1,5 @@ var foo = () => { - var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports); + var D = (i, r) => () => (r || i((r = { exports: {} }).exports, r), r.exports); return D; }; export function test() { diff --git a/integration/snapshots/latin1-chars-in-regexp.debug.js b/integration/snapshots/latin1-chars-in-regexp.debug.js index 42217319b..f50253ead 100644 --- a/integration/snapshots/latin1-chars-in-regexp.debug.js +++ b/integration/snapshots/latin1-chars-in-regexp.debug.js @@ -1,6 +1,5 @@ -var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; -var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; -var re_btou = new RegExp([ +export var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; +export var re_btou = new RegExp([ "[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", "[\xF0-\xF7][\x80-\xBF]{3}" @@ -57,12 +56,12 @@ const newlinePreserved = `\n`; export function test() { if (!real.every((point, i) => point.every((val, j) => val === expected[i][j]))) throw new Error(`test failed -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); if (newlinePreserved.length !== 1 || newlinePreserved.charCodeAt(0) !== 10) throw new Error("Newline was not preserved"); const decoder = new TextDecoder("utf8"); if (!realLines.every((line, i) => decoder.decode(Uint8Array.from(expected[i])) === line)) throw new Error(`test failed. Lines did not match. -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); testDone(import.meta.url); } diff --git a/integration/snapshots/latin1-chars-in-regexp.hmr.debug.js b/integration/snapshots/latin1-chars-in-regexp.hmr.debug.js index 64a95f458..151dccdd0 100644 --- a/integration/snapshots/latin1-chars-in-regexp.hmr.debug.js +++ b/integration/snapshots/latin1-chars-in-regexp.hmr.debug.js @@ -12,7 +12,6 @@ Bun.activate(true); var hmr = new FastHMR(1430071586, "latin1-chars-in-regexp.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; - var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var re_btou = new RegExp([ "[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", @@ -70,24 +69,30 @@ var hmr = new FastHMR(1430071586, "latin1-chars-in-regexp.js", FastRefresh), exp function test() { if (!real.every((point, i) => point.every((val, j) => val === expected[i][j]))) throw new Error(`test failed -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); if (newlinePreserved.length !== 1 || newlinePreserved.charCodeAt(0) !== 10) throw new Error("Newline was not preserved"); const decoder = new TextDecoder("utf8"); if (!realLines.every((line, i) => decoder.decode(Uint8Array.from(expected[i])) === line)) throw new Error(`test failed. Lines did not match. -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); testDone(import.meta.url); } hmr.exportAll({ + re_utob: () => re_utob, + re_btou: () => re_btou, test: () => test }); })(); -var $$hmr_test = hmr.exports.test; +var $$hmr_re_utob = hmr.exports.re_utob, $$hmr_re_btou = hmr.exports.re_btou, $$hmr_test = hmr.exports.test; hmr._update = function(exports) { + $$hmr_re_utob = exports.re_utob; + $$hmr_re_btou = exports.re_btou; $$hmr_test = exports.test; }; export { + $$hmr_re_utob as re_utob, + $$hmr_re_btou as re_btou, $$hmr_test as test }; diff --git a/integration/snapshots/latin1-chars-in-regexp.hmr.js b/integration/snapshots/latin1-chars-in-regexp.hmr.js index f92b8f153..3f7d8284e 100644 --- a/integration/snapshots/latin1-chars-in-regexp.hmr.js +++ b/integration/snapshots/latin1-chars-in-regexp.hmr.js @@ -12,7 +12,6 @@ Bun.activate(false); var hmr = new FastHMR(1430071586, "latin1-chars-in-regexp.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; - var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var re_btou = new RegExp([ "[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", @@ -70,24 +69,30 @@ var hmr = new FastHMR(1430071586, "latin1-chars-in-regexp.js", FastRefresh), exp function test() { if (!real.every((point, i) => point.every((val, j) => val === expected[i][j]))) throw new Error(`test failed -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); if (newlinePreserved.length !== 1 || newlinePreserved.charCodeAt(0) !== 10) throw new Error("Newline was not preserved"); const decoder = new TextDecoder("utf8"); if (!realLines.every((line, i) => decoder.decode(Uint8Array.from(expected[i])) === line)) throw new Error(`test failed. Lines did not match. -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); testDone(import.meta.url); } hmr.exportAll({ + re_utob: () => re_utob, + re_btou: () => re_btou, test: () => test }); })(); -var $$hmr_test = hmr.exports.test; +var $$hmr_re_utob = hmr.exports.re_utob, $$hmr_re_btou = hmr.exports.re_btou, $$hmr_test = hmr.exports.test; hmr._update = function(exports) { + $$hmr_re_utob = exports.re_utob; + $$hmr_re_btou = exports.re_btou; $$hmr_test = exports.test; }; export { + $$hmr_re_utob as re_utob, + $$hmr_re_btou as re_btou, $$hmr_test as test }; diff --git a/integration/snapshots/latin1-chars-in-regexp.js b/integration/snapshots/latin1-chars-in-regexp.js index 42217319b..f50253ead 100644 --- a/integration/snapshots/latin1-chars-in-regexp.js +++ b/integration/snapshots/latin1-chars-in-regexp.js @@ -1,6 +1,5 @@ -var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; -var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; -var re_btou = new RegExp([ +export var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; +export var re_btou = new RegExp([ "[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", "[\xF0-\xF7][\x80-\xBF]{3}" @@ -57,12 +56,12 @@ const newlinePreserved = `\n`; export function test() { if (!real.every((point, i) => point.every((val, j) => val === expected[i][j]))) throw new Error(`test failed -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); if (newlinePreserved.length !== 1 || newlinePreserved.charCodeAt(0) !== 10) throw new Error("Newline was not preserved"); const decoder = new TextDecoder("utf8"); if (!realLines.every((line, i) => decoder.decode(Uint8Array.from(expected[i])) === line)) throw new Error(`test failed. Lines did not match. -${JSON.stringify({expected, real }, null, 2)}`); +${JSON.stringify({ expected, real }, null, 2)}`); testDone(import.meta.url); } diff --git a/integration/snapshots/multiple-var.debug.js b/integration/snapshots/multiple-var.debug.js index 1861aacf7..cb115b5fc 100644 --- a/integration/snapshots/multiple-var.debug.js +++ b/integration/snapshots/multiple-var.debug.js @@ -1,11 +1,9 @@ var foo = true; globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT = true; if (globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT) - ({ - foo - } = {foo: false }); + ({ foo } = { foo: false }); +var foo; export function test() { console.assert(foo === false, "foo should be false"); return testDone(import.meta.url); } -var foo; diff --git a/integration/snapshots/multiple-var.hmr.debug.js b/integration/snapshots/multiple-var.hmr.debug.js index 0987b9ab0..71eabc794 100644 --- a/integration/snapshots/multiple-var.hmr.debug.js +++ b/integration/snapshots/multiple-var.hmr.debug.js @@ -14,14 +14,12 @@ var hmr = new FastHMR(2883558553, "multiple-var.js", FastRefresh), exports = hmr var foo = true; globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT = true; if (globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT) - ({ - foo - } = {foo: false }); + ({ foo } = { foo: false }); + var foo; function test() { console.assert(foo === false, "foo should be false"); return testDone(import.meta.url); } - var foo; hmr.exportAll({ test: () => test }); diff --git a/integration/snapshots/multiple-var.hmr.js b/integration/snapshots/multiple-var.hmr.js index 7b717f25f..c3ca6188f 100644 --- a/integration/snapshots/multiple-var.hmr.js +++ b/integration/snapshots/multiple-var.hmr.js @@ -14,14 +14,12 @@ var hmr = new FastHMR(2883558553, "multiple-var.js", FastRefresh), exports = hmr var foo = true; globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT = true; if (globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT) - ({ - foo - } = {foo: false }); + ({ foo } = { foo: false }); + var foo; function test() { console.assert(foo === false, "foo should be false"); return testDone(import.meta.url); } - var foo; hmr.exportAll({ test: () => test }); diff --git a/integration/snapshots/multiple-var.js b/integration/snapshots/multiple-var.js index 1861aacf7..cb115b5fc 100644 --- a/integration/snapshots/multiple-var.js +++ b/integration/snapshots/multiple-var.js @@ -1,11 +1,9 @@ var foo = true; globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT = true; if (globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT) - ({ - foo - } = {foo: false }); + ({ foo } = { foo: false }); +var foo; export function test() { console.assert(foo === false, "foo should be false"); return testDone(import.meta.url); } -var foo; diff --git a/integration/snapshots/spread_with_key.debug.tsx b/integration/snapshots/spread_with_key.debug.tsx index 168a6e3ac..92d72def4 100644 --- a/integration/snapshots/spread_with_key.debug.tsx +++ b/integration/snapshots/spread_with_key.debug.tsx @@ -8,9 +8,7 @@ var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, jsxEl = require(JSXClassic).createElement; var { default: React} = require($bbcd215f); -export function SpreadWithTheKey({ - className -}) { +export function SpreadWithTheKey({ className }) { const rest = {}; return jsxEl("div", { diff --git a/integration/snapshots/spread_with_key.hmr.debug.tsx b/integration/snapshots/spread_with_key.hmr.debug.tsx index f53c751e0..91447f5eb 100644 --- a/integration/snapshots/spread_with_key.hmr.debug.tsx +++ b/integration/snapshots/spread_with_key.hmr.debug.tsx @@ -21,9 +21,7 @@ Bun.activate(true); var hmr = new FastHMR(2717584935, "spread_with_key.tsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { - function SpreadWithTheKey({ - className - }) { + function SpreadWithTheKey({ className }) { const rest = {}; return jsxEl("div", { className, diff --git a/integration/snapshots/spread_with_key.hmr.tsx b/integration/snapshots/spread_with_key.hmr.tsx index cd8fbd0e7..dcd47a173 100644 --- a/integration/snapshots/spread_with_key.hmr.tsx +++ b/integration/snapshots/spread_with_key.hmr.tsx @@ -21,9 +21,7 @@ Bun.activate(false); var hmr = new FastHMR(2717584935, "spread_with_key.tsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { - function SpreadWithTheKey({ - className - }) { + function SpreadWithTheKey({ className }) { const rest = {}; return jsxEl("div", { className, diff --git a/integration/snapshots/spread_with_key.tsx b/integration/snapshots/spread_with_key.tsx index 168a6e3ac..92d72def4 100644 --- a/integration/snapshots/spread_with_key.tsx +++ b/integration/snapshots/spread_with_key.tsx @@ -8,9 +8,7 @@ var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, jsxEl = require(JSXClassic).createElement; var { default: React} = require($bbcd215f); -export function SpreadWithTheKey({ - className -}) { +export function SpreadWithTheKey({ className }) { const rest = {}; return jsxEl("div", { diff --git a/integration/snapshots/string-escapes.debug.js b/integration/snapshots/string-escapes.debug.js index a220eab93..82dbc76e0 100644 --- a/integration/snapshots/string-escapes.debug.js +++ b/integration/snapshots/string-escapes.debug.js @@ -8,7 +8,6 @@ var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; var tab = "\t"; -var シ = "wow"; var f = ""; var f = "₇"; var obj = { @@ -319,7 +318,7 @@ const correctEncodedObj = [ 51, 125 ]; -const jsxVariants = jsx(JSXFrag, { +export const jsxVariants = jsx(JSXFrag, { children: [ '"\\r\\n": "\\r\\n", "\\n": "\\n", "\\t": "\\t", "\\f": "\\f", "\\v": "\\v", "\\u2028": "\\u2028", "\\u2029": "\\u2029", "😊": "😊", "😃": "😃", "🕵🏽♂️": "🕵🏽♂️", "㋡": "㋡", "☺": "☺", シ: "シ", "👋": "👋", f: f, "☹": "☹", "☻": "☻", children: 123,', jsx("div", { diff --git a/integration/snapshots/string-escapes.hmr.debug.js b/integration/snapshots/string-escapes.hmr.debug.js index cb2a312ab..4e14cd971 100644 --- a/integration/snapshots/string-escapes.hmr.debug.js +++ b/integration/snapshots/string-escapes.hmr.debug.js @@ -20,7 +20,6 @@ Bun.activate(true); var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var tab = "\t"; - var シ = "wow"; var f = ""; var f = "₇"; var obj = { @@ -331,7 +330,7 @@ var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = h 51, 125 ]; - const jsxVariants = jsx(JSXFrag, { + var jsxVariants = jsx(JSXFrag, { children: [ '"\\r\\n": "\\r\\n", "\\n": "\\n", "\\t": "\\t", "\\f": "\\f", "\\v": "\\v", "\\u2028": "\\u2028", "\\u2029": "\\u2029", "😊": "😊", "😃": "😃", "🕵🏽♂️": "🕵🏽♂️", "㋡": "㋡", "☺": "☺", シ: "シ", "👋": "👋", f: f, "☹": "☹", "☻": "☻", children: 123,', jsx("div", { @@ -471,17 +470,20 @@ var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = h return testDone(import.meta.url); } hmr.exportAll({ + jsxVariants: () => jsxVariants, obj: () => obj, test: () => test }); })(); -var $$hmr_obj = hmr.exports.obj, $$hmr_test = hmr.exports.test; +var $$hmr_jsxVariants = hmr.exports.jsxVariants, $$hmr_obj = hmr.exports.obj, $$hmr_test = hmr.exports.test; hmr._update = function(exports) { + $$hmr_jsxVariants = exports.jsxVariants; $$hmr_obj = exports.obj; $$hmr_test = exports.test; }; export { + $$hmr_jsxVariants as jsxVariants, $$hmr_obj as obj, $$hmr_test as test }; diff --git a/integration/snapshots/string-escapes.hmr.js b/integration/snapshots/string-escapes.hmr.js index 1ad77ecc2..5e0395b9b 100644 --- a/integration/snapshots/string-escapes.hmr.js +++ b/integration/snapshots/string-escapes.hmr.js @@ -20,7 +20,6 @@ Bun.activate(false); var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var tab = "\t"; - var シ = "wow"; var f = ""; var f = "₇"; var obj = { @@ -331,7 +330,7 @@ var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = h 51, 125 ]; - const jsxVariants = jsx(JSXFrag, { + var jsxVariants = jsx(JSXFrag, { children: [ '"\\r\\n": "\\r\\n", "\\n": "\\n", "\\t": "\\t", "\\f": "\\f", "\\v": "\\v", "\\u2028": "\\u2028", "\\u2029": "\\u2029", "😊": "😊", "😃": "😃", "🕵🏽♂️": "🕵🏽♂️", "㋡": "㋡", "☺": "☺", シ: "シ", "👋": "👋", f: f, "☹": "☹", "☻": "☻", children: 123,', jsx("div", { @@ -471,17 +470,20 @@ var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = h return testDone(import.meta.url); } hmr.exportAll({ + jsxVariants: () => jsxVariants, obj: () => obj, test: () => test }); })(); -var $$hmr_obj = hmr.exports.obj, $$hmr_test = hmr.exports.test; +var $$hmr_jsxVariants = hmr.exports.jsxVariants, $$hmr_obj = hmr.exports.obj, $$hmr_test = hmr.exports.test; hmr._update = function(exports) { + $$hmr_jsxVariants = exports.jsxVariants; $$hmr_obj = exports.obj; $$hmr_test = exports.test; }; export { + $$hmr_jsxVariants as jsxVariants, $$hmr_obj as obj, $$hmr_test as test }; diff --git a/integration/snapshots/string-escapes.js b/integration/snapshots/string-escapes.js index a220eab93..82dbc76e0 100644 --- a/integration/snapshots/string-escapes.js +++ b/integration/snapshots/string-escapes.js @@ -8,7 +8,6 @@ var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; var tab = "\t"; -var シ = "wow"; var f = ""; var f = "₇"; var obj = { @@ -319,7 +318,7 @@ const correctEncodedObj = [ 51, 125 ]; -const jsxVariants = jsx(JSXFrag, { +export const jsxVariants = jsx(JSXFrag, { children: [ '"\\r\\n": "\\r\\n", "\\n": "\\n", "\\t": "\\t", "\\f": "\\f", "\\v": "\\v", "\\u2028": "\\u2028", "\\u2029": "\\u2029", "😊": "😊", "😃": "😃", "🕵🏽♂️": "🕵🏽♂️", "㋡": "㋡", "☺": "☺", シ: "シ", "👋": "👋", f: f, "☹": "☹", "☻": "☻", children: 123,', jsx("div", { diff --git a/integration/snapshots/unicode-identifiers.debug.js b/integration/snapshots/unicode-identifiers.debug.js index 4a192c22a..6e23e2929 100644 --- a/integration/snapshots/unicode-identifiers.debug.js +++ b/integration/snapshots/unicode-identifiers.debug.js @@ -1,4 +1,11 @@ -var ε = 0.000001, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π; +var ε = 0.000001; +var ε2 = ε * ε; +var π = Math.PI; +var τ = 2 * π; +var τε = τ - ε; +var halfπ = π / 2; +var d3_radians = π / 180; +var d3_degrees = 180 / π; export {d3_radians}; export function test() { diff --git a/integration/snapshots/unicode-identifiers.hmr.debug.js b/integration/snapshots/unicode-identifiers.hmr.debug.js index f03b022a3..6db5ebc34 100644 --- a/integration/snapshots/unicode-identifiers.hmr.debug.js +++ b/integration/snapshots/unicode-identifiers.hmr.debug.js @@ -11,7 +11,14 @@ Bun.activate(true); var hmr = new FastHMR(1398361736, "unicode-identifiers.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { - var ε = 0.000001, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π; + var ε = 0.000001; + var ε2 = ε * ε; + var π = Math.PI; + var τ = 2 * π; + var τε = τ - ε; + var halfπ = π / 2; + var d3_radians = π / 180; + var d3_degrees = 180 / π; function test() { console.assert(ε === 0.000001); return testDone(import.meta.url); diff --git a/integration/snapshots/unicode-identifiers.hmr.js b/integration/snapshots/unicode-identifiers.hmr.js index a52106ea3..1dd9e8a13 100644 --- a/integration/snapshots/unicode-identifiers.hmr.js +++ b/integration/snapshots/unicode-identifiers.hmr.js @@ -11,7 +11,14 @@ Bun.activate(false); var hmr = new FastHMR(1398361736, "unicode-identifiers.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { - var ε = 0.000001, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π; + var ε = 0.000001; + var ε2 = ε * ε; + var π = Math.PI; + var τ = 2 * π; + var τε = τ - ε; + var halfπ = π / 2; + var d3_radians = π / 180; + var d3_degrees = 180 / π; function test() { console.assert(ε === 0.000001); return testDone(import.meta.url); diff --git a/integration/snapshots/unicode-identifiers.js b/integration/snapshots/unicode-identifiers.js index 4a192c22a..6e23e2929 100644 --- a/integration/snapshots/unicode-identifiers.js +++ b/integration/snapshots/unicode-identifiers.js @@ -1,4 +1,11 @@ -var ε = 0.000001, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π; +var ε = 0.000001; +var ε2 = ε * ε; +var π = Math.PI; +var τ = 2 * π; +var τε = τ - ε; +var halfπ = π / 2; +var d3_radians = π / 180; +var d3_degrees = 180 / π; export {d3_radians}; export function test() { diff --git a/integration/snippets/latin1-chars-in-regexp.js b/integration/snippets/latin1-chars-in-regexp.js index 9695b9362..e4d613f5e 100644 --- a/integration/snippets/latin1-chars-in-regexp.js +++ b/integration/snippets/latin1-chars-in-regexp.js @@ -8,9 +8,8 @@ // "g" // ); -var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; -var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; -var re_btou = new RegExp( +export var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; +export var re_btou = new RegExp( [ "[\xC0-\xDF][\x80-\xBF]", "[\xE0-\xEF][\x80-\xBF]{2}", diff --git a/integration/snippets/string-escapes.js b/integration/snippets/string-escapes.js index 0cb692211..436140939 100644 --- a/integration/snippets/string-escapes.js +++ b/integration/snippets/string-escapes.js @@ -49,7 +49,7 @@ const correctEncodedObj = [ 58, 49, 50, 51, 125, ]; -const jsxVariants = ( +export const jsxVariants = ( <> "\r\n": "\r\n", "\n": "\n", "\t": "\t", "\f": "\f", "\v": "\v", "\u2028": "\u2028", "\u2029": "\u2029", "😊": "😊", "😃": "😃", "🕵🏽♂️": "🕵🏽♂️", "㋡": |