From 472db8a84e13aa9960ec5e0c245805c9a6eec910 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 7 Mar 2022 14:15:39 +0900 Subject: [PATCH 1/3] chore(node): pin npm version to 8.5.2 in integration test --- node/integrationtest/test.ts | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/node/integrationtest/test.ts b/node/integrationtest/test.ts index c579ccb76a93..496cc3bec919 100644 --- a/node/integrationtest/test.ts +++ b/node/integrationtest/test.ts @@ -18,26 +18,19 @@ Deno.test("integration test of compat mode", { const expressPath = join(tempDir, "node_modules", "express"); await t.step("yarn add npm express", async () => { - await exec(`deno run --compat --unstable -A ${yarnUrl} add npm`, opts); - const stat = await Deno.lstat(join(npmPath, "package.json")); - assert(stat.isFile); + // FIXME(kt3k): npm@8.5.3 doesn't work with compat mode + await exec(`deno run --compat --unstable -A ${yarnUrl} add npm@8.5.2`, opts); + assert((await Deno.lstat(join(npmPath, "package.json"))).isFile); await exec(`deno run --compat --unstable -A ${yarnUrl} add express`, opts); assert((await Deno.lstat(join(expressPath, "package.json"))).isFile); }); - // FIXME(kt3k): npm in compat mode is broken in Linux and Mac - if (Deno.build.os === "windows") { - await t.step("npm install gulp", async () => { - await exec( - `deno run --compat --unstable -A ${ - join(npmPath, "index.js") - } install gulp`, - opts, - ); - const stat = await Deno.lstat(join(gulpPath, "package.json")); - assert(stat.isFile); - }); - } + await t.step("npm install gulp", async () => { + const npmCli = join(npmPath, "index.js"); + await exec(`deno run --compat --unstable -A ${npmCli} install gulp`, opts); + const stat = await Deno.lstat(join(gulpPath, "package.json")); + assert(stat.isFile); + }); await t.step("run express example app", async () => { await Deno.writeTextFile( From c77ae63989d840691f3b19af1dd5b7becf7872ef Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 7 Mar 2022 14:18:54 +0900 Subject: [PATCH 2/3] chore: fmt --- node/integrationtest/test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node/integrationtest/test.ts b/node/integrationtest/test.ts index 496cc3bec919..1d668b44e0bf 100644 --- a/node/integrationtest/test.ts +++ b/node/integrationtest/test.ts @@ -19,7 +19,10 @@ Deno.test("integration test of compat mode", { await t.step("yarn add npm express", async () => { // FIXME(kt3k): npm@8.5.3 doesn't work with compat mode - await exec(`deno run --compat --unstable -A ${yarnUrl} add npm@8.5.2`, opts); + await exec( + `deno run --compat --unstable -A ${yarnUrl} add npm@8.5.2`, + opts, + ); assert((await Deno.lstat(join(npmPath, "package.json"))).isFile); await exec(`deno run --compat --unstable -A ${yarnUrl} add express`, opts); assert((await Deno.lstat(join(expressPath, "package.json"))).isFile); From 25ba24fcf0101d73f94b7ea59c5dc34b49a53adf Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 7 Mar 2022 15:10:35 +0900 Subject: [PATCH 3/3] rerun ci