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
Support for TypeScript 4.8 decorator AST changes #249
Merged
Merged
Conversation
This file contains 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
bicknellr
changed the title
Test on TypeScript 4.8
Support for TypeScript 4.8 decorator AST changes
Oct 17, 2022
rictic
approved these changes
Dec 13, 2022
Now that this PR has been merged, a new release would be highly appreciated, so that runem/lit-analyzer#278 can be fixed. Perhaps @runem or @rictic can help? 🙂 |
bicknellr
added a commit
to bicknellr/web-component-analyzer
that referenced
this pull request
Apr 5, 2023
bicknellr
added a commit
to bicknellr/web-component-analyzer
that referenced
this pull request
Apr 5, 2023
rictic
pushed a commit
that referenced
this pull request
Apr 6, 2023
* Install `typescript@~5.0`. * Add `5.0` to the set of tested TypeScript versions. * Support for TypeScript 4.8+ decorator AST changes (cherry-pick of #249) * Fall back to `isTypeAssertion` for `isTypeAssertionExpression` (introduced in `4.0.2`). (cherry-pick c69e804) * Fix building with TypeScript before `isTypeAssertionExpression` existed. * Remove indentation from JSDoc descriptions in tests. (...) Somewhere between 3.8 and 5.0, indentation for JSDoc description lines starting with whitespace was fixed to not include the additional space immediately after the line's leading `*`. The indentiation in this test causes it to fail in at least TS 5.0, so I'm removing it rather than trying to track down exactly when this change was made and then propagating the version number to the test. * `DocumentAndElementEventHandlers` was removed in microsoft/TypeScript#52328 (0c2fa39). * Revert back to `lockfileVersion: 1` by installing new deps with npm v6 instead of v9.
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.
This PR adds TypeScript 4.8 to the set of TypeScript versions that are tested. TypeScript 4.8 has a breaking change to the AST where the
.decorators
property has been deprecated and decorators are now found in the.modifiers
property.1 This PR introduces a newgetDecorators
function that returns all decorators existing in either array, if they exist.Footnotes
https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#decorators-are-placed-on-modifiers-on-typescripts-syntax-trees ↩