build!: specify a minimum TypeScript version using typesVersions#9116
Closed
build!: specify a minimum TypeScript version using typesVersions#9116
Conversation
🦋 Changeset detectedLatest commit: f54d039 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Changeset File Check
|
Collaborator
Size Report 1Affected ProductsNo changes between base commit (86155b3) and merge commit (e53d3ec).Test Logs |
Collaborator
Size Analysis Report 1Affected ProductsNo changes between base commit (86155b3) and merge commit (e53d3ec).Test Logs |
Contributor
Author
|
After reviewing, this is a pretty hacky solution and the warning doesn't show up in a number of common cases. Closing this and trying to think of a better solution. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Specified a minimum version of TypeScript required using
typesVersionsfield. If the version is below, the TS compiler directs the compiler to use a typings file calledtypescript-not-supported.tswhich contains a single string which will be logged as a syntax error in the TS compiler, and provide useful error info to the user.Following user suggestions here: microsoft/TypeScript#32166
Fixes #8837
I chose 4.5 because due to the issue above we know that the SDK requires at least 4.5. I'm not sure if there are any other TS features we are using that require an even higher version (in a product or bundle that user wasn't using) but we can increase it if we discover any.
I added a hack to allow our old api-documenter (stuck on TS 4.1.6) to work - docgen.ts removes the
typesVersionsrestriction on old versions in packages/app/package.json before running and then puts it back when it's done/exits. We will update api-documenter/extractor soon.