Skip to content

PR: Sync new upstream commits 03-02-2026 - #16

Merged
miccy merged 34 commits into
sync/bun-migrationfrom
sync/merge-upstream-03-02-26
Feb 3, 2026
Merged

PR: Sync new upstream commits 03-02-2026#16
miccy merged 34 commits into
sync/bun-migrationfrom
sync/merge-upstream-03-02-26

Conversation

@miccy

@miccy miccy commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Description

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Checklist

  • Code follows project style guidelines
  • Tests pass locally (bun run check)
  • Documentation updated (if applicable)
  • No secrets or sensitive data included

Related Issues

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced structured concurrency with AsyncDisposableStack for improved resource management across platforms.
    • Platform-specific Runner implementations for Web, Node.js, and React Native with enhanced error handling.
  • API Changes

    • Renamed createRunner with updated factory pattern for platform-agnostic runner creation.
    • Replaced runMain with new createRunner architecture.
    • Renamed createNodeJsRelay to startRelay.
    • Deprecated MainTask type.
  • Improvements

    • Enhanced global error handling across browser and Node.js environments.
    • Improved test stability with bundle size normalization.
    • Enabled React Strict Mode for web applications.
  • Documentation

    • Added comprehensive guides on structured concurrency, platform implementations, and test patterns.

steida and others added 30 commits February 2, 2026 12:16
Replace the old runMain pattern with a shutdown-aware createRunner that injects a shutdown promise into deps and installs global signal and error handlers (SIGINT, SIGTERM, SIGHUP, uncaughtException, unhandledRejection). Move Node.js runner wiring into packages/nodejs/src/Task.ts, resolve shutdown via process signals, and ensure listeners are cleaned up on runner dispose. Rename relay APIs: createNodeJsRelayBetterSqliteDeps -> createRelayDeps and createNodeJsRelay -> startRelay, update examples and the apps/relay entry to use startRelay and createRunner. Simplify task typing in packages/common (introduce AnyTask and use it in InferTask* helpers, add CreateRunner type, remove MainTask), and adjust the local-first Relay implementation to handle sqlite errors by logging and returning ok(stack). Update tests to reflect the new createRunner/shutdown behavior and to verify signal/error handling and listener cleanup. README updated to reflect the API rename.
Introduce a browser-specific Task runner and tests. Implements createRunner in packages/web/src/Task.ts that composes the common runner, creates a console child named "global", registers global "error" and "unhandledrejection" handlers (logging via createUnknownError), and removes those listeners when the runner is disposed. Adds vitest tests in packages/web/test/Task.test.ts to verify custom deps merging, mocked listener registration/removal, real-event logging for ErrorEvent and PromiseRejectionEvent, and that handlers are detached after disposal.
Update packages/nodejs/package.json to change the "files" entry from "dist/**" to "dist/src/**". This restricts what gets packaged/published (avoiding unrelated files under dist), reducing package size and ensuring only the compiled source artifacts and src are included.
Consolidate imports and stop passing a custom time provider to createConsoleEntryFormatter in apps/relay/src/index.ts. The createTime import and its usage were removed so the formatter uses its default time handling, and the import statement was simplified.
Update pnpm-lock.yaml to refresh multiple dependency versions and integrity hashes. Notable bumps: @algolia/autocomplete-core/plugin/shared 1.19.4 -> 1.19.5, framer-motion & motion 12.30.1 -> 12.31.0, enhanced-resolve 5.18.4 -> 5.19.0, and dotenv 16.4.7 -> 16.6.1. Snapshots/resolutions updated accordingly — this is an automated lockfile refresh to keep transitive deps in sync.
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
refactor: Remove type-unsafe cast in TreeShaking test normalization
Adapted from upstream e57edbe to use workspace:* for @evolu/* packages.
Used explicit React versions (^19.2.3) instead of catalog:react19 since Bun doesn't support pnpm catalogs.
Skipped pnpm-lock.yaml as we use bun.lockb.
@miccy miccy self-assigned this Feb 3, 2026
@miccy miccy added upstream Needs cherry-pick or merge from upstream feat New feature or request update Update libs and deps labels Feb 3, 2026
@coderabbitai

coderabbitai Bot commented Feb 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • ✅ Full review completed - (🔄 Check again to review again)

Note

🎁 Summarized by CodeRabbit Free

The PR author is not assigned a seat. To perform a comprehensive line-by-line review, please assign a seat to the pull request author through the subscription management page by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@miccy miccy changed the title Sync/merge upstream 03 02 26 PR: Sync new upstream commits 03-02-2026 Feb 3, 2026
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
@miccy miccy linked an issue Feb 3, 2026 that may be closed by this pull request
Copilot AI and others added 3 commits February 3, 2026 16:14
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
Co-authored-by: miccy <9729864+miccy@users.noreply.github.com>
Sync 3 upstream commits from common-v8: workspace deps, export reordering, test mocking

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request syncs 14 commits from the upstream common-v8 branch, implementing a comprehensive structured concurrency migration across the Evolu monorepo. The changes modernize the Task runner architecture with platform-specific implementations and improve type safety throughout.

Changes:

  • Migrated to structured concurrency with platform-specific createRunner implementations for Web, Node.js, and React Native
  • Introduced CreateRunner<BaseDeps> interface for better type safety and extensibility
  • Simplified relay API from createNodeJsRelay to startRelay with improved error handling
  • Made TimeDep optional in createConsoleEntryFormatter with sensible defaults
  • Aligned all packages to use @vitest/coverage-v8@^4.0.18 and updated test configurations
  • Updated example applications to use workspace:* dependencies for consistency
  • Removed re-export of @evolu/web from @evolu/react-web (breaking change, acknowledged)

Reviewed changes

Copilot reviewed 45 out of 47 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/web/src/Task.ts New browser-specific runner with global error event handlers
packages/web/test/Task.test.ts Comprehensive tests for web runner event listener cleanup
packages/nodejs/src/Task.ts Node.js runner with process signal handling and shutdown promise
packages/nodejs/test/Task.test.ts Tests for Node.js signal handling and listener cleanup
packages/react-native/src/Task.ts React Native runner with ErrorUtils integration
packages/react-native/test/Task.test.ts Tests for React Native error handling
packages/common/src/Task.ts Core structured concurrency improvements with CreateRunner interface
packages/common/src/Console.ts Made TimeDep optional with default value for better DX
packages/nodejs/src/local-first/Relay.ts Simplified to startRelay with better error handling pattern
packages/web/vitest.config.ts Browser test configuration with multi-browser support
packages/react-web/src/index.ts Removed re-export of @evolu/web (breaking change)
packages/common/test/TreeShaking.test.ts Normalized bundle size checks for environmental stability
apps/relay/src/index.ts Updated to use new startRelay API
apps/web/src/components/Features.tsx Simplified feature list removing unused id field
Example applications Aligned dependencies to workspace:* pattern

@miccy
miccy merged commit b0dc8a2 into sync/bun-migration Feb 3, 2026
8 checks passed
@miccy
miccy deleted the sync/merge-upstream-03-02-26 branch February 10, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature or request update Update libs and deps upstream Needs cherry-pick or merge from upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sync upstream/common-v8 (new commits)

4 participants