-
-
Notifications
You must be signed in to change notification settings - Fork 926
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
update dom-expressions, solid-js/web, solid-js/html, solid-js/store to make the exports isomorphic #2269
update dom-expressions, solid-js/web, solid-js/html, solid-js/store to make the exports isomorphic #2269
Changes from 2 commits
313f8e3
b4d5c49
9d1699e
617a64a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,15 @@ export { | |
Match, | ||
Index, | ||
ErrorBoundary, | ||
// This overrides mergeProps from dom-expressions/src/server.js | ||
mergeProps | ||
} from "solid-js"; | ||
|
||
export const isServer: boolean = true; | ||
export const isDev: boolean = false; | ||
|
||
// Types for these come from dom-expressions/src/server.d.ts | ||
// These override the functions from dom-expressions that throw on the serverside. | ||
export function render() {} | ||
export function hydrate() {} | ||
export function insert() {} | ||
Comment on lines
+22
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These functions override the error-throwing functions that are now exported from dom-expressions, making this particular set of functions be no-ops instead of throwing errors. All the other newly-added functions in dom-expressions (see here) continue to throw errors if they are not overriden here, which is non-breaking. Removing the set of functions here could be breaking if anyone is already depending on them being no-ops, but the new functions added to dom-expressions/src/server.js never existed there or here for server code, so the introduction of those new error-throwing functions cannot be breaking because no one used them before. If desired, those additional functions in dom-expressions can be overriden here to make them no-ops instead of error-throwing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems fine to me and honestly I think I'm ok even making them throw if called. I don't see any reason why these should ever be called on the server with a server build. |
||
|
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.
This is a quick way to install a package from any github repo, including sub-folders, useful for testing.
See https://gitpkg.vercel.app
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.
All tests are passing. Anything I may not have thought of that needs testing?