-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use a single transport for fetchModule and HMR support #18362
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
94963e0
feat: use a single transport for fetchModule and HMR support
sapphi-red 9e9f36d
chore: fix typecheck
sapphi-red 5c2c060
test: run restart test later to reduce flaky fails
sapphi-red 44b0179
chore: merge main
sapphi-red 5e01ae2
refactor: normalize internally
sapphi-red 69b58b5
refactor: replace invokeId internally
sapphi-red 30a7109
chore: change exported types / functions
sapphi-red 00e2098
chore: bump bundle limit
sapphi-red 313fac8
refactor: move onDisconnect handler in connect method parameter
sapphi-red affa13e
chore: merge main
sapphi-red d37b86e
refactor: minor change in runnerTransport.ts
sapphi-red 3e5807a
fix: reject on disconnection
sapphi-red eaafc17
refactor: rename RunnerTransport to ModuleRunnerTransport
sapphi-red b39895f
fix: make transport optional
sapphi-red 6dbf384
refactor: minor change in runnableEnvironment.ts
sapphi-red 38b50bf
fix: WS compat
sapphi-red 4543a67
feat: send ping as PingPayload
sapphi-red daceec6
feat: make createWebSocketModuleRunnerTransport more generic
sapphi-red 473b465
refactor: remove not used types
sapphi-red c481c19
test: update some typings in server-worker-runner.spec.ts
sapphi-red 0b69b63
docs: update content
sapphi-red 54944e4
docs: update title to ModuleRunnerTransport
sapphi-red f08a2df
refactor: make ModuleRunnerOptions.hmr `boolean | ModuleRunnerHmr` an…
sapphi-red 878849c
test: transport is not required
sapphi-red f892a8d
fix: error if vite:fetchModule was sent instead of invoked
sapphi-red fddfd64
fix: call connect anyway
sapphi-red 7536dfb
feat: add `environment.getInvokeHandlers`
sapphi-red 05413c6
refactor: improve types
sapphi-red f068cbc
docs: update
sapphi-red 7d8ee2f
docs: don't call invokeHandlers directly
sapphi-red 3897427
feat: print name when disconnected
sapphi-red 1668bd8
docs: use /invoke
sapphi-red f98a467
refactor: change `invoke` type
sapphi-red d499c9f
docs: change it to HotPayload for now
sapphi-red 34ac5f7
refactor: improve invoke types
sapphi-red 0d2b390
chore: merge main
sapphi-red d98fd84
fix: client ping target
sapphi-red aaddea2
wip: use HotChannel even for HTTP requests
sapphi-red 4b349f7
fix: handle floating promises
sapphi-red 665ee30
feat: call custom event listeners when send is called on
sapphi-red 140de68
docs: remove `null` from environment::hot
sapphi-red 33ccd64
refactor: remove `ctx.hot`
sapphi-red d55aec8
refactor: remove `send` constructed from `invoke`
sapphi-red 27a6e0c
docs: remove unneeded argument
sapphi-red 7f8534c
docs: rename hot channel name for the example using `setInvokeHandler`
sapphi-red 0d92ce1
fix: add back `context.hot` to disable hmr only in single env
sapphi-red e40e17a
chore: merge main
sapphi-red f060ccb
chore: merge main
sapphi-red 83d4a24
chore: merge main
sapphi-red 7abf3ac
feat: replace `HotChannel::setInvokeHandler` with `NormalizedHotChann…
sapphi-red 65a23d2
docs: dont extend DevEnvironment
sapphi-red File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be
channel
orhotChannel
?transport
is also used on the module runner side (ModuleRunnerTransport).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah,
transport: HotChannel
typing feels confusing. I liked the symmetry ofDevEnvironmentContext.transport
andModuleRunnerOptions.transport
though, so if we change this on environment side, then we might want to align on runner side.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think naming stuff is a blocker and we can follow up later if needed.