[FEATURE] Migrate CLI runtime to pnpm for improved install performance
- Dominant language
- TypeScript
- Stars
- 272
- Forks
- 375
- Avg merge
- 3h 22m
- Merged PRs (30d)
- 8
Description
### Why do we need this improvement?
The current npm installation process for the CLI is significantly slow, taking approximately 4m 13s on a fresh install (local benchmark). This creates friction for new contributors and slows down CI/CD pipelines where fresh installs occur frequently.
Furthermore, npm's hoisting mechanism is currently masking several missing peer dependencies (e.g., ajv, tslib, spectral). This results in a "fragile" dependency graph where the project relies on packages that aren't explicitly declared in package.json.
### How will this change help?
- Performance: Migrating to pnpm reduces fresh installation time to ~1m 19s. This is a ~3.2x speed improvement.
- Stability: pnpm uses a strict dependency resolution strategy. This forces us to explicitly declare all used dependencies, preventing "phantom dependency" bugs and ensuring the build is deterministic across all environments.
### Screenshots
_No response_
### How could it be implemented/designed?
- Remove package-lock.json.
- Generate pnpm-lock.yaml.
- Update package.json to include the missing dependencies identified during the migration (specifically: tslib, ajv, ajv-formats, @stoplight/spectral-core, @stoplight/spectral-formatters, @apidevtools/json-schema-ref-parser).
- Update CI workflows to use pnpm install instead of npm install.
### 🚧 Breaking changes
Yes
### 👀 Have you checked for similar open issues?
- [x] I checked and didn't find a similar issue
### 🏢 Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)
### Are you willing to work on this issue?
Yes I am willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.