From: Jérôme Benoit Date: Wed, 7 Oct 2026 15:50:13 +0000 (+0200) Subject: chore: replace volta with mise for toolchain management (#2143) X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8b5bda421565ae5daf7817d51e72f18e9a11e086;p=e-mobility-charging-stations-simulator.git chore: replace volta with mise for toolchain management (#2143) * chore: replace volta with mise for toolchain management Volta is unmaintained and its maintainers recommend mise. Declare node and pnpm in .mise.toml, drop the per-package volta blocks, point the sea script at mise which node and update the README setup instructions. CI is unchanged: it already provisions node and pnpm through actions/setup-node and pnpm/action-setup, and its node matrix must keep testing several versions. Signed-off-by: Jérôme Benoit * chore: read mise toolchain versions from package.json Follow poolifier#3334 without duplicating Node.js or pnpm pins. Keep explicitly selected runtimes through onFail ignore, and require a mise version verified to install the current pnpm release assets. Correct the Corepack setup instructions and ignore personal mise overrides and lockfiles. Signed-off-by: Jérôme Benoit * docs: keep development setup instructions focused on the project Signed-off-by: Jérôme Benoit --------- Signed-off-by: Jérôme Benoit --- diff --git a/.gitignore b/.gitignore index 32df8163..b3319278 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,16 @@ Thumbs.db *.mta mta_archives/ +# mise local overrides +mise.local.toml +mise.*.local.toml +.mise.local.toml +.mise.*.local.toml +mise.local.lock +mise.*.local.lock +.mise.local.lock +.mise.*.local.lock + # pnpm package-lock.json diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 00000000..4ec1d0f8 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,5 @@ +min_version = "2026.9.18" + +[settings] +# Read development tool versions from package.json. +idiomatic_version_file_enable_tools = ["node", "pnpm"] diff --git a/README.md b/README.md index d2e7af12..99182f47 100644 --- a/README.md +++ b/README.md @@ -80,21 +80,21 @@ brew install node ### Development prerequisites (optional) -Install [volta](https://volta.sh/) for managing automatically the node.js runtime and package manager version: +Install [mise](https://mise.jdx.dev/) for managing automatically the node.js runtime and package manager version: #### Unix ```shell -curl https://get.volta.sh | bash +curl -fsSL https://mise.run | sh ``` #### Windows ```powershell -choco install -y volta +winget install jdx.mise ``` -Setup [volta](https://volta.sh/) with [pnpm](https://github.com/pnpm/pnpm) package manager support: https://docs.volta.sh/advanced/pnpm +Then [activate mise](https://mise.jdx.dev/getting-started.html#activate-mise) in your shell and run `mise install` from the repository root to install the development tools. ### Branching model @@ -104,11 +104,11 @@ The `vX.Y` branches are the maintenance branches for the corresponding major and ### Dependencies -Enable corepack, if [volta](https://volta.sh/) is not installed and configured, and install latest pnpm version: +From the repository root, enable Corepack and install the pnpm version declared in `package.json` if [mise](https://mise.jdx.dev/) is not installed and configured. If Corepack is not available, install it with `npm install --global corepack` first. ```shell corepack enable -corepack prepare pnpm@latest --activate +corepack install ``` In the repository root, run the following command: diff --git a/package.json b/package.json index b84919e2..e6bdd71f 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,12 @@ "node": ">=22.0.0", "pnpm": ">=10.9.0" }, - "volta": { - "node": "24.21.0", - "pnpm": "12.9.0" + "devEngines": { + "runtime": { + "name": "node", + "version": "24.21.0", + "onFail": "ignore" + } }, "packageManager": "pnpm@12.9.0", "repository": { @@ -69,7 +72,7 @@ "test": "cross-env NODE_ENV=test node --import tsx --test --test-force-exit 'tests/**/*.test.ts'", "test:debug": "cross-env NODE_ENV=test node --import tsx --test --inspect 'tests/**/*.test.ts'", "test:coverage": "mkdir -p coverage && cross-env NODE_ENV=test node --import tsx --test --test-force-exit --experimental-test-coverage --test-coverage-include='src/**/*.ts' --test-reporter=lcov --test-reporter-destination=coverage/lcov.info 'tests/**/*.test.ts'", - "sea": "pnpm exec rimraf ./dist/evse-simulator ./dist/evse-simulator.blob && node --experimental-sea-config sea-config.json && pnpm dlx ncp $(volta which node || n which lts || nvm which node || command -v node) ./dist/evse-simulator && pnpm dlx postject ./dist/evse-simulator NODE_SEA_BLOB ./dist/evse-simulator.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 && pnpm exec rimraf ./dist/evse-simulator.blob" + "sea": "pnpm exec rimraf ./dist/evse-simulator ./dist/evse-simulator.blob && node --experimental-sea-config sea-config.json && pnpm dlx ncp $(mise which node || n which lts || nvm which node || command -v node) ./dist/evse-simulator && pnpm dlx postject ./dist/evse-simulator NODE_SEA_BLOB ./dist/evse-simulator.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 && pnpm exec rimraf ./dist/evse-simulator.blob" }, "dependencies": { "@mikro-orm/better-sqlite": "^6.6.14", diff --git a/ui/cli/package.json b/ui/cli/package.json index d84807f7..0ee38d94 100644 --- a/ui/cli/package.json +++ b/ui/cli/package.json @@ -6,10 +6,6 @@ "node": ">=22.0.0", "pnpm": ">=10.9.0" }, - "volta": { - "node": "24.21.0", - "pnpm": "12.9.0" - }, "packageManager": "pnpm@12.9.0", "type": "module", "bin": { diff --git a/ui/common/package.json b/ui/common/package.json index b6d80626..5c87a608 100644 --- a/ui/common/package.json +++ b/ui/common/package.json @@ -6,10 +6,6 @@ "node": ">=22.0.0", "pnpm": ">=10.9.0" }, - "volta": { - "node": "24.21.0", - "pnpm": "12.9.0" - }, "packageManager": "pnpm@12.9.0", "type": "module", "exports": "./src/index.ts", diff --git a/ui/web/package.json b/ui/web/package.json index 984ad487..590084a9 100644 --- a/ui/web/package.json +++ b/ui/web/package.json @@ -7,10 +7,6 @@ "node": ">=22.0.0", "pnpm": ">=10.9.0" }, - "volta": { - "node": "24.21.0", - "pnpm": "12.9.0" - }, "packageManager": "pnpm@12.9.0", "type": "module", "scripts": {