Skip to content

Commit 27e50c1

Browse files
committed
chore(_tools): update build script for npm
1 parent 9b01401 commit 27e50c1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

_tools/meta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BuildOptions } from "https://deno.land/x/dnt@0.33.1/mod.ts";
1+
import { BuildOptions } from "https://deno.land/x/dnt@0.34.0/mod.ts";
22

33
export const makeOptions = (version: string): BuildOptions => ({
44
test: false,

_tools/publish_npm.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ if (import.meta.main) {
1616
const tag = isPrerelease?.[0] ?? "latest";
1717

1818
const pkg = makeOptions(version);
19-
const result = await Deno.run({
20-
cmd: ["npm", "publish", pkg.outDir, "--tag", String(tag)],
21-
stdout: "piped",
22-
})
23-
.output();
19+
const command = new Deno.Command("npm", {
20+
args: ["publish", pkg.outDir, "--tag", String(tag)],
21+
});
22+
const result = await command.output();
2423

25-
console.log(new TextDecoder().decode(result));
24+
if (!result.success) {
25+
console.error(new TextDecoder().decode(result.stderr));
26+
}
2627
}

0 commit comments

Comments
 (0)