Skip to content

WEBDEV-8724: Migrate elements to pnpm#63

Open
jbuckner wants to merge 2 commits into
mainfrom
WEBDEV-8724-pnpm
Open

WEBDEV-8724: Migrate elements to pnpm#63
jbuckner wants to merge 2 commits into
mainfrom
WEBDEV-8724-pnpm

Conversation

@jbuckner

@jbuckner jbuckner commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Migrates the repo from npm to pnpm 11. Same setup as the offshoot migration (WEBDEV-8502).

  • packageManager + engines pins
  • pnpm-workspace.yaml with nodeLinker: hoisted and the WEBDEV-8544 supply-chain cooldown (14 days), @internetarchive/* excluded
  • pnpm-lock.yaml replaces package-lock.json; .npmrc sets package-lock=false
  • CI installs/tests with pnpm; the publish step stays on npm publish so provenance keeps working
  • prettier pinned to 3.6.2 so regenerating the lockfile didn't jump to 3.9 and reformat the codebase

No pnpm-only preinstall guard: this is a published library, and a dependency's preinstall runs during consumers' installs (npm would fail, pnpm would warn). packageManager + the committed lockfile still steer devs to pnpm.

Local: install / build / 164 tests all green. No runtime code touched.

🤖 Generated with Claude Code

Switch the repo from npm to pnpm 11.

- packageManager + engines pins, and a preinstall guard
  (support/only-pnpm.cjs) so npm/yarn/bun installs fail fast
- .npmrc drops package-lock; pnpm-workspace.yaml uses nodeLinker: hoisted
  and the WEBDEV-8544 supply-chain cooldown (14 days), with
  @internetarchive/* excluded
- allowBuilds: esbuild, which vite and vitest need
- pnpm-lock.yaml replaces package-lock.json
- CI installs/tests with pnpm; publish stays on npm so provenance keeps
  working
- pinned prettier to 3.6.2 so regenerating the lockfile didn't pull 3.9
  and reformat the whole codebase
- README dev/publish steps use pnpm

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTzdCHTRpPpn9VUnFCFn3R
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://internetarchive.github.io/elements/pr/pr-63/

Built to branch ghpages at 2026-07-14 19:52 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov-commenter

codecov-commenter commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.62%. Comparing base (cd1ffd3) to head (46faf65).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   78.62%   78.62%           
=======================================
  Files          17       17           
  Lines         697      697           
  Branches      189      189           
=======================================
  Hits          548      548           
  Misses        100      100           
  Partials       49       49           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

npm runs a dependency's preinstall script, and the guard shipped in the
published package.json, so `npm install @internetarchive/elements` failed
for consumers: the guard file isn't in the tarball, so node hit
MODULE_NOT_FOUND and the install aborted. pnpm consumers installed fine
but got a spurious "ignored build scripts" warning naming elements.

The guard belongs in an app, not a published library. packageManager,
engines, and the committed pnpm lockfile still steer devs to pnpm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTzdCHTRpPpn9VUnFCFn3R
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