blog.naokihaba.com

OSS activity in March 2026

In March, I sent my first PR to Vite+. I wanted to use Vite+ at work. So I started with the problems in vp create and vp migrate.

voidzero-dev/vite-plus

fix: add troubleshooting tips for npm template not found error (#1055)

This was my first PR to Vite+. If you passed a template name that does not exist to vp create, the pnpm 404 error was shown unchanged (#828). Vite+ ran the package manager before it checked whether the package exists on npm. So I changed it to check the npm registry first. If the package is not found, Vite+ now shows a message that says so.

fix(create): show helpful error for unknown vite: templates (#1130)

If you pass an unknown vite: template, such as vp create vite:test, the command failed with ENOENT (#1128). A known vite: template is rewritten to create-vite@latest during the process. So if the name still starts with vite: at the end, the template is unknown. In that case, Vite+ now suggests running vp create --list.

Processing for each name passed to vp create. vite:library is rewritten to create-vite@latest and creates the project. vite:test stays as vite:. Before, it failed with ENOENT. After #1130, it suggests –list. A name that is not on npm used to show the pnpm 404 error unchanged. After #1055, Vite+ checks the npm registry first and shows that the name was not found.

feat(migrate): migrate .nvmrc to .node-version during vp migrate (#1159)

Vite+ reads the Node.js version from .node-version. However, many projects that use nvm write the version in .nvmrc (#1158). So I changed vp migrate to move .nvmrc to .node-version. It removes the leading v.

I was not sure what to do when .nvmrc contains node. .node-version cannot express node. At first, I showed a warning and skipped the migration. In review, I got a suggestion to convert it to lts/*. Node.js had announced that all major versions would become LTS from Node.js 27. So I chose the conversion, and the log now shows that it happened.

In this PR, I thought about one question most. It was not how to write the code. It was how Vite+ should behave. Which comes first: keeping the meaning of the original setting, or not stopping the migration?

feat(migrate): support volta node version migration to .node-version (#1201)

This is the Volta version of #1159 (#1183). If package.json has volta.node, vp migrate creates .node-version. If .nvmrc also exists, .nvmrc takes priority. Vite+ then shows the steps to remove the volta field by hand. The PR was merged on April 1.

Conversion when vp migrate creates .node-version. The leading v in .nvmrc v24.14.0 is removed to give 24.14.0. node in .nvmrc is converted to lts/* and shown in the log (#1159). volta.node in package.json writes the same version (#1201). When both exist, .nvmrc takes priority, and the steps to remove the volta field by hand are shown.