-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
90 lines (70 loc) · 3 KB
/
Copy pathJustfile
File metadata and controls
90 lines (70 loc) · 3 KB
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
# vacant — common dev tasks. `just <target>` or `just` for the menu.
default:
@just --list
# Build the release binary.
build:
cargo build --release -p vacant
# Run the binary on stdin or args (after a fresh build).
run *args: build
./target/release/vacant {{args}}
# Run all rust tests, parallel via nextest if available.
test:
@cargo nextest run --workspace 2>/dev/null || cargo test --workspace
# Format + clippy + rules drift check.
check: check-rules-sync
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
# Refresh rules/rules.toml from the Public Suffix List (writes the canonical file).
ingest-psl *args:
uv run ingest/psl.py {{args}}
# Refresh rules/rules.toml with RDAP bootstrap data (writes the canonical file).
ingest-rdap *args:
uv run ingest/rdap.py {{args}}
# Discover RDAP endpoints for TLDs the IANA bootstrap omits (writes canonical file).
ingest-rdap-probe *args:
uv run ingest/rdap.py --probe {{args}}
# Refresh rules/rules.toml forbidden_labels from the per-registry handlers.
ingest-forbidden *args:
uv run ingest/forbidden.py {{args}}
# Test the ingest scripts.
ingest-check:
uv run --with pytest --with httpx pytest ingest/tests
# Mirror rules/rules.toml into every package's embedded copy.
sync-rules:
cp rules/rules.toml crates/vacant/data/rules.toml
cp rules/rules.toml python/vacant/rules.toml
cp rules/rules.toml js/vacant/rules.toml
# Fail if any embedded copy of rules.toml has drifted from the canonical.
check-rules-sync:
@diff -q rules/rules.toml crates/vacant/data/rules.toml >/dev/null || (echo "crates/vacant/data/rules.toml drifted from rules/rules.toml — run 'just sync-rules'" >&2; exit 1)
@diff -q rules/rules.toml python/vacant/rules.toml >/dev/null || (echo "python/vacant/rules.toml drifted from rules/rules.toml — run 'just sync-rules'" >&2; exit 1)
@diff -q rules/rules.toml js/vacant/rules.toml >/dev/null || (echo "js/vacant/rules.toml drifted from rules/rules.toml — run 'just sync-rules'" >&2; exit 1)
# Build the maturin extension into the local venv.
py-develop: sync-rules
cd python && uv run --with maturin maturin develop --uv
# Format + lint + tests for the python package.
py-check: sync-rules
cd python && uv run ruff format --check .
cd python && uv run ruff check .
cd python && uv run pytest
# Build a release wheel locally.
py-wheel: sync-rules
cd python && uv run --with maturin maturin build --release
# Build a source distribution.
py-sdist: sync-rules
cd python && uv run --with maturin maturin sdist
# Build the napi-rs binding into js/.
js-develop: sync-rules
cd js && npm ci
cd js && npm run build:napi
# Typecheck + tsup + node:test smoke for the JS package.
js-check: js-develop
cd js && npm run typecheck
cd js && npm run build
cd js && npm test
# Produce a publishable npm tarball (main package only; per-platform stubs build separately).
js-pack: js-check
cd js && npm pack
# Clean build outputs.
clean:
cargo clean