feat: bump realtime-js to 2.15.1 #1529
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix / Compatibility improvement - Updates
@supabase/realtime-jsto2.16.0which eliminates bundler warnings and runtime failures caused by dynamic imports.What is the current behavior?
Widespread bundler and runtime issues affecting users:
Critical dependency: the request of a dependency is an expressionin Webpack buildsRelated Issues:
Current problematic behavior from realtime-js:
What is the new behavior?
Universal compatibility with clean, explicit WebSocket configuration:
For Most Users: No Changes Required
For Node.js < 22 Users: Simple One-Time Migration
Before (caused issues):
After (universal compatibility):
Implementation Details
This PR updates the dependency and demonstrates the new usage pattern in the integration tests:
Additional context
Why This Is Not a Breaking Change
Current behavior is already broken for many users:
Production failures documented in Issue 2.49.9 breaks application code on Vercel (error 500) #1437:
This PR fixes broken functionality rather than breaking working functionality
Provides clear migration path with enhanced error messages and documentation
The Journey to This Solution
isowsdependency issuesisowsbut reintroduced bundler warnings via dynamic importsEcosystem Impact Analysis
Long-term Benefits
Related PR: supabase/realtime-js#514 - The underlying fix that eliminates dynamic imports