diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d912f09000..1ce2a40d67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,20 +6,20 @@ You'll need the following tools installed on your system: -``` +```bash brew install pnpm node just cmake ``` Install Rust & Cargo using rustup: -``` +```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh cargo install cargo-binstall ``` Initial setup to install dependencies for Vite+: -``` +```bash just init ``` @@ -49,13 +49,13 @@ just init To create a release build of Vite+ and all upstream dependencies, run: -``` +```bash just build ``` ## Install the Vite+ Global CLI from source code -``` +```bash pnpm bootstrap-cli vp --version ``` @@ -134,7 +134,7 @@ vp --version You can run this command to build, test and check if there are any snapshot changes: -``` +```bash pnpm bootstrap-cli && pnpm test && git status ``` @@ -189,7 +189,7 @@ git push --force-with-lease To sync the latest upstream dependencies such as Rolldown and Vite, run: -``` +```bash pnpm tool sync-remote just build ``` diff --git a/docs/config/run.md b/docs/config/run.md index 4349ae7d75..a1f6edc778 100644 --- a/docs/config/run.md +++ b/docs/config/run.md @@ -2,6 +2,7 @@ You can configure Vite Task under the `run` field in `vite.config.ts`. Check out [`vp run`](/guide/run) to learn more about running scripts and tasks with Vite+. + ```ts [vite.config.ts] import { defineConfig } from 'vite-plus'; diff --git a/packages/tools/src/local-npm-registry.ts b/packages/tools/src/local-npm-registry.ts index a626f0c779..a33f1ea7c2 100644 --- a/packages/tools/src/local-npm-registry.ts +++ b/packages/tools/src/local-npm-registry.ts @@ -226,7 +226,8 @@ const upstreamAgent = new HttpsAgent({ keepAlive: true, maxSockets: 64 }); // in a pnpm-packed tarball, so long-name (pax header) handling is unnecessary. function readPackageJsonFromTarball(tgzBytes: Buffer, sourcePath: string): PackageManifest { const tar = gunzipSync(tgzBytes); - for (let offset = 0; offset + 512 <= tar.length;) { + let offset = 0; + while (offset + 512 <= tar.length) { const rawName = tar.subarray(offset, offset + 100).toString(); const nulIndex = rawName.indexOf('\0'); const name = nulIndex === -1 ? rawName : rawName.slice(0, nulIndex); diff --git a/rfcs/pack-command.md b/rfcs/pack-command.md index 12a9f9c782..e51a763839 100644 --- a/rfcs/pack-command.md +++ b/rfcs/pack-command.md @@ -412,6 +412,7 @@ This RFC documents an existing command with no breaking changes: The `exe` option accepts an object for advanced configuration: + ```ts export default { pack: {