Skip to content

Commit 1c6daae

Browse files
authored
Merge branch 'main' into fix/991
2 parents d27bb53 + 57dfd6a commit 1c6daae

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

packages/cli/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ These commands map to their corresponding tools. For example, `vp dev --port 300
6363

6464
- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
6565
- **Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead.
66-
- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vp test` command, run it using `vp run test`.
66+
- **Running scripts:** Vite+ built-in commands (`vp dev`, `vp build`, `vp test`, etc.) always run the Vite+ built-in tool, not any `package.json` script of the same name. To run a custom script that shares a name with a built-in command, use `vp run <script>`. For example, if you have a custom `dev` script that runs multiple services concurrently, run it with `vp run dev`, not `vp dev` (which always starts Vite's dev server).
6767
- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands.
6868
- **Use Vite+ wrappers for one-off binaries:** Use `vp dlx` instead of package-manager-specific `dlx`/`npx` commands.
6969
- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.

packages/cli/src/utils/editor.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ export async function selectEditor({
184184
};
185185
const selectedEditor = await prompts.select({
186186
message: 'Which editor are you using?',
187-
options:
188-
editorOptions.length > 0
189-
? [editorOptions[0], noneOption, ...editorOptions.slice(1)]
190-
: [noneOption],
187+
options: [...editorOptions, noneOption],
191188
initialValue: 'vscode',
192189
});
193190

0 commit comments

Comments
 (0)