googleapis / googleapis/librarian
nodejs: upgrade to pnpm 8+
- Dominant language
- Go
- Stars
- 45
- Forks
- 61
- Avg merge
- 19h 11m
- Merged PRs (30d)
- 181
Description
librarian's Node.js toolchain currently pins `pnpm` to version `7.32.2`.
In `pnpm` v7, global binary directory resolution relies on `NPM_CONFIG_*` environment variables (`NPM_CONFIG_GLOBAL_BIN_DIR`, `NPM_CONFIG_STORE_DIR`, etc.) to prevent global CLI tools from leaking into the host's active Node.js installation directory.
Modern `pnpm` (v8+) standardized configuration exclusively around `PNPM_HOME` and `PNPM_CONFIG_*` environment variables.
### Proposed Changes
1. Upgrade `pnpm` in Librarian's Node.js generator toolchain to version `8.x` or later.
2. Clean up legacy `NPM_CONFIG_*` environment variables in `internal/librarian/nodejs/install.go` and rely exclusively on `PNPM_HOME` / `PNPM_CONFIG_*`.
3. Revert PR #6873
Contributor guide
Research direction
Start with internal/librarian/nodejs/install.go and trace the pinned pnpm version and environment variables used by the Node.js generator. Review PR #6873 and compare the current setup with the requested PNPM_HOME/PNPM_CONFIG_* configuration. Done means pnpm is upgraded to 8 or later, legacy NPM_CONFIG_* handling is removed, and global tools no longer affect the host Node.js installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, node.js
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100