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

Remove obsolete name property from client reference in Flight Node Register #26322

Closed
wants to merge 1 commit into from

Conversation

unstubbable
Copy link
Contributor

Summary

This is a leftover from #26300 where name was incorporated into $$id.

How did you test this change?

yarn test and yarn test --prod

@react-sizebot
Copy link

react-sizebot commented Mar 6, 2023

Comparing: eb616a1...96b9eef

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 155.25 kB 155.25 kB = 48.98 kB 48.98 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 157.24 kB 157.24 kB = 49.65 kB 49.65 kB
facebook-www/ReactDOM-prod.classic.js = 532.50 kB 532.50 kB = 94.85 kB 94.85 kB
facebook-www/ReactDOM-prod.modern.js = 516.42 kB 516.42 kB = 92.45 kB 92.45 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js = 4.16 kB 4.14 kB +0.13% 1.49 kB 1.50 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js = 4.16 kB 4.14 kB +0.13% 1.49 kB 1.50 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-node-register.js = 4.16 kB 4.14 kB +0.13% 1.49 kB 1.50 kB

Generated by 🚫 dangerJS against 96b9eef

This is a leftover from facebook#26300 where `name` was incorporated into `$$id`.
@@ -95,8 +97,6 @@ module.exports = function register() {
return target.$$id;
case '$$async':
return target.$$async;
case 'name':
return target.name;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This case was not covered by a unit test, but I think it's dead code and can not be reached.

@@ -185,7 +185,6 @@ module.exports = function register() {
);
}: any),
{
name: {value: name},
Copy link
Contributor Author

@unstubbable unstubbable Mar 6, 2023

Choose a reason for hiding this comment

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

If this was left in intentionally for convenience (i.e. reading it in deepProxyHandlers), feel free to just close the PR. But including the name here, but not in all the other branches, felt inconsistent and confusing to me.

@sebmarkbage
Copy link
Collaborator

This was intentionally left as a debug value for when the function is printed.

@sebmarkbage sebmarkbage closed this Mar 6, 2023
@unstubbable unstubbable deleted the remove-leftover branch March 6, 2023 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants