Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"browser-ui-test": "^0.22.2",
"es-check": "^6.2.1",
"eslint": "^8.57.1",
"eslint-js": "github:eslint/js",
"typescript": "^5.8.3"
}
}
3 changes: 3 additions & 0 deletions src/build_helper/src/npm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ pub fn install(src_root_path: &Path, out_dir: &Path, npm: &Path) -> Result<PathB

let mut cmd = Command::new(npm);
if CiEnv::is_ci() {
eprintln!("Running npm ci");
// `npm ci` redownloads every time and thus is too slow for local development.
cmd.arg("ci");
} else {
eprintln!("Running npm install");
cmd.arg("install");
}
// disable a bunch of things we don't want.
// this makes tidy output less noisy, and also significantly improves runtime
// of repeated tidy invocations.
cmd.args(&["--audit=false", "--save=false", "--fund=false"]);
cmd.current_dir(out_dir);
eprintln!("Executing {cmd:?}");
let exit_status = cmd.spawn()?.wait()?;
if !exit_status.success() {
eprintln!("npm install did not exit successfully");
Expand Down
2 changes: 2 additions & 0 deletions src/tools/tidy/src/extra_checks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ fn check_impl(
}

if js_lint || js_typecheck {
eprintln!("Running npm install");
rustdoc_js::npm_install(root_path, outdir, npm)?;
eprintln!("Finished npm install");
}

if js_lint {
Expand Down
Loading