diff options
author | 2022-07-09 15:45:38 +0400 | |
---|---|---|
committer | 2022-07-09 05:09:16 -0700 | |
commit | 7d1c9fa1a471d180c078a860c4885478f334bdf5 (patch) | |
tree | 1c7fa59320147142c828dc7ca1d38bbda3722839 /test | |
parent | dd5996379d3783e1982f156056dc550e365920d8 (diff) | |
download | bun-7d1c9fa1a471d180c078a860c4885478f334bdf5.tar.gz bun-7d1c9fa1a471d180c078a860c4885478f334bdf5.tar.zst bun-7d1c9fa1a471d180c078a860c4885478f334bdf5.zip |
Migrate to Zig v0.10.0
Diffstat (limited to 'test')
58 files changed, 279 insertions, 299 deletions
diff --git a/test/apps/bun-create-next.sh b/test/apps/bun-create-next.sh index 4f19e535d..110351d97 100644 --- a/test/apps/bun-create-next.sh +++ b/test/apps/bun-create-next.sh @@ -4,21 +4,20 @@ set -euo pipefail # The important part of this test: make sure that bun.js successfully loads # The most likely reason for this test to fail is that something broke in the JavaScriptCore <> bun integration -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" -rm -rf /tmp/next-app -mkdir -p /tmp/next-app -$BUN_BIN create next /tmp/next-app +DIR=$(mktemp -d -t next-app) +$BUN_BIN create next "$DIR" if (($?)); then echo "bun create failed" exit 1 fi -echo "hi!" >/tmp/next-app/public/file.txt -echo "export default 'string';" >/tmp/next-app/file.js +echo "hi!" >"$DIR/public/file.txt" +echo "export default 'string';" >"$DIR/file.js" -cd /tmp/next-app +cd "$DIR" BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN dev --port 8087 & sleep 0.1 curl --fail -Ss http://localhost:8087/ @@ -28,7 +27,7 @@ if [[ "$(curl --fail -sS http://localhost:8087/file.txt)" != "hi!" ]]; then echo "" echo "" echo "ERR: Expected 'hi!', got '$(curl --fail -sS http://localhost:8087/file.txt)'" - killall -9 $(basename $BUN_BIN) || echo "" + killall -9 "$(basename "$BUN_BIN")" || echo "" exit 1 fi @@ -37,12 +36,12 @@ if [[ "$(curl --fail -sS http://localhost:8087/file.js)" != *"string"* ]]; then echo "" echo "" echo "ERR: Expected file to contain string got '$(curl --fail -sS http://localhost:8087/file.js)'" - killall -9 $(basename $BUN_BIN) || echo "" + killall -9 "$(basename "$BUN_BIN")" || echo "" exit 1 fi # very simple HMR test -echo "export default 'string';" >/tmp/next-app/file2.js +echo "export default 'string';" >"$DIR/file2.js" sleep 0.1 if [[ "$(curl --fail -sS http://localhost:8087/file2.js)" != *"string"* ]]; then @@ -50,8 +49,8 @@ if [[ "$(curl --fail -sS http://localhost:8087/file2.js)" != *"string"* ]]; then echo "" echo "" echo "ERR: Expected file to contain string got '$(curl --fail -sS http://localhost:8087/file2.js)'" - killall -9 $(basename $BUN_BIN) || echo "" + killall -9 "$(basename "$BUN_BIN")" || echo "" exit 1 fi -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" diff --git a/test/apps/bun-create-react.sh b/test/apps/bun-create-react.sh index 41552dee5..e903b3f65 100644 --- a/test/apps/bun-create-react.sh +++ b/test/apps/bun-create-react.sh @@ -1,19 +1,20 @@ #!/bin/bash -killall -9 $(basename $BUN_BIN) || echo "" +set -euo pipefail -rm -rf /tmp/react-app -mkdir -p /tmp/react-app -$BUN_BIN create react /tmp/react-app +killall -9 "$(basename "$BUN_BIN")" || echo "" + +DIR=$(mktemp -d -t react-app) +$BUN_BIN create react "$DIR" if (($?)); then echo "bun create failed" exit 1 fi -cd /tmp/react-app +cd "$DIR" BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN dev --port 8087 & sleep 0.005 -curl --fail http://localhost:8087/ && curl --fail http://localhost:8087/src/index.jsx && killall -9 $(basename $BUN_BIN) && echo "✅ bun create react passed." +curl --fail http://localhost:8087/ && curl --fail http://localhost:8087/src/index.jsx && killall -9 "$(basename "$BUN_BIN")" && echo "✅ bun create react passed." exit $? diff --git a/test/apps/bun-dev-index-html.sh b/test/apps/bun-dev-index-html.sh index 01d99b71a..2cabb798b 100644 --- a/test/apps/bun-dev-index-html.sh +++ b/test/apps/bun-dev-index-html.sh @@ -2,9 +2,9 @@ set -euo pipefail -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" -dir=$(mktemp -d --suffix=bun-dev-check) +DIR=$(mktemp -d -t bun-dev-check) index_content="<html><body>index.html</body></html>" bacon_content="<html><body>bacon.html</body></html>" @@ -14,13 +14,13 @@ css_not_transpiled_content="@import url(/index.js); @import url(/i-dont-exist.cs css_is_transpiled_import="*{background-color:red;}" css_is_transpiled="@import url(./css_is_transpiled_import.css);" -echo $index_content >"$dir/index.html" -echo $js_content >"$dir/index.js" -echo $bacon_content >"$dir/bacon.html" -echo $static_content >"$dir/static.txt" -echo $css_not_transpiled_content >"$dir/css_not_transpiled_content.css" +echo $index_content >"$DIR/index.html" +echo $js_content >"$DIR/index.js" +echo $bacon_content >"$DIR/bacon.html" +echo $static_content >"$DIR/static.txt" +echo $css_not_transpiled_content >"$DIR/css_not_transpiled_content.css" -cd $dir +cd "$DIR" $BUN_BIN dev --port 8087 & sleep 0.005 @@ -65,5 +65,5 @@ if [[ "$(curl --fail -sS http://localhost:8087/bacon.html)" != "$bacon_content" exit 1 fi -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" echo "✅ bun dev index html check passed." diff --git a/test/apps/bun-dev.sh b/test/apps/bun-dev.sh index fd2447e93..485edd69a 100644 --- a/test/apps/bun-dev.sh +++ b/test/apps/bun-dev.sh @@ -2,21 +2,21 @@ set -euo pipefail -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" -dir=$(mktemp -d --suffix=bun-dev-check) +DIR=$(mktemp -d -t bun-dev-check) index_content="<html><body>index.html</body></html>" bacon_content="<html><body>bacon.html</body></html>" js_content="console.log('hi')" -mkdir -p $dir/public +mkdir -p "$DIR/public" -echo $index_content >"$dir/public/index.html" -echo $js_content >"$dir/index.js" -echo $bacon_content >"$dir/public/bacon.html" +echo $index_content >"$DIR/public/index.html" +echo $js_content >"$DIR/index.js" +echo $bacon_content >"$DIR/public/bacon.html" -cd $dir +cd "$DIR" $BUN_BIN dev --port 8087 & sleep 0.005 diff --git a/test/apps/bun-install-lockfile-status.sh b/test/apps/bun-install-lockfile-status.sh index b23b4fc3c..de8a4a8f2 100644 --- a/test/apps/bun-install-lockfile-status.sh +++ b/test/apps/bun-install-lockfile-status.sh @@ -2,11 +2,11 @@ set -euo pipefail -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" -dir=$(mktemp -d --suffix=bun-lockfile) +DIR=$(mktemp -d -t bun-lockfile) -cd $dir +cd "$DIR" $BUN_BIN add react diff --git a/test/apps/bun-install-utf8.sh b/test/apps/bun-install-utf8.sh index 66783cb50..263eade6a 100644 --- a/test/apps/bun-install-utf8.sh +++ b/test/apps/bun-install-utf8.sh @@ -2,11 +2,11 @@ set -euo pipefail -killall -9 $(basename $BUN_BIN) || echo "" +killall -9 "$(basename "$BUN_BIN")" || echo "" -dir=$(mktemp -d --suffix=bun-ADD) +DIR=$(mktemp -d -t bun-ADD) -cd $dir +cd "$DIR" # https://github.com/Jarred-Sumner/bun/issues/115 echo '{ "author": "Arnaud Barré (https://github.com/ArnaudBarre)" }' >package.json diff --git a/test/apps/bun-install.sh b/test/apps/bun-install.sh index dd4083e33..adc69fec3 100644 --- a/test/apps/bun-install.sh +++ b/test/apps/bun-install.sh @@ -2,9 +2,9 @@ set -euo pipefail -dir=$(mktemp -d --suffix=bun-install-test-1) +DIR=$(mktemp -d -t bun-install-test-1) -cd $dir +cd "$DIR" ${NPM_CLIENT:-$(which bun)} add react react-dom @types/react @babel/parser esbuild echo "console.log(typeof require(\"react\").createElement);" >index.js @@ -47,7 +47,7 @@ fi ${NPM_CLIENT:-$(which bun)} remove react-dom if [ -d "node_modules/react-dom" ]; then - echo "ERR: react-dom module still exists in $dir" + echo "ERR: react-dom module still exists in $DIR" exit 1 fi @@ -68,14 +68,14 @@ if echo "$yarn_dot_lock" | grep -q "@types/react"; then fi if echo "$yarn_dot_lock" | grep -q "@types/react"; then - echo "ERR: @types/react module still exists in $dir" + echo "ERR: @types/react module still exists in $DIR" exit 1 fi ${NPM_CLIENT:-$(which bun)} remove react if [ -d "node_modules/react" ]; then - echo "ERR: react module still exists in $dir" + echo "ERR: react module still exists in $DIR" exit 1 fi diff --git a/test/apps/bun-run-check.sh b/test/apps/bun-run-check.sh index dca1db6ae..decfb2896 100644 --- a/test/apps/bun-run-check.sh +++ b/test/apps/bun-run-check.sh @@ -1,6 +1,8 @@ #!/bin/bash -(killall -9 $(basename $BUN_BIN) || echo "") >/dev/null 2>&1 +set -euo pipefail + +(killall -9 "$(basename "$BUN_BIN")" || echo "") >/dev/null 2>&1 # https://github.com/Jarred-Sumner/bun/issues/40 # Define a function (details aren't important) @@ -8,11 +10,10 @@ fn() { :; } # The important bit: export the function export -f fn -rm -rf /tmp/bun-run-check -mkdir -p /tmp/bun-run-check +DIR=$(mktemp -d -t bun-run-check) -cp ./bun-run-check-package.json /tmp/bun-run-check/package.json -cd /tmp/bun-run-check +cp ./bun-run-check-package.json "$DIR/package.json" +cd "$DIR" $BUN_BIN run bash -- -c "" @@ -22,12 +23,12 @@ if (($?)); then fi # https://github.com/Jarred-Sumner/bun/issues/53 -rm -f /tmp/bun-run-out.expected.txt /tmp/bun-run-out.txt >/dev/null 2>&1 +rm -f "$DIR/bun-run-out.expected.txt" "$DIR/bun-run-out.txt" >/dev/null 2>&1 -$BUN_BIN run --silent argv -- foo bar baz >/tmp/bun-run-out.txt -npm run --silent argv -- foo bar baz >/tmp/bun-run-out.expected.txt +$BUN_BIN run --silent argv -- foo bar baz > "$DIR/bun-run-out.txt" +npm run --silent argv -- foo bar baz > "$DIR/bun-run-out.expected.txt" -cmp -s /tmp/bun-run-out.expected.txt /tmp/bun-run-out.txt +cmp -s "$DIR/bun-run-out.expected.txt" "$DIR/bun-run-out.txt" if (($?)); then echo "argv failed" exit 1 diff --git a/test/scripts/bun.lockb b/test/scripts/bun.lockb Binary files differindex 2d9937d57..4d944995a 100755 --- a/test/scripts/bun.lockb +++ b/test/scripts/bun.lockb diff --git a/test/scripts/package-lock.json b/test/scripts/package-lock.json index a41b9bd92..10abe53e4 100644 --- a/test/scripts/package-lock.json +++ b/test/scripts/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "puppeteer": "^10.2.0" + "puppeteer": "^10.4.0" } }, "node_modules/@types/node": { @@ -425,8 +425,10 @@ }, "node_modules/puppeteer": { "version": "10.4.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz", + "integrity": "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==", + "deprecated": "Version no longer supported. Upgrade to @latest", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "debug": "4.3.1", "devtools-protocol": "0.0.901419", @@ -804,6 +806,8 @@ }, "puppeteer": { "version": "10.4.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz", + "integrity": "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==", "requires": { "debug": "4.3.1", "devtools-protocol": "0.0.901419", diff --git a/test/scripts/package.json b/test/scripts/package.json index b4637138b..bc5c1db22 100644 --- a/test/scripts/package.json +++ b/test/scripts/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "puppeteer": "^10.2.0" + "puppeteer": "^10.4.0" } } diff --git a/test/snapshots/array-args-with-default-values.hmr.js b/test/snapshots/array-args-with-default-values.hmr.js index 3c8997b54..421272052 100644 --- a/test/snapshots/array-args-with-default-values.hmr.js +++ b/test/snapshots/array-args-with-default-values.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(3474597122, "array-args-with-default-values.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(3022324119, "array-args-with-default-values.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var lines; const data = () => lines.map(([a = null, b = null, c = null, d = null]) => ({ diff --git a/test/snapshots/bundled-entry-point.hmr.js b/test/snapshots/bundled-entry-point.hmr.js index b4fb5e46f..4440f8f36 100644 --- a/test/snapshots/bundled-entry-point.hmr.js +++ b/test/snapshots/bundled-entry-point.hmr.js @@ -1,18 +1,18 @@ import { __require as require -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -import * as $bbcd215f from "http://localhost:3000/node_modules/react/index.js"; -var hmr = new FastHMR(3012834585, "bundled-entry-point.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var hmr = new FastHMR(2903293251, "bundled-entry-point.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { return testDone(import.meta.url); @@ -30,4 +30,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/bundled-entry-point.js.map +//# sourceMappingURL=http://localhost:8080/bundled-entry-point.js.map diff --git a/test/snapshots/bundled-entry-point.js b/test/snapshots/bundled-entry-point.js index 51562933f..4f5a59894 100644 --- a/test/snapshots/bundled-entry-point.js +++ b/test/snapshots/bundled-entry-point.js @@ -1,11 +1,9 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; export function test() { return testDone(import.meta.url); - } - //# sourceMappingURL=http://localhost:8080/bundled-entry-point.js.map diff --git a/test/snapshots/caught-require.hmr.js b/test/snapshots/caught-require.hmr.js index 8a63f51a0..e1229ee3f 100644 --- a/test/snapshots/caught-require.hmr.js +++ b/test/snapshots/caught-require.hmr.js @@ -11,10 +11,12 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(2398506918, "caught-require.js", FastRefresh), exports = hmr.exports; +var this_package_should_not_exist_f335_0 = (() => ({})); +var this_package_should_not_exist_f335_1 = (() => ({})); +var hmr = new FastHMR(2167781, "caught-require.js", FastRefresh), exports = hmr.exports; await (hmr._load = async function() { try { - require((() => { throw (new Error(`Cannot require module '"this-package-should-not-exist"'`)); } )()); + require((() => { throw (new Error(`Cannot require module "this-package-should-not-exist"`)); } )()); } catch (exception) { } try { @@ -26,7 +28,7 @@ await (hmr._load = async function() { }); async function test() { try { - require((() => { throw (new Error(`Cannot require module '"this-package-should-not-exist"'`)); } )()); + require((() => { throw (new Error(`Cannot require module "this-package-should-not-exist"`)); } )()); } catch (exception) { } try { diff --git a/test/snapshots/caught-require.js b/test/snapshots/caught-require.js index 73608f8e3..7c356a21d 100644 --- a/test/snapshots/caught-require.js +++ b/test/snapshots/caught-require.js @@ -1,12 +1,12 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; +var this_package_should_not_exist_f335_0 = (() => ({})); +var this_package_should_not_exist_f335_1 = (() => ({})); try { - require((() => { throw (new Error(`Cannot require module '"this-package-should-not-exist"'`)); } )()); - + require((() => { throw (new Error(`Cannot require module "this-package-should-not-exist"`)); } )()); } catch (exception) { } - try { await import("this-package-should-not-exist"); } catch (exception) { @@ -16,7 +16,7 @@ import("this-package-should-not-exist").then(() => { }); export async function test() { try { - require((() => { throw (new Error(`Cannot require module '"this-package-should-not-exist"'`)); } )()); + require((() => { throw (new Error(`Cannot require module "this-package-should-not-exist"`)); } )()); } catch (exception) { } try { diff --git a/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js index b74b8c2b7..3d98612c6 100644 --- a/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js +++ b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.hmr.js @@ -1,19 +1,19 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -import _login from "http://localhost:3000/_login.js"; -import _auth from "http://localhost:3000/_auth.js"; -import * as _loginReally from "http://localhost:3000/_login.js"; -import * as _loginReally2 from "http://localhost:3000/_login.js"; -import * as _authReally from "http://localhost:3000/_auth.js"; -var hmr = new FastHMR(3878252498, "cjs-transform-shouldnt-have-static-imports-in-cjs-function.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +import _login from "http://localhost:8080/_login.js"; +import _auth from "http://localhost:8080/_auth.js"; +import * as _loginReally from "http://localhost:8080/_login.js"; +import * as _loginReally2 from "http://localhost:8080/_login.js"; +import * as _authReally from "http://localhost:8080/_auth.js"; +var hmr = new FastHMR(2970650542, "cjs-transform-shouldnt-have-static-imports-in-cjs-function.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { return testDone(import.meta.url); @@ -42,4 +42,4 @@ export { $$hmr_bar as bar }; -//# sourceMappingURL=http://localhost:3000/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js.map +//# sourceMappingURL=http://localhost:8080/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js.map diff --git a/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js index 1bd6883d8..77e4fc695 100644 --- a/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js +++ b/test/snapshots/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js @@ -5,7 +5,6 @@ import * as _loginReally2 from "http://localhost:8080/_login.js"; import * as _authReally from "http://localhost:8080/_auth.js"; export { _login as login }; - export function test() { return testDone(import.meta.url); } diff --git a/test/snapshots/code-simplification-neql-define.hmr.js b/test/snapshots/code-simplification-neql-define.hmr.js index 6d521b01d..51111af01 100644 --- a/test/snapshots/code-simplification-neql-define.hmr.js +++ b/test/snapshots/code-simplification-neql-define.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(726376257, "code-simplification-neql-define.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(3365801599, "code-simplification-neql-define.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var testFailed = false; const invariant = () => { diff --git a/test/snapshots/code-simplification-neql-define.js b/test/snapshots/code-simplification-neql-define.js index 6c0e684df..bf526597c 100644 --- a/test/snapshots/code-simplification-neql-define.js +++ b/test/snapshots/code-simplification-neql-define.js @@ -11,7 +11,7 @@ export var $f332019d = $$m({ var RelayQueryResponseCache = function() { var foo = function RelayQueryResponseCache(_ref) { var size = _ref.size, ttl = _ref.ttl; - !(size > 0) && invariant(false, "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + "`%s`.", size); + !(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 }); diff --git a/test/snapshots/custom-emotion-jsx/file.hmr.jsx b/test/snapshots/custom-emotion-jsx/file.hmr.jsx index d26b0a16d..d16266fd1 100644 --- a/test/snapshots/custom-emotion-jsx/file.hmr.jsx +++ b/test/snapshots/custom-emotion-jsx/file.hmr.jsx @@ -11,12 +11,12 @@ __require as require import { __FastRefreshModule as FastHMR } from "http://localhost:8080/bun:wrap"; -import * as $72625799 from "http://localhost:8080/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js"; -var JSX = require($72625799); +import * as $5bf278c5 from "http://localhost:8080/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js"; +var JSX = require($5bf278c5); var jsx = require(JSX).jsxDEV; -import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js"; -var ReactDOM = require($5b3cea55); -var hmr = new FastHMR(2497996991, "custom-emotion-jsx/file.jsx", FastRefresh), exports = hmr.exports; +import * as $d2dc5006 from "http://localhost:8080/node_modules/react-dom/index.js"; +var ReactDOM = require($d2dc5006); +var hmr = new FastHMR(1769322314, "custom-emotion-jsx/file.jsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { var Foo = () => jsx("div", { css: { content: '"it worked!"' } diff --git a/test/snapshots/custom-emotion-jsx/file.jsx b/test/snapshots/custom-emotion-jsx/file.jsx index 466cd4697..bef09a0c3 100644 --- a/test/snapshots/custom-emotion-jsx/file.jsx +++ b/test/snapshots/custom-emotion-jsx/file.jsx @@ -1,16 +1,14 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $72625799 from "http://localhost:8080/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js"; -var JSX = require($72625799); +import * as $5bf278c5 from "http://localhost:8080/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js"; +var JSX = require($5bf278c5); var jsx = require(JSX).jsxDEV; - -import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js"; -var ReactDOM = require($5b3cea55); +import * as $d2dc5006 from "http://localhost:8080/node_modules/react-dom/index.js"; +var ReactDOM = require($d2dc5006); export const Foo = () => jsx("div", { css: { content: '"it worked!"' } }, undefined, false, undefined, this); - export function test() { const element = document.createElement("div"); element.id = "custom-emotion-jsx"; diff --git a/test/snapshots/export-default-module-hot.hmr.js b/test/snapshots/export-default-module-hot.hmr.js index 3dadccd28..a1b5a69a2 100644 --- a/test/snapshots/export-default-module-hot.hmr.js +++ b/test/snapshots/export-default-module-hot.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(2909748314, "export-default-module-hot.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(2744655916, "export-default-module-hot.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var export_default_module_hot_default = typeof module !== "undefined" && module.id; function test() { diff --git a/test/snapshots/export.hmr.js b/test/snapshots/export.hmr.js index 73d6db2d4..2ec5e1a80 100644 --- a/test/snapshots/export.hmr.js +++ b/test/snapshots/export.hmr.js @@ -1,16 +1,16 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -import what from "http://localhost:3000/_auth.js"; -import * as where from "http://localhost:3000/_auth.js"; -var hmr = new FastHMR(1879780259, "export.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +import what from "http://localhost:8080/_auth.js"; +import * as where from "http://localhost:8080/_auth.js"; +var hmr = new FastHMR(2026450590, "export.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var yoyoyo = "yoyoyo"; function hey() { @@ -70,9 +70,9 @@ export { $$hmr_booop as booop, $$hmr_test as test }; -export { default as auth } from "http://localhost:3000/_auth.js"; -export { default as login } from "http://localhost:3000/_login.js"; -export * from "http://localhost:3000/_bacon.js"; -export { } from "http://localhost:3000/_bacon.js"; +export { default as auth } from "http://localhost:8080/_auth.js"; +export { default as login } from "http://localhost:8080/_login.js"; +export * from "http://localhost:8080/_bacon.js"; +export { } from "http://localhost:8080/_bacon.js"; -//# sourceMappingURL=http://localhost:3000/export.js.map +//# sourceMappingURL=http://localhost:8080/export.js.map diff --git a/test/snapshots/export.js b/test/snapshots/export.js index 986d3b45f..84fe5b8e9 100644 --- a/test/snapshots/export.js +++ b/test/snapshots/export.js @@ -1,6 +1,5 @@ import what from "http://localhost:8080/_auth.js"; export { default as auth } from "http://localhost:8080/_auth.js"; - export { default as login } from "http://localhost:8080/_login.js"; export * from "http://localhost:8080/_bacon.js"; export let yoyoyo = "yoyoyo"; @@ -18,7 +17,6 @@ export { } from "http://localhost:8080/_bacon.js"; import * as where from "http://localhost:8080/_auth.js"; export { where }; - export { bar as booop }; export function test() { hey(); diff --git a/test/snapshots/forbid-in-is-correct.hmr.js b/test/snapshots/forbid-in-is-correct.hmr.js index ae3714d04..fc01825b5 100644 --- a/test/snapshots/forbid-in-is-correct.hmr.js +++ b/test/snapshots/forbid-in-is-correct.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(346837007, "forbid-in-is-correct.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(30801918, "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); diff --git a/test/snapshots/global-is-remapped-to-globalThis.hmr.js b/test/snapshots/global-is-remapped-to-globalThis.hmr.js index a0e28b60a..7db0c2ef9 100644 --- a/test/snapshots/global-is-remapped-to-globalThis.hmr.js +++ b/test/snapshots/global-is-remapped-to-globalThis.hmr.js @@ -1,14 +1,14 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -var hmr = new FastHMR(713665787, "global-is-remapped-to-globalThis.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +var hmr = new FastHMR(997256900, "global-is-remapped-to-globalThis.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { console.assert(globalThis === globalThis); @@ -27,4 +27,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/global-is-remapped-to-globalThis.js.map +//# sourceMappingURL=http://localhost:8080/global-is-remapped-to-globalThis.js.map diff --git a/test/snapshots/jsx-entities.hmr.jsx b/test/snapshots/jsx-entities.hmr.jsx index 3bad6ca8d..cee60e53e 100644 --- a/test/snapshots/jsx-entities.hmr.jsx +++ b/test/snapshots/jsx-entities.hmr.jsx @@ -11,14 +11,14 @@ __require as require import { __FastRefreshModule as FastHMR } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; -import * as $1f6f0e67 from "http://localhost:8080/node_modules/react-dom/server.browser.js"; -var ReactDOM = require($1f6f0e67); -var hmr = new FastHMR(817082122, "jsx-entities.jsx", FastRefresh), exports = hmr.exports; +import * as $72f3f54c from "http://localhost:8080/node_modules/react-dom/server.browser.js"; +var ReactDOM = require($72f3f54c); +var hmr = new FastHMR(2026553427, "jsx-entities.jsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { const elements = { [ReactDOM.renderToString(jsx(JSXFrag, { diff --git a/test/snapshots/jsx-entities.jsx b/test/snapshots/jsx-entities.jsx index 9fd075bc6..e4f9a8745 100644 --- a/test/snapshots/jsx-entities.jsx +++ b/test/snapshots/jsx-entities.jsx @@ -1,14 +1,13 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; - -import * as $1f6f0e67 from "http://localhost:8080/node_modules/react-dom/server.browser.js"; -var ReactDOM = require($1f6f0e67); +import * as $72f3f54c from "http://localhost:8080/node_modules/react-dom/server.browser.js"; +var ReactDOM = require($72f3f54c); const elements = { [ReactDOM.renderToString(jsx(JSXFrag, { children: '"' @@ -2751,7 +2750,6 @@ const elements = { children: "\u0294" }, undefined, false, undefined, this))]: 660 }; - export function test() { for (let rawKey in elements) { var key = rawKey; diff --git a/test/snapshots/jsx-spacing.hmr.jsx b/test/snapshots/jsx-spacing.hmr.jsx index 59287257b..b626bd920 100644 --- a/test/snapshots/jsx-spacing.hmr.jsx +++ b/test/snapshots/jsx-spacing.hmr.jsx @@ -11,12 +11,12 @@ __require as require import { __FastRefreshModule as FastHMR } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); var jsx = require(JSX).jsxDEV; -import * as $1f6f0e67 from "http://localhost:8080/node_modules/react-dom/server.browser.js"; -var ReactDOM = require($1f6f0e67); -var hmr = new FastHMR(3614189736, "jsx-spacing.jsx", FastRefresh), exports = hmr.exports; +import * as $72f3f54c from "http://localhost:8080/node_modules/react-dom/server.browser.js"; +var ReactDOM = require($72f3f54c); +var hmr = new FastHMR(1284217403, "jsx-spacing.jsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { const ReturnDescriptionAsString = ({ description }) => description; function test() { diff --git a/test/snapshots/jsx-spacing.jsx b/test/snapshots/jsx-spacing.jsx index bfbcab92f..2d79ddee7 100644 --- a/test/snapshots/jsx-spacing.jsx +++ b/test/snapshots/jsx-spacing.jsx @@ -1,14 +1,12 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); var jsx = require(JSX).jsxDEV; - -import * as $1f6f0e67 from "http://localhost:8080/node_modules/react-dom/server.browser.js"; -var ReactDOM = require($1f6f0e67); +import * as $72f3f54c from "http://localhost:8080/node_modules/react-dom/server.browser.js"; +var ReactDOM = require($72f3f54c); const ReturnDescriptionAsString = ({ description }) => description; - export function test() { const _bun = ReactDOM.renderToString(jsx(ReturnDescriptionAsString, { description: `line1 diff --git a/test/snapshots/latin1-chars-in-regexp.hmr.js b/test/snapshots/latin1-chars-in-regexp.hmr.js index afd3b813e..88183696a 100644 --- a/test/snapshots/latin1-chars-in-regexp.hmr.js +++ b/test/snapshots/latin1-chars-in-regexp.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(1430071586, "latin1-chars-in-regexp.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(3684541220, "latin1-chars-in-regexp.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var re_btou = new RegExp([ diff --git a/test/snapshots/lodash-regexp.hmr.js b/test/snapshots/lodash-regexp.hmr.js index e5d6b9130..896ad287a 100644 --- a/test/snapshots/lodash-regexp.hmr.js +++ b/test/snapshots/lodash-regexp.hmr.js @@ -1,19 +1,19 @@ import { __require as require -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -import * as $60f52dc2 from "http://localhost:3000/node_modules/lodash/lodash.js"; -var { shuffle} = require($60f52dc2); -var hmr = new FastHMR(2158065009, "lodash-regexp.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +import * as $2f2e4966 from "http://localhost:8080/node_modules/lodash/lodash.js"; +var { shuffle} = require($2f2e4966); +var hmr = new FastHMR(639488503, "lodash-regexp.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { const foo = [1, 2, 3, 4, 6]; @@ -42,4 +42,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/lodash-regexp.js.map +//# sourceMappingURL=http://localhost:8080/lodash-regexp.js.map diff --git a/test/snapshots/lodash-regexp.js b/test/snapshots/lodash-regexp.js index b1566fb6d..5f3950b6a 100644 --- a/test/snapshots/lodash-regexp.js +++ b/test/snapshots/lodash-regexp.js @@ -1,11 +1,10 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $60f52dc2 from "http://localhost:8080/node_modules/lodash/lodash.js"; -var { shuffle} = require($60f52dc2); +import * as $2f2e4966 from "http://localhost:8080/node_modules/lodash/lodash.js"; +var { shuffle} = require($2f2e4966); export function test() { const foo = [1, 2, 3, 4, 6]; - const bar = shuffle(foo); console.assert(bar !== foo); console.assert(bar.length === foo.length); @@ -19,5 +18,4 @@ export function test() { return testDone(import.meta.url); } - //# sourceMappingURL=http://localhost:8080/lodash-regexp.js.map diff --git a/test/snapshots/multiple-imports.hmr.js b/test/snapshots/multiple-imports.hmr.js index 59d620c07..4e42537f0 100644 --- a/test/snapshots/multiple-imports.hmr.js +++ b/test/snapshots/multiple-imports.hmr.js @@ -1,24 +1,24 @@ import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __require as require -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; -import * as $2f488e5b from "http://localhost:3000/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:3000/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +} from "http://localhost:8080/bun:wrap"; +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; -var { default: React} = require($bbcd215f); -var { default: React2} = require($bbcd215f); -var hmr = new FastHMR(2165509932, "multiple-imports.js", FastRefresh), exports = hmr.exports; +var { default: React} = require($45b81229); +var { default: React2} = require($45b81229); +var hmr = new FastHMR(2063938930, "multiple-imports.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { const bacon = React; const bacon2 = jsx(JSXFrag, { @@ -44,4 +44,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/multiple-imports.js.map +//# sourceMappingURL=http://localhost:8080/multiple-imports.js.map diff --git a/test/snapshots/multiple-imports.js b/test/snapshots/multiple-imports.js index af9396b46..e8717b572 100644 --- a/test/snapshots/multiple-imports.js +++ b/test/snapshots/multiple-imports.js @@ -1,16 +1,14 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; - -var { default: React} = require($bbcd215f); -var { default: React2} = require($bbcd215f); +var { default: React} = require($45b81229); +var { default: React2} = require($45b81229); const bacon = React; - const bacon2 = jsx(JSXFrag, { children: "hello" }, undefined, false, undefined, this); diff --git a/test/snapshots/multiple-var.hmr.js b/test/snapshots/multiple-var.hmr.js index 3acb5b8d3..940dbddad 100644 --- a/test/snapshots/multiple-var.hmr.js +++ b/test/snapshots/multiple-var.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(2883558553, "multiple-var.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(1028067224, "multiple-var.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var foo = true; globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT = true; diff --git a/test/snapshots/number-literal-bug.hmr.js b/test/snapshots/number-literal-bug.hmr.js index cdb63994d..18e3748fa 100644 --- a/test/snapshots/number-literal-bug.hmr.js +++ b/test/snapshots/number-literal-bug.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(583570002, "number-literal-bug.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(3925211795, "number-literal-bug.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { const precision = 10; diff --git a/test/snapshots/optional-chain-with-function.hmr.js b/test/snapshots/optional-chain-with-function.hmr.js index e9a89a827..96b06cfe0 100644 --- a/test/snapshots/optional-chain-with-function.hmr.js +++ b/test/snapshots/optional-chain-with-function.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(3608848620, "optional-chain-with-function.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(2063149784, "optional-chain-with-function.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { try { diff --git a/test/snapshots/package-json-exports/index.hmr.js b/test/snapshots/package-json-exports/index.hmr.js index 69efa5194..7220e2a6d 100644 --- a/test/snapshots/package-json-exports/index.hmr.js +++ b/test/snapshots/package-json-exports/index.hmr.js @@ -1,25 +1,25 @@ import { __require as require -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -import * as $4068f25b from "http://localhost:3000/package-json-exports/node_modules/inexact/browser/index.js"; -var InexactRoot = require($4068f25b); -import * as $d2a171d2 from "http://localhost:3000/package-json-exports/node_modules/inexact/browser/dir/file.js"; -var InexactFile = require($d2a171d2); -import * as $522c6d1f from "http://localhost:3000/package-json-exports/node_modules/inexact/browser/foo.js"; -var ExactFile = require($522c6d1f); -import * as $fce83cd7 from "http://localhost:3000/package-json-exports/node_modules/js-only-exports/browser/js-file.js"; -var JSFileExtensionOnly = require($fce83cd7); -var hmr = new FastHMR(1953708113, "package-json-exports/index.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +import * as $147f6594 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/index.js"; +var InexactRoot = require($147f6594); +import * as $f9f33cd5 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/dir/file.js"; +var InexactFile = require($f9f33cd5); +import * as $efd1f056 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/foo.js"; +var ExactFile = require($efd1f056); +import * as $3e697ad7 from "http://localhost:8080/package-json-exports/node_modules/js-only-exports/browser/js-file.js"; +var JSFileExtensionOnly = require($3e697ad7); +var hmr = new FastHMR(2713515135, "package-json-exports/index.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { async function test() { console.assert(InexactRoot.target === "browser"); @@ -41,4 +41,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/package-json-exports/index.js.map +//# sourceMappingURL=http://localhost:8080/package-json-exports/index.js.map diff --git a/test/snapshots/package-json-exports/index.js b/test/snapshots/package-json-exports/index.js index 3d41a7985..7d9ad8b60 100644 --- a/test/snapshots/package-json-exports/index.js +++ b/test/snapshots/package-json-exports/index.js @@ -1,22 +1,20 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -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); -import * as $fce83cd7 from "http://localhost:8080/package-json-exports/node_modules/js-only-exports/browser/js-file.js"; -var JSFileExtensionOnly = require($fce83cd7); +import * as $147f6594 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/index.js"; +var InexactRoot = require($147f6594); +import * as $f9f33cd5 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/dir/file.js"; +var InexactFile = require($f9f33cd5); +import * as $efd1f056 from "http://localhost:8080/package-json-exports/node_modules/inexact/browser/foo.js"; +var ExactFile = require($efd1f056); +import * as $3e697ad7 from "http://localhost:8080/package-json-exports/node_modules/js-only-exports/browser/js-file.js"; +var JSFileExtensionOnly = require($3e697ad7); export async function test() { console.assert(InexactRoot.target === "browser"); - console.assert(InexactFile.target === "browser"); console.assert(ExactFile.target === "browser"); console.assert(JSFileExtensionOnly.isJS === true); return testDone(import.meta.url); } - //# sourceMappingURL=http://localhost:8080/package-json-exports/index.js.map diff --git a/test/snapshots/package-json-utf8.hmr.js b/test/snapshots/package-json-utf8.hmr.js index 5676d6477..ba753af0e 100644 --- a/test/snapshots/package-json-utf8.hmr.js +++ b/test/snapshots/package-json-utf8.hmr.js @@ -9,7 +9,7 @@ import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; import pkg from "http://localhost:8080/utf8-package-json.json"; -var hmr = new FastHMR(4111115104, "package-json-utf8.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(1703475520, "package-json-utf8.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { console.assert(!!pkg.author); diff --git a/test/snapshots/package-json-utf8.js b/test/snapshots/package-json-utf8.js index 8845090f0..b08c3804d 100644 --- a/test/snapshots/package-json-utf8.js +++ b/test/snapshots/package-json-utf8.js @@ -1,9 +1,7 @@ import pkg from "http://localhost:8080/utf8-package-json.json"; export function test() { console.assert(!!pkg.author); - return testDone(import.meta.url); } - //# sourceMappingURL=http://localhost:8080/package-json-utf8.js.map diff --git a/test/snapshots/react-context-value-func.hmr.tsx b/test/snapshots/react-context-value-func.hmr.tsx index 0c751a7a9..3a11b4342 100644 --- a/test/snapshots/react-context-value-func.hmr.tsx +++ b/test/snapshots/react-context-value-func.hmr.tsx @@ -11,12 +11,12 @@ __require as require import { __FastRefreshModule as FastHMR } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); var jsx = require(JSX).jsxDEV; -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var { default: React} = require($bbcd215f); -var hmr = new FastHMR(3514348331, "react-context-value-func.tsx", FastRefresh), exports = hmr.exports; +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var { default: React} = require($45b81229); +var hmr = new FastHMR(2913325904, "react-context-value-func.tsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { const Context = React.createContext({}); const ContextProvider = ({ children }) => { diff --git a/test/snapshots/react-context-value-func.tsx b/test/snapshots/react-context-value-func.tsx index 71b5e5f60..faafc591a 100644 --- a/test/snapshots/react-context-value-func.tsx +++ b/test/snapshots/react-context-value-func.tsx @@ -1,14 +1,12 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); var jsx = require(JSX).jsxDEV; - -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var { default: React} = require($bbcd215f); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var { default: React} = require($45b81229); const Context = React.createContext({}); - const ContextProvider = ({ children }) => { const [cb, setCB] = React.useState(function() { }); diff --git a/test/snapshots/spread_with_key.hmr.tsx b/test/snapshots/spread_with_key.hmr.tsx index 37cb57b34..befb56390 100644 --- a/test/snapshots/spread_with_key.hmr.tsx +++ b/test/snapshots/spread_with_key.hmr.tsx @@ -11,13 +11,13 @@ __require as require import { __FastRefreshModule as FastHMR } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, jsxEl = require(JSXClassic).createElement; -var { default: React} = require($bbcd215f); -var hmr = new FastHMR(2717584935, "spread_with_key.tsx", FastRefresh), exports = hmr.exports; +var { default: React} = require($45b81229); +var hmr = new FastHMR(1528600417, "spread_with_key.tsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { function SpreadWithTheKey({ className }) { const rest = {}; diff --git a/test/snapshots/spread_with_key.tsx b/test/snapshots/spread_with_key.tsx index e096a76c8..266ec96ea 100644 --- a/test/snapshots/spread_with_key.tsx +++ b/test/snapshots/spread_with_key.tsx @@ -1,16 +1,14 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, jsxEl = require(JSXClassic).createElement; - -var { default: React} = require($bbcd215f); +var { default: React} = require($45b81229); export function SpreadWithTheKey({ className }) { const rest = {}; - return jsxEl("div", { className, ...rest, @@ -18,7 +16,6 @@ export function SpreadWithTheKey({ className }) { key: "spread-with-the-key" }, "Rendered component containing warning"); } - export function test() { console.assert(React.isValidElement(jsx(SpreadWithTheKey, { className: "foo" diff --git a/test/snapshots/string-escapes.hmr.js b/test/snapshots/string-escapes.hmr.js index 5847bdf97..61adda87e 100644 --- a/test/snapshots/string-escapes.hmr.js +++ b/test/snapshots/string-escapes.hmr.js @@ -1,22 +1,22 @@ import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __require as require -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; -import * as $2f488e5b from "http://localhost:3000/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:3000/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +} from "http://localhost:8080/bun:wrap"; +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; -var hmr = new FastHMR(2482749838, "string-escapes.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(3888655093, "string-escapes.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var tab = "\t"; var f = ""; @@ -487,4 +487,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/string-escapes.js.map +//# sourceMappingURL=http://localhost:8080/string-escapes.js.map diff --git a/test/snapshots/string-escapes.js b/test/snapshots/string-escapes.js index 9084bc362..82122d6a5 100644 --- a/test/snapshots/string-escapes.js +++ b/test/snapshots/string-escapes.js @@ -1,12 +1,11 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); -import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js"; -var JSXClassic = require($bbcd215f); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var JSXClassic = require($45b81229); var jsx = require(JSX).jsxDEV, JSXFrag = require(JSXClassic).Fragment; - var tab = "\t"; var f = ""; var f = "\u2087"; diff --git a/test/snapshots/styledcomponents-output.hmr.js b/test/snapshots/styledcomponents-output.hmr.js index b39adb87c..266a24ca1 100644 --- a/test/snapshots/styledcomponents-output.hmr.js +++ b/test/snapshots/styledcomponents-output.hmr.js @@ -11,16 +11,16 @@ __require as require import { __FastRefreshModule as FastHMR } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); var jsx = require(JSX).jsxDEV; -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); -var hmr = new FastHMR(1290604342, "styledcomponents-output.js", FastRefresh), exports = hmr.exports; +import * as $1dd97690 from "http://localhost:8080/node_modules/styled-components/dist/styled-components.browser.esm.js"; +var { default: styled} = require($1dd97690); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var { default: React} = require($45b81229); +import * as $d2dc5006 from "http://localhost:8080/node_modules/react-dom/index.js"; +var { default: ReactDOM} = require($d2dc5006); +var hmr = new FastHMR(1833563982, "styledcomponents-output.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { const ErrorScreenRoot = styled.div` font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, diff --git a/test/snapshots/styledcomponents-output.js b/test/snapshots/styledcomponents-output.js index f3a59d365..63bfc786d 100644 --- a/test/snapshots/styledcomponents-output.js +++ b/test/snapshots/styledcomponents-output.js @@ -1,16 +1,15 @@ import { __require as require } from "http://localhost:8080/bun:wrap"; -import * as $2f488e5b from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; -var JSX = require($2f488e5b); +import * as $1407d117 from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js"; +var JSX = require($1407d117); var jsx = require(JSX).jsxDEV; - -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); +import * as $1dd97690 from "http://localhost:8080/node_modules/styled-components/dist/styled-components.browser.esm.js"; +var { default: styled} = require($1dd97690); +import * as $45b81229 from "http://localhost:8080/node_modules/react/index.js"; +var { default: React} = require($45b81229); +import * as $d2dc5006 from "http://localhost:8080/node_modules/react-dom/index.js"; +var { default: ReactDOM} = require($d2dc5006); const ErrorScreenRoot = styled.div` font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif; @@ -39,7 +38,6 @@ const ErrorScreenRoot = styled.div` color: inherit; } `; - export function test() { if (typeof window !== "undefined") { const reactEl = document.createElement("div"); diff --git a/test/snapshots/template-literal.hmr.js b/test/snapshots/template-literal.hmr.js index 0baee2be1..6d9c7b8ca 100644 --- a/test/snapshots/template-literal.hmr.js +++ b/test/snapshots/template-literal.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(2201713056, "template-literal.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(929338545, "template-literal.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { const css = (templ) => templ.toString(); const fooNoBracesUTF8 = css` diff --git a/test/snapshots/ts-fallback-rewrite-works.hmr.js b/test/snapshots/ts-fallback-rewrite-works.hmr.js index 09f26c952..855c2d89f 100644 --- a/test/snapshots/ts-fallback-rewrite-works.hmr.js +++ b/test/snapshots/ts-fallback-rewrite-works.hmr.js @@ -1,11 +1,11 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __HMRModule as HMR -} from "http://localhost:3000/bun:wrap"; -var hmr = new HMR(421762902, "ts-fallback-rewrite-works.ts"), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +var hmr = new HMR(1227236257, "ts-fallback-rewrite-works.ts"), exports = hmr.exports; (hmr._load = function() { function test() { return testDone(import.meta.url); @@ -23,4 +23,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/ts-fallback-rewrite-works.js.map +//# sourceMappingURL=http://localhost:8080/ts-fallback-rewrite-works.js.map diff --git a/test/snapshots/tsx-fallback-rewrite-works.hmr.js b/test/snapshots/tsx-fallback-rewrite-works.hmr.js index b33df25c4..20b6e7a21 100644 --- a/test/snapshots/tsx-fallback-rewrite-works.hmr.js +++ b/test/snapshots/tsx-fallback-rewrite-works.hmr.js @@ -1,14 +1,14 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -var hmr = new FastHMR(2117426367, "tsx-fallback-rewrite-works.tsx", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +var hmr = new FastHMR(360033594, "tsx-fallback-rewrite-works.tsx", FastRefresh), exports = hmr.exports; (hmr._load = function() { function test() { return testDone(import.meta.url); @@ -26,4 +26,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/tsx-fallback-rewrite-works.js.map +//# sourceMappingURL=http://localhost:8080/tsx-fallback-rewrite-works.js.map diff --git a/test/snapshots/type-only-imports.hmr.ts b/test/snapshots/type-only-imports.hmr.ts index f732881b7..f4cb4c2b1 100644 --- a/test/snapshots/type-only-imports.hmr.ts +++ b/test/snapshots/type-only-imports.hmr.ts @@ -1,11 +1,11 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __HMRModule as HMR -} from "http://localhost:3000/bun:wrap"; -var hmr = new HMR(650094581, "type-only-imports.ts"), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +var hmr = new HMR(3679071858, "type-only-imports.ts"), exports = hmr.exports; (hmr._load = function() { var baconator = true; var SilentSymbolCollisionsAreOkayInTypeScript = true; @@ -33,4 +33,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/type-only-imports.ts.map +//# sourceMappingURL=http://localhost:8080/type-only-imports.ts.map diff --git a/test/snapshots/unicode-identifiers.hmr.js b/test/snapshots/unicode-identifiers.hmr.js index be84e436e..af31ee68f 100644 --- a/test/snapshots/unicode-identifiers.hmr.js +++ b/test/snapshots/unicode-identifiers.hmr.js @@ -1,14 +1,14 @@ import { __HMRClient as Bun -} from "http://localhost:3000/bun:wrap"; -Bun.activate(true); +} from "http://localhost:8080/bun:wrap"; +Bun.activate(false); import { __FastRefreshModule as FastHMR -} from "http://localhost:3000/bun:wrap"; +} from "http://localhost:8080/bun:wrap"; import { __FastRefreshRuntime as FastRefresh -} from "http://localhost:3000/bun:wrap"; -var hmr = new FastHMR(1398361736, "unicode-identifiers.js", FastRefresh), exports = hmr.exports; +} from "http://localhost:8080/bun:wrap"; +var hmr = new FastHMR(3104834253, "unicode-identifiers.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var ε = 0.000001; var ε2 = ε * ε; @@ -38,4 +38,4 @@ export { $$hmr_test as test }; -//# sourceMappingURL=http://localhost:3000/unicode-identifiers.js.map +//# sourceMappingURL=http://localhost:8080/unicode-identifiers.js.map diff --git a/test/snapshots/void-shouldnt-delete-call-expressions.hmr.js b/test/snapshots/void-shouldnt-delete-call-expressions.hmr.js index f2a1dbf18..e1cef13fe 100644 --- a/test/snapshots/void-shouldnt-delete-call-expressions.hmr.js +++ b/test/snapshots/void-shouldnt-delete-call-expressions.hmr.js @@ -8,7 +8,7 @@ __FastRefreshModule as FastHMR import { __FastRefreshRuntime as FastRefresh } from "http://localhost:8080/bun:wrap"; -var hmr = new FastHMR(635901064, "void-shouldnt-delete-call-expressions.js", FastRefresh), exports = hmr.exports; +var hmr = new FastHMR(4057172107, "void-shouldnt-delete-call-expressions.js", FastRefresh), exports = hmr.exports; (hmr._load = function() { var was_called = false; function thisShouldBeCalled() { diff --git a/test/snippets/bun.lockb b/test/snippets/bun.lockb Binary files differindex 127db7b6d..cc2676be1 100755 --- a/test/snippets/bun.lockb +++ b/test/snippets/bun.lockb |