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(core): prepare process AST mods for move to transform #2489

Merged
merged 5 commits into from
May 8, 2022

Conversation

idoros
Copy link
Collaborator

@idoros idoros commented May 3, 2022

This PR refactor the AST modifications that occur in the processor to prepare them to be moved to the transformer

  • prepareAST - new feature hook called on every node at the end of the analyze process
  • modifiers
    • @namespace
    • :vars
    • @st-import / :import
    • @st-global-custom-property
    • @custom-selector
    • @st-scope

- new feature hook `prepareAST` to remove a node or do custom mods
- call `prepareAST` on every node at the end of analyze
- move `imports`, `namespace`, and `vars` to `prepareAST`
- `:vars` require a bailout when running on props, since without eager removal `URLs` are being collected twice AND custom property can be defined within a var value (not the currect behavior)
@idoros idoros added core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds labels May 3, 2022
@idoros idoros self-assigned this May 3, 2022
idoros added 3 commits May 4, 2022 09:47
- remove temp `stubs` - custom selector is anlyzed with the statement
- remove `@custom-selector` and extends rules at the end of the process
- keep track of if custom selector is scoped and use flag to report unscoped selectors that use the custom selector
- cleanup `toRemove` code in feature and processor
- deprecate annotation on `meta.scopes`
- refactor initial `st-scope` feature to  manage `analyze/prepareAST` from processor
@idoros idoros merged commit 169d298 into master May 8, 2022
@idoros idoros deleted the ido/collect-process-ast-modifiers branch May 8, 2022 11:02
@idoros idoros mentioned this pull request May 23, 2022
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants