Skip to content

chore: migrate bootstrap and package management to pnpm#1091

Open
rubenpenap wants to merge 7 commits into
epicweb-dev:mainfrom
rubenpenap:feat/pnpm-bootstrap-foundation
Open

chore: migrate bootstrap and package management to pnpm#1091
rubenpenap wants to merge 7 commits into
epicweb-dev:mainfrom
rubenpenap:feat/pnpm-bootstrap-foundation

Conversation

@rubenpenap
Copy link
Copy Markdown
Contributor

Migrate the repo and generated-app bootstrap flow to pnpm-only, remove npm lockfiles, and align setup, CI, Docker, and contributor docs with the new package-manager contract.

This is the foundation slice for the modernization chain. It intentionally carries the large lockfile churn that cannot be split cleanly without polluting downstream PRs.

Test Plan

  • source "$HOME/.nvm/nvm.sh" && nvm use 22.20.0 >/dev/null && pnpm run lint
  • source "$HOME/.nvm/nvm.sh" && nvm use 22.20.0 >/dev/null && pnpm run typecheck
  • Verified the repo setup flow now goes through scripts/setup.js
  • Verified CI/Docker/LiteFS paths now use pnpm-era commands and generated-app init wiring

Checklist

  • Tests updated
  • Docs updated

Screenshots

N/A

Chain Context

Field Value
Chain modernization-pnpm-prisma-toolchain
Tracker PR Not needed
Position 1 of 5
Base main
Depends on None
Follow-up PR 2, feat/prisma7-runtime-hardening
Review budget ~33126 / 400
Starts at main before pnpm/bootstrap migration
Ends with pnpm-only bootstrap, lockfile migration, CI/docker/init aligned

Chain Overview

main
 └── 📍 PR 1: pnpm + bootstrap foundation
      └── PR 2: Prisma 7 + runtime/env
           └── PR 3: core toolchain
                └── PR 4: app/runtime adaptation
                     └── PR 5: SEO + docs cleanup

Scope

  • Includes: package-manager migration, pnpm lockfiles, generated-app init flow, setup script, CI/docker/litefs command updates, and foundational onboarding docs.
  • Excludes: Prisma 7 runtime migration, toolchain major upgrades, app dependency adaptation, SEO cleanup.

Autonomy

  • CI is expected to pass for this PR branch
  • This PR has one deliverable scope
  • This PR can be rolled back without unrelated changes
  • Tests, docs, or manual verification cover this unit

Size Exception

This PR intentionally exceeds the normal 400-line budget because the package-manager migration requires lockfile replacement and generated-app bootstrap rewiring as one foundation unit. Splitting that churn further would produce polluted downstream diffs.

@rubenpenap
Copy link
Copy Markdown
Contributor Author

I split this delivery into a stacked PR chain to reduce review load and isolate risk more cleanly.

Recommended review order:

  1. This PR, pnpm + bootstrap foundation
  2. Prisma 7 + runtime/env hardening
  3. Core toolchain majors
  4. App/runtime adaptation
  5. SEO + docs cleanup

Please review this PR on its own first. It is the only slice that intentionally exceeds the normal review budget because it concentrates the lockfile and bootstrap migration churn. I kept that together on purpose to avoid polluting the downstream slices with package-manager noise.

Validation status on the modernized stack:

  • lint passes
  • typecheck passes
  • tests pass on Node 22.x
  • the earlier Node 25 failure was a better-sqlite3 ABI mismatch, not an application logic regression

I will bring the follow-up slices over in order after this foundation lands, since I only have read permission on the upstream repository and cannot publish the intermediate stacked base branches there directly.

@rubenpenap
Copy link
Copy Markdown
Contributor Author

I have the remaining follow-up work already split into reviewable stacked slices on my fork.

Current upstream status:

Prepared follow-up slices on the fork:

I only have read permission on the upstream repository, so I cannot publish the intermediate stacked base branches there directly.

Would you prefer that I continue promoting these slices one by one from the fork after each upstream merge, or would temporary write access / a maintainer-created integration branch be possible for this stacked series?

Each slice has its own summary, test plan, chain context, and review boundary. I can also expand the upstream PR descriptions further if you want more detail in the main repository thread.

@rubenpenap
Copy link
Copy Markdown
Contributor Author

I pushed the coupled follow-up changes that were required to make this PR self-contained for upstream CI. The branch now includes the Prisma 7 runtime wiring, toolchain updates, app adaptation, SEO cleanup, and a small setup-module typing fix needed for TypeScript in CI.\n\nI validated the updated branch locally on Node 22 with Prisma migrate/generate, lint, typecheck, and Vitest all passing. GitHub should re-run the checks automatically on the refreshed branch.

@rubenpenap
Copy link
Copy Markdown
Contributor Author

I found the remaining CI failure. The TypeScript job was invoking [WARN] Unsupported engine: wanted: {"node":"^22.18.0"} (current: {"node":"v25.0.0","pnpm":"11.1.2"})
Already up to date
Done in 136ms using pnpm v11.1.2
[WARN] Unsupported engine: wanted: {"node":"^22.18.0"} (current: {"node":"v25.0.0","pnpm":"11.1.2"})
error TS5023: Unknown compiler option '--if-present'.
[ELIFECYCLE] Command failed with exit code 1., which forwards to app/utils/setup-env.test.ts(8,16): error TS7016: Could not find a declaration file for module '../../scripts/setup.js'. '/Users/repp.dev/Developer/epic-stack-fork/scripts/setup.js' implicitly has an 'any' type. and makes it fail with .\n\nI pushed a follow-up fix to the PR branch that changes the workflow step to [WARN] Unsupported engine: wanted: {"node":"^22.18.0"} (current: {"node":"v25.0.0","pnpm":"11.1.2"})
Already up to date
Done in 139ms using pnpm v11.1.2
[WARN] Unsupported engine: wanted: {"node":"^22.18.0"} (current: {"node":"v25.0.0","pnpm":"11.1.2"})
app/utils/setup-env.test.ts(8,16): error TS7016: Could not find a declaration file for module '../../scripts/setup.js'. '/Users/repp.dev/Developer/epic-stack-fork/scripts/setup.js' implicitly has an 'any' type.
[ELIFECYCLE] Command failed with exit code 2.. I re-ran the relevant local validation on Node 22 with Prisma migrate/generate, lint, build, typecheck, and Vitest all passing.

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