diff options
Diffstat (limited to 'integration')
24 files changed, 102 insertions, 60 deletions
diff --git a/integration/snapshots/array-args-with-default-values.hmr.js b/integration/snapshots/array-args-with-default-values.hmr.js index f7b40203e..aae356eed 100644 --- a/integration/snapshots/array-args-with-default-values.hmr.js +++ b/integration/snapshots/array-args-with-default-values.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(186686614, "array-args-with-default-values.js"), exports = hmr.exports; +var hmr = new HMR(3474597122, "array-args-with-default-values.js"), exports = hmr.exports; (hmr._load = function() { var lines; const data = () => lines.map(([a = null, b = null, c = null, d = null]) => ({ diff --git a/integration/snapshots/bundled-entry-point.hmr.js b/integration/snapshots/bundled-entry-point.hmr.js index 828236c19..f3008327a 100644 --- a/integration/snapshots/bundled-entry-point.hmr.js +++ b/integration/snapshots/bundled-entry-point.hmr.js @@ -7,10 +7,10 @@ __HMRModule as HMR import { __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; Bun.activate(false); -var hmr = new HMR(2355916096, "bundled-entry-point.js"), exports = hmr.exports; +var hmr = new HMR(3012834585, "bundled-entry-point.js"), exports = hmr.exports; (hmr._load = function() { var hello = null ?? "world"; function test() { diff --git a/integration/snapshots/bundled-entry-point.js b/integration/snapshots/bundled-entry-point.js index e7816245b..04f92d63a 100644 --- a/integration/snapshots/bundled-entry-point.js +++ b/integration/snapshots/bundled-entry-point.js @@ -1,7 +1,7 @@ import { __require as require } from "http://localhost:8080/__runtime.js"; -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; var hello = null ?? "world"; export function test() { diff --git a/integration/snapshots/code-simplification-neql-define.hmr.js b/integration/snapshots/code-simplification-neql-define.hmr.js index 7a1c66be5..1e517c533 100644 --- a/integration/snapshots/code-simplification-neql-define.hmr.js +++ b/integration/snapshots/code-simplification-neql-define.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(1142302163, "code-simplification-neql-define.js"), exports = hmr.exports; +var hmr = new HMR(726376257, "code-simplification-neql-define.js"), exports = hmr.exports; (hmr._load = function() { var testFailed = false; const invariant = () => { diff --git a/integration/snapshots/export.hmr.js b/integration/snapshots/export.hmr.js index 04821c18e..6088ffd77 100644 --- a/integration/snapshots/export.hmr.js +++ b/integration/snapshots/export.hmr.js @@ -8,7 +8,7 @@ import what from "http://localhost:8080/_auth.js"; import * as where from "http://localhost:8080/_auth.js"; Bun.activate(false); -var hmr = new HMR(4033101122, "export.js"), exports = hmr.exports; +var hmr = new HMR(1879780259, "export.js"), exports = hmr.exports; (hmr._load = function() { var yoyoyo = "yoyoyo"; function hey() { diff --git a/integration/snapshots/forbid-in-is-correct.hmr.js b/integration/snapshots/forbid-in-is-correct.hmr.js index 979a6be64..bd20b7b42 100644 --- a/integration/snapshots/forbid-in-is-correct.hmr.js +++ b/integration/snapshots/forbid-in-is-correct.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(2952402969, "forbid-in-is-correct.js"), exports = hmr.exports; +var hmr = new HMR(346837007, "forbid-in-is-correct.js"), exports = hmr.exports; (hmr._load = function() { var foo = () => { var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports); diff --git a/integration/snapshots/global-is-remapped-to-globalThis.hmr.js b/integration/snapshots/global-is-remapped-to-globalThis.hmr.js index aa9e9d8b5..a5a3723a6 100644 --- a/integration/snapshots/global-is-remapped-to-globalThis.hmr.js +++ b/integration/snapshots/global-is-remapped-to-globalThis.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(2277846108, "global-is-remapped-to-globalThis.js"), exports = hmr.exports; +var hmr = new HMR(713665787, "global-is-remapped-to-globalThis.js"), exports = hmr.exports; (hmr._load = function() { function test() { console.assert(globalThis === globalThis); diff --git a/integration/snapshots/lodash-regexp.hmr.js b/integration/snapshots/lodash-regexp.hmr.js index 768ad9b0d..cd9ca40f7 100644 --- a/integration/snapshots/lodash-regexp.hmr.js +++ b/integration/snapshots/lodash-regexp.hmr.js @@ -7,11 +7,11 @@ __HMRModule as HMR import { __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; -import * as $cbd4e379 from "http://localhost:8080/node_modules/lodash/lodash.js"; -var { shuffle} = require($cbd4e379); +import * as $60f52dc2 from "http://localhost:8080/node_modules/lodash/lodash.js"; +var { shuffle} = require($60f52dc2); Bun.activate(false); -var hmr = new HMR(1678450382, "lodash-regexp.js"), exports = hmr.exports; +var hmr = new HMR(2158065009, "lodash-regexp.js"), exports = hmr.exports; (hmr._load = function() { function test() { const foo = [1, 2, 3, 4, 6]; diff --git a/integration/snapshots/lodash-regexp.js b/integration/snapshots/lodash-regexp.js index 30dcab4e5..6e0e6190a 100644 --- a/integration/snapshots/lodash-regexp.js +++ b/integration/snapshots/lodash-regexp.js @@ -1,8 +1,8 @@ import { __require as require } from "http://localhost:8080/__runtime.js"; -import * as $cbd4e379 from "http://localhost:8080/node_modules/lodash/lodash.js"; -var { shuffle} = require($cbd4e379); +import * as $60f52dc2 from "http://localhost:8080/node_modules/lodash/lodash.js"; +var { shuffle} = require($60f52dc2); export function test() { const foo = [1, 2, 3, 4, 6]; diff --git a/integration/snapshots/multiple-imports.hmr.js b/integration/snapshots/multiple-imports.hmr.js index df44a70df..022f3e666 100644 --- a/integration/snapshots/multiple-imports.hmr.js +++ b/integration/snapshots/multiple-imports.hmr.js @@ -8,15 +8,15 @@ import { __HMRModule as HMR } from "http://localhost:8080/__runtime.js"; import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($2ed51059); +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; -var { default: React} = require($2ed51059); -var { default: React2} = require($2ed51059); +var { default: React} = require($bbcd215f); +var { default: React2} = require($bbcd215f); Bun.activate(false); -var hmr = new HMR(1572769260, "multiple-imports.js"), exports = hmr.exports; +var hmr = new HMR(2165509932, "multiple-imports.js"), exports = hmr.exports; (hmr._load = function() { const bacon = React; const bacon2 = jsx(JSXFrag, { diff --git a/integration/snapshots/multiple-imports.js b/integration/snapshots/multiple-imports.js index f4c274567..1bc6eb747 100644 --- a/integration/snapshots/multiple-imports.js +++ b/integration/snapshots/multiple-imports.js @@ -2,12 +2,12 @@ import { __require as require } from "http://localhost:8080/__runtime.js"; import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($2ed51059); +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; -var { default: React} = require($2ed51059); -var { default: React2} = require($2ed51059); +var { default: React} = require($bbcd215f); +var { default: React2} = require($bbcd215f); const bacon = React; const bacon2 = jsx(JSXFrag, { diff --git a/integration/snapshots/package-json-exports/index.hmr.js b/integration/snapshots/package-json-exports/index.hmr.js index 26c6c0592..508dd63ee 100644 --- a/integration/snapshots/package-json-exports/index.hmr.js +++ b/integration/snapshots/package-json-exports/index.hmr.js @@ -7,15 +7,15 @@ __HMRModule as HMR import { __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; -import * as $cc5b5b4d from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/index.js"; -var InexactRoot = require($cc5b5b4d); -import * as $3a1d0f08 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/dir/file.js"; -var InexactFile = require($3a1d0f08); -import * as $6b803e42 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/foo.js"; -var ExactFile = require($6b803e42); +import * as $4068f25b from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/index.js"; +var InexactRoot = require($4068f25b); +import * as $d2a171d2 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/dir/file.js"; +var InexactFile = require($d2a171d2); +import * as $522c6d1f from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/foo.js"; +var ExactFile = require($522c6d1f); Bun.activate(false); -var hmr = new HMR(3722745821, "package-json-exports/index.js"), exports = hmr.exports; +var hmr = new HMR(1953708113, "package-json-exports/index.js"), exports = hmr.exports; (hmr._load = function() { async function test() { console.assert(InexactRoot.target === "browser"); diff --git a/integration/snapshots/package-json-exports/index.js b/integration/snapshots/package-json-exports/index.js index 45e3dcaf5..1b260c7ea 100644 --- a/integration/snapshots/package-json-exports/index.js +++ b/integration/snapshots/package-json-exports/index.js @@ -1,12 +1,12 @@ import { __require as require } from "http://localhost:8080/__runtime.js"; -import * as $cc5b5b4d from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/index.js"; -var InexactRoot = require($cc5b5b4d); -import * as $3a1d0f08 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/dir/file.js"; -var InexactFile = require($3a1d0f08); -import * as $6b803e42 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/foo.js"; -var ExactFile = require($6b803e42); +import * as $4068f25b from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/index.js"; +var InexactRoot = require($4068f25b); +import * as $d2a171d2 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/dir/file.js"; +var InexactFile = require($d2a171d2); +import * as $522c6d1f from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/foo.js"; +var ExactFile = require($522c6d1f); export async function test() { console.assert(InexactRoot.target === "browser"); diff --git a/integration/snapshots/spread_with_key.hmr.tsx b/integration/snapshots/spread_with_key.hmr.tsx index 457d61a79..9176e2ef7 100644 --- a/integration/snapshots/spread_with_key.hmr.tsx +++ b/integration/snapshots/spread_with_key.hmr.tsx @@ -8,14 +8,14 @@ import { __HMRModule as HMR } from "http://localhost:8080/__runtime.js"; import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($2ed51059); +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, jsxEl = require(JSXClassic).createElement; -var { default: React} = require($2ed51059); +var { default: React} = require($bbcd215f); Bun.activate(false); -var hmr = new HMR(263168651, "spread_with_key.tsx"), exports = hmr.exports; +var hmr = new HMR(2717584935, "spread_with_key.tsx"), exports = hmr.exports; (hmr._load = function() { function SpreadWithTheKey({ className diff --git a/integration/snapshots/spread_with_key.tsx b/integration/snapshots/spread_with_key.tsx index b57a92a00..052e3f4ba 100644 --- a/integration/snapshots/spread_with_key.tsx +++ b/integration/snapshots/spread_with_key.tsx @@ -2,11 +2,11 @@ import { __require as require } from "http://localhost:8080/__runtime.js"; import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($2ed51059); +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($bbcd215f); var jsx = require(JSX).jsxDEV, jsxEl = require(JSXClassic).createElement; -var { default: React} = require($2ed51059); +var { default: React} = require($bbcd215f); export function SpreadWithTheKey({ className }) { diff --git a/integration/snapshots/string-escapes.hmr.js b/integration/snapshots/string-escapes.hmr.js index bebb37923..9231cb6cf 100644 --- a/integration/snapshots/string-escapes.hmr.js +++ b/integration/snapshots/string-escapes.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(2657253006, "string-escapes.js"), exports = hmr.exports; +var hmr = new HMR(2482749838, "string-escapes.js"), exports = hmr.exports; (hmr._load = function() { var tab = "\t"; var シ = "wow"; diff --git a/integration/snapshots/styledcomponents-output.hmr.js b/integration/snapshots/styledcomponents-output.hmr.js index c50113fd4..5d0dee825 100644 --- a/integration/snapshots/styledcomponents-output.hmr.js +++ b/integration/snapshots/styledcomponents-output.hmr.js @@ -10,15 +10,15 @@ __HMRModule as HMR import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; var jsx = require(JSX).jsxDEV; -import * as $ab83b9cf from "http://localhost:8080/node_modules/styled-components/dist/styled-components.browser.esm.js"; -var { default: styled} = require($ab83b9cf); -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; -var { default: React} = require($2ed51059); -import * as $a259fa9b from "http://localhost:8080/node_modules/react-dom/index.js"; -var { default: ReactDOM} = require($a259fa9b); +import * as $d4051a2e from "http://localhost:8080/node_modules/styled-components/dist/styled-components.browser.esm.js"; +var { default: styled} = require($d4051a2e); +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +var { default: React} = require($bbcd215f); +import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js"; +var { default: ReactDOM} = require($5b3cea55); Bun.activate(false); -var hmr = new HMR(2744898121, "styledcomponents-output.js"), exports = hmr.exports; +var hmr = new HMR(1290604342, "styledcomponents-output.js"), exports = hmr.exports; (hmr._load = function() { const ErrorScreenRoot = styled.div` font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, diff --git a/integration/snapshots/styledcomponents-output.js b/integration/snapshots/styledcomponents-output.js index 8a0e25280..df45ce11e 100644 --- a/integration/snapshots/styledcomponents-output.js +++ b/integration/snapshots/styledcomponents-output.js @@ -4,12 +4,12 @@ __require as require import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; var jsx = require(JSX).jsxDEV; -import * as $ab83b9cf from "http://localhost:8080/node_modules/styled-components/dist/styled-components.browser.esm.js"; -var { default: styled} = require($ab83b9cf); -import * as $2ed51059 from "http://localhost:8080/node_modules/react/index.js"; -var { default: React} = require($2ed51059); -import * as $a259fa9b from "http://localhost:8080/node_modules/react-dom/index.js"; -var { default: ReactDOM} = require($a259fa9b); +import * as $d4051a2e from "http://localhost:8080/node_modules/styled-components/dist/styled-components.browser.esm.js"; +var { default: styled} = require($d4051a2e); +import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +var { default: React} = require($bbcd215f); +import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js"; +var { default: ReactDOM} = require($5b3cea55); const ErrorScreenRoot = styled.div` font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif; diff --git a/integration/snapshots/ts-fallback-rewrite-works.hmr.js b/integration/snapshots/ts-fallback-rewrite-works.hmr.js index 6703d08a1..e728c5f14 100644 --- a/integration/snapshots/ts-fallback-rewrite-works.hmr.js +++ b/integration/snapshots/ts-fallback-rewrite-works.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(631080924, "ts-fallback-rewrite-works.ts"), exports = hmr.exports; +var hmr = new HMR(421762902, "ts-fallback-rewrite-works.ts"), exports = hmr.exports; (hmr._load = function() { function test() { return testDone(import.meta.url); diff --git a/integration/snapshots/tsx-fallback-rewrite-works.hmr.js b/integration/snapshots/tsx-fallback-rewrite-works.hmr.js index 85b864563..3f2f754e2 100644 --- a/integration/snapshots/tsx-fallback-rewrite-works.hmr.js +++ b/integration/snapshots/tsx-fallback-rewrite-works.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(2958250497, "tsx-fallback-rewrite-works.tsx"), exports = hmr.exports; +var hmr = new HMR(2117426367, "tsx-fallback-rewrite-works.tsx"), exports = hmr.exports; (hmr._load = function() { function test() { return testDone(import.meta.url); diff --git a/integration/snapshots/type-only-imports.hmr.ts b/integration/snapshots/type-only-imports.hmr.ts index e36667ddf..84740d0d9 100644 --- a/integration/snapshots/type-only-imports.hmr.ts +++ b/integration/snapshots/type-only-imports.hmr.ts @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(2365801153, "type-only-imports.ts"), exports = hmr.exports; +var hmr = new HMR(650094581, "type-only-imports.ts"), exports = hmr.exports; (hmr._load = function() { var baconator = true; var SilentSymbolCollisionsAreOkayInTypeScript = true; diff --git a/integration/snapshots/unicode-identifiers.hmr.js b/integration/snapshots/unicode-identifiers.hmr.js index 0452d6849..5d465d559 100644 --- a/integration/snapshots/unicode-identifiers.hmr.js +++ b/integration/snapshots/unicode-identifiers.hmr.js @@ -6,7 +6,7 @@ __HMRClient as Bun } from "http://localhost:8080/__runtime.js"; Bun.activate(false); -var hmr = new HMR(2975064322, "unicode-identifiers.js"), exports = hmr.exports; +var hmr = new HMR(1398361736, "unicode-identifiers.js"), exports = hmr.exports; (hmr._load = function() { var ε = 1.0e-06, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π; function test() { diff --git a/integration/snapshots/void-shouldnt-delete-call-expressions.hmr.js b/integration/snapshots/void-shouldnt-delete-call-expressions.hmr.js new file mode 100644 index 000000000..239b40fbd --- /dev/null +++ b/integration/snapshots/void-shouldnt-delete-call-expressions.hmr.js @@ -0,0 +1,32 @@ +import { +__HMRModule as HMR +} from "http://localhost:8080/__runtime.js"; +import { +__HMRClient as Bun +} from "http://localhost:8080/__runtime.js"; +Bun.activate(false); + +var hmr = new HMR(635901064, "void-shouldnt-delete-call-expressions.js"), exports = hmr.exports; +(hmr._load = function() { + var was_called = false; + function thisShouldBeCalled() { + was_called = true; + } + thisShouldBeCalled(); + function test() { + if (!was_called) + throw new Error("Expected thisShouldBeCalled to be called"); + return testDone(import.meta.url); + } + hmr.exportAll({ + test: () => test + }); +})(); +var $$hmr_test = hmr.exports.test; +hmr._update = function(exports) { + $$hmr_test = exports.test; +}; + +export { + $$hmr_test as test +}; diff --git a/integration/snapshots/void-shouldnt-delete-call-expressions.js b/integration/snapshots/void-shouldnt-delete-call-expressions.js new file mode 100644 index 000000000..3e088c5a7 --- /dev/null +++ b/integration/snapshots/void-shouldnt-delete-call-expressions.js @@ -0,0 +1,10 @@ +var was_called = false; +function thisShouldBeCalled() { + was_called = true; +} +thisShouldBeCalled(); +export function test() { + if (!was_called) + throw new Error("Expected thisShouldBeCalled to be called"); + return testDone(import.meta.url); +} |