chore: update deps (#561)

Update std, esbuild, and preact.
This commit is contained in:
Luca Casonato
2022-07-30 17:29:29 +02:00
committed by GitHub
parent a6aac89663
commit ba20756c17
18 changed files with 75 additions and 71 deletions
+17 -5
View File
@@ -47,9 +47,8 @@ Deno.test({
"-A",
"init.ts",
tmpDirName,
"--no-twind",
"--no-vscode",
],
stdin: "null",
stdout: "null",
});
const { code } = await cliProcess.status();
@@ -107,6 +106,7 @@ Deno.test({
await t.step("start up the server and access the root page", async () => {
const serverProcess = Deno.run({
cmd: ["deno", "run", "-A", "--check", "main.ts"],
stdin: "null",
stdout: "piped",
stderr: "inherit",
cwd: tmpDirName,
@@ -119,7 +119,7 @@ Deno.test({
let started = false;
for await (const line of lines) {
console.log(line);
if (line.includes("Server listening on http://")) {
if (line.includes("Listening on http://")) {
started = true;
break;
}
@@ -136,7 +136,9 @@ Deno.test({
assertEquals(res.status, 200);
// verify the island is revived.
const browser = await puppeteer.launch({ args: ["--no-sandbox"] });
const browser = await puppeteer.launch({
args: ["--no-sandbox"],
});
const page = await browser.newPage();
await page.goto("http://localhost:8000", { waitUntil: "networkidle2" });
const counter = await page.$("body > div > div > p");
@@ -146,7 +148,10 @@ Deno.test({
const buttonPlus = await page.$("body > div > div > button:nth-child(3)");
await buttonPlus?.click();
await delay(100);
counterValue = await counter?.evaluate((el) => el.textContent);
console.log(counterValue);
assert(counterValue === "4");
await page.close();
await browser.close();
@@ -177,6 +182,7 @@ Deno.test({
"--twind",
"--vscode",
],
stdin: "null",
stdout: "null",
});
const { code } = await cliProcess.status();
@@ -249,6 +255,7 @@ Deno.test({
await t.step("start up the server and access the root page", async () => {
const serverProcess = Deno.run({
cmd: ["deno", "run", "-A", "--check", "main.ts"],
stdin: "null",
stdout: "piped",
stderr: "inherit",
cwd: tmpDirName,
@@ -261,7 +268,7 @@ Deno.test({
let started = false;
for await (const line of lines) {
console.log(line);
if (line.includes("Server listening on http://")) {
if (line.includes("Listening on http://")) {
started = true;
break;
}
@@ -294,6 +301,8 @@ Deno.test({
const buttonPlus = await page.$("body > div > div > button:nth-child(3)");
await buttonPlus?.click();
await delay(100);
counterValue = await counter?.evaluate((el) => el.textContent);
assert(counterValue === "4");
await page.close();
@@ -316,6 +325,7 @@ Deno.test("fresh-init error(help)", async function (t) {
async () => {
const cliProcess = Deno.run({
cmd: ["deno", "run", "-A", "init.ts"],
stdin: "null",
stderr: "piped",
});
const { code } = await cliProcess.status();
@@ -334,6 +344,7 @@ Deno.test("fresh-init error(help)", async function (t) {
async () => {
const cliProcess = Deno.run({
cmd: ["deno", "run", "-A", "init.ts", "-f"],
stdin: "null",
stderr: "piped",
});
const { code } = await cliProcess.status();
@@ -352,6 +363,7 @@ Deno.test("fresh-init error(help)", async function (t) {
async () => {
const cliProcess = Deno.run({
cmd: ["deno", "run", "-A", "init.ts", "--foo"],
stdin: "null",
stderr: "piped",
});
const { code } = await cliProcess.status();
+4 -4
View File
@@ -8,9 +8,9 @@ export {
assert,
assertEquals,
assertStringIncludes,
} from "https://deno.land/std@0.129.0/testing/asserts.ts";
} from "https://deno.land/std@0.150.0/testing/asserts.ts";
export {
TextLineStream,
} from "https://deno.land/std@0.129.0/streams/delimiter.ts";
export { delay } from "https://deno.land/std@0.129.0/async/delay.ts";
export { default as puppeteer } from "https://deno.land/x/puppeteer@9.0.2/mod.ts";
} from "https://deno.land/std@0.150.0/streams/delimiter.ts";
export { delay } from "https://deno.land/std@0.150.0/async/delay.ts";
export { default as puppeteer } from "https://deno.land/x/puppeteer@14.1.1/mod.ts";
+3 -3
View File
@@ -1,8 +1,8 @@
{
"imports": {
"$fresh/": "../../",
"preact": "https://esm.sh/preact@10.8.2",
"preact/": "https://esm.sh/preact@10.8.2/",
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.0?external=preact"
"preact": "https://esm.sh/preact@10.10.0",
"preact/": "https://esm.sh/preact@10.10.0/",
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.1?external=preact"
}
}
+3 -3
View File
@@ -1,8 +1,8 @@
{
"imports": {
"$fresh/": "../../",
"preact": "https://esm.sh/preact@10.8.2",
"preact/": "https://esm.sh/preact@10.8.2/",
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.0?external=preact"
"preact": "https://esm.sh/preact@10.10.0",
"preact/": "https://esm.sh/preact@10.10.0/",
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.1?external=preact"
}
}
+2 -2
View File
@@ -23,8 +23,7 @@ Deno.test({
let started = false;
for await (const line of lines) {
console.log(line);
if (line.includes("Server listening on http://")) {
if (line.includes("Listening on http://")) {
started = true;
break;
}
@@ -45,6 +44,7 @@ Deno.test({
const buttonPlus = await page.$(`#b-${counterId}`);
await buttonPlus?.click();
await delay(100);
value = await pElem?.evaluate((el) => el.textContent);
assert(value === `${originalValue + 1}`, `${counterId} click`);
}