Files
pnpm/installing
zybo 194d36856e feat(ci): implement pnpm ci command (#11003)
* feat(ci): implement pnpm ci command

This implements the `pnpm ci` (clean-install) command, which is similar
to `npm ci`. The command:

- Removes `node_modules` before installation (clean install)
- Installs dependencies from the lockfile with `--frozen-lockfile`
- Fails if the lockfile is missing or out of sync with `package.json`
- Supports workspaces (removes `node_modules` from all workspace projects)

This is useful for CI/CD environments where you want to ensure
reproducible builds.

Aliases: `pnpm clean-install`, `pnpm ic`, `pnpm install-clean`

Closes #6100

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update tsconfig.json references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(ci): simplify pnpm ci to compose clean + install --frozen-lockfile

Per maintainer feedback, simplify the ci command to just call
`clean.handler()` then `install.handler()` with frozenLockfile: true,
following the same composition pattern as installTest.

Moved ci command from installing/commands to pnpm/src/cmd/ where it
can import both clean and install handlers directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(ci): remove ci stub from installing/commands

The ci command now lives entirely in pnpm/src/cmd/ci.ts,
so the old stub in installing/commands is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(ci): rename ci.ts to cleanInstall.ts

Per reviewer feedback, use the full command name for the file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ci): use non-dotfile marker in ci test

The clean command preserves dotfiles in node_modules (except pnpm's
own .bin, .modules.yaml, .pnpm), so the test marker starting with "."
was not being removed. Renamed to a regular file name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: zubeyralmaho <zubeyralmaho@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:43:05 +01:00
..