GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — fix(cache): stop tracking pnpm's workspace state files by wan9chi · Pull Request #825 · voidzero-dev/vite-task Conversation
|
fspy benchmarklinuxmacoswindows |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1a36a1e to
34c502f
Compare
34c502f to
df1dd79
Compare
## Motivation `vitest_browser_cache::vitest_browser_caches_inputs_and_restores_outputs` fails intermittently on Windows runners in the `Test (windows-ignored)` job: ``` Error: listen EACCES: permission denied ::1:63315 ``` 63315 is the fixed default port for Vitest browser mode's server. Windows reserves dynamic port ranges (Hyper-V/WinNAT excluded port ranges), and listening on a reserved port fails with `EACCES`. Vite only tries another port on `EADDRINUSE`, so the run fails, `dist/result.json` is never written, and the snapshot diverges. It depends on which runner the job lands on: it failed on #824 and #825 and passed on other runs of the same code. ## Changes The fixture's browser server now listens on port 0, so the OS chooses a free port. Vite supports `server.listen(0)` directly, but the config can't request it the normal way: - `test.api: { port: 0 }`: Vitest only copies `api.port` when it is truthy, so `0` falls back to 63315. - Setting `test.api` at all, even with a concrete port, adds an `API started at http://localhost:<port>/` banner line that would change the snapshot. `test.browser.api` prints a deprecation warning in Vitest 5. Instead, a small `enforce: 'post'` plugin sets `test.api.port = 0` after Vitest resolves `test.api`. The banner stays unchanged, and the snapshot is identical. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
945328b to
8cb1389
Compare
There was an error while loading. Please reload this page.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
`node_modules/.pnpm-workspace-state-*.json` records pnpm's dependency check before `pnpm run` and `pnpm exec`. pnpm rewrites it with a new timestamp whenever it rechecks dependencies, for example after a manifest becomes newer than the last check, and it holds absolute project paths. Tasks that run `pnpm run` read it, so they missed the cache whenever another pnpm command had rechecked, and across checkouts. Whether the check passes doesn't change what a cached task outputs, so these files are skipped like `.git`, in any `node_modules` directory. The e2e test runs a real `pnpm run`, so `vite-task-tools` now depends on pnpm's npm package, pinned to the repo's `packageManager` version. Co-Authored-By: Claude Opus 5.5 <[email protected]>
8cb1389 to
49c0fd5
Compare
There was an error while loading. Please reload this page.
Vite+ 1.2 supports authenticated private npm registries and shows a new `vp run` summary that counts cache hits among cache-enabled tasks and reports successful tasks. It also verifies installer downloads, shows download progress in `vp upgrade`, and fixes task cache misses in pnpm projects and PowerShell exit status. ### Highlights - Support authenticated private npm registries ([#2624](#2624)), by @RSS1102. - The `vp run` summary now reads like `3/4 cache hit (75%), 9/10 successful, 2s saved.`: the cache hit rate leaves out tasks with caching disabled, and the count of successful tasks replaces the count of failed tasks ([vite-task#821](voidzero-dev/vite-task#821)), by @wan9chi. ### Features - The `install.sh` and `install.ps1` installers check each downloaded platform archive against the registry's SHA-512 `dist.integrity` before extracting it, and stop when the digest is missing or does not match ([#2949](#2949)), by @fengmk2. - `vp upgrade` shows a progress bar while it downloads the new platform package, instead of looking frozen on slow connections ([#2968](#2968)), by @kshanxs. - When a task is not cached because it wrote a file it also read, the summary says it `modified its inputs`, and `vp run --last-details` shows the `cache: { input, output }` exclusions that let it be cached. Detailed summaries show each cause of an error on its own line, and an invalid `--filter` glob reports its error once ([vite-task#783](voidzero-dev/vite-task#783), [vite-task#784](voidzero-dev/vite-task#784), [vite-task#761](voidzero-dev/vite-task#761), [vite-task#763](voidzero-dev/vite-task#763)), by @wan9chi. - The task runner can be built without file-access tracking on additional platforms. Tasks on those platforms must configure both `input` and `output` explicitly to be cached ([vite-task#829](voidzero-dev/vite-task#829)), by @mfechner. - Upgrade the bundled tools ([#2935](#2935), [#2977](#2977), [#2998](#2998), [#3021](#3021), [#3039](#3039)), by @voidzero-guard[bot] and @fengmk2: - `[email protected]` to `[email protected]`. - `[email protected]` to `[email protected]`. - `[email protected]` to `[email protected]`. - `[email protected]` to `[email protected]`. Vitest now turns on its on-disk caches by default, and `vp test` tasks run through `vp run` stay cacheable with them. - `[email protected]` to `[email protected]` and `[email protected]` to `[email protected]`. Oxfmt now also formats TOML in Markdown code blocks and frontmatter. The new lint and format versions can flag code that passed before, so run `vp fmt` after upgrading if CI runs `vp check`. - `vp migrate` keeps Prettier and continues the rest of the migration when the Prettier config uses a format the bundled Oxfmt cannot read, such as `.prettierrc.yml`. - `[email protected]` to `[email protected]`. Line disable comments apply to type-aware diagnostics again ([tsgolint#1271](oxc-project/tsgolint#1271)), so disable comments moved to the `} as T` line for v1.1.0 need to move back above the statement. - Projects that use `@effect/tsgo` need `@effect/[email protected]` or later with this tsgolint version. ### Fixes & Enhancements - Reinstalling dependencies with pnpm, or installing them at another path, no longer causes task cache misses, and tasks that run `pnpm run` or `pnpm exec` no longer miss the cache after pnpm rechecks dependencies ([vite-task#823](voidzero-dev/vite-task#823), [vite-task#824](voidzero-dev/vite-task#824), [vite-task#825](voidzero-dev/vite-task#825)), by @wan9chi. - On macOS, tasks with automatic file-access tracking can run Node.js single executable applications, such as pnpm 11's standalone binary, and `deno compile` outputs ([vite-task#840](voidzero-dev/vite-task#840)), by @wan9chi. - Cached tasks can run scripts whose shebang names an interpreter path longer than 126 bytes ([vite-task#788](voidzero-dev/vite-task#788)), by @lifeiscontent. - When a cache hit's outputs cannot be restored, `vp run` fails with an error suggesting `vp cache clean` instead of reporting a successful cache hit ([vite-task#770](voidzero-dev/vite-task#770)), by @wan9chi. - `vp run` no longer stops every task when concurrent tasks write to a full output pipe, such as a CI log collector ([vite-task#801](voidzero-dev/vite-task#801)), by @naokihaba. - On Linux, tasks with automatic file-access tracking start faster ([vite-task#817](voidzero-dev/vite-task#817)), by @wan9chi. - In PowerShell, a failing `vp` command sets `$?` to `False` and stops `&&` chains, as calling `vp.exe` directly does ([#2947](#2947)), by @fengmk2. - The Windows installer works when the PowerShell profile enables `Set-StrictMode`, and leaves the caller's strict mode unchanged ([#3005](#3005)), by @fengmk2. - Sourcing the Vite+ env script in POSIX shells is much faster with a long `PATH`, for example from 1.5 s to 6 ms in dash with 147 entries ([#2905](#2905)), by @jonykru. - Node.js version ranges from `.node-version`, `engines.node`, and `devEngines.runtime`, and package-manager version ranges, follow npm's semver rules ([#2835](#2835)), by @ryuapp. - `vp migrate` adds the `tsdown <0.23` compatibility settings (`deps.resolveDepSubpath` and `attw.profile`) only for projects on an older tsdown, so upgrades from Vite+ 1.x or `[email protected]` and later keep the modern defaults ([#2910](#2910)), by @fengmk2. - `vp create vite:generator` keeps the description prompt visible instead of drawing the spinner over it, uses concrete version ranges for dependencies missing from the workspace catalog, adds `rootDir: "src"` to the generated `tsconfig.json`, and scaffolds generators on `[email protected]` with Zod 4 option schemas ([#2940](#2940), [#2996](#2996), [#1831](#1831)), by @jong-kyung, @fengmk2, and @renovate[bot]. - `vp create` stops processing an organization template archive that expands past fixed size, compression ratio, or entry count limits ([#2950](#2950)), by @fengmk2. - `vp config` skips Git config writes that change nothing, so concurrent runs across linked worktrees no longer fail with `could not lock config file` after the first setup ([#2958](#2958)), by @naokihaba. - Git hooks no longer append the legacy `$VP_HOME/bin` or `~/.vite-plus/bin` directory to `PATH`. They use the inherited environment with the project's `node_modules/.bin` first, so projects without a local `vite-plus` dependency need the Vite+ bin directory on the Git client's `PATH` ([#2930](#2930)), by @liangmiQwQ. - Concurrent commands that need the same uninstalled Node.js version download it once; the others wait and reuse the installation ([#3024](#3024)), by @fengmk2. - `@voidzero-dev/vite-plus-core` declares the same `postcss`, optional `fsevents`, and Yuku parser ranges as the bundled Vite and tsdown, and `@oxlint/plugins` matches the bundled `oxlint` ([#2921](#2921)), by @fengmk2. - `vp pack --help` lists both default env prefixes, `VITE_PACK_` and `TSDOWN_` ([#3002](#3002)), by @jong-kyung. - Prompts and status lines use one space after status symbols ([#2928](#2928)), by @cpojer. ### Docs - Document shell completion, the global `-C` flag, the split directory layout, automatic update checks and how to opt out, package manager subcommands, and `vp env doctor` diagnostic scopes ([#2972](#2972), [#2956](#2956), [#2973](#2973), [#2960](#2960), [#2975](#2975), [#2982](#2982)), by @jong-kyung. - Clarify how `vp exec` and `vpx` resolve commands, how `vp test` selects its runner, how `vp config` treats existing Git hooks, what `vp check` needs for type checking, and how global CLI environment variables behave ([#2957](#2957), [#2979](#2979), [#2962](#2962), [#2978](#2978), [#2916](#2916), [#2919](#2919)), by @jong-kyung. - Correct migration prerequisites, minimum versions, and upgrade order, clarify tsup migration and staged configuration, fix local CLI installation without a global `vp`, and state the version requirements of `vp env uninstall` ([#2990](#2990), [#2923](#2923), [#2944](#2944), [#3004](#3004), [#2946](#2946)), by @jong-kyung. - Rename the install guide to Package Management, clarify package-management command compatibility, and align the create, run, and staged guides with CLI behavior and Vite Task defaults ([#2929](#2929), [#2925](#2925), [#2939](#2939), [#2941](#2941), [#2908](#2908)), by @jong-kyung. - Explain task cache behavior and how Vite build outputs are cached ([#2963](#2963), [#2942](#2942)), by @yusuke99 and @jong-kyung. - Correct the `baseUrl` and editor setup guidance in troubleshooting, and clarify JetBrains IDE support ([#2943](#2943), [#3001](#3001)), by @jong-kyung. - Note that `lazyPlugins` does not defer local module imports ([#2967](#2967)), by @kshanxs. - Align inline comments in code examples ([#2927](#2927)), by @yusuke99. ### Chore - Bump vite-task to `9ba4cc9`; its user-facing changes are listed above ([#3019](#3019)), by @wan9chi. - Speed up CI by removing platform waits, reusing native test binaries and dependency caches, skipping slow pnpm cache restores on macOS and Windows, and installing prebuilt `cargo-zigbuild` ([#2961](#2961), [#3023](#3023), [#3015](#3015), [#3010](#3010)), by @fengmk2. - Run CI bootstrap scripts without unpinned `tsx`, isolate upstream CLI help capture from workspace overrides, and update security-action to v1.0.10 ([#2948](#2948), [#2976](#2976), [#3022](#3022)), by @fengmk2. - Cache the docs build with the Vite Task remote cache ([#2926](#2926), [#2951](#2951)), by @wan9chi. - Add a Nix flake for the contributor development environment ([#2874](#2874), [#2974](#2974)), by @myuron and @fengmk2. - Stabilize the CLI help wrapping and browser snapshot tests ([#2952](#2952), [#3006](#3006)), by @myuron and @fengmk2. - Exclude upstream-managed dependencies from Renovate ([#2918](#2918)), by @fengmk2. - Refine the release-manager guidance ([#2917](#2917)), by @fengmk2. ### Bundled Versions | Tool | Version | Source | Changelog | | --------------- | ---------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | vite | `8.3.4` | [`b6c20f6`](vitejs/vite@b6c20f6) | [8.3.4](https://github.com/vitejs/vite/releases/tag/v8.3.4) | | rolldown | `1.2.13` | [`f7de35f`](rolldown/rolldown@f7de35f) | [1.2.13](https://github.com/rolldown/rolldown/releases/tag/v1.2.13) | | tsdown | `0.23.1` | [npm](https://npmx.dev/package/tsdown/v/0.23.1) | [0.23.1](https://github.com/rolldown/tsdown/releases/tag/v0.23.1) | | vitest | `5.0.4` | [npm](https://npmx.dev/package/vitest/v/5.0.4) | [5.0.4](https://github.com/vitest-dev/vitest/releases/tag/v5.0.4) | | oxlint | `1.88.0` | [npm](https://npmx.dev/package/oxlint/v/1.88.0) | [1.88.0](https://github.com/oxc-project/oxc/releases/tag/oxlint_v1.88.0) | | oxlint-tsgolint | `7.0.2004` | [npm](https://npmx.dev/package/oxlint-tsgolint/v/7.0.2004) | [7.0.2004](https://github.com/oxc-project/tsgolint/releases/tag/v7.0.2004) | | oxfmt | `0.73.0` | [npm](https://npmx.dev/package/oxfmt/v/0.73.0) | [0.73.0](https://github.com/oxc-project/oxc/releases/tag/oxfmt_v0.73.0) | ### Upgrade ```bash vp upgrade ``` ### New Contributors @ryuapp @jonykru @myuron @kshanxs @mfechner **Full Changelog**: v1.1.0...v1.2.0 --- Merging this PR will trigger the release workflow. --------- Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com> Co-authored-by: MK (fengmk2) <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
## Motivation Remote-caching dogfooding surfaced repeated spurious cache misses for tasks that list `node_modules`: - `node_modules/.pnpm-workspace-state-v1.json` appearing or disappearing caused misses even though `tracked_accesses.rs` already skips direct reads and writes of `node_modules/.pnpm-workspace-state-*.json` (#825). - `node_modules/.vite-temp` (created by Vite when bundling `vite.config.*` and left behind) caused misses for unrelated tasks that list `node_modules` because Vite's runtime `ignoreInput` call only applies to the Vite task itself. - Similarly, `.git` (at the workspace root) and the task cache root (`node_modules/.vite/task-cache`, skipped for direct accesses in #937) were not excluded from directory listing fingerprints. ## Changes - Add `crates/vt/src/session/execute/ignored_paths.rs` (`IgnoredDirEntries`, `is_ignored_workspace_path`, `relative_cache_root`) as a single source of truth for built-in ignored workspace paths (`.DS_Store`, root `.git`, `node_modules/.pnpm-workspace-state-*.json`, `node_modules/.vite-temp`, and the workspace-relative task cache root), compiled on all platforms, and add `RelativePath::file_name` in `vt_path`. - Use `is_ignored_workspace_path` in `tracked_accesses.rs` (skipping direct accesses under `node_modules/.vite-temp` and `.DS_Store` alongside `.git`, pnpm workspace state files, and the task cache). - Use `IgnoredDirEntries` in both `fingerprint.rs`'s `leave_out_excluded_entries` (during fingerprint creation and cache validation) and `rebuildable.rs` (`holds`, `is_empty_folder`, and `add_files_under`). - Bump `CACHE_SCHEMA_VERSION` from 23 to 24 to avoid first-run misses and mixed-version remote cache churn against v23 entries that recorded these names in `DirListing.entries`. - Document the built-in exclusions in `docs/inputs.md`, update `CHANGELOG.md`, and add unit tests plus a cross-platform synthetic e2e snapshot test (`node_modules_listing_ignores_volatile_entries`). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes cache fingerprint semantics and bumps the schema version, which invalidates existing local caches but is required for correct hit/miss behavior. > > **Overview** > Fixes **spurious cache misses** when tasks **list directories** (especially `node_modules`, the workspace root, or `node_modules/.vite`) because volatile entries were still fingerprinted even though some direct accesses were already skipped. > > Introduces **`ignored_paths`** as the shared rules for built-in ignored workspace paths: `.DS_Store`, root `.git`, `node_modules/.pnpm-workspace-state-*.json`, `node_modules/.vite-temp`, and the workspace-relative task cache root. Those rules now apply consistently to **fspy tracked reads/writes**, **directory listing fingerprints** (create + validate), and **rebuildable-folder scans**, with `relative_cache_root` passed through cache validation and post-run fingerprinting. > > **`CACHE_SCHEMA_VERSION` is bumped to 24** so older entries that recorded these names in listings are not compared against the new semantics. Adds `RelativePath::file_name`, updates **inputs** docs, and an e2e snapshot confirming real `node_modules` changes still miss while volatile entries do not. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ac51599. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Gemini 4 Neon <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.