Repository navigation
Conversation
|
Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.
Updated: |
fengmk2
force-pushed
the
feat/implode-shared-source-matcher
branch
from
December 5, 2026 17:22
90b680e to
b66ad71
Compare
`vp implode` matched only lines that start with `. ` or `source ` and
one argument, so it left lines such as
`[ -f "$HOME"/.vite-plus/env ] && . "$HOME"/.vite-plus/env`,
`. ${HOME}/.vite-plus/env` and `source -- "$HOME/.vite-plus/env"`.
Implode now selects lines with the shell-word matcher of
`vp env doctor` and first-use setup. It removes a line when the line
sources the env file on its own and each other command on it names the
env file. It keeps lines that continue a command, blocks that span
lines, and lines with other commands, so a removal cannot break the
profile.
fengmk2
force-pushed
the
feat/implode-shared-source-matcher
branch
from
December 5, 2026 17:25
b66ad71 to
008d213
Compare
Contributor
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.52 MiB | 2.52 MiB | 0 B (0.00%) |
packages/core/dist |
Directory total | 4.29 MiB | 4.29 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 6.81 MiB | 6.81 MiB | 0 B (0.00%) |
vp (Linux x64) |
Binary | 9.31 MiB | 9.31 MiB | +4.00 KiB (+0.04%) |
vp (Linux x64) |
gzip -9 | 4.26 MiB | 4.26 MiB | +824 B (+0.02%) |
| NAPI (Linux x64) | Binary | 37.99 MiB | 37.99 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | gzip -9 | 15.33 MiB | 15.33 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
Binary | 6.12 MiB | 6.12 MiB | +16 B (+0.00%) |
vp (macOS ARM64) |
gzip -9 | 3.65 MiB | 3.65 MiB | +756 B (+0.02%) |
| NAPI (macOS ARM64) | Binary | 44.39 MiB | 44.39 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 19.42 MiB | 19.42 MiB | 0 B (0.00%) |
vp (Windows x64) |
Binary | 7.27 MiB | 7.27 MiB | +1.50 KiB (+0.02%) |
vp (Windows x64) |
gzip -9 | 3.33 MiB | 3.33 MiB | +769 B (+0.02%) |
| NAPI (Windows x64) | Binary | 33.88 MiB | 33.88 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | gzip -9 | 14.04 MiB | 14.04 MiB | +1 B (+0.00%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.09 KiB | 7.09 KiB | -2 B (-0.03%) |
| Installer (Windows x64) | Binary | 4.70 MiB | 4.70 MiB | 0 B (0.00%) |
| Installer (Windows x64) | gzip -9 | 2.25 MiB | 2.25 MiB | 0 B (0.00%) |
Implode now keeps a sourcing line in a block that an earlier line opens, such as the only command in a multi-line `if`, Fish `if` or `function`, or Nushell braces. A pending `&&`, `||` or `|` now continues across blank and comment lines, so the command after it stays. The shell-word splitter keeps `>&`, `<&`, `&>` and POSIX `>|` inside the command, so `. "$HOME/.vite-plus/env" >/dev/null 2>&1` counts as one command and implode removes it.
This branch has not been deployed
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.
vp implodenow removes the profile lines that source the Vite+ env file in the spellings thatvp env doctorand first-use setup accept, such as:[ -f "$HOME"/.vite-plus/env ] && . "$HOME"/.vite-plus/env. ${HOME}/.vite-plus/envsource -- "$HOME/.vite-plus/env"Implode reads each line with the shell-word matcher from #3660. It removes a line only when the line sources the env file on its own and each other command on it names the env file. Lines that continue a command, blocks that span lines, and lines with other commands stay, so cleanup does not break a profile or drop an unrelated command.