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

feat(compiler): Handle TSSatisfiesExpression #29818

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nikeee
Copy link
Contributor

@nikeee nikeee commented Jun 8, 2024

Summary

Resolves #29754

Details

I tried keeping @babel/types as low as possible, to match the actual used implementation. However, there were multiple issues:

  • Using <7.24 caused ~200 type errors
  • Using ^7.23 added AST support for optional member assignments, which are at stage 1. I added TODOs/"Not Supported" for these cases.
  • SourceLocation seems to now have identifiers, filename and index. It is used in scope merging. Since filename and identifier cannot be "merged", I chose the right location as the one supplying these, because the only usage of that function passes identifier for the right location. This might not be what we want, please check this and assume that I don't know what I am doing :)

How did you test this change?

Added a test for a simple case. I think we don't need a more complex one, since we're only interested in the inner expression and not in the satisfies constraint.

Copy link

vercel bot commented Jun 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ❌ Failed (Inspect) Jun 8, 2024 8:13pm

@react-sizebot
Copy link

react-sizebot commented Jun 8, 2024

Comparing: c2ae9e2...a4b0ec0

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.js = 6.66 kB 6.66 kB +0.11% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 497.44 kB 497.44 kB = 89.16 kB 89.16 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB +0.11% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 502.26 kB 502.26 kB = 89.85 kB 89.85 kB
facebook-www/ReactDOM-prod.classic.js = 596.94 kB 596.94 kB = 105.24 kB 105.24 kB
facebook-www/ReactDOM-prod.modern.js = 571.12 kB 571.12 kB = 101.19 kB 101.19 kB
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 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
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 kB 0.00 kB

Generated by 🚫 dangerJS against a4b0ec0

@nikeee
Copy link
Contributor Author

nikeee commented Jun 8, 2024

Still fighting with linter dependencies, converting to draft.

@nikeee nikeee marked this pull request as draft June 8, 2024 20:20
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.

[Compiler Todo]: Handle TSSatisfiesExpression expressions
3 participants