Skip to content

Conversation

@chris-olszewski
Copy link
Member

@chris-olszewski chris-olszewski commented Oct 6, 2025

What was changed

Move from NPM to PNPM package manager

Why?

PNPM offers a variety of improvements over NPM. Specifically, we're interested in the security benefits of minimumReleaseAge and not running dependency lifecycle scripts unless allowlisted.

Needs to be landed in conjunction with temporalio/features#698

Checklist

  1. Closes N/A

  2. How was this tested:
    CI

  3. Any docs updates needed?
    N/A

@chris-olszewski chris-olszewski force-pushed the olszewski/pnpm branch 5 times, most recently from cd61082 to d5cd111 Compare October 7, 2025 18:49
features-tests:
name: Features Tests
uses: temporalio/features/.github/workflows/typescript.yaml@main
uses: temporalio/features/.github/workflows/typescript.yaml@olszewski/pnpm
Copy link
Member Author

Choose a reason for hiding this comment

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

Used to verify CI setup. Once both PRs are approved will switch to main before landing

@chris-olszewski chris-olszewski marked this pull request as ready for review November 12, 2025 15:17
@chris-olszewski chris-olszewski requested a review from a team as a code owner November 12, 2025 15:17
shell: bash
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
Copy link
Contributor

Choose a reason for hiding this comment

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

Not 100% sure about this, but it seems reasonable to hope that pnpm will be more stable and not require this "retry 3 times" hack.

# End samples

# TODO: PNPM doesn't write logs to file by default
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't mind just removing that step.

{
"version": "1.13.2",
"npmClient": "npm",
"npmClient": "pnpm",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd expect the diff to show the previous line being deleted. Could it be that you duplicated the line rather than modify it?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are still some scripts in this file that use npm.

Copy link
Contributor

Choose a reason for hiding this comment

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

Some scripts here are still using npm.

- 'packages/common'
- 'packages/core-bridge'
- 'packages/create-project'
- 'packages/docs'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what to do with the docs package. It was previously handled in isolation both to avoid conflicting dependencies and to speed up loading dependencies from an empty cache. PNPM may certainly help on both of those aspects, but I'm not convinced that that will be sufficient.

Could we consider removing docs from this workspace, and add a distinct pnpm-workspace.yaml file inside of docs?

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.

3 participants