mirror of
https://github.com/denoland/deno
synced 2024-08-25 02:57:22 +00:00
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.
This commit is contained in:
parent
0f2cbcf6a9
commit
32025dca5c
|
@ -1,12 +1,18 @@
|
||||||
#!/usr/bin/env -S deno run --unstable --allow-write --allow-read --allow-run --allow-net
|
#!/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.
|
// 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 subcommand = Deno.args.includes("--check") ? "check" : "fmt";
|
||||||
const configFile = join(ROOT_PATH, ".dprint.json");
|
const configFile = join(ROOT_PATH, ".dprint.json");
|
||||||
const execPath = await getPrebuilt("dprint");
|
const cmd = new Deno.Command("deno", {
|
||||||
const cmd = new Deno.Command(execPath, {
|
args: [
|
||||||
args: [subcommand, "--config=" + configFile],
|
"run",
|
||||||
|
"-A",
|
||||||
|
"--no-config",
|
||||||
|
"npm:dprint@0.43.0",
|
||||||
|
subcommand,
|
||||||
|
"--config=" + configFile,
|
||||||
|
],
|
||||||
cwd: ROOT_PATH,
|
cwd: ROOT_PATH,
|
||||||
stdout: "inherit",
|
stdout: "inherit",
|
||||||
stderr: "inherit",
|
stderr: "inherit",
|
||||||
|
|
|
@ -15,7 +15,6 @@ export { delay } from "../test_util/std/async/delay.ts";
|
||||||
|
|
||||||
// [toolName] --version output
|
// [toolName] --version output
|
||||||
const versions = {
|
const versions = {
|
||||||
"dprint": "dprint 0.40.0",
|
|
||||||
"dlint": "dlint 0.51.0",
|
"dlint": "dlint 0.51.0",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue