docs(UPGRADE): 3.x groundwork on meteor3-wip — Mongo 7 docker, 3.1 resolved, blockers

This commit is contained in:
vjrj 2026-07-13 23:26:23 +02:00
parent bddeca79a0
commit ad0969a657

View file

@ -197,6 +197,61 @@ When Mongo is ≥ 4.4 and the notifications service is live in prod, the remaini
server code (collections/methods/publications `*Async`, no Fibers), React 18
render root, and re-run the smoke test.
## 3.x groundwork — done on branch `meteor3-wip` (in progress, not deployable)
To de-risk the eventual 3.x jump, the migration was driven as far as it goes
against a **modern dockerized MongoDB** (the "mongo superior" decision: give
fuegos its own Mongo 7 instead of the shared rsmain 3.2, which is what actually
unblocks Meteor 3's driver). This lives on `meteor3-wip`; `meteor3-upgrade` stays
at the deployable Meteor 2.5.
**Modern Mongo (local, reproducible):**
```bash
docker run -d --name tcef-mongo7 -p 27019:27019 mongo:7 --replSet rs0 --port 27019 --bind_ip_all
docker exec tcef-mongo7 mongosh --port 27019 --quiet --eval 'rs.initiate({_id:"rs0",members:[{_id:0,host:"localhost:27019"}]})'
export MONGO_URL="mongodb://localhost:27019/fuegos?replicaSet=rs0"
# meteor-tool node 22 needs this to reach warehouse.meteor.com (else Happy-Eyeballs
# picks an unreachable IPv6):
export NODE_OPTIONS="--dns-result-order=ipv4first --no-network-family-autoselection"
```
**Reached `METEOR@3.1` with all package-version conflicts resolved.** Dead
packages swapped for Meteor-3 equivalents:
| Old (mongo@1.x / dead) | New |
|---|---|
| `mongo-livedata` | removed (deprecated alias) |
| `facts` | `facts-base` |
| `saucecode:timezoned-synced-cron` | `quave:synced-cron` |
| `aldeed:collection2-core` | `aldeed:collection2@4.0.4` |
| `mys:fonts` (pinned caching-compiler@1.0.0) | removed |
| `fourseven:scss@4.14.1` (node-sass, fails on node 22) | `@5.0.0` (Dart Sass) + `sass` npm |
| `nimble:restivus` (vendored) | accounts-password loosened to `2.0.0 \|\| 3.0.0` |
SCSS then compiles (Dart Sass; only `@import`/`lighten`/`darken` deprecation
warnings — cosmetic debt: migrate to `@use` + `color.adjust`).
**Blocked at the client-bundle linker:** `Runtime is not available, but it uses
features needing the runtime: underscore` — one of the old client atmosphere
packages (bert / blaze-react / cookie-consent / meteor-status / bootstrap-4 /
etc.) needs replacing for Meteor 3's linker. Beyond that, the **server
async/await migration is the main remaining effort** (unavoidable for 3.x):
- `Rest.js` + its helpers (`countRealFires`, `firesUnion`, `whichAreFalsePositives`,
`fireFromHash`, `subscriptionsInsert`, `upsertFalsePositive`) use sync Mongo
(`findOne`, `find().fetch()/.count()`, `insert/update/remove/upsert`) → must
become `*Async`.
- The vendored **restivus must be patched to `await`** async endpoint handlers
(its `_callEndpoint` uses the return value synchronously).
- `methods.js`/`publications.js` across the app, `subsUnion.js`, `migrations.js`,
the Comments feature, and startup files → async.
- `cron.js` `SyncedCron` import (quave export) and `facts.js` `Facts` import
(facts-base export).
- React 16 → 18 render root (`createRoot`) in `startup/client/index.js`.
This is a multi-hour migration; the smoke test (now `mongosh`-capable, see
`smoke/smoke.sh` on that branch) is the gate. Resume on `meteor3-wip`.
## Dependency debt (tracked, to resolve in the noted escala)
| Dep | From | Target | Status |