mirror of
https://github.com/hanzoai/unrs-resolver.git
synced 2026-09-24 17:03:52 +00:00
- Move dot/, abnormal-relative-* into fixtures/resolve/ (used by resolve.rs) - Move global-pnp/ into fixtures/pnp/ (used by pnp.rs) - Move pnpm-workspace/ into fixtures/pnpm/ (used by napi tests) - Move bench-tsconfig-paths/ into fixtures/tsconfig/ (used by benches) - Delete unused fixtures/prefer-file-over-dir/ Co-authored-by: Hanzo Dev <[email protected]>
95 lines
2.0 KiB
Makefile
95 lines
2.0 KiB
Makefile
#!/usr/bin/env -S just --justfile
|
|
|
|
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
|
|
set shell := ["bash", "-cu"]
|
|
|
|
_default:
|
|
@just --list -u
|
|
|
|
alias r := ready
|
|
|
|
# Make sure you have cargo-binstall installed.
|
|
# You can download the pre-compiled binary from <https://github.com/cargo-bins/cargo-binstall#installation>
|
|
# or install via `cargo install cargo-binstall`
|
|
# Initialize the project by installing all the necessary tools.
|
|
init:
|
|
cargo binstall cargo-shear typos-cli watchexec-cli -y
|
|
rustup target add s390x-unknown-linux-gnu
|
|
|
|
install:
|
|
pnpm install
|
|
cd fixtures/pnp; yarn
|
|
cd fixtures/pnp/global-pnp; yarn
|
|
cd fixtures/yarn; yarn
|
|
|
|
# When ready, run the same CI commands
|
|
ready:
|
|
git diff --exit-code --quiet
|
|
just install
|
|
typos
|
|
cargo fmt
|
|
just check
|
|
just test
|
|
just lint
|
|
just doc
|
|
git status
|
|
|
|
watch *args='':
|
|
watchexec {{args}}
|
|
|
|
watch-check:
|
|
just watch "'cargo check; cargo clippy'"
|
|
|
|
watch-example target *args='':
|
|
just watch "cargo run --example {{target}} -- {{args}}"
|
|
|
|
# Run the example
|
|
example target *args='':
|
|
cargo run --example {{target}} -- {{args}}
|
|
|
|
# Format all files
|
|
fmt:
|
|
cargo shear --fix # remove all unused dependencies
|
|
cargo fmt --all
|
|
node --run fmt
|
|
|
|
# Run cargo check
|
|
check:
|
|
cargo check --all-features --all-targets
|
|
cargo check --target s390x-unknown-linux-gnu
|
|
|
|
# Run all the tests
|
|
test:
|
|
cargo test
|
|
cargo test --all-features
|
|
node --run build
|
|
node --run test
|
|
cd fixtures/pnp; yarn test
|
|
|
|
# Lint the whole project
|
|
lint:
|
|
cargo clippy --all-features --all-targets -- --deny warnings
|
|
|
|
# Generate doc
|
|
doc:
|
|
RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features
|
|
|
|
# Get code coverage
|
|
codecov:
|
|
cargo codecov --html
|
|
|
|
# Run the benchmarks.
|
|
benchmark:
|
|
cargo bench
|
|
|
|
# Run cargo-fuzz
|
|
fuzz:
|
|
cd fuzz; cargo +nightly fuzz run --sanitizer none resolver -- -only_ascii=1 -max_total_time=900
|
|
|
|
# Manual Release
|
|
release:
|
|
cargo binstall -y release-plz
|
|
release-plz update
|
|
just check
|
|
# NOTE: make sure to update version in npm/package.json
|