Skip to content
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

Debug: limit "object as children" error to elements #3801

Merged
merged 3 commits into from
Dec 3, 2022

Conversation

developit
Copy link
Member

@developit developit commented Nov 15, 2022

This should fix preactjs/preact-render-to-string#254 without incurring the performance overhead of converting primitives in JSX text positions to VNodes.

If this works, we can remove these lines from render-to-string.

This should fix preactjs/preact-render-to-string#254 without incurring the performance overhead of converting primitives in JSX text positions to VNodes.
@coveralls
Copy link

coveralls commented Nov 15, 2022

Coverage Status

Coverage remained the same at 99.531% when pulling 3c7cc27 on debug-limit-object-children into d4089df on master.

@github-actions
Copy link

github-actions bot commented Nov 15, 2022

Size Change: -17 B (0%)

Total Size: 52.9 kB

Filename Size Change
debug/dist/debug.js 3 kB -5 B (0%)
debug/dist/debug.module.js 3.01 kB -5 B (0%)
debug/dist/debug.umd.js 3.08 kB -7 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.81 kB 0 B
compat/dist/compat.module.js 3.75 kB 0 B
compat/dist/compat.umd.js 3.87 kB 0 B
devtools/dist/devtools.js 231 B 0 B
devtools/dist/devtools.module.js 240 B 0 B
devtools/dist/devtools.umd.js 315 B 0 B
dist/preact.js 4.05 kB 0 B
dist/preact.min.js 4.08 kB 0 B
dist/preact.min.module.js 4.07 kB 0 B
dist/preact.min.umd.js 4.1 kB 0 B
dist/preact.module.js 4.07 kB 0 B
dist/preact.umd.js 4.12 kB 0 B
hooks/dist/hooks.js 1.49 kB 0 B
hooks/dist/hooks.module.js 1.52 kB 0 B
hooks/dist/hooks.umd.js 1.57 kB 0 B
jsx-runtime/dist/jsxRuntime.js 358 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 324 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 439 B 0 B
test-utils/dist/testUtils.js 442 B 0 B
test-utils/dist/testUtils.module.js 444 B 0 B
test-utils/dist/testUtils.umd.js 526 B 0 B

compressed-size-action

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Not sure why I went the other way. Agree that this is a better approach 👍

debug/src/debug.js Outdated Show resolved Hide resolved
@developit
Copy link
Member Author

Alright, I just manually confirmed that this change addresses preactjs/preact-render-to-string#254. Will open a PR there.

developit added a commit to preactjs/preact-render-to-string that referenced this pull request Nov 15, 2022
@developit developit merged commit 915fd30 into master Dec 3, 2022
@developit developit deleted the debug-limit-object-children branch December 3, 2022 16:59
JoviDeCroock pushed a commit to preactjs/preact-render-to-string that referenced this pull request Feb 25, 2023
JoviDeCroock pushed a commit to preactjs/preact-render-to-string that referenced this pull request Feb 25, 2023
JoviDeCroock added a commit that referenced this pull request Jan 12, 2024
JoviDeCroock added a commit that referenced this pull request Jan 12, 2024
* backport #3871

* port test from #3884 functionality seems to work in v11

* backport #3880

* backport #3875

* backport #3862

* add todo for #3801

* backport #3868

* backport #3867

* backport #3863

* add todo for #3856

* backport #3844

* backport #3816

* backport #3888

* backport #3889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With Nextjs Error: Objects are not valid as a child. Encountered an object with the keys {}
3 participants