Commit 0992b14
authored
sync(common-v8): cautious wave1 cherry-pick sync (#58)
## Summary
Cautious, commit-by-commit `upstream/common-v8` sync wave from a
history-separated upstream branch (no merge, no unrelated-history
merge).
This PR ports low-risk/high-value pieces and explicitly defers high-risk
runtime/dependency waves.
## Candidate upstream commits and decisions
### PORTED
- `e903c47d` Add Set shim typings and refactor Abort polyfills
- Ported as fork-equivalent: added
`packages/react-native/src/Polyfills.ts` and
`packages/react-native/src/SetPrototypeShimModules.d.ts`.
- `a4287569` Improved polyfills for web and React Native runtimes
(selective)
- Ported selective parts in fork-relevant paths:
- `packages/common/src/Polyfills.ts`
- `packages/common/test/_browserSetup.ts`
- `packages/react-native/test/Polyfills.test.ts`
- `8c4101ac` Simplified cleaning (selective)
- Ported safe root `.gitignore` patterns only.
### SKIPPED
- `edf950f6` VSCode settings only (`.vscode/settings.json`)
- `c06944fa` `apps/web` docs/minimal playground (not relevant in this
fork layout for wave1)
### DEFERRED
- `ec61d7fd` Expo 55 mega-wave (large lockfile/deps churn)
- `9364b02c` shared sync resource management refactor (runtime-heavy)
- Equivalent worker bootstrap from `a4287569` in web worker was tested
and reverted due regression:
- `@evolu/web (webkit)` `Worker.worker.test.ts` failed with `Object not
disposable`
- deferred to wave2 runtime branch
## Fork-compat adjustments included
- Switched `@evolu/common/polyfills` imports to `@evolu/common` (fork
export shape).
- Added explicit `set.prototype.*` dependencies to
`packages/react-native/package.json`.
- Tightened Promise polyfill typing for TS 5.9/Node 24+ to keep build
green.
## Risks and mitigations
- **Risk:** polyfill behavior differences across RN/web runtimes.
- **Mitigation:** added/ran dedicated `Polyfills.test.ts` (19 tests).
- **Risk:** web worker runtime regression from direct upstream mapping.
- **Mitigation:** reverted problematic worker bootstrap equivalent in
wave1; keep for wave2 investigation.
- **Risk:** cleanup changes accidentally hiding important artifacts.
- **Mitigation:** only additive, conservative `.gitignore` changes; no
destructive clean script switch.
## Validation (local)
Required gates from plan:
- `bun run build` ✅
- `bun run test` ✅
- `bun run lint` ✅ (Biome warnings only in upstream-derived test style;
no errors)
- `bun run coverage:lane:active` ✅
- `(cd examples/react-expo && bun run web:export)` ✅
Targeted checks:
- `bunx vitest run --project react-native
packages/react-native/test/Polyfills.test.ts` ✅
## Wave2 plan
Next branch: `sync/common-v8-2026-03-01-wave2-runtime`
- Tackle deferred runtime refactor (`9364b02c`)
- Re-evaluate selected parts of Expo55 wave (`ec61d7fd`) with explicit
lockfile/dependency strategy
- Revisit web worker polyfill bootstrap with architecture-specific
adaptation + focused webkit worker tests
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Poznámky k vydání
* **Nové funkce**
* Polyfilly pro React Native (Promise statické metody,
AbortController/AbortSignal) veřejně dostupné.
* Polyfilly pro metody Set prototype.
* Nová asynchronní pomocná funkce arrayFromAsync.
* **Dokumentace**
* Přepsané tabulky v README a aktualizovaný obrázek.
* **Testy**
* Přidána rozsáhlá sada testů pro polyfily a abort/timeout; přesun
některých testů.
* **Chores**
* Aktualizovány položky .gitignore a drobné verze devDependencies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->File tree
20 files changed
+1238
-192
lines changed- .changeset
- apps/relay
- examples/react-nextjs
- packages
- common
- src
- test
- nodejs
- react-native
- src
- test
- web
20 files changed
+1238
-192
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
50 | 66 | | |
51 | 67 | | |
52 | 68 | | |
| |||
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
71 | 87 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments