Events move: workspaces and one root lockfile, versions pinned to 2.1.1
- Workspaces: apps/events/backend and apps/events/frontend; apps/events itself excluded (npm doesn't install node_modules for a workspace nested in another). Its dev tools (Playwright, axe, concurrently) move to the root. - Packages renamed @crosscode/events, -backend, -frontend; nested lockfiles removed. - allowScripts moved to the root (npm ignores it in workspaces), same choices. - Direct dependencies that moved pinned to their 2.1.1 versions in root overrides; @sentry/node pinned only inside the backend. - Same results as 2.1.1: 52 suites / 711 backend tests, typecheck, both builds. - EVENTS-2.2-PLAN §2 and HANDOVER updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+22
-3
@@ -53,9 +53,18 @@ git remote remove events-move
|
||||
|
||||
## 2. Workspaces and the lockfile
|
||||
|
||||
- Root `package.json` → `"workspaces": ["packages/*", "apps/*", "apps/events/backend",
|
||||
"apps/events/frontend"]`. `apps/events` itself is covered by `apps/*` (its root scripts and
|
||||
Playwright).
|
||||
- Root `package.json` → `"workspaces": ["packages/*", "apps/*", "!apps/events",
|
||||
"apps/events/backend", "apps/events/frontend"]`. **Done 2026-11-12, and changed from the first
|
||||
plan:** `apps/events` itself is **not** a workspace. npm doesn't create `node_modules` for a
|
||||
workspace that sits inside another workspace's folder, so any package it nested under
|
||||
`apps/events/frontend/node_modules` (e.g. `@hookform/resolvers`) was silently missing. Its dev
|
||||
tools (`@playwright/test`, `@axe-core/playwright`, `concurrently`) moved to the root
|
||||
`devDependencies`; its scripts still run from `apps/events` (npm finds the root's
|
||||
`node_modules/.bin`). Its `build` and `test` scripts are renamed `build:all` and `test:backend`
|
||||
so nothing would run twice if it became a workspace again.
|
||||
- **`allowScripts` moved to the root** `package.json` (npm 11 ignores it in a workspace), with
|
||||
the same choices as before: Prisma, its engines, `@sentry/cli` and `unrs-resolver` allowed;
|
||||
`@parcel/watcher`, `@scarf/scarf` and `esbuild` not.
|
||||
- Rename the packages so workspace names are unique: `@crosscode/events` (was `hope-events`),
|
||||
`@crosscode/events-backend`, `@crosscode/events-frontend`. Nothing reads the names. The Hub
|
||||
reads the backend's `version` (`backend/src/hub/report.js`), and that stays. All three go to
|
||||
@@ -65,6 +74,16 @@ git remote remove events-move
|
||||
compare `npm ls --all` before and after (next, react, prisma, @prisma/client, express,
|
||||
typescript, jest, ts-jest, @sentry/nextjs, pg-boss, and anything else resolved differently).
|
||||
Pin anything that moved with `overrides`. Keep the existing `shell-quote` override at the root.
|
||||
**Done 2026-11-12:** every direct dependency of the backend and frontend that moved is pinned
|
||||
to its 2.1.1 version in the root `overrides` (34 of them, e.g. `next` 16.4.3, `nodemailer`
|
||||
10.3.0, the Radix packages), with `@sentry/node` pinned **only inside
|
||||
`@crosscode/events-backend`** (10.71.0), since the frontend's `@sentry/nextjs` uses 10.78.0 and
|
||||
Sentry packages must match. Not pinned: `eslint` (the root lint declares `^10.13.0`, so npm
|
||||
refuses an override; 10.13 → 10.14, lint only), and about 50 transitive packages per app on
|
||||
newer patch / minor versions (mostly build tooling: Babel, Rollup, browserslist). They can't
|
||||
all be pinned, because the backend and frontend no longer have separate trees. The test
|
||||
comparison (§6) is the check. Once 2.2.0 is out, these pins can be loosened in a normal
|
||||
release.
|
||||
- **Hoisting traps to check:**
|
||||
- Prisma's `prisma-client-js` generates into the hoisted `node_modules/.prisma/client`. That's
|
||||
fine while Events is the only Prisma app. **Accounts (phase 3) must use its own generator
|
||||
|
||||
Reference in New Issue
Block a user