Skip to content

fix(migrate): skip gitignored directories when migrating script runners - #3623

Open
voidzero-bot[bot] wants to merge 4 commits into
mainfrom
triagebot/fix-3622
Open

voidzero-bot[bot] wants to merge 4 commits into
mainfrom
triagebot/fix-3622

Conversation

@voidzero-bot

@voidzero-bot voidzero-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

vp migrate printed the --full hint on every run when a gitignored folder, such as a vendored bower_components, held a file that loads ts-node, tsx, or oxnode. The runner scans read every directory except a fixed list of names.

The scans that detect runner uses and rewrite runner shebangs now skip gitignored directories. They use the GitignoreMatcher from the Vitest v5 preflight, which reads rules from the Git root and compiles them once per walk. A workspace package that is itself gitignored is still scanned in full. The scan that decides whether to remove a runner's devDependency still reads ignored files, because migration leaves them unchanged and ignored build output can load the runner.

The hint check also stops counting ts-node and oxnode uses that --full keeps with a warning, such as a ts-node command that type-checks or a require('ts-node').register() call. Before, such a use printed the hint again after every --full run.

Closes #3622

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
viteplus-dev Deployed Preview eb663b2

Updated: Dec 5, 2026, 17:52 UTC | Dashboard

@fengmk2 fengmk2 changed the title fix(migrate): ignore gitignored dirs when detecting runner usage fix(migrate): skip gitignored directories when migrating script runners Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: eb663b2

@fengmk2 fengmk2 self-assigned this Dec 5, 2026
voidzero-bot Bot and others added 2 commits December 6, 2026 01:34
`vp migrate` printed the `--full` hint on every run when a gitignored
folder, such as a vendored `bower_components`, held a file that loads
ts-node, tsx, or oxnode. The runner scans read every directory except a
fixed list of names.

The scans that detect runner uses and rewrite runner shebangs now skip
gitignored directories. They use the `GitignoreMatcher` from the Vitest v5
preflight, which reads rules from the Git root and compiles them once per
walk. A workspace package that is itself gitignored is still scanned in
full. The scan that decides whether to remove a runner's devDependency
still reads ignored files, because migration leaves them unchanged and
ignored build output can load the runner.

Closes #3622
@fengmk2
fengmk2 force-pushed the triagebot/fix-3622 branch from ac893b3 to f0d4934 Compare December 5, 2026 17:36
`sourceTreeMatches` and the Vitest v5 file walk now use one helper to
pick the child directories they enter.
On an existing Vite+ project, a bare `vp migrate` printed the `--full`
hint on every run when the project had a ts-node or oxnode use that
migration cannot convert, such as a type-checking ts-node command. The
hint check counted uses that `--full` keeps with a warning. It now
counts only uses that `--full` changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp migrate suggests --full because the ts-node scan reads gitignored folders like bower_components

1 participant