Repository navigation
lint(oxlint): forbid node:path in favor of pathe - #184
Merged
Merged
Conversation
`node:path` returns OS-native separators, which breaks any path that ends up embedded in a module specifier, generated source, or compared against Vite's normalized watcher paths — the Windows unit-test regression in #183 was the latest example. `pathe` is a drop-in replacement that always emits forward slashes; we already use it throughout the source. Add an oxlint `no-restricted-imports` rule that flags `node:path` (and bare `path`) and points violators at pathe. Explicit format work is still allowed via `node:path/win32` or `node:path/posix`. Migrate all 145 remaining imports to `pathe` and add the dep to the five packages/playgrounds that didn't already have it.
pathe
TheAlexLichter
marked this pull request as draft
May 5, 2026 16:41
create-void ships a single bundled `dist/index.mjs` and has no runtime `dependencies` — every transitive import has to be listed in `deps.onlyBundle` for tsdown to inline it. Add `pathe` so the build doesn't fail with 'located in node_modules but not included in deps.onlyBundle'.
TheAlexLichter
marked this pull request as ready for review
May 5, 2026 16:44
cpojer
reviewed
May 6, 2026
Comment on lines
+172
to
+176
| "message": "Use `pathe` instead. It re-exports the same API but always emits forward slashes, which avoids cross-platform breakage when paths are embedded in module specifiers, generated source, or compared against Vite's normalized watcher events. If you genuinely need format-specific behavior, import `node:path/win32` or `node:path/posix` explicitly." | ||
| }, | ||
| { | ||
| "name": "path", | ||
| "message": "Use `pathe` instead of the unprefixed `path` import (and prefer `node:path/win32` / `node:path/posix` for explicit format-specific behavior)." |
Member
There was a problem hiding this comment.
Unsure why the message is different for both 🤷♂️
cpojer
approved these changes
May 6, 2026
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
…lowlist) (#184) #183 bumped only the vite-plus CLI to ^0.2.0; two follow-ups were missing. 1. Catalog aliases. Vite+ 0.2 dropped the separate @voidzero-dev/vite-plus-test package (npm latest is 0.1.24, no 0.2.x) and now bundles upstream vitest@4.1.9 directly. The catalog still pointed vite/vitest at the old 0.1.x packaging, so `vp test run` could not launch ("Could not find 'vitest' bin entry"). Point vite -> @voidzero-dev/vite-plus-core@0.2.0 and vitest -> 4.1.9. 2. minimumReleaseAge. The freshly-published 0.2.0 first-party packages were rejected by pnpm's supply-chain age check, breaking `vp install --frozen-lockfile` in CI. Exclude the org's own scopes (the list Vite+ `vp config` maintains automatically); third-party stays gated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node:pathreturns OS-native separators, which silently breaks any path that ends up embedded in a module specifier, generated source, or compared against Vite's normalized watcher paths. The Windows unit-test regression fixed in #183 is the latest example, and there's nothing stopping us from re-introducing it.This PR adds an oxlint
no-restricted-importsrule that flagsnode:path(and barepath) and points contributors atpathe. Explicit format work is still allowed vianode:path/win32ornode:path/posixas those are different specifiers and have format-specific semantics.