Switch to pnpm by RobbieTheWagner · Pull Request #1702 · shipshapecode/tether

Walkthrough

Swaps Yarn/Volta for pnpm across CI, scripts, and docs: CI sets up Node 18 + pnpm, package.json scripts/engines switched to pnpm/Node 18, release hook and .npmignore updated, Jest config adapted for pnpm layout, tests added and a Cypress assertion relaxed.

Changes

Cohort / File(s) Summary
CI workflow
​.github/workflows/main.yml
Replaced Volta/minimal-checkout with pnpm/action-setup@v4, updated actions/checkout to v4, added actions/setup-node@v4 to install Node 18 and enable pnpm cache, and switched install/test steps from Yarn to pnpm i / pnpm test.
Package & build scripts
.release-it.js, package.json
Switched build/release hooks and npm scripts from Yarn to pnpm (e.g., yarn buildpnpm build), raised engines.node to >=18, added engines.pnpm: ">=10", removed Volta/Yarn block and added pnpm settings (onlyBuiltDependencies), and bumped various devDependency versions.
Ignore list
.npmignore
Added pnpm-lock.yaml to ignore pnpm lockfile when publishing via npm.
Test config
jest.config.js
Added transformIgnorePatterns to exclude node_modules except for .pnpm and sinon, allowing Babel transforms for modules under pnpm layout.
Docs & release notes
CONTRIBUTING.md, RELEASE.md
Replaced Yarn references/commands with pnpm equivalents across setup, install, build, test, and release instructions.
Unit tests — Shift
test/unit/shift.spec.js
Added tests for Shift.position covering absent shift, string/object/function shift values, parsing, and negative values.
Unit tests — Bounds
test/unit/utils/bounds.spec.js
Added tests for getBounds, getScrollHandleBounds, getVisibleBounds, removeUtilElements, and caching behavior with DOM setup/teardown and numeric validations.
Unit tests — Parents
test/unit/utils/parents.spec.js
Added tests for getScrollParents and getOffsetParent covering fixed/absolute positioning, scrollable ancestor detection, nested scroll parents, and resilience when getComputedStyle returns null.
Cypress adjustment
test/cypress/integration/scroll.cy.js
Relaxed pixel-exact assertion to tolerance-based comparison (to.be.closeTo(..., 1)) to allow ±1px differences.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Pay attention to CI ordering, Node/pnpm setup, and caching in .github/workflows/main.yml.
  • Verify package.json engine changes, script migrations, pnpm-specific settings, and dependency version bumps.
  • Confirm .release-it.js hook and release automation remain correct after switching to pnpm build.
  • Validate jest.config.js transformIgnorePatterns syntax and that Sinon/ESM modules transform correctly under pnpm layout.
  • Carefully review new unit tests for DOM safety and teardown: test/unit/utils/parents.spec.js and test/unit/utils/bounds.spec.js are the most complex.

Poem

🐇 I dropped my yarn for parcels neat,

PNPM hopping on quick feet.
Node eighteen, CI beams bright,
Tests now dance in morning light.
A tiny thump — the build takes flight!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Switch to pnpm' directly and accurately describes the main change across all modified files, which uniformly replace yarn tooling with pnpm equivalents throughout the project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch yarn-to-pnpm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.