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

refactor(css/codegen): do not use raw #6674

Merged

Conversation

alexander-akait
Copy link
Collaborator

@alexander-akait alexander-akait commented Dec 18, 2022

Description:

Refactor codegen and do not use raw, also:

  1. fix bug with printing e\32px dimension (we need to escape as in spec)
  2. do not parser wrong hash token as color
  3. fix especaping in " in Str
  4. fix serialization in raw URL
  5. support element() function (before we parse it as hash, now as id selector)

BREAKING CHANGE:

Yes, we don't use raw in codegen, except printing tokens, so if you want to inject something non standard, you should use ListOfComponentValues with PreservedToken

Related issue (if exists):

No

@alexander-akait alexander-akait changed the title Refactor do not use raw in codegen refactor(css/codegen): do not use raw Dec 18, 2022
@alexander-akait alexander-akait marked this pull request as ready for review December 18, 2022 21:51
@kdy1 kdy1 self-assigned this Dec 19, 2022
@kdy1 kdy1 added this to the Planned milestone Dec 19, 2022
@alexander-akait alexander-akait force-pushed the refactor-do-not-use-raw-in-codegen branch from 02ce308 to fc1cea0 Compare December 19, 2022 15:52
@alexander-akait
Copy link
Collaborator Author

@kdy1 Rebased too

kdy1
kdy1 previously approved these changes Dec 20, 2022
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_css_ast --breaking

@kdy1 kdy1 enabled auto-merge (squash) December 20, 2022 07:59
@alexander-akait alexander-akait force-pushed the refactor-do-not-use-raw-in-codegen branch 2 times, most recently from 73ea12d to 1aed07a Compare December 20, 2022 15:24
@alexander-akait
Copy link
Collaborator Author

@kdy1 Rebased too

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

CI failed

@alexander-akait alexander-akait force-pushed the refactor-do-not-use-raw-in-codegen branch from 1aed07a to 7f8941f Compare December 21, 2022 14:14
@alexander-akait
Copy link
Collaborator Author

@kdy1 Fixed too 👍

@kdy1 kdy1 merged commit ebebd60 into swc-project:main Dec 22, 2022
@alexander-akait alexander-akait deleted the refactor-do-not-use-raw-in-codegen branch December 27, 2022 10:40
@kdy1 kdy1 modified the milestones: Planned, v1.3.25 Jan 5, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants