You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add object form for input globs with base directory (#295)
## Summary
- Input entries now support an object form `{ "base": "workspace" |
"package", "pattern": "..."}` to resolve glob patterns relative to the
workspace root instead of the package directory
- Bare string globs continue to work as before (resolved relative to the
package directory)
- Negation (`!`) is supported in both the bare string and object forms
- `base` is required in the object form — if you want package-relative,
just use a bare string.
`{ "base": "package", "pattern": "src/**" }` is equivalent to
`"src/**"`.
### Example
```json
{
"input": [
"src/**",
{ "base": "workspace", "pattern": "configs/tsconfig.json" },
{ "base": "workspace", "pattern": "!dist/**"},
{ "auto": true }
]
}
```
## Test plan
- [x] Unit tests for deserialization of new object form (valid values,
missing `base` error, invalid `base` error, mixed arrays)
- [x] Unit tests for glob resolution with workspace and package bases
- [x] Plan snapshot fixture (`input-workspace-base`) verifying
workspace-relative resolution
- [x] TypeScript type generation updated and verified
https://claude.ai/code/session_01KiaZHtCW4hCsdJyPuBNPnw
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
# Changelog
2
2
3
+
-**Added** object form for `input` entries: `{ "pattern": "...", "base": "workspace" | "package" }` to resolve glob patterns relative to the workspace root instead of the package directory ([#295](https://github.com/voidzero-dev/vite-task/pull/295))
3
4
-**Fixed** arguments after the task name being consumed by `vp` instead of passed through to the task ([#286](https://github.com/voidzero-dev/vite-task/pull/286), [#290](https://github.com/voidzero-dev/vite-task/pull/290))
4
5
-**Changed** default untracked env patterns to align with Turborepo, covering more CI and platform-specific variables ([#262](https://github.com/voidzero-dev/vite-task/pull/262))
5
6
-**Added**`--log=interleaved|labeled|grouped` flag to control task output display: `interleaved` (default) streams directly, `labeled` prefixes lines with `[pkg#task]`, `grouped` buffers output per task ([#266](https://github.com/voidzero-dev/vite-task/pull/266))
0 commit comments