Add Namespace and update deno serve#13
Open
nickchomey wants to merge 3 commits intostarfederation:mainfrom
Open
Add Namespace and update deno serve#13nickchomey wants to merge 3 commits intostarfederation:mainfrom
nickchomey wants to merge 3 commits intostarfederation:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds RC7 namespace support to patchElements in the TypeScript SDK and updates Deno examples/tests to use the modern Deno.serve API.
Changes:
- Introduces
DatastarDatalineNamespace,NamespaceTypes, andNamespaceType, and wiresnamespaceintoPatchElementsOptions. - Adds runtime validation for the
namespaceoption inServerSentEventGenerator.patchElements. - Updates Deno test/example servers to use
Deno.serveand forwardsnamespacethrough the test event harnesses.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/node.ts | Forwards namespace from test event payloads into patchElements options. |
| test/deno.ts | Migrates to Deno.serve and forwards namespace into patchElements options. |
| test/bun.ts | Forwards namespace from test event payloads into patchElements options. |
| src/types.ts | Adds NamespaceType and types PatchElementsOptions.namespace. |
| src/consts.ts | Adds DatastarDatalineNamespace and NamespaceTypes. |
| src/abstractServerSentEventGenerator.ts | Validates namespace and documents it in patchElements options. |
| examples/deno/deno.ts | Migrates example server to Deno.serve. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
04a2c92 to
0bb2678
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #12
Adds a namespace type. Its entirely possible this is not done correctly - i dont quite understand how it all works. It is a good start though.
Also updates the archaic version of deno serve with the latest api.
I did run
and it all passed.
But, as was noted in #12, there's no tests for namespace...