summaryrefslogtreecommitdiff
path: root/tools/format.js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-11-20 19:21:21 -0500
committerGitHub <noreply@github.com>2023-11-21 00:21:21 +0000
commit32025dca5ca76695d463383372cd5f88687e2e9d (patch)
tree9f9f9c676079e11d60611467b974b8b96bd51b0e /tools/format.js
parent0f2cbcf6a98f0caa28f1ad59431d735044887feb (diff)
chore(tools): pull dprint from npm instead of third_party (#21281)
This will allow this format script to work on more architectures. Also, this upgrade fixes the issue with the unstable incremental cache that's currently on main.
Diffstat (limited to 'tools/format.js')
-rwxr-xr-xtools/format.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/format.js b/tools/format.js
index b2296ede6..aff07702b 100755
--- a/tools/format.js
+++ b/tools/format.js
@@ -1,12 +1,18 @@
#!/usr/bin/env -S deno run --unstable --allow-write --allow-read --allow-run --allow-net
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-import { getPrebuilt, join, ROOT_PATH } from "./util.js";
+import { join, ROOT_PATH } from "./util.js";
const subcommand = Deno.args.includes("--check") ? "check" : "fmt";
const configFile = join(ROOT_PATH, ".dprint.json");
-const execPath = await getPrebuilt("dprint");
-const cmd = new Deno.Command(execPath, {
- args: [subcommand, "--config=" + configFile],
+const cmd = new Deno.Command("deno", {
+ args: [
+ "run",
+ "-A",
+ "--no-config",
+ "npm:dprint@0.43.0",
+ subcommand,
+ "--config=" + configFile,
+ ],
cwd: ROOT_PATH,
stdout: "inherit",
stderr: "inherit",