forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
119 lines (88 loc) · 2.03 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
set windows-shell := ["powershell"]
set shell := ["bash", "-cu"]
_default:
just --list -u
setup:
# Rust related setup
cargo install cargo-binstall
cargo binstall taplo-cli cargo-insta cargo-deny -y
# Node.js related setup
corepack enable
pnpm install
just setup-submodule
echo "✅✅✅ Setup complete!"
setup-submodule:
git submodule update --init
setup-bench:
node ./scripts/misc/setup-benchmark-input.js
# Update the submodule to the latest commit
update-submodule:
git submodule update --init
# `roll` command almost run all ci checks locally. It's useful to run this before pushing your changes.
roll:
just roll-rust
just roll-node
just roll-repo
roll-rust:
just check-rust
just test-rust
just lint-rust
roll-node:
just test-node
just check-node
just lint-node
roll-repo:
just lint-repo
# CHECKING
check-rust:
cargo check --workspace
check-node:
pnpm type-check
check:
just check-rust
just check-node
# run tests for both Rust and Node.js
test:
just test-rust
just test-node
test-rust:
cargo test --no-fail-fast
test-node:
pnpm build
pnpm test
# Fix formatting issues both for Rust, Node.js and all files in the repository
fmt:
just fmt-rust
just fmt-repo
fmt-rust:
cargo fmt --all -- --emit=files
taplo fmt
fmt-repo:
pnpm lint-prettier:fix
pnpm lint-toml:fix
# lint the codebase
lint:
just lint-rust
just lint-node
lint-rust:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- --deny warnings
lint-node:
pnpm lint-code
lint-repo:
pnpm lint-filename
pnpm lint-prettier
pnpm lint-spell
pnpm lint-toml
# BENCHING
bench-rust:
cargo bench -p bench
bench-node:
pnpm --filter bench run bench
bench-node-par:
pnpm --filter bench exec node ./benches/par.js
# RELEASING
bump packages *args:
node ./scripts/misc/bump-version.js {{args}}
changelog:
pnpm conventional-changelog --preset angular --i CHANGELOG.md --same-file --pkg=./packages/rolldown/package.json