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
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ for each phase. They moved here from `hope-events/docs/` on 2026-11-05.
|
||||
|-------|------|-------|
|
||||
| 0 | contracts 1.0.0 / 1.1.0 | **Released** 2026-11-04 (`contracts@1.0.0`, `contracts@1.1.0`). Not published to a registry (decision 22): the Hub gets a packed release committed to its repo |
|
||||
| 1 | Hub 2.0.0 | **Released** 2026-11-05 (`events-hub` `v2.0.0`; `docs/HUB-2.0-PLAN.md` there). **Not deployed yet:** `events-hub/deployment.md` → "Upgrading to 2.0" (run `check-hub2` first). crosscode-site's address prices are merged, **not deployed yet** |
|
||||
| 1b | Cross Events 2.2.0: moves here as `apps/events`, `crosscode` script | **Next.** Planned and decided in [EVENTS-2.2-PLAN.md](./EVENTS-2.2-PLAN.md) |
|
||||
| 1b | Cross Events 2.2.0: moves here as `apps/events`, `crosscode` script | **In progress.** Planned in [EVENTS-2.2-PLAN.md](./EVENTS-2.2-PLAN.md). **Steps 1–3 done 2026-11-12** (merged into `main`): history merged in under `apps/events` (from `hope-events` `e6c9670`), workspaces and one root lockfile with versions pinned to 2.1.1, same test results as 2.1.1 (711 backend tests, typecheck, both builds). **Still to do:** the `crosscode` script and `adopt` (§4–5), VM testing (§6), the version bump and `events@2.2.0` tag, adopting each install, archiving `hope-events` (§7). Until then servers keep deploying from `hope-events` `v2.1.1`, and **Events work happens here** (`hope-events` is frozen; a hotfix there as 2.1.2 is cherry-picked into `apps/events`) |
|
||||
| 1c | Cross Events 2.3.0: authenticator app 2FA (TOTP + recovery codes) | Not started (`TwoFactorMethod` enum in Events' `prisma/schema.prisma`) |
|
||||
| 1d | Agent 1.0.0 + Hub 2.1.0 (+ contracts 1.2.0): server agent, installs / scheduled updates / uninstalls from the Hub, server stats | **Planned** 2026-11-12 in [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md) (ROADMAP decisions 27–37). Starts after 1b; can run alongside 1c |
|
||||
| 2 | Cross Events 2.4.0: protocol v2, Linked products, event feed, `packages/seo` | Not started. Events keeps speaking protocol 1 until then |
|
||||
|
||||
Reference in New Issue
Block a user