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

fix: print deprecation reason correctly on ts 4.3+ #35

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

gluxon
Copy link
Contributor

@gluxon gluxon commented Sep 30, 2021

This is an alternative to #33 that uses the builtin ts.displayPartsToString function and passes the codeclimate status check.

I'd bias towards merging #33 if reviewers are on the fence. This PR was created before I realized that existed.

@gund
Copy link
Owner

gund commented Dec 14, 2021

Hey @gluxon, thanks for PRs!

I really prefer this one as it's nicely explains what is happening in the code and also structure wise.

I just merged the #39 that updates a bunch of dependencies, could you please rebase this PR with master to see if everything still works?

Thanks!

@gluxon
Copy link
Contributor Author

gluxon commented Dec 14, 2021

Thanks for taking a look @gund! Just rebased. I'll do a quick test locally to make sure this is still working as expected and comment back in a few.

@gund
Copy link
Owner

gund commented Dec 14, 2021

Thanks for quick rebase!

All tests pass but there seems to be a single type error here

src/utils/stringifyJSDocTagInfoText.ts:10:11 - error TS2339: Property 'text' does not exist on type 'never'.
10     : tag.text ?? '';
             ~~~~
Found 1 error.

@codeclimate
Copy link

codeclimate bot commented Dec 14, 2021

Code Climate has analyzed commit e3c3c47 and detected 0 issues on this pull request.

View more on Code Climate.

@gluxon
Copy link
Contributor Author

gluxon commented Dec 14, 2021

Thanks for the heads up. I missed that the rebase pulled in a new version of TypeScript and just had to update the backcompat for the other direction. 🙂

Copy link
Owner

@gund gund left a comment

Choose a reason for hiding this comment

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

Great stuff! Thanks for the updates!

@gund gund merged commit cf372f8 into gund:master Dec 14, 2021
@gluxon gluxon deleted the typescript-4.3-compat branch December 14, 2021 16:07
@gund
Copy link
Owner

gund commented Dec 14, 2021

🎉 This PR is included in version 1.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gund gund added the released label Dec 14, 2021
@gluxon
Copy link
Contributor Author

gluxon commented Dec 14, 2021

Thanks for the review! Feel free to remove the backcompat code in the future if we want to drop support for TypeScript codebases before 4.3.

4.3 was released May 26th 2021, so I think waiting a year from now may be reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants