Skip to content

feat: consolidate package manager to pnpm on gapic-generator-typescript#8365

Open
quirogas wants to merge 2 commits into
googleapis:mainfrom
quirogas:feat/pkg-mgr-consolidation
Open

feat: consolidate package manager to pnpm on gapic-generator-typescript#8365
quirogas wants to merge 2 commits into
googleapis:mainfrom
quirogas:feat/pkg-mgr-consolidation

Conversation

@quirogas
Copy link
Copy Markdown
Contributor

@quirogas quirogas commented May 27, 2026

This pull request consolidated the package manager used by gapic-generator-typescript.

@quirogas quirogas self-assigned this May 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a pnpm-workspace.yaml file to define the workspace root directory for the gapic-generator-typescript generator. There are no review comments to address, and I have no additional feedback to provide.

@quirogas quirogas marked this pull request as ready for review May 27, 2026 15:57
@quirogas quirogas requested a review from a team as a code owner May 27, 2026 15:57
@pearigee
Copy link
Copy Markdown
Contributor

I think we should keep these lockfiles (except maybe yarn)

I think consolidating around a package manager is a bit more complicated than deleting these lockfiles.

At minimum, I think we NEED to have lock files for NPM (to cover automation and our customers) and PNPM (to cover our automation).

Lockfiles are most useful as a mitigation against supply chain attacks (we are going to be adding them everywhere in the near future). Deleting them exposes us to more risk. Simply running npm install is a major security risk these days UNLESS our versions are strictly defined in a lockfile. For example:

Consolidation is mostly a CI/Automation problem

To consolidate around a single package manager, the key challenge is actually in our automation (GitHub Actions, GCB, Docker Containers, BazelBot, etc.). These automations use a mixture of PNPM and NPM. Note, that modern supply chain attacks are specifically designed to compromise CI (i.e. with Docker escape mechanisms). As a result, we probably need to keep a NPM and PNPM lock around.

Here are a few usage examples:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to add this file? The workspace configuration is only useful when defining multiple packages. In this case, we are just saying the current directory is one (which is implicit given the package.json).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants