Conversation
Source upstream commit: 7e0d6897615c493e1154a5670f32a1686f9ec1ce Port scope: adapted (keeps fork dependency versions, adds runtime-compatible test assertions)
Source upstream commit: d6e35b1ac58f6665071ca0633a1444838123c0ed Port scope: adapted (keeps fork script layout, applies build-script simplification and root clean:ts gate)
…ps/cli, and @react-navigation packages.
…bplist-parser` 0.3.1 to bun.lock.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Miccy <code@miccy.dev>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (54)
📝 WalkthroughWalkthroughTato PR zavádí rozsáhlé refaktorování, které nahrazuje rimraf vlastním bun skriptem rm.mts, implementuje komplexní polyfilly pro DisposableStack a AsyncDisposableStack, vylepšuje server Relay hardening, aktualizuje test infrastrukturu a přidává nový workflow pro WebSocket testování v prohlížeči. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR streamlines monorepo maintenance and CI by replacing rimraf cleanup with a Bun-based removal script, tightening/expanding test coverage (notably for browser/WebSocket and polyfill behavior), and improving reliability of Node.js relay shutdown and error handling.
Changes:
- Replaced
rimrafusage across packages/apps/examples withscripts/rm.mts, and updated root build/clean/coverage scripts accordingly. - Added/expanded tests and setup hooks for browser + polyfills (DisposableStack/AsyncDisposableStack), plus new targeted coverage lane for
@evolu/web. - Improved Node.js relay robustness (upgrade rejection responses, startup awaiting, shutdown timeouts) and updated various deps/configs.
Reviewed changes
Copilot reviewed 54 out of 55 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.coverage.config.mts | Adds a dedicated Vitest coverage config (Istanbul provider) excluding browser projects. |
| scripts/rm.mts | Introduces Bun-invoked removal helper to replace rimraf. |
| packages/web/vitest.config.ts | Adds browser test setup file for consistent polyfill installation. |
| packages/web/test/_browserSetup.ts | Installs common polyfills before web browser tests. |
| packages/web/test/Sqlite.mocked.test.ts | Adds retry test coverage for WASM SQLite init failure path. |
| packages/web/test/Platform.test.ts | Adds worker-context test for reloadApp behavior. |
| packages/web/test/DbWorker.test.ts | Adds coverage for follower behavior waiting on shared init promise. |
| packages/web/src/Platform.ts | Adds Istanbul ignore hint for worker fallback branch. |
| packages/web/package.json | Switches build/clean to Bun-based rm script. |
| packages/vue/package.json | Switches build/clean to Bun-based rm script. |
| packages/tauri/package.json | Switches build/clean to Bun-based rm script. |
| packages/tanstack-start/package.json | Switches build/clean to Bun-based rm script. |
| packages/svelte/package.json | Switches build/clean to Bun-based rm script and bumps Svelte version. |
| packages/react/package.json | Switches build/clean to Bun-based rm script. |
| packages/react-web/test/index.test.ts | Adds tests for react-web index exports and createEvoluDeps wiring. |
| packages/react-web/package.json | Switches build/clean to Bun-based rm script. |
| packages/react-native/package.json | Switches build/clean to Bun-based rm script and bumps Expo version. |
| packages/nodejs/test/setup.ts | Installs common polyfills in Node.js test setup. |
| packages/nodejs/test/Sqlite.test.ts | Refactors runtime selection testing to use env override instead of mutating globals. |
| packages/nodejs/test/Relay.test.ts | Makes handshake error assertions more runtime-tolerant; adds 500-path test. |
| packages/nodejs/test/Error.test.ts | Adds tests for global error scope listener wiring and disposal. |
| packages/nodejs/src/local-first/Relay.ts | Hardens upgrade rejection, startup await, and shutdown with timeouts/termination. |
| packages/nodejs/src/Sqlite.ts | Adds env override for Bun-vs-Node sqlite runtime detection. |
| packages/nodejs/package.json | Switches build/clean to Bun-based rm script. |
| packages/common/test/local-first/Sync.test.ts | Adjusts quota test to use timestamp with drift validation. |
| packages/common/test/local-first/DbWorkerProtocol.test.ts | Adds deterministic constant export test coverage. |
| packages/common/test/_globalSetup.ts | Binds test server to 127.0.0.1 and adds close timeouts + forced client termination. |
| packages/common/test/_browserSetup.ts | Switches from disposablestack/auto to installPolyfills(). |
| packages/common/test/WebSocket.test.ts | Gates browser WebSocket tests behind env flags; uses 127.0.0.1 URLs. |
| packages/common/test/TreeShaking.test.ts | Replaces webpack bundling with Bun bundling for tree-shaking lanes and updates snapshots. |
| packages/common/test/Polyfills.test.ts | Adds extensive conformance/regression tests for owned DisposableStack polyfills. |
| packages/common/src/local-first/Protocol.ts | Makes captureStackTrace optional for non-V8 runtimes. |
| packages/common/src/Type.ts | Uses nodeBuffer abstraction (avoids direct globalThis.Buffer use). |
| packages/common/src/Task.ts | Improves AsyncDisposableStack use handling for sync-disposable resources; refines yield implementation. |
| packages/common/src/Polyfills.ts | Replaces runtime dependency with owned DisposableStack polyfill implementation + probes. |
| packages/common/src/Platform.ts | Adds nodeBuffer abstraction and updates hasNodeBuffer detection. |
| packages/common/src/Buffer.ts | Makes captureStackTrace optional for non-V8 runtimes. |
| packages/common/package.json | Removes disposablestack + webpack deps; updates scripts (notably build/clean). |
| packages/bun/package.json | Switches build/clean to Bun-based rm script. |
| packages/astro/package.json | Switches build/clean to Bun-based rm script. |
| package.json | Adds TS clean step to build, switches coverage config, adds web coverage lane, updates deps/overrides, removes rimraf/webpack. |
| examples/vue-vite-pwa/package.json | Switches clean to Bun-based rm script. |
| examples/tauri/package.json | Switches clean to Bun-based rm script and bumps Tauri CLI. |
| examples/tanstack-start/package.json | Bumps TanStack Router version. |
| examples/svelte-vite-pwa/package.json | Switches clean to Bun-based rm script and bumps Svelte version. |
| examples/react-vite-pwa/package.json | Switches clean to Bun-based rm script. |
| examples/react-nextjs/package.json | Switches clean to Bun-based rm script. |
| examples/react-expo/package.json | Switches clean to Bun-based rm script and bumps Expo-related deps. |
| examples/react-electron/package.json | Switches clean to Bun-based rm script and bumps Electron version. |
| examples/angular-vite-pwa/package.json | Bumps Angular-related deps. |
| apps/relay/tsconfig.json | Adds explicit Node types/typeRoots configuration. |
| apps/relay/package.json | Switches build/clean to Bun-based rm script and uses TS build mode. |
| .github/workflows/ws-browser-nightly.yaml | Adds nightly workflow to run browser WebSocket tests and upload artifacts. |
| .github/workflows/ci.yaml | Adds web to CI path filters/targets. |
| const workerUrl = URL.createObjectURL( | ||
| new Blob([workerSource], { type: "text/javascript" }), | ||
| ); | ||
| const worker = new Worker(workerUrl, { type: "module" }); | ||
|
|
There was a problem hiding this comment.
workerUrl is revoked in finally, but new Worker(workerUrl, ...) is outside the try block. If the Worker constructor throws (e.g. unsupported in some runners), the object URL won’t be revoked. Consider moving Worker creation inside the try (or wrapping it) so URL.revokeObjectURL(workerUrl) always runs.
This pull request introduces several improvements across the monorepo, focusing on streamlining build and clean scripts, updating dependencies, enhancing test coverage for the
webpackage, and adding a new nightly CI workflow for browser WebSocket tests. Below are the most important changes grouped by theme:Build & Clean Script Improvements:
rimrafpackage incleanandbuildscripts across packages and examples with a custom Bun-based script (bun ../../scripts/rm.mts). This change standardizes cleanup operations and removes the dependency onrimraf. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]cleanandbuildscripts inpackage.jsonto use the Bun-based script and added aclean:tsscript for TypeScript build cache cleanup. (package.jsonL60-R64, F65c6b61L5R5)Test Coverage & CI Enhancements:
webpackage, and included a newcoverage:lane:webscript for streamlined lane-based coverage checks. [1] [2]webto the list of filtered build targets in the CI workflow trigger to ensure web builds are included in CI runs.ws-browser-nightly.yaml) to run nightly browser-based WebSocket tests, including log and screenshot artifact uploads for debugging.Dependency Updates:
package.json, including removingrimrafandwebpack, and adding new overrides forsvgoandtar.TypeScript Configuration Improvements:
apps/relay/tsconfig.jsonto explicitly include Node.js types and type roots, improving type safety and compatibility.These changes collectively improve developer experience, consistency, and reliability across the monorepo.
Summary by CodeRabbit
Poznámky k vydání
Nové funkce
Opravy chyb
Chores