summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/format.js14
-rw-r--r--tools/util.js1
2 files changed, 10 insertions, 5 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",
diff --git a/tools/util.js b/tools/util.js
index 95eccbfe3..11c07326f 100644
--- a/tools/util.js
+++ b/tools/util.js
@@ -15,7 +15,6 @@ export { delay } from "../test_util/std/async/delay.ts";
// [toolName] --version output
const versions = {
- "dprint": "dprint 0.40.0",
"dlint": "dlint 0.51.0",
};