-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
add react/internal
entry point, reorganize imports
#11426
Conversation
/release:pr |
A new release has been made for this PR. You can install it with |
The diffs for react/react.cjs and react/hooks/hooks.cjs look promising, but why is size-limits suddenly increased by so much? Comparing the (prettified) % diff old.js new.js pr/react-internal
25c25
< d = "0.0.0-pr-11412-20231212060506";
---
> d = "0.0.0-pr-11426-20231212121205";
6589c6589
< w("createContext" in p, 46);
---
> w("createContext" in p, 45);
6607c6607
< return w(!!r, 50), r;
---
> return w(!!r, 49), r;
7406c7406
< return w(t && t.client, 45), e.children(t.client);
---
> return w(t && t.client, 44), e.children(t.client);
7422c7422
< return w(s.client, 47), p.createElement(i.Provider, { value: s }, n);
---
> return w(s.client, 46), p.createElement(i.Provider, { value: s }, n);
7688c7688
< w(!h(), 51);
---
> w(!h(), 50); |
Ah... incorrect size limits in the parent PR. Explains a lot :D I updated them over there. |
@@ -50,7 +50,7 @@ export { | |||
makeVar, | |||
} from "../cache/index.js"; | |||
|
|||
export * from "../cache/inmemory/types.js"; | |||
export type * from "../cache/inmemory/types.js"; |
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.
Kinda unrelated, but this came up as a "Risky cross-entry-point nested import" and we're not using it for any runtime code, so it seems like a good idea.
@@ -1,9 +1,5 @@ | |||
name: Compare Build Output | |||
on: |
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'm assuming this was to check for this PR but will need to be reverted?
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.
Honestly, I think we should leave it in. This check is always useful, not only against release branches, and it doesn't save us a lot of time not running it.
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.
Changes look good! I'll leave it up to you to decide when to merge.
.changeset/ten-bananas-smile.md
Outdated
"@apollo/client": patch | ||
--- | ||
|
||
Changes to bundling to prevent duplication of shipped code |
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.
Changes to bundling to prevent duplication of shipped code | |
Move Suspense cache internals to own internal entrypoint to prevent duplication of shipped code |
Perhaps we could be a bit more explicit about what was changed?
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.
Honestly, I just added that Changeset to be able to do a /pr:release
- I'll remove that one and then you can just merge this into your branch whenever you want. I don't think this needs a changeset :)
And thanks for digging into this! Glad you spotted the build oddity on my other PR before it shipped! |
Closing in favor of #11439 |
We had the bundling issues, because both
/react
and/react/hooks
exported functions that relied onSuspenseCache
, but there was no way of importingSuspenseCache
from a common place between the two.Let's see if this solves it somehow.
Checklist: