mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 21:32:05 +00:00
📷
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
var lines;
|
||||
const data = () => lines.map(([a = null, b = null, c = null, d = null]) => ({
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d
|
||||
}));
|
||||
export function test() {
|
||||
let ran = false;
|
||||
lines = [
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined]
|
||||
];
|
||||
for (let foo of data()) {
|
||||
console.assert(foo.a === null);
|
||||
console.assert(foo.b === null);
|
||||
console.assert(foo.c === null);
|
||||
console.assert(foo.d === null);
|
||||
ran = true;
|
||||
}
|
||||
console.assert(ran);
|
||||
testDone(import.meta.url);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
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]) => ({
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d
|
||||
}));
|
||||
function test() {
|
||||
let ran = false;
|
||||
lines = [
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined]
|
||||
];
|
||||
for (let foo of data()) {
|
||||
console.assert(foo.a === null);
|
||||
console.assert(foo.b === null);
|
||||
console.assert(foo.c === null);
|
||||
console.assert(foo.d === null);
|
||||
ran = true;
|
||||
}
|
||||
console.assert(ran);
|
||||
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
|
||||
};
|
||||
47
integration/snapshots/array-args-with-default-values.hmr.js
Normal file
47
integration/snapshots/array-args-with-default-values.hmr.js
Normal file
@@ -0,0 +1,47 @@
|
||||
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(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]) => ({
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d
|
||||
}));
|
||||
function test() {
|
||||
let ran = false;
|
||||
lines = [
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined]
|
||||
];
|
||||
for (let foo of data()) {
|
||||
console.assert(foo.a === null);
|
||||
console.assert(foo.b === null);
|
||||
console.assert(foo.c === null);
|
||||
console.assert(foo.d === null);
|
||||
ran = true;
|
||||
}
|
||||
console.assert(ran);
|
||||
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
|
||||
};
|
||||
25
integration/snapshots/array-args-with-default-values.js
Normal file
25
integration/snapshots/array-args-with-default-values.js
Normal file
@@ -0,0 +1,25 @@
|
||||
var lines;
|
||||
const data = () => lines.map(([a = null, b = null, c = null, d = null]) => ({
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
d
|
||||
}));
|
||||
export function test() {
|
||||
let ran = false;
|
||||
lines = [
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined],
|
||||
[undefined, undefined, undefined, undefined]
|
||||
];
|
||||
for (let foo of data()) {
|
||||
console.assert(foo.a === null);
|
||||
console.assert(foo.b === null);
|
||||
console.assert(foo.c === null);
|
||||
console.assert(foo.d === null);
|
||||
ran = true;
|
||||
}
|
||||
console.assert(ran);
|
||||
testDone(import.meta.url);
|
||||
}
|
||||
30
integration/snapshots/bundled-entry-point.hmr.js
Normal file
30
integration/snapshots/bundled-entry-point.hmr.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js";
|
||||
Bun.activate(false);
|
||||
|
||||
var hmr = new HMR(3012834585, "bundled-entry-point.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var hello = null ?? "world";
|
||||
function test() {
|
||||
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
|
||||
};
|
||||
@@ -1,30 +1,9 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js";
|
||||
Bun.activate(true);
|
||||
var hello = null ?? "world";
|
||||
|
||||
var hmr = new HMR(3012834585, "bundled-entry-point.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var hello = null ?? "world";
|
||||
function test() {
|
||||
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
|
||||
};
|
||||
export function test() {
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__cJS2eSM
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import * as _login_b977_0 from "http://localhost:8080/_login.js";
|
||||
import * as _login_b977_1 from "http://localhost:8080/_login.js";
|
||||
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";
|
||||
|
||||
export default __cJS2eSM(function(module, exports) {
|
||||
;
|
||||
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
module.exports.iAmCommonJs = true;
|
||||
exports.YouAreCommonJS = true;
|
||||
require(_login_b977_0);
|
||||
require(_login_b977_1);
|
||||
Object.defineProperty(module.exports,"login",{get: () => _login, enumerable: true, configurable: true});
|
||||
var test = function test() {
|
||||
return testDone(import.meta.url);
|
||||
};
|
||||
Object.defineProperty(module.exports,"test",{get: () => test, enumerable: true, configurable: true});
|
||||
var foo, bar;
|
||||
Object.defineProperties(module.exports,{'foo': {get: () => foo, set: ($_newValue) => {foo = $_newValue;}, enumerable: true, configurable: true},
|
||||
'bar': {get: () => bar, set: ($_newValue) => {bar = $_newValue;}, enumerable: true, configurable: true}});
|
||||
}, "cjs-transform-shouldnt-have-static-imports-in-cjs-function.js");
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export default __cJS2eSM(function(module, exports) {
|
||||
return testDone(import.meta.url);
|
||||
};
|
||||
Object.defineProperty(module.exports,"test",{get: () => test, enumerable: true, configurable: true});
|
||||
var foo, bar;
|
||||
let foo, bar;
|
||||
Object.defineProperties(module.exports,{'foo': {get: () => foo, set: ($_newValue) => {foo = $_newValue;}, enumerable: true, configurable: true},
|
||||
'bar': {get: () => bar, set: ($_newValue) => {bar = $_newValue;}, enumerable: true, configurable: true}});
|
||||
}, "cjs-transform-shouldnt-have-static-imports-in-cjs-function.js");
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
var testFailed = false;
|
||||
const invariant = () => {
|
||||
testFailed = true;
|
||||
};
|
||||
var $$m = (arg) => {
|
||||
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() {
|
||||
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);
|
||||
!(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl);
|
||||
};
|
||||
foo({size: 100, ttl: 3600 });
|
||||
};
|
||||
RelayQueryResponseCache();
|
||||
}
|
||||
}["relay-runtime/lib/network/RelayQueryResponseCache.js"]);
|
||||
export function test() {
|
||||
var foo = () => result;
|
||||
if (testFailed)
|
||||
throw new Error("invariant should not be called");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(726376257, "code-simplification-neql-define.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var testFailed = false;
|
||||
const invariant = () => {
|
||||
testFailed = true;
|
||||
};
|
||||
var $$m = (arg) => {
|
||||
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() {
|
||||
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);
|
||||
!(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl);
|
||||
};
|
||||
foo({size: 100, ttl: 3600 });
|
||||
};
|
||||
RelayQueryResponseCache();
|
||||
}
|
||||
}["relay-runtime/lib/network/RelayQueryResponseCache.js"]);
|
||||
function test() {
|
||||
var foo = () => result;
|
||||
if (testFailed)
|
||||
throw new Error("invariant should not be called");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
$f332019d: () => $f332019d,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_$f332019d = hmr.exports.$f332019d, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_$f332019d = exports.$f332019d;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_$f332019d as $f332019d,
|
||||
$$hmr_test as test
|
||||
};
|
||||
53
integration/snapshots/code-simplification-neql-define.hmr.js
Normal file
53
integration/snapshots/code-simplification-neql-define.hmr.js
Normal file
@@ -0,0 +1,53 @@
|
||||
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(726376257, "code-simplification-neql-define.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var testFailed = false;
|
||||
const invariant = () => {
|
||||
testFailed = true;
|
||||
};
|
||||
var $$m = (arg) => {
|
||||
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() {
|
||||
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);
|
||||
!(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl);
|
||||
};
|
||||
foo({size: 100, ttl: 3600 });
|
||||
};
|
||||
RelayQueryResponseCache();
|
||||
}
|
||||
}["relay-runtime/lib/network/RelayQueryResponseCache.js"]);
|
||||
function test() {
|
||||
var foo = () => result;
|
||||
if (testFailed)
|
||||
throw new Error("invariant should not be called");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
$f332019d: () => $f332019d,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_$f332019d = hmr.exports.$f332019d, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_$f332019d = exports.$f332019d;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_$f332019d as $f332019d,
|
||||
$$hmr_test as test
|
||||
};
|
||||
28
integration/snapshots/code-simplification-neql-define.js
Normal file
28
integration/snapshots/code-simplification-neql-define.js
Normal file
@@ -0,0 +1,28 @@
|
||||
var testFailed = false;
|
||||
const invariant = () => {
|
||||
testFailed = true;
|
||||
};
|
||||
var $$m = (arg) => {
|
||||
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() {
|
||||
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);
|
||||
!(ttl > 0) && invariant(false, "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", ttl);
|
||||
};
|
||||
foo({size: 100, ttl: 3600 });
|
||||
};
|
||||
RelayQueryResponseCache();
|
||||
}
|
||||
}["relay-runtime/lib/network/RelayQueryResponseCache.js"]);
|
||||
export function test() {
|
||||
var foo = () => result;
|
||||
if (testFailed)
|
||||
throw new Error("invariant should not be called");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
74
integration/snapshots/export.hmr.js
Normal file
74
integration/snapshots/export.hmr.js
Normal file
@@ -0,0 +1,74 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import what from "http://localhost:8080/_auth.js";
|
||||
import * as where from "http://localhost:8080/_auth.js";
|
||||
Bun.activate(false);
|
||||
|
||||
var hmr = new HMR(1879780259, "export.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var yoyoyo = "yoyoyo";
|
||||
function hey() {
|
||||
return true;
|
||||
}
|
||||
var foo = () => {
|
||||
};
|
||||
var bar = 100;
|
||||
var powerLevel = Symbol("9001");
|
||||
function test() {
|
||||
hey();
|
||||
foo();
|
||||
if (where.default !== "hi")
|
||||
throw new Error(`_auth import is incorrect.`);
|
||||
console.assert(powerLevel.description === "9001", "Symbol is not exported correctly");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
yoyoyo: () => yoyoyo,
|
||||
default: () => hey,
|
||||
foo: () => foo,
|
||||
bar: () => bar,
|
||||
powerLevel: () => powerLevel,
|
||||
what: () => what,
|
||||
when: () => what,
|
||||
whence: () => what,
|
||||
where: () => where,
|
||||
booop: () => bar,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_yoyoyo = hmr.exports.yoyoyo, $$hmr_default = hmr.exports.default, $$hmr_foo = hmr.exports.foo, $$hmr_bar = hmr.exports.bar, $$hmr_powerLevel = hmr.exports.powerLevel, $$hmr_what = hmr.exports.what, $$hmr_when = hmr.exports.when, $$hmr_whence = hmr.exports.whence, $$hmr_where = hmr.exports.where, $$hmr_booop = hmr.exports.booop, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_yoyoyo = exports.yoyoyo;
|
||||
$$hmr_default = exports.default;
|
||||
$$hmr_foo = exports.foo;
|
||||
$$hmr_bar = exports.bar;
|
||||
$$hmr_powerLevel = exports.powerLevel;
|
||||
$$hmr_what = exports.what;
|
||||
$$hmr_when = exports.when;
|
||||
$$hmr_whence = exports.whence;
|
||||
$$hmr_where = exports.where;
|
||||
$$hmr_booop = exports.booop;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_yoyoyo as yoyoyo,
|
||||
$$hmr_default as default,
|
||||
$$hmr_foo as foo,
|
||||
$$hmr_bar as bar,
|
||||
$$hmr_powerLevel as powerLevel,
|
||||
$$hmr_what as what,
|
||||
$$hmr_when as when,
|
||||
$$hmr_whence as whence,
|
||||
$$hmr_where as where,
|
||||
$$hmr_booop as booop,
|
||||
$$hmr_test as test
|
||||
};
|
||||
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";
|
||||
@@ -1,74 +1,31 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import what from "http://localhost:8080/_auth.js";
|
||||
import * as where from "http://localhost:8080/_auth.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(1879780259, "export.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var yoyoyo = "yoyoyo";
|
||||
function hey() {
|
||||
return true;
|
||||
}
|
||||
var foo = () => {
|
||||
};
|
||||
var bar = 100;
|
||||
var powerLevel = Symbol("9001");
|
||||
function test() {
|
||||
hey();
|
||||
foo();
|
||||
if (where.default !== "hi")
|
||||
throw new Error(`_auth import is incorrect.`);
|
||||
console.assert(powerLevel.description === "9001", "Symbol is not exported correctly");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
yoyoyo: () => yoyoyo,
|
||||
default: () => hey,
|
||||
foo: () => foo,
|
||||
bar: () => bar,
|
||||
powerLevel: () => powerLevel,
|
||||
what: () => what,
|
||||
when: () => what,
|
||||
whence: () => what,
|
||||
where: () => where,
|
||||
booop: () => bar,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_yoyoyo = hmr.exports.yoyoyo, $$hmr_default = hmr.exports.default, $$hmr_foo = hmr.exports.foo, $$hmr_bar = hmr.exports.bar, $$hmr_powerLevel = hmr.exports.powerLevel, $$hmr_what = hmr.exports.what, $$hmr_when = hmr.exports.when, $$hmr_whence = hmr.exports.whence, $$hmr_where = hmr.exports.where, $$hmr_booop = hmr.exports.booop, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_yoyoyo = exports.yoyoyo;
|
||||
$$hmr_default = exports.default;
|
||||
$$hmr_foo = exports.foo;
|
||||
$$hmr_bar = exports.bar;
|
||||
$$hmr_powerLevel = exports.powerLevel;
|
||||
$$hmr_what = exports.what;
|
||||
$$hmr_when = exports.when;
|
||||
$$hmr_whence = exports.whence;
|
||||
$$hmr_where = exports.where;
|
||||
$$hmr_booop = exports.booop;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_yoyoyo as yoyoyo,
|
||||
$$hmr_default as default,
|
||||
$$hmr_foo as foo,
|
||||
$$hmr_bar as bar,
|
||||
$$hmr_powerLevel as powerLevel,
|
||||
$$hmr_what as what,
|
||||
$$hmr_when as when,
|
||||
$$hmr_whence as whence,
|
||||
$$hmr_where as where,
|
||||
$$hmr_booop as booop,
|
||||
$$hmr_test as test
|
||||
};
|
||||
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";
|
||||
|
||||
export default function hey() {
|
||||
return true;
|
||||
}
|
||||
export const foo = () => {
|
||||
};
|
||||
export var bar = 100;
|
||||
export let powerLevel = Symbol("9001");
|
||||
|
||||
export {what};
|
||||
export {what as when, what as whence};
|
||||
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();
|
||||
foo();
|
||||
if (where.default !== "hi")
|
||||
throw new Error(`_auth import is incorrect.`);
|
||||
console.assert(powerLevel.description === "9001", "Symbol is not exported correctly");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
8
integration/snapshots/forbid-in-is-correct.debug.js
Normal file
8
integration/snapshots/forbid-in-is-correct.debug.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var foo = () => {
|
||||
var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports);
|
||||
return D;
|
||||
};
|
||||
export function test() {
|
||||
foo();
|
||||
testDone(import.meta.url);
|
||||
}
|
||||
30
integration/snapshots/forbid-in-is-correct.hmr.debug.js
Normal file
30
integration/snapshots/forbid-in-is-correct.hmr.debug.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
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);
|
||||
return D;
|
||||
};
|
||||
function test() {
|
||||
foo();
|
||||
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
|
||||
};
|
||||
30
integration/snapshots/forbid-in-is-correct.hmr.js
Normal file
30
integration/snapshots/forbid-in-is-correct.hmr.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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(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);
|
||||
return D;
|
||||
};
|
||||
function test() {
|
||||
foo();
|
||||
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
|
||||
};
|
||||
8
integration/snapshots/forbid-in-is-correct.js
Normal file
8
integration/snapshots/forbid-in-is-correct.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var foo = () => {
|
||||
var D = (i, r) => () => (r || i((r = {exports: {} }).exports, r), r.exports);
|
||||
return D;
|
||||
};
|
||||
export function test() {
|
||||
foo();
|
||||
testDone(import.meta.url);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
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(713665787, "global-is-remapped-to-globalThis.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
console.assert(globalThis === globalThis);
|
||||
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
|
||||
};
|
||||
@@ -1,26 +1,4 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(713665787, "global-is-remapped-to-globalThis.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
console.assert(globalThis === globalThis);
|
||||
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
|
||||
};
|
||||
export function test() {
|
||||
console.assert(globalThis === globalThis);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
41
integration/snapshots/lodash-regexp.hmr.js
Normal file
41
integration/snapshots/lodash-regexp.hmr.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import * as $60f52dc2 from "http://localhost:8080/node_modules/lodash/lodash.js";
|
||||
var { shuffle} = require($60f52dc2);
|
||||
Bun.activate(false);
|
||||
|
||||
var hmr = new HMR(2158065009, "lodash-regexp.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
const foo = [1, 2, 3, 4, 6];
|
||||
const bar = shuffle(foo);
|
||||
console.assert(bar !== foo);
|
||||
console.assert(bar.length === foo.length);
|
||||
bar.sort();
|
||||
foo.sort();
|
||||
for (let i = 0;i < bar.length; i++) {
|
||||
console.assert(bar[i] === foo[i], "expected " + i + " to be " + foo[i]);
|
||||
console.assert(typeof bar[i] === "number");
|
||||
console.assert(typeof foo[i] === "number");
|
||||
}
|
||||
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
|
||||
};
|
||||
@@ -1,41 +1,21 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import * as $60f52dc2 from "http://localhost:8080/node_modules/lodash/lodash.js";
|
||||
var { shuffle} = require($60f52dc2);
|
||||
Bun.activate(true);
|
||||
export function test() {
|
||||
const foo = [1, 2, 3, 4, 6];
|
||||
|
||||
var hmr = new HMR(2158065009, "lodash-regexp.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
const foo = [1, 2, 3, 4, 6];
|
||||
const bar = shuffle(foo);
|
||||
console.assert(bar !== foo);
|
||||
console.assert(bar.length === foo.length);
|
||||
bar.sort();
|
||||
foo.sort();
|
||||
for (let i = 0;i < bar.length; i++) {
|
||||
console.assert(bar[i] === foo[i], "expected " + i + " to be " + foo[i]);
|
||||
console.assert(typeof bar[i] === "number");
|
||||
console.assert(typeof foo[i] === "number");
|
||||
}
|
||||
return testDone(import.meta.url);
|
||||
const bar = shuffle(foo);
|
||||
console.assert(bar !== foo);
|
||||
console.assert(bar.length === foo.length);
|
||||
bar.sort();
|
||||
foo.sort();
|
||||
for (let i = 0;i < bar.length; i++) {
|
||||
console.assert(bar[i] === foo[i], "expected " + i + " to be " + foo[i]);
|
||||
console.assert(typeof bar[i] === "number");
|
||||
console.assert(typeof foo[i] === "number");
|
||||
}
|
||||
hmr.exportAll({
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
export {
|
||||
$$hmr_test as test
|
||||
};
|
||||
|
||||
46
integration/snapshots/multiple-imports.hmr.js
Normal file
46
integration/snapshots/multiple-imports.hmr.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
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 $bbcd215f from "http://localhost:8080/node_modules/react/index.js";
|
||||
var JSXClassic = require($bbcd215f);
|
||||
var jsx = require(JSX).jsxDEV, fileName = "multiple-imports.js", JSXFrag = require(JSX, JSXClassic).Fragment;
|
||||
|
||||
var { default: React} = require($bbcd215f);
|
||||
var { default: React2} = require($bbcd215f);
|
||||
Bun.activate(false);
|
||||
|
||||
var hmr = new HMR(2165509932, "multiple-imports.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
const bacon = React;
|
||||
const bacon2 = jsx(JSXFrag, {
|
||||
children: ["hello"]
|
||||
}, undefined, true, {
|
||||
fileName,
|
||||
lineNumber: 92
|
||||
}, this);
|
||||
function test() {
|
||||
console.assert(bacon === React);
|
||||
console.assert(bacon === React2);
|
||||
console.assert(typeof bacon2 !== "undefined");
|
||||
console.assert(React.isValidElement(bacon2));
|
||||
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
|
||||
};
|
||||
@@ -1,12 +1,6 @@
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
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 $bbcd215f from "http://localhost:8080/node_modules/react/index.js";
|
||||
var JSXClassic = require($bbcd215f);
|
||||
@@ -14,33 +8,18 @@ var jsx = require(JSX).jsxDEV, fileName = "multiple-imports.js", JSXFrag = requi
|
||||
|
||||
var { default: React} = require($bbcd215f);
|
||||
var { default: React2} = require($bbcd215f);
|
||||
Bun.activate(true);
|
||||
const bacon = React;
|
||||
|
||||
var hmr = new HMR(2165509932, "multiple-imports.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
const bacon = React;
|
||||
const bacon2 = jsx(JSXFrag, {
|
||||
children: ["hello"]
|
||||
}, undefined, true, {
|
||||
fileName,
|
||||
lineNumber: 92
|
||||
}, this);
|
||||
function test() {
|
||||
console.assert(bacon === React);
|
||||
console.assert(bacon === React2);
|
||||
console.assert(typeof bacon2 !== "undefined");
|
||||
console.assert(React.isValidElement(bacon2));
|
||||
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
|
||||
};
|
||||
const bacon2 = jsx(JSXFrag, {
|
||||
children: ["hello"]
|
||||
}, undefined, true, {
|
||||
fileName,
|
||||
lineNumber: 92
|
||||
}, this);
|
||||
export function test() {
|
||||
console.assert(bacon === React);
|
||||
console.assert(bacon === React2);
|
||||
console.assert(typeof bacon2 !== "undefined");
|
||||
console.assert(React.isValidElement(bacon2));
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as $d2a171d2 from "http://localhost:8080/package-json-exports/node_modu
|
||||
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 function test() {
|
||||
export async function test() {
|
||||
console.assert(InexactRoot.target === "browser");
|
||||
|
||||
console.assert(InexactFile.target === "browser");
|
||||
|
||||
@@ -17,7 +17,7 @@ Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(1953708113, "package-json-exports/index.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
async function test() {
|
||||
console.assert(InexactRoot.target === "browser");
|
||||
console.assert(InexactFile.target === "browser");
|
||||
console.assert(ExactFile.target === "browser");
|
||||
|
||||
37
integration/snapshots/package-json-exports/index.hmr.js
Normal file
37
integration/snapshots/package-json-exports/index.hmr.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
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(1953708113, "package-json-exports/index.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
async function test() {
|
||||
console.assert(InexactRoot.target === "browser");
|
||||
console.assert(InexactFile.target === "browser");
|
||||
console.assert(ExactFile.target === "browser");
|
||||
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
|
||||
};
|
||||
@@ -1,37 +1,17 @@
|
||||
import {
|
||||
__require as require
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
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(true);
|
||||
export async function test() {
|
||||
console.assert(InexactRoot.target === "browser");
|
||||
|
||||
var hmr = new HMR(1953708113, "package-json-exports/index.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
console.assert(InexactRoot.target === "browser");
|
||||
console.assert(InexactFile.target === "browser");
|
||||
console.assert(ExactFile.target === "browser");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
console.assert(InexactFile.target === "browser");
|
||||
console.assert(ExactFile.target === "browser");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
export {
|
||||
$$hmr_test as test
|
||||
};
|
||||
|
||||
57
integration/snapshots/string-escapes.hmr.js
Normal file
57
integration/snapshots/string-escapes.hmr.js
Normal file
@@ -0,0 +1,57 @@
|
||||
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(2482749838, "string-escapes.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var tab = "\t";
|
||||
var シ = "wow";
|
||||
var f = "";
|
||||
var obj = {
|
||||
"\r\n": "\r\n",
|
||||
"\n": "\n",
|
||||
"\t": "\t",
|
||||
"\u2028": "\u2028",
|
||||
"\u2029": "\u2029",
|
||||
"😊": "😊",
|
||||
"😃": "😃",
|
||||
"㋡": "㋡",
|
||||
"☺": "☺",
|
||||
シ: "シ",
|
||||
f,
|
||||
"☹": "☹",
|
||||
"☻": "☻",
|
||||
children: 123
|
||||
};
|
||||
const foo = () => {
|
||||
};
|
||||
const Bar = foo("a", {
|
||||
children: 123
|
||||
});
|
||||
const carriage = obj["\r\n"];
|
||||
const newline = obj["\n"];
|
||||
function test() {
|
||||
console.assert(carriage === "\r\n");
|
||||
console.assert(newline === "\n");
|
||||
console.assert(tab === "\t");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
obj: () => obj,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_obj = hmr.exports.obj, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_obj = exports.obj;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_obj as obj,
|
||||
$$hmr_test as test
|
||||
};
|
||||
@@ -1,57 +1,34 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(2482749838, "string-escapes.js"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var tab = "\t";
|
||||
var シ = "wow";
|
||||
var f = "";
|
||||
var obj = {
|
||||
"\r\n": "\r\n",
|
||||
"\n": "\n",
|
||||
"\t": "\t",
|
||||
"\u2028": "\u2028",
|
||||
"\u2029": "\u2029",
|
||||
"😊": "😊",
|
||||
"😃": "😃",
|
||||
"㋡": "㋡",
|
||||
"☺": "☺",
|
||||
シ: "シ",
|
||||
f,
|
||||
"☹": "☹",
|
||||
"☻": "☻",
|
||||
children: 123
|
||||
};
|
||||
const foo = () => {
|
||||
};
|
||||
const Bar = foo("a", {
|
||||
children: 123
|
||||
});
|
||||
const carriage = obj["\r\n"];
|
||||
const newline = obj["\n"];
|
||||
function test() {
|
||||
console.assert(carriage === "\r\n");
|
||||
console.assert(newline === "\n");
|
||||
console.assert(tab === "\t");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
obj: () => obj,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_obj = hmr.exports.obj, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_obj = exports.obj;
|
||||
$$hmr_test = exports.test;
|
||||
var tab = "\t";
|
||||
var シ = "wow";
|
||||
var f = "";
|
||||
var obj = {
|
||||
"\r\n": "\r\n",
|
||||
"\n": "\n",
|
||||
"\t": "\t",
|
||||
"\u2028": "\u2028",
|
||||
"\u2029": "\u2029",
|
||||
"😊": "😊",
|
||||
"😃": "😃",
|
||||
"㋡": "㋡",
|
||||
"☺": "☺",
|
||||
シ: "シ",
|
||||
f,
|
||||
"☹": "☹",
|
||||
"☻": "☻",
|
||||
children: 123
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_obj as obj,
|
||||
$$hmr_test as test
|
||||
const foo = () => {
|
||||
};
|
||||
const Bar = foo("a", {
|
||||
children: 123
|
||||
});
|
||||
const carriage = obj["\r\n"];
|
||||
const newline = obj["\n"];
|
||||
|
||||
export {obj};
|
||||
export function test() {
|
||||
console.assert(carriage === "\r\n");
|
||||
console.assert(newline === "\n");
|
||||
console.assert(tab === "\t");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
25
integration/snapshots/ts-fallback-rewrite-works.hmr.js
Normal file
25
integration/snapshots/ts-fallback-rewrite-works.hmr.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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(421762902, "ts-fallback-rewrite-works.ts"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
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
|
||||
};
|
||||
@@ -1,25 +1,3 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(421762902, "ts-fallback-rewrite-works.ts"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
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
|
||||
};
|
||||
export function test() {
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
25
integration/snapshots/tsx-fallback-rewrite-works.hmr.js
Normal file
25
integration/snapshots/tsx-fallback-rewrite-works.hmr.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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(2117426367, "tsx-fallback-rewrite-works.tsx"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
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
|
||||
};
|
||||
@@ -1,25 +1,3 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(2117426367, "tsx-fallback-rewrite-works.tsx"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
function test() {
|
||||
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
|
||||
};
|
||||
export function test() {
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
35
integration/snapshots/type-only-imports.hmr.ts
Normal file
35
integration/snapshots/type-only-imports.hmr.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
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(650094581, "type-only-imports.ts"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var baconator = true;
|
||||
var SilentSymbolCollisionsAreOkayInTypeScript = true;
|
||||
function test() {
|
||||
console.assert(SilentSymbolCollisionsAreOkayInTypeScript);
|
||||
console.assert(baconator);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
baconator: () => baconator,
|
||||
SilentSymbolCollisionsAreOkayInTypeScript: () => SilentSymbolCollisionsAreOkayInTypeScript,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_baconator = hmr.exports.baconator, $$hmr_SilentSymbolCollisionsAreOkayInTypeScript = hmr.exports.SilentSymbolCollisionsAreOkayInTypeScript, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_baconator = exports.baconator;
|
||||
$$hmr_SilentSymbolCollisionsAreOkayInTypeScript = exports.SilentSymbolCollisionsAreOkayInTypeScript;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_baconator as baconator,
|
||||
$$hmr_SilentSymbolCollisionsAreOkayInTypeScript as SilentSymbolCollisionsAreOkayInTypeScript,
|
||||
$$hmr_test as test
|
||||
};
|
||||
@@ -1,35 +1,7 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
|
||||
var hmr = new HMR(650094581, "type-only-imports.ts"), exports = hmr.exports;
|
||||
(hmr._load = function() {
|
||||
var baconator = true;
|
||||
var SilentSymbolCollisionsAreOkayInTypeScript = true;
|
||||
function test() {
|
||||
console.assert(SilentSymbolCollisionsAreOkayInTypeScript);
|
||||
console.assert(baconator);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
baconator: () => baconator,
|
||||
SilentSymbolCollisionsAreOkayInTypeScript: () => SilentSymbolCollisionsAreOkayInTypeScript,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_baconator = hmr.exports.baconator, $$hmr_SilentSymbolCollisionsAreOkayInTypeScript = hmr.exports.SilentSymbolCollisionsAreOkayInTypeScript, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_baconator = exports.baconator;
|
||||
$$hmr_SilentSymbolCollisionsAreOkayInTypeScript = exports.SilentSymbolCollisionsAreOkayInTypeScript;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_baconator as baconator,
|
||||
$$hmr_SilentSymbolCollisionsAreOkayInTypeScript as SilentSymbolCollisionsAreOkayInTypeScript,
|
||||
$$hmr_test as test
|
||||
};
|
||||
export const baconator = true;
|
||||
export const SilentSymbolCollisionsAreOkayInTypeScript = true;
|
||||
export function test() {
|
||||
console.assert(SilentSymbolCollisionsAreOkayInTypeScript);
|
||||
console.assert(baconator);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
30
integration/snapshots/unicode-identifiers.hmr.js
Normal file
30
integration/snapshots/unicode-identifiers.hmr.js
Normal file
@@ -0,0 +1,30 @@
|
||||
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(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() {
|
||||
console.assert(ε === 1.0e-06);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
d3_radians: () => d3_radians,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_d3_radians = hmr.exports.d3_radians, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_d3_radians = exports.d3_radians;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_d3_radians as d3_radians,
|
||||
$$hmr_test as test
|
||||
};
|
||||
@@ -1,30 +1,7 @@
|
||||
import {
|
||||
__HMRModule as HMR
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
import {
|
||||
__HMRClient as Bun
|
||||
} from "http://localhost:8080/__runtime.js";
|
||||
Bun.activate(true);
|
||||
var ε = 1.0e-06, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;
|
||||
|
||||
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() {
|
||||
console.assert(ε === 1.0e-06);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
hmr.exportAll({
|
||||
d3_radians: () => d3_radians,
|
||||
test: () => test
|
||||
});
|
||||
})();
|
||||
var $$hmr_d3_radians = hmr.exports.d3_radians, $$hmr_test = hmr.exports.test;
|
||||
hmr._update = function(exports) {
|
||||
$$hmr_d3_radians = exports.d3_radians;
|
||||
$$hmr_test = exports.test;
|
||||
};
|
||||
|
||||
export {
|
||||
$$hmr_d3_radians as d3_radians,
|
||||
$$hmr_test as test
|
||||
};
|
||||
export {d3_radians};
|
||||
export function test() {
|
||||
console.assert(ε === 1.0e-06);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
56
integration/snippets/code-simplification-neql-define.js
Normal file
56
integration/snippets/code-simplification-neql-define.js
Normal file
@@ -0,0 +1,56 @@
|
||||
var testFailed = false;
|
||||
const invariant = () => {
|
||||
testFailed = true;
|
||||
};
|
||||
var $$m = (arg) => {
|
||||
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 () {
|
||||
var foo = function RelayQueryResponseCache(_ref) {
|
||||
var size = _ref.size,
|
||||
ttl = _ref.ttl;
|
||||
!(size > 0)
|
||||
? process.env.NODE_ENV !== "production"
|
||||
? invariant(
|
||||
false,
|
||||
"RelayQueryResponseCache: Expected the max cache size to be > 0, got " +
|
||||
"`%s`.",
|
||||
size
|
||||
)
|
||||
: invariant(false)
|
||||
: void 0;
|
||||
!(ttl > 0)
|
||||
? process.env.NODE_ENV !== "production"
|
||||
? invariant(
|
||||
false,
|
||||
"RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.",
|
||||
ttl
|
||||
)
|
||||
: invariant(false)
|
||||
: void 0;
|
||||
};
|
||||
foo({ size: 100, ttl: 3600 });
|
||||
};
|
||||
RelayQueryResponseCache();
|
||||
},
|
||||
}["relay-runtime/lib/network/RelayQueryResponseCache.js"]
|
||||
);
|
||||
|
||||
export function test() {
|
||||
var foo = () => result;
|
||||
// $f332019d;
|
||||
|
||||
if (testFailed) throw new Error("invariant should not be called");
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
10
integration/snippets/forbid-in-is-correct.js
Normal file
10
integration/snippets/forbid-in-is-correct.js
Normal file
@@ -0,0 +1,10 @@
|
||||
var foo = () => {
|
||||
// prettier-ignore
|
||||
var D=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);
|
||||
return D;
|
||||
};
|
||||
|
||||
export function test() {
|
||||
foo();
|
||||
testDone(import.meta.url);
|
||||
}
|
||||
@@ -7,6 +7,5 @@ export async function test() {
|
||||
console.assert(InexactFile.target === "browser");
|
||||
console.assert(ExactFile.target === "browser");
|
||||
|
||||
console.assert(failed);
|
||||
return testDone(import.meta.url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user