Skip to content

chore(ui): Install and build the portal plugins with pnpm - #611

Merged
kevwilliams merged 5 commits into
mainfrom
chore/pnpm
Nov 4, 2026
Merged

kevwilliams merged 5 commits into
mainfrom
chore/pnpm

Conversation

@kevwilliams

Copy link
Copy Markdown
Contributor

Summary

npm installs are slow and heavy, so both portal plugins now install, build and run CI with pnpm 11, matching cloud-portal.

Every package keeps the version npm resolved, except that the consumer plugin takes the AI SDK one patch back because the newest release is under a day old.

Without this, running the consumer plugin with pnpm 11 stopped at its first script, because nothing said whether esbuild could run its install script.

Breaking changes

Anyone working on a plugin needs pnpm and a clean install. Node 26 ships without corepack, so install pnpm once, and it then switches to the pinned version on its own.

npm install -g pnpm@11
rm -rf node_modules && pnpm install

Test plan

  • Both plugins typecheck and build with pnpm, and the consumer's unit tests pass
  • Both plugin images build in CI

Fixes #609

Switch both plugins from npm to pnpm 11.28.9, as cloud-portal did, for
smaller installs and faster runs on the same Node runtime.

- Each package.json pins pnpm through packageManager. Node 26 ships no
  corepack, so every environment installs that version itself.
- Each plugin gets a pnpm-workspace.yaml: the npm overrides in pnpm's
  parent>child syntax, esbuild allowed to run its install script and
  fsevents not, and @datum-cloud packages exempt from the one-day release
  delay. pnpm 11 fails an install when a script is neither allowed nor
  denied.
- pnpm-lock.yaml is imported from package-lock.json, which is removed.
  The provider keeps every version. The consumer uses one copy of the
  Radix dialog packages where npm kept an older nested set for cmdk, and
  takes ai 7.0.161 with its two @ai-sdk packages one patch back, since
  7.0.162 is under a day old. ai is a peer of datum-ui only.
The build stage installs the pnpm that packageManager pins, then runs
`pnpm install --frozen-lockfile --ignore-scripts` and `pnpm build`. pnpm
stays out of the runtime stage, which copies only dist.

The CA-root and uid comments no longer explain themselves through the
old Bun image; the checks and the uid stay.
pnpm/action-setup installs the version each plugin pins, reading the
plugin's own package.json since the repository root has none.
setup-node caches the pnpm store keyed on the plugin's pnpm-lock.yaml,
and install, typecheck and tests run through pnpm.
`pnpm import` exempted 11 third-party versions from pnpm 11's one-day
release delay, because npm had resolved them while they were under a day
old. The comment above them called the whole list our own packages. It
now says why these were added and that they can go once an update moves
past them.
@kevwilliams kevwilliams added the enhancement New feature or request label Nov 4, 2026
@kevwilliams kevwilliams self-assigned this Nov 4, 2026
@kevwilliams
kevwilliams marked this pull request as ready for review November 4, 2026 00:40
@kevwilliams
kevwilliams requested a review from a team as a code owner November 4, 2026 00:40
@kevwilliams
kevwilliams merged commit f6ac18a into main Nov 4, 2026
15 checks passed
@kevwilliams
kevwilliams deleted the chore/pnpm branch November 4, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin installs are slow and heavy

2 participants