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

[Flight] Warn if this argument is passed to .bind of a Server Reference #28380

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

sebmarkbage
Copy link
Collaborator

This won't ever be serialized and is likely just a mistake.

This should be covered by the "use server" compiler since it ensures that something that accepts a "this" won't be allowed to compile and if it doesn't accept it, TypeScript should ideally forbid it to be passed.

So maybe this is unnecessary.

This won't ever be serialized and is likely just a mistake.

This should be covered by the "use server" compiler since it ensures that
something that accepts a "this" won't be allowed to compile and if it
doesn't accept it, TypeScript should ideally forbid it to be passed.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 19, 2024
@react-sizebot
Copy link

Comparing: c1fd2a9...976da3e

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 = 177.01 kB 177.01 kB = 55.17 kB 55.17 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 179.00 kB 179.00 kB = 55.74 kB 55.74 kB
facebook-www/ReactDOM-prod.classic.js = 592.58 kB 592.58 kB = 104.54 kB 104.54 kB
facebook-www/ReactDOM-prod.modern.js = 575.87 kB 575.87 kB = 101.55 kB 101.55 kB
test_utils/ReactAllWarnings.js Deleted 66.79 kB 0.00 kB Deleted 16.36 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-client/cjs/react-client-flight.development.js +0.82% 54.92 kB 55.37 kB +1.15% 13.48 kB 13.63 kB
oss-stable/react-client/cjs/react-client-flight.development.js +0.82% 54.92 kB 55.37 kB +1.15% 13.48 kB 13.63 kB
oss-experimental/react-client/cjs/react-client-flight.development.js +0.75% 59.97 kB 60.42 kB +1.08% 14.49 kB 14.64 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +0.73% 61.23 kB 61.68 kB +1.14% 14.76 kB 14.92 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +0.73% 61.23 kB 61.68 kB +1.14% 14.76 kB 14.92 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +0.71% 63.01 kB 63.46 kB +1.05% 15.31 kB 15.47 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +0.71% 63.01 kB 63.46 kB +1.05% 15.31 kB 15.47 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +0.71% 63.04 kB 63.49 kB +1.05% 15.33 kB 15.49 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +0.71% 63.04 kB 63.49 kB +1.05% 15.33 kB 15.49 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +0.70% 64.45 kB 64.89 kB +1.00% 15.69 kB 15.85 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +0.70% 64.45 kB 64.89 kB +1.00% 15.69 kB 15.85 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +0.69% 64.47 kB 64.92 kB +1.00% 15.73 kB 15.89 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +0.69% 64.47 kB 64.92 kB +1.00% 15.73 kB 15.89 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +0.69% 65.31 kB 65.76 kB +1.00% 15.89 kB 16.05 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +0.69% 65.31 kB 65.76 kB +1.00% 15.89 kB 16.05 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +0.69% 65.34 kB 65.79 kB +1.00% 15.93 kB 16.09 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +0.69% 65.34 kB 65.79 kB +1.00% 15.93 kB 16.09 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +0.68% 66.28 kB 66.73 kB +1.00% 15.77 kB 15.93 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +0.66% 68.06 kB 68.51 kB +0.93% 16.32 kB 16.47 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +0.66% 68.09 kB 68.54 kB +0.92% 16.34 kB 16.50 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +0.64% 69.50 kB 69.94 kB +0.89% 16.71 kB 16.86 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +0.64% 69.52 kB 69.97 kB +0.90% 16.75 kB 16.90 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +0.64% 70.36 kB 70.81 kB +0.89% 16.91 kB 17.06 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +0.64% 70.39 kB 70.84 kB +0.89% 16.95 kB 17.10 kB
test_utils/ReactAllWarnings.js Deleted 66.79 kB 0.00 kB Deleted 16.36 kB 0.00 kB

Generated by 🚫 dangerJS against 976da3e

@sebmarkbage sebmarkbage merged commit 65a0e2b into facebook:main Feb 19, 2024
36 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 19, 2024
…ce (#28380)

This won't ever be serialized and is likely just a mistake.

This should be covered by the "use server" compiler since it ensures
that something that accepts a "this" won't be allowed to compile and if
it doesn't accept it, TypeScript should ideally forbid it to be passed.

So maybe this is unnecessary.

DiffTrain build for [65a0e2b](65a0e2b)
huozhi added a commit to vercel/next.js that referenced this pull request Feb 23, 2024
### React upstream changes

- facebook/react#28333
- facebook/react#28334
- facebook/react#28378
- facebook/react#28377
- facebook/react#28376
- facebook/react#28338
- facebook/react#28331
- facebook/react#28336
- facebook/react#28320
- facebook/react#28317
- facebook/react#28375
- facebook/react#28367
- facebook/react#28380
- facebook/react#28368
- facebook/react#28343
- facebook/react#28355
- facebook/react#28374
- facebook/react#28362
- facebook/react#28344
- facebook/react#28339
- facebook/react#28353
- facebook/react#28346
- facebook/react#25790
- facebook/react#28352
- facebook/react#28326
- facebook/react#27688
- facebook/react#28329
- facebook/react#28332
- facebook/react#28340
- facebook/react#28327
- facebook/react#28325
- facebook/react#28324
- facebook/react#28309
- facebook/react#28310
- facebook/react#28307
- facebook/react#28306
- facebook/react#28315
- facebook/react#28318
- facebook/react#28226
- facebook/react#28308
- facebook/react#27563
- facebook/react#28297
- facebook/react#28286
- facebook/react#28284
- facebook/react#28275
- facebook/react#28145
- facebook/react#28301
- facebook/react#28224
- facebook/react#28152
- facebook/react#28296
- facebook/react#28294
- facebook/react#28279
- facebook/react#28273
- facebook/react#28269
- facebook/react#28376
- facebook/react#28338
- facebook/react#28331
- facebook/react#28336
- facebook/react#28320
- facebook/react#28317
- facebook/react#28375
- facebook/react#28367
- facebook/react#28380
- facebook/react#28368
- facebook/react#28343
- facebook/react#28355
- facebook/react#28374
- facebook/react#28362
- facebook/react#28344
- facebook/react#28339
- facebook/react#28353
- facebook/react#28346
- facebook/react#25790
- facebook/react#28352
- facebook/react#28326
- facebook/react#27688
- facebook/react#28329
- facebook/react#28332
- facebook/react#28340
- facebook/react#28327
- facebook/react#28325
- facebook/react#28324
- facebook/react#28309
- facebook/react#28310
- facebook/react#28307
- facebook/react#28306
- facebook/react#28315
- facebook/react#28318
- facebook/react#28226
- facebook/react#28308
- facebook/react#27563
- facebook/react#28297
- facebook/react#28286
- facebook/react#28284
- facebook/react#28275
- facebook/react#28145
- facebook/react#28301
- facebook/react#28224
- facebook/react#28152
- facebook/react#28296
- facebook/react#28294
- facebook/react#28279
- facebook/react#28273
- facebook/react#28269

Closes NEXT-2542


Disable ppr test for strict mode for now, @acdlite will check it and
we'll sync again
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…ce (facebook#28380)

This won't ever be serialized and is likely just a mistake.

This should be covered by the "use server" compiler since it ensures
that something that accepts a "this" won't be allowed to compile and if
it doesn't accept it, TypeScript should ideally forbid it to be passed.

So maybe this is unnecessary.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
…ce (#28380)

This won't ever be serialized and is likely just a mistake.

This should be covered by the "use server" compiler since it ensures
that something that accepts a "this" won't be allowed to compile and if
it doesn't accept it, TypeScript should ideally forbid it to be passed.

So maybe this is unnecessary.

DiffTrain build for commit 65a0e2b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants