aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-06 20:02:40 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-06 20:02:40 -0700
commit0d79435ce26f5d97886f58f4f8d191cdc73fb7e6 (patch)
tree733b935ca9c6c8fbfb88d1ff60bd940c5e0268da
parent4ee2fdf1c612f39426b14a2c37c1e46735d9f58e (diff)
downloadbun-0d79435ce26f5d97886f58f4f8d191cdc73fb7e6.tar.gz
bun-0d79435ce26f5d97886f58f4f8d191cdc73fb7e6.tar.zst
bun-0d79435ce26f5d97886f58f4f8d191cdc73fb7e6.zip
Snapshots
-rw-r--r--integration/snapshots/custom-emotion-jsx/file.hmr.jsx6
-rw-r--r--integration/snapshots/custom-emotion-jsx/file.jsx22
-rw-r--r--integration/snapshots/multiple-imports.hmr.js4
-rw-r--r--integration/snapshots/multiple-imports.js4
-rw-r--r--integration/snapshots/react-context-value-func.hmr.tsx20
-rw-r--r--integration/snapshots/react-context-value-func.tsx35
-rw-r--r--integration/snapshots/spread_with_key.hmr.tsx2
-rw-r--r--integration/snapshots/spread_with_key.tsx2
-rw-r--r--integration/snapshots/styledcomponents-output.hmr.js4
-rw-r--r--integration/snapshots/styledcomponents-output.js4
-rw-r--r--packages/bun-cli-darwin-x64/package.json2
-rw-r--r--packages/bun-cli/package.json2
12 files changed, 82 insertions, 25 deletions
diff --git a/integration/snapshots/custom-emotion-jsx/file.hmr.jsx b/integration/snapshots/custom-emotion-jsx/file.hmr.jsx
index 447bb6dd7..da190ef0d 100644
--- a/integration/snapshots/custom-emotion-jsx/file.hmr.jsx
+++ b/integration/snapshots/custom-emotion-jsx/file.hmr.jsx
@@ -7,7 +7,7 @@ __require as require
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 JSX from "http://localhost:8080/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js";
var jsx = require(JSX).jsxDEV;
import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js";
@@ -18,12 +18,12 @@ var hmr = new HMR(2497996991, "custom-emotion-jsx/file.jsx"), exports = hmr.expo
(hmr._load = function() {
var Foo = () => jsx("div", {
css: {content: '"it worked!"' }
- }, undefined, true, undefined, this);
+ }, undefined, false, undefined, this);
function test() {
const element = document.createElement("div");
element.id = "custom-emotion-jsx";
document.body.appendChild(element);
- ReactDOM.render(jsx(Foo, {}, undefined, true, undefined, this), element);
+ ReactDOM.render(jsx(Foo, {}, undefined, false, undefined, this), element);
const style = window.getComputedStyle(element.firstChild);
if (!(style["content"] ?? "").includes("it worked!"))
throw new Error('Expected "it worked!" but received: ' + style["content"]);
diff --git a/integration/snapshots/custom-emotion-jsx/file.jsx b/integration/snapshots/custom-emotion-jsx/file.jsx
new file mode 100644
index 000000000..b6be3371f
--- /dev/null
+++ b/integration/snapshots/custom-emotion-jsx/file.jsx
@@ -0,0 +1,22 @@
+import {
+__require as require
+} from "http://localhost:8080/__runtime.js";
+import * as JSX from "http://localhost:8080/node_modules/@emotion/react/jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js";
+var jsx = require(JSX).jsxDEV;
+
+import * as $5b3cea55 from "http://localhost:8080/node_modules/react-dom/index.js";
+var ReactDOM = require($5b3cea55);
+export const Foo = () => jsx("div", {
+ css: {content: '"it worked!"' }
+}, undefined, false, undefined, this);
+
+export function test() {
+ const element = document.createElement("div");
+ element.id = "custom-emotion-jsx";
+ document.body.appendChild(element);
+ ReactDOM.render(jsx(Foo, {}, undefined, false, undefined, this), element);
+ const style = window.getComputedStyle(element.firstChild);
+ if (!(style["content"] ?? "").includes("it worked!"))
+ throw new Error('Expected "it worked!" but received: ' + style["content"]);
+ return testDone(import.meta.url);
+}
diff --git a/integration/snapshots/multiple-imports.hmr.js b/integration/snapshots/multiple-imports.hmr.js
index 022f3e666..03cfe9d1a 100644
--- a/integration/snapshots/multiple-imports.hmr.js
+++ b/integration/snapshots/multiple-imports.hmr.js
@@ -20,8 +20,8 @@ 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, undefined, this);
+ children: "hello"
+ }, undefined, false, undefined, this);
function test() {
console.assert(bacon === React);
console.assert(bacon === React2);
diff --git a/integration/snapshots/multiple-imports.js b/integration/snapshots/multiple-imports.js
index 1bc6eb747..a98366885 100644
--- a/integration/snapshots/multiple-imports.js
+++ b/integration/snapshots/multiple-imports.js
@@ -11,8 +11,8 @@ var { default: React2} = require($bbcd215f);
const bacon = React;
const bacon2 = jsx(JSXFrag, {
- children: ["hello"]
-}, undefined, true, undefined, this);
+ children: "hello"
+}, undefined, false, undefined, this);
export function test() {
console.assert(bacon === React);
console.assert(bacon === React2);
diff --git a/integration/snapshots/react-context-value-func.hmr.tsx b/integration/snapshots/react-context-value-func.hmr.tsx
index 090911b33..c6313661e 100644
--- a/integration/snapshots/react-context-value-func.hmr.tsx
+++ b/integration/snapshots/react-context-value-func.hmr.tsx
@@ -23,23 +23,23 @@ var hmr = new HMR(3514348331, "react-context-value-func.tsx"), exports = hmr.exp
const foo = true;
return jsx(Context.Provider, {
value: cb,
- children: [children(foo)]
- }, undefined, true, undefined, this);
+ children: children(foo)
+ }, undefined, false, undefined, this);
};
const ContextValue = ({}) => jsx(Context.Consumer, {
- children: [(foo) => {
+ children: (foo) => {
if (foo)
return jsx("div", {
- children: ["Worked!"]
- }, undefined, true, undefined, this);
+ children: "Worked!"
+ }, undefined, false, undefined, this);
throw `Value "${foo}"" should be true`;
- }]
- }, undefined, true, undefined, this);
+ }
+ }, undefined, false, undefined, this);
const TestComponent = () => jsx(ContextProvider, {
- children: [jsx(ContextValue, {}, undefined, true, undefined, this)]
- }, undefined, true, undefined, this);
+ children: jsx(ContextValue, {}, undefined, false, undefined, this)
+ }, undefined, false, undefined, this);
function test() {
- const foo = jsx(TestComponent, {}, undefined, true, undefined, this);
+ const foo = jsx(TestComponent, {}, undefined, false, undefined, this);
return testDone(import.meta.url);
}
hmr.exportAll({
diff --git a/integration/snapshots/react-context-value-func.tsx b/integration/snapshots/react-context-value-func.tsx
new file mode 100644
index 000000000..5d151afba
--- /dev/null
+++ b/integration/snapshots/react-context-value-func.tsx
@@ -0,0 +1,35 @@
+import {
+__require as require
+} from "http://localhost:8080/__runtime.js";
+import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js";
+var jsx = require(JSX).jsxDEV;
+
+import * as $bbcd215f from "http://localhost:8080/node_modules/react/index.js";
+var { default: React} = require($bbcd215f);
+const Context = React.createContext({});
+
+const ContextProvider = ({ children }) => {
+ const [cb, setCB] = React.useState(function() {
+ });
+ const foo = true;
+ return jsx(Context.Provider, {
+ value: cb,
+ children: children(foo)
+ }, undefined, false, undefined, this);
+};
+const ContextValue = ({}) => jsx(Context.Consumer, {
+ children: (foo) => {
+ if (foo)
+ return jsx("div", {
+ children: "Worked!"
+ }, undefined, false, undefined, this);
+ throw `Value "${foo}"" should be true`;
+ }
+}, undefined, false, undefined, this);
+const TestComponent = () => jsx(ContextProvider, {
+ children: jsx(ContextValue, {}, undefined, false, undefined, this)
+}, undefined, false, undefined, this);
+export function test() {
+ const foo = jsx(TestComponent, {}, undefined, false, undefined, this);
+ return testDone(import.meta.url);
+}
diff --git a/integration/snapshots/spread_with_key.hmr.tsx b/integration/snapshots/spread_with_key.hmr.tsx
index 9176e2ef7..4b5d9ccf6 100644
--- a/integration/snapshots/spread_with_key.hmr.tsx
+++ b/integration/snapshots/spread_with_key.hmr.tsx
@@ -31,7 +31,7 @@ var hmr = new HMR(2717584935, "spread_with_key.tsx"), exports = hmr.exports;
function test() {
console.assert(React.isValidElement(jsx(SpreadWithTheKey, {
className: "foo"
- }, undefined, true, undefined, this)));
+ }, undefined, false, undefined, this)));
return testDone(import.meta.url);
}
hmr.exportAll({
diff --git a/integration/snapshots/spread_with_key.tsx b/integration/snapshots/spread_with_key.tsx
index 052e3f4ba..cb079bb95 100644
--- a/integration/snapshots/spread_with_key.tsx
+++ b/integration/snapshots/spread_with_key.tsx
@@ -23,6 +23,6 @@ export function SpreadWithTheKey({
export function test() {
console.assert(React.isValidElement(jsx(SpreadWithTheKey, {
className: "foo"
- }, undefined, true, undefined, this)));
+ }, undefined, false, undefined, this)));
return testDone(import.meta.url);
}
diff --git a/integration/snapshots/styledcomponents-output.hmr.js b/integration/snapshots/styledcomponents-output.hmr.js
index 5d0dee825..e451ae202 100644
--- a/integration/snapshots/styledcomponents-output.hmr.js
+++ b/integration/snapshots/styledcomponents-output.hmr.js
@@ -53,8 +53,8 @@ var hmr = new HMR(1290604342, "styledcomponents-output.js"), exports = hmr.expor
document.body.appendChild(reactEl);
ReactDOM.render(jsx(ErrorScreenRoot, {
id: "error-el",
- children: ["The react child should have this text"]
- }, undefined, true, undefined, this), reactEl);
+ children: "The react child should have this text"
+ }, undefined, false, undefined, this), reactEl);
const style = document.querySelector("style[data-styled]");
console.assert(style, "style tag should exist");
console.assert(style.textContent.split("").every((a) => a.codePointAt(0) < 128), "style tag should not contain invalid unicode codepoints");
diff --git a/integration/snapshots/styledcomponents-output.js b/integration/snapshots/styledcomponents-output.js
index df45ce11e..0f81a0ba7 100644
--- a/integration/snapshots/styledcomponents-output.js
+++ b/integration/snapshots/styledcomponents-output.js
@@ -44,8 +44,8 @@ export function test() {
document.body.appendChild(reactEl);
ReactDOM.render(jsx(ErrorScreenRoot, {
id: "error-el",
- children: ["The react child should have this text"]
- }, undefined, true, undefined, this), reactEl);
+ children: "The react child should have this text"
+ }, undefined, false, undefined, this), reactEl);
const style = document.querySelector("style[data-styled]");
console.assert(style, "style tag should exist");
console.assert(style.textContent.split("").every((a) => a.codePointAt(0) < 128), "style tag should not contain invalid unicode codepoints");
diff --git a/packages/bun-cli-darwin-x64/package.json b/packages/bun-cli-darwin-x64/package.json
index 73ccbdde8..2b74a6832 100644
--- a/packages/bun-cli-darwin-x64/package.json
+++ b/packages/bun-cli-darwin-x64/package.json
@@ -4,5 +4,5 @@
},
"name": "bun-cli-darwin-x64",
"repository": "https://github.com/jarred-sumner/bun",
- "version": "0.0.32"
+ "version": "0.0.34"
}
diff --git a/packages/bun-cli/package.json b/packages/bun-cli/package.json
index 2e2682e24..6541c95fe 100644
--- a/packages/bun-cli/package.json
+++ b/packages/bun-cli/package.json
@@ -9,5 +9,5 @@
"postinstall": "node postinstall.js",
"prepublishOnly": "rm -rf ./bin/bun; chmod +x ./reset-bin.js; cp ./reset-bin.js ./bin/bun"
},
- "version": "0.0.32"
+ "version": "0.0.34"
}