Repository navigation
fix(compiler): inherited @Element, _-prefixed members, plain-component imports, watch versioning, scopeCss $-patterns and decorator diagnostics - #7061
Merged
Conversation
…t imports, watch versioning, scopeCss $-patterns and decorator diagnostics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
GitHub Issue Number/s: All found from https://github.com/popcorn245/StencilRS/blob/main/docs/quirks.md - thanks @popcorn245 !
__stencil_transformTagwithout importing it, so the module throws on load._(e.g.@State() _filters) are left out of the runtime metadata, so they aren't reactive.@Element()declared on a base class isundefinedin components that extend it.10→20.scopeCssexpands$&,$`and$'found in selectors (withcommentOriginalSelector, and in@supports selector(...)conditions).@Watch/@Listenargument crashes the compiler, and computed member names produce bogus members or invalid JS.resolveVar()) discards every other diagnostic in the file.What is the new behavior?
transformTag._-prefixed members are kept. Only the internal_astNodefield is filtered.elementRefis inherited from base classes in all outputs (standalone, lazy, SSR), and the base class no longer emits anelfield that would hide the getter.scopeCssuses function replacers, so selector text is inserted literally.@Watch/@Listenargument, a computed name on@Event/@Element/@Method/@Watch/@Listen, and an unresolvable computed name on@Prop/@State/@AttachInternals.Documentation
Does this introduce a breaking change?
Code that previously compiled into broken components now fails with a compile error (see
BREAKING_CHANGES.md, "Unusable Decorator Names and Arguments Are Errors"). Migration: use a plain member name, or aconststring / enum member for@Prop/@State/@AttachInternals.Testing
decorator-diagnostics.spec.ts,native-component,lazy-component,parse-extends,parse-states,incremental-compiler,scope-css). The versioning andscopeCsstests were checked to fail without the fix.test/runtimeextends-element: inherited@Element()read from the base class, fromrender()and fromcomponentWillLoad(lazy, standalone, standalone-predefined). All 6 tests fail without the fix.pnpm build,typecheck,test,lint,format,spellcheckandknippass.Other information
Found by cross-checking against an external parity suite of Stencil v5 behaviour.