Skip to content
Draft
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
3 changes: 3 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false

- run: npm install -g npm@11.17.0

- run: npm install
- run: npx vp build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false

- run: npm install -g npm@11.17.0

- run: npm install

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Update npm
run: npm install -g npm@11.17.0

- name: Install dependencies
run: npm install
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false

- run: npm install -g npm@11.17.0

- run: npm install

Expand All @@ -33,6 +36,9 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: 24
package-manager-cache: false

- run: npm install -g npm@11.17.0

- run: npm install

Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# pkg.pr.new registry bridge (added by test-pkg-pr-new-migrate.sh)
registry=https://pkg-pr-registry-bridge.void.app/
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["VoidZero.vite-plus-extension-pack"]
}
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"editor.defaultFormatter": "oxc.oxc-vscode",
"[javascript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"oxc.fmt.configPath": "./vite.config.ts",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
}
}
16 changes: 16 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--VITE PLUS START-->

# Using Vite+, the Unified Toolchain for the Web

This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.

Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.

## Review Checklist

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
- [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.

<!--VITE PLUS END-->
22 changes: 16 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"test:package": "npm run package && npm pack --dry-run && vp build --config tests/package-smoke/vite.config.ts",
"package": "svelte-package && find dist \\( -name '*.js' -o -name '*.d.ts' \\) -type f -exec perl -pi -e \"s/(\\.\\.?\\/[^'\\\"]*)\\.ts(['\\\"])/\\1.js\\2/g\" {} +",
"prepublishOnly": "npm run package",
"changelog": "npx tsx https://github.com/janosh/workflows/raw/refs/heads/main/scripts/make-release-notes.ts"
"changelog": "npx tsx https://github.com/janosh/workflows/raw/refs/heads/main/scripts/make-release-notes.ts",
"prepare": "vp config"
},
"devDependencies": {
"@janosh/vite-config": "github:janosh/dotfiles",
Expand All @@ -67,17 +68,17 @@
"@sveltejs/package": "2.5.8",
"@sveltejs/vite-plugin-svelte": "^7.1.2",
"@types/node": "^26.0.1",
"@vitest/coverage-v8": "^4.1.9",
"@vitest/coverage-v8": "4.1.9",
"@wooorm/starry-night": "^3.10.0",
"acorn": "^8.17.0",
"happy-dom": "^20.10.6",
"mdsvex": "^0.12.7",
"svelte": "^5.56.4",
"svelte-toc": "^0.7.0",
"typescript": "6.0.3",
"vite": "^8.1.0",
"vite-plus": "0.2.1",
"vitest": "^4.1.9"
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.333e612a4d9d966e79724c336ba7bf422f79b442",
"vite-plus": "0.0.0-commit.333e612a4d9d966e79724c336ba7bf422f79b442",
Comment on lines +79 to +80

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using temporary commit-specific versions from pkg.pr.new (e.g., 0.0.0-commit.333e612a4d9d966e79724c336ba7bf422f79b442) for vite and vite-plus in package.json is highly risky for long-term maintainability. These packages are temporary and can be garbage-collected or deleted from the registry bridge, which will eventually break local installations and CI builds for anyone cloning this repository in the future.\n\nConsider using official pre-release tags (like alpha or beta versions) published to the main npm registry once they are available, or pin to stable versions if possible.

"vitest": "4.1.9"
},
"peerDependencies": {
"@wooorm/starry-night": "^3.0.0",
Expand All @@ -94,6 +95,15 @@
},
"overrides": {
"esrap": "2.2.11",
"svelte": "$svelte"
"svelte": "$svelte",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.333e612a4d9d966e79724c336ba7bf422f79b442",
"vitest": "4.1.9"
},
"devEngines": {
"packageManager": {
"name": "npm",
"version": "11.17.0",
"onFail": "download"
}
}
}
2 changes: 1 addition & 1 deletion src/lib/live-examples/vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { parse } from 'acorn'
import { Buffer } from 'node:buffer'
import process from 'node:process'
import type { HmrContext, Plugin, ViteDevServer } from 'vite'
import type { HmrContext, Plugin, ViteDevServer } from 'vite-plus'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Importing types from vite-plus instead of vite in a published library file will cause issues for consumers of this package. Since vite-plus is only a devDependency and not a dependency or peerDependency, consumers who do not use vite-plus will get compilation/type resolution errors (e.g., Cannot find module 'vite-plus') when they import ./live-examples.\n\nTo ensure compatibility with all Vite users, keep importing the types from 'vite'.

Suggested change
import type { HmrContext, Plugin, ViteDevServer } from 'vite-plus'
import type { HmrContext, Plugin, ViteDevServer } from 'vite'

import { EXAMPLE_MODULE_PREFIX } from './mdsvex-transform.ts'

// Matches import paths emitted by mdsvex-transform, e.g. ___live_example___0.svelte
Expand Down
2 changes: 1 addition & 1 deletion tests/package-smoke/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { defineConfig } from 'vite'
import { defineConfig } from 'vite-plus'

export default defineConfig({
plugins: [svelte()],
Expand Down
Loading