Skip to content

Commit 1fc21b0

Browse files
committed
Merge remote-tracking branch 'origin/main' into runner-aware-tools
# Conflicts: # crates/vite_task_graph/src/config/mod.rs
2 parents 11521c0 + e613113 commit 1fc21b0

151 files changed

Lines changed: 3285 additions & 640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
test:
6969
needs: detect-changes
7070
if: needs.detect-changes.outputs.code-changed == 'true'
71-
name: Test
71+
name: Test (${{ matrix.shard }})
7272
strategy:
7373
fail-fast: false
7474
matrix:
@@ -77,18 +77,71 @@ jobs:
7777
target: x86_64-unknown-linux-gnu
7878
cargo_cmd: cargo-zigbuild
7979
build_target: x86_64-unknown-linux-gnu.2.17
80-
- os: windows-latest
81-
target: x86_64-pc-windows-msvc
82-
cargo_cmd: cargo
83-
build_target: x86_64-pc-windows-msvc
80+
shard: linux-gnu
81+
scope: ''
82+
run_env: ''
8483
- os: namespace-profile-mac-default
8584
target: aarch64-apple-darwin
8685
cargo_cmd: cargo
8786
build_target: aarch64-apple-darwin
87+
shard: macos-arm64
88+
scope: ''
89+
run_env: ''
8890
- os: namespace-profile-mac-default
8991
target: x86_64-apple-darwin
9092
cargo_cmd: cargo
9193
build_target: x86_64-apple-darwin
94+
shard: macos-x64
95+
scope: ''
96+
run_env: ''
97+
# Windows e2e fixtures dominate wall-clock (60s per PTY step vs 20s on
98+
# Unix). Coverage is partitioned by crate: the e2e shards run
99+
# `-p vite_task_bin` and the non-e2e shard runs
100+
# `--workspace --exclude vite_task_bin`; the union is the workspace
101+
# by construction. The e2e_snapshots harness self-shards via
102+
# VT_SHARD_INDEX/VT_SHARD_TOTAL across the 5 e2e jobs.
103+
- os: windows-latest
104+
target: x86_64-pc-windows-msvc
105+
cargo_cmd: cargo
106+
build_target: x86_64-pc-windows-msvc
107+
shard: windows-e2e-1
108+
scope: '-p vite_task_bin'
109+
run_env: 'VT_SHARD_INDEX=1 VT_SHARD_TOTAL=5'
110+
- os: windows-latest
111+
target: x86_64-pc-windows-msvc
112+
cargo_cmd: cargo
113+
build_target: x86_64-pc-windows-msvc
114+
shard: windows-e2e-2
115+
scope: '-p vite_task_bin'
116+
run_env: 'VT_SHARD_INDEX=2 VT_SHARD_TOTAL=5'
117+
- os: windows-latest
118+
target: x86_64-pc-windows-msvc
119+
cargo_cmd: cargo
120+
build_target: x86_64-pc-windows-msvc
121+
shard: windows-e2e-3
122+
scope: '-p vite_task_bin'
123+
run_env: 'VT_SHARD_INDEX=3 VT_SHARD_TOTAL=5'
124+
- os: windows-latest
125+
target: x86_64-pc-windows-msvc
126+
cargo_cmd: cargo
127+
build_target: x86_64-pc-windows-msvc
128+
shard: windows-e2e-4
129+
scope: '-p vite_task_bin'
130+
run_env: 'VT_SHARD_INDEX=4 VT_SHARD_TOTAL=5'
131+
- os: windows-latest
132+
target: x86_64-pc-windows-msvc
133+
cargo_cmd: cargo
134+
build_target: x86_64-pc-windows-msvc
135+
shard: windows-e2e-5
136+
scope: '-p vite_task_bin'
137+
run_env: 'VT_SHARD_INDEX=5 VT_SHARD_TOTAL=5'
138+
- os: windows-latest
139+
target: x86_64-pc-windows-msvc
140+
cargo_cmd: cargo
141+
build_target: x86_64-pc-windows-msvc
142+
shard: windows-non-e2e
143+
scope: '--workspace --exclude vite_task_bin'
144+
run_env: ''
92145
runs-on: ${{ matrix.os }}
93146
steps:
94147
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
@@ -124,13 +177,13 @@ jobs:
124177
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
125178

126179
- name: Build tests
127-
run: ${{ matrix.cargo_cmd }} test --no-run --target ${{ matrix.build_target }}
180+
run: ${{ matrix.cargo_cmd }} test --no-run ${{ matrix.scope }} --target ${{ matrix.build_target }}
128181

129182
# Default `cargo test` runs only tests that need nothing beyond the
130183
# Rust toolchain; this step verifies that contract before Node.js
131184
# and pnpm enter the picture.
132185
- name: Run tests
133-
run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }}
186+
run: ${{ matrix.run_env }} ${{ matrix.cargo_cmd }} test ${{ matrix.scope }} --target ${{ matrix.build_target }}
134187

135188
# x86_64-apple-darwin runs on arm64 runner under Rosetta; install x64 Node
136189
# so fspy's x86_64 preload dylib can be injected into spawned node procs.
@@ -139,7 +192,7 @@ jobs:
139192
architecture: ${{ matrix.target == 'x86_64-apple-darwin' && 'x64' || '' }}
140193

141194
- name: Run ignored tests
142-
run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} -- --ignored
195+
run: ${{ matrix.run_env }} ${{ matrix.cargo_cmd }} test ${{ matrix.scope }} --target ${{ matrix.build_target }} -- --ignored
143196

144197
test-musl:
145198
needs: detect-changes
@@ -215,7 +268,7 @@ jobs:
215268
- run: cargo fmt --check
216269
- run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
217270

218-
- uses: crate-ci/typos@5374cbf686e897b15713110e233094e2874de7ef # v1.46.1
271+
- uses: crate-ci/typos@aca895bf05aec0cb7dffa6f94495e923224d9f17 # v1.46.2
219272
with:
220273
files: .
221274

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
- **Added** task command shorthands for defining tasks as command strings or command string arrays ([#391](https://github.com/voidzero-dev/vite-task/pull/391))
34
- **Changed** Cached logs are stored with colors intact (`FORCE_COLOR=1` is auto-injected into spawned tasks). Colors are then stripped at display time when the terminal does not support them. Other color-related env vars (`NO_COLOR`, `COLORTERM`, `TERM`, `TERM_PROGRAM`) are no longer passed through by default. Opt in via a task's `env`/`untrackedEnv` ([#378](https://github.com/voidzero-dev/vite-task/pull/378))
45
- **Added** `output` field for cached tasks: archives matching files after a successful run and restores them on cache hit ([#375](https://github.com/voidzero-dev/vite-task/pull/375))
56
- **Fixed** Windows cached tasks can now run package shims rewritten through PowerShell; default env passthrough now preserves `PATHEXT` ([#366](https://github.com/voidzero-dev/vite-task/pull/366))

Cargo.lock

Lines changed: 71 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ base64 = "0.22.1"
4949
wincode = "0.5.2"
5050
bindgen = "0.72.1"
5151
bitflags = "2.10.0"
52-
# The newest released version (0.3.0) of brush-parser has a bug that reports incorrect locations for some ast nodes.
53-
# The latest commit has fixed it. TODO: switch back to released version when a new version is published.
54-
brush-parser = { git = "https://github.com/reubeno/brush", rev = "dcb760933b10ee0433d7b740a5709b06f5c67c6b" }
52+
brush-parser = "0.4.0"
5553
bstr = { version = "1.12.0", default-features = false, features = ["alloc", "std"] }
5654
bumpalo = { version = "3.17.0", features = ["allocator-api2"] }
5755
bytemuck = { version = "1.23.0", features = ["extern_crate_alloc", "must_cast"] }

crates/vite_shell/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{collections::BTreeMap, fmt::Display, ops::Range};
22

33
use brush_parser::{
4-
Parser, ParserOptions,
4+
Parser, ParserImpl, ParserOptions,
55
ast::{
66
AndOr, Assignment, AssignmentName, AssignmentValue, Command, CommandPrefix,
77
CommandPrefixOrSuffixItem, CommandSuffix, CompoundListItem, Pipeline, Program,
@@ -47,7 +47,9 @@ const PARSER_OPTIONS: ParserOptions = ParserOptions {
4747
enable_extended_globbing: false,
4848
posix_mode: true,
4949
sh_mode: true,
50-
tilde_expansion: false,
50+
tilde_expansion_at_word_start: false,
51+
tilde_expansion_after_colon: false,
52+
parser_impl: ParserImpl::Peg,
5153
};
5254

5355
/// Remove shell quoting from a word value, respecting quoting context.

0 commit comments

Comments
 (0)