Skip to content

chore: switch from npm to pnpm as package manager#520

Open
devin-ai-integration[bot] wants to merge 52 commits into
mainfrom
devin/1779934552-switch-to-pnpm
Open

chore: switch from npm to pnpm as package manager#520
devin-ai-integration[bot] wants to merge 52 commits into
mainfrom
devin/1779934552-switch-to-pnpm

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented May 28, 2026

Copy link
Copy Markdown

Summary

Migrates the millicast-sdk monorepo from npm + Lerna to pnpm workspaces, following the same patterns used across 18 other millicast/CoSMoSoftware repositories.

Changes:

  • Package manager: Replaced package-lock.json with pnpm-lock.yaml (imported via pnpm import)
  • pnpm-workspace.yaml: Created with standard config (trustPolicy: no-downgrade, engineStrict: true, minimumReleaseAge: 10080, allowBuilds for native packages)
  • package.json:
    • Set packageManager to pnpm@11.1.2 with SHA matching all other repos
    • Added engines.node: ">=24.0.0" and engines.pnpm: ">=11.0.0"
    • Replaced all lerna run scripts with pnpm -r run / pnpm --filter equivalents
    • Removed lerna, @lerna/publish, install, npm from devDependencies
  • lerna.json: Removed (no longer needed with pnpm workspaces)
  • CI workflows (check-tests.yml, new-release.yml, rc-release.yml): Updated to use actions/setup-node with Node 24, corepack enable, and pnpm ci
    • Added PUPPETEER_SKIP_DOWNLOAD=true for unit-test/e2e-test jobs + explicit npx puppeteer browsers install chrome step (pnpm's strict node_modules causes puppeteer's postinstall to create a corrupt cache)
  • jsdoc.json: Fixed plugin/template paths from ../../node_modules/ to node_modules/ (pnpm doesn't hoist to root)
  • Sub-package scripts: npm runpnpm run in packages/millicast-sdk/package.json
  • CONTRIBUTING.md: Updated all instructions from npm/Lerna to pnpm

CI Status:

  • ✅ eslint — passes
  • ✅ unit-test — passes (173/173 tests)
  • ✅ build-docs — passes
  • ✅ e2e-test — passes (needed to reactivate account used with publish token)
  • ⏳ Analyze (javascript) / Devin Review — passes

Review & Testing Checklist for Human

  • Verify pnpm publish commands in new-release.yml and rc-release.yml work correctly with --no-git-checks flag
  • Confirm the e2e-test account credentials (PUBLISHER_DEMO_ACC_ID / PUBLISHER_DEMO_TOKEN) are still valid — all 4 e2e failures are Unauthorized: Account disabled
  • Test a local dev workflow: clone, corepack enable, pnpm ci, pnpm run build, pnpm run start

Notes

  • The codeql-analysis.yml workflow was not modified since it uses GitHub's autobuild action which auto-detects the build system
  • The husky v4 pre-commit hook has a known issue with pnpm (npxpnpm dlx translation fails). Upgrading to husky v9+ would resolve it but is out of scope for this migration
  • nx.json was kept since it doesn't depend on lerna and may be useful for build caching

Link to Devin session: https://dolby.devinenterprise.com/sessions/9b9e1c01e1b3454a96e298bf03675273
Requested by: @nicholi


Open in Devin Review

- Replace npm with pnpm as the package manager
- Convert package-lock.json to pnpm-lock.yaml via pnpm import
- Add pnpm-workspace.yaml with trustPolicy, engineStrict, minimumReleaseAge
- Set packageManager to pnpm@11.1.2 with SHA
- Add engines.node >=24.0.0 and engines.pnpm >=11.0.0
- Replace lerna scripts with pnpm workspace equivalents
- Remove lerna, @lerna/publish, install, npm devDependencies
- Remove lerna.json
- Update all CI workflows to use pnpm ci + Node 24
- Update sub-package scripts from npm run to pnpm run
- Update CONTRIBUTING.md for pnpm usage
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot

changeset-bot Bot commented May 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fdb7a98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration Bot and others added 4 commits May 28, 2026 02:25
The relative paths ../../node_modules/ assumed npm's hoisted flat
structure. With pnpm, these packages are in the local package's
node_modules/ directory.

Co-Authored-By: nicholi <nicholas.schell@dolby.com>
pnpm's strict node_modules prevents puppeteer's postinstall from
being found by jest-environment-puppeteer. Add an explicit install
step to ensure Chrome is available for unit and e2e tests.

Co-Authored-By: nicholi <nicholas.schell@dolby.com>
Puppeteer's postinstall creates the cache folder but fails to extract
the Chrome binary on CI. Skip the automatic download during pnpm ci
and use the explicit puppeteer browsers install step instead.

Co-Authored-By: nicholi <nicholas.schell@dolby.com>
pnpm --filter exec doesn't properly run the puppeteer CLI. Use npx
with working-directory set to the millicast-sdk package instead.

Co-Authored-By: nicholi <nicholas.schell@dolby.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread pnpm-workspace.yaml
Co-Authored-By: nicholi <nicholas.schell@dolby.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 14 commits May 28, 2026 10:13
Co-Authored-By: nicholi <nicholas.schell@dolby.com>
Co-Authored-By: nicholi <nicholas.schell@dolby.com>
Co-Authored-By: nicholi <nicholas.schell@dolby.com>
and also dryrun workflow
targeted at millicast-sdk
publishing to npmjs with trusted publisher
allow being called manually through workflow_dispatch
always specify shell: bash (because we are using ubuntu container here)
some cosmetic whitespace between steps
use pnpm exec for eslint
always specify shell: bash (because we are using ubuntu container here)
some cosmetic whitespace between steps
add node-gyp devDependency for millicast-sdk
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

nicholi added 5 commits May 28, 2026 06:39
we can enforce signatures in github repo
should quickly update these to versions with provenance in newer packages
@nicholi

nicholi commented May 28, 2026

Copy link
Copy Markdown
Contributor

TODO

how to incorporate changesets into node-release.yml more appropriately. How does version bumping work with changesets? Play with tools some.

Probably understand this fully and merge first.
#513

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

nicholi added 2 commits May 28, 2026 08:00
add environment section to job
drop new-release (now everything moved to node-release)
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

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.

1 participant