Skip to content

Use npm ci instead of npm install in build.rs#385

Merged
ChristianPavilonis merged 3 commits intomainfrom
fix/build-rs-npm-ci
Feb 28, 2026
Merged

Use npm ci instead of npm install in build.rs#385
ChristianPavilonis merged 3 commits intomainfrom
fix/build-rs-npm-ci

Conversation

@ChristianPavilonis
Copy link
Collaborator

@ChristianPavilonis ChristianPavilonis commented Feb 26, 2026

Summary

  • Switch build.rs from npm install to npm ci so that building on a fresh worktree does not modify package-lock.json and pollute diffs.

Changes

File Change
crates/js/build.rs Changed .arg("install") to .arg("ci") and updated warning message

Closes

Closes #378

Test plan

  • cargo test --workspace
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • JS tests: cd crates/js/lib && npx vitest run
  • JS format: cd crates/js/lib && npm run format
  • Docs format: cd docs && npm run format
  • WASM build: cargo build --bin trusted-server-fastly --release --target wasm32-wasip1

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses tracing macros (not println!)
  • New code has tests
  • No secrets or credentials committed

Prevents package-lock.json from being modified when node_modules is
missing, keeping diffs clean on fresh worktrees.

Closes #378
Copy link
Collaborator

@aram356 aram356 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this:

can you please update docs:

./guide/error-reference.md:npm install
./README.md:npm install

Copy link
Collaborator

@aram356 aram356 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good. Please merge it.

@ChristianPavilonis ChristianPavilonis merged commit 728e785 into main Feb 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build.rs should use npm run ci instead of install to prevent package-lock.json changes in diffs

2 participants