Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ dunce = "1.0.5"
fast-glob = "1.0.0"
flate2 = { version = "=1.1.9", features = ["zlib-rs"] }
form_urlencoded = "1.2.1"
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
futures = "0.3.31"
futures-util = "0.3.31"
glob = "0.3.2"
Expand Down Expand Up @@ -250,8 +250,8 @@ pretty_assertions = "1.4.1"
phf = "0.14.0"
prettyplease = "0.2.32"
proc-macro2 = "1"
pty_terminal_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
pty_terminal_test_client = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
pty_terminal_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
pty_terminal_test_client = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
quote = "1"
rayon = "1.10.0"
regex = "1.11.1"
Expand All @@ -274,7 +274,7 @@ sha2 = "0.10.9"
shell-escape = "0.1.5"
simdutf8 = "0.1.5"
smallvec = { version = "1.15.1", features = ["union"] }
snapshot_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
snapshot_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
string_cache = "0.9.0"
sugar_path = { version = "3", features = ["cached_current_dir"] }
supports-color = "3"
Expand Down Expand Up @@ -305,11 +305,11 @@ vite_pm_cli = { path = "crates/vite_pm_cli" }
vite_setup = { path = "crates/vite_setup" }
vite_shared = { path = "crates/vite_shared" }
vite_static_config = { path = "crates/vite_static_config" }
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
vite_powershell = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "85d4e734c64c96c2ce60e734b3e202b5add53696" }
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
vite_powershell = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "5c1d02c750ac21c6f4cf0528062590a145e87fd1" }
walkdir = "2.5.0"
which = "8.0.0"
winreg = "0.56.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script type="module" src="/src/valid.js"></script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "@test/builtin-script-note",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "vp build",
"dev": "vite --host --port 5000",
"lint": "vp lint --deny-warnings src/",
"format": "prettier --write src/",
"help": "vpt echo help"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# A built-in command never runs a `package.json` script of the same name, so it
# points at `vpr <name>` instead. This project defines `build`, `dev`, `lint`,
# `format` and `help` scripts, but no `fmt` one.
[[case]]
name = "builtin_script_note"
vp = ["local", "global"]
skip-platforms = ["windows"]
steps = [
{ argv = ["vp", "dev", "--port", "12312312312"], comment = "`vp dev` points at the `dev` script (invalid port exits the server immediately)", continue-on-failure = true },
{ argv = ["vp", "build"], comment = "`vp build` points at the same build script used by the suppression cases" },
{ argv = ["vp", "lint", "src/"], comment = "every built-in that can be mistaken for a script gets the same note", continue-on-failure = true },
{ argv = ["vp", "lint", "."], cwd = "src", comment = "note reaches the enclosing package from a subdirectory, like `vpr` does", continue-on-failure = true },
{ argv = ["vp", "format", "src/"], comment = "the `format` alias reaches the local CLI as typed, so its own script gets the note", continue-on-failure = true },
{ argv = ["vp", "fmt", "src/"], comment = "no note: only `format` is a script here, and that is not the name this ran under", continue-on-failure = true },
{ argv = ["vp", "help", "dev"], comment = "the local path checks the original `help` spelling; the global CLI renders help before local delegation", continue-on-failure = true },
{ argv = ["vp", "preview", "--port", "12312312312"], comment = "no note: this project has no `preview` script", continue-on-failure = true },
{ argv = ["vp", "lint", "src/"], tty = false, comment = "the note still reaches piped output, such as an AI agent capturing the command; it goes to stderr, so parsed stdout stays intact", continue-on-failure = true },
]

# Vite Task sets `VP_RUN` for a package script's child process. The nested
# built-in should not point back at the `vp run` already in progress.
[[case]]
name = "builtin_script_note_inside_task"
vp = "local"
skip-platforms = ["windows"]
steps = [
{ argv = ["vp", "run", "build"], comment = "no note: a task-spawned `vp build` is already on the script path" },
]

# npm, pnpm and Yarn expose the active package script through the same
# `npm_lifecycle_event` compatibility variable. The note should not recommend
# switching runners when a package-manager script has already done that.
[[case]]
name = "builtin_script_note_inside_npm_script"
vp = "local"
skip-platforms = ["windows"]
steps = [
{ argv = ["npm", "run", "build"], comment = "no note: npm has already selected and started the build script" },
]
Loading
Loading