-
Notifications
You must be signed in to change notification settings - Fork 521
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
Bump TypeScript to 3.8.3 #1244
Bump TypeScript to 3.8.3 #1244
Conversation
This is a conservative bump to minimize the amount of changes needed in tooling and dependencies. Version 3.8.3 was chosen because it is the version that implements support for type-only exports and imports (i.e. `import type { TFoo } from '@types/foo';`, which is the major source of incompatibility with upgraded type definitions in newer dependency versions. Notable changes: * As noted in jaegertracing#998, the `@types/react` version used to type-check `jaeger-ui` is a transitive dependency on version `16.8.7`, rather than the expected `18`. Unfortunately, both newer `16.x` type definitions as well as `18.x` type definitions are incompatible with various dependencies such as `antd`. As a workaround, downgrade the typing versions for now and add an explicit dependency on them to the project. Only index.tsx was using a React 18-specific API (createRoot), so convert it back to JS until the typings can be updated again. * TypeScript now enforces that `composite` projects must also generate declaration files, since that's what the project references system uses. Make it so. This required a small adjustment to the ErrorMessage component, as the types of its Message and Details sub-components could not be reflected in this declaration file; this was trivially fixable by converting them to named exports instead (which is also consistent with other areas of the codebase). * Make Plexus a project reference in the root tsconfig, per the longstanding todo and per the changes above. Signed-off-by: Máté Szabó <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1244 +/- ##
==========================================
+ Coverage 95.40% 95.50% +0.10%
==========================================
Files 244 244
Lines 7751 7749 -2
Branches 2017 2017
==========================================
+ Hits 7395 7401 +6
+ Misses 355 348 -7
+ Partials 1 0 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
lgtm, any concerns from your side? Any additional testing required? Bundle size changes? |
The bundle size should be unaffected (seems like it's indeed 1648 kB both on |
👍 |
## Which problem is this PR solving? - Contributes towards jaegertracing#818 ## Short description of the changes This is a conservative bump to minimize the amount of changes needed in tooling and dependencies. Version 3.8.3 was chosen because it is the version that implements support for type-only exports and imports (i.e. `import type { TFoo } from '@types/foo';`, which is the major source of incompatibility with upgraded type definitions in newer dependency versions. Notable changes: * As noted in jaegertracing#998, the `@types/react` version used to type-check `jaeger-ui` is a transitive dependency on version `16.8.7`, rather than the expected `18`. Unfortunately, both newer `16.x` type definitions as well as `18.x` type definitions are incompatible with various dependencies such as `antd`. As a workaround, downgrade the typing versions for now and add an explicit dependency on them to the project. Only index.tsx was using a React 18-specific API (createRoot), so convert it back to JS until the typings can be updated again. * TypeScript now enforces that `composite` projects must also generate declaration files, since that's what the project references system uses. Make it so. This required a small adjustment to the ErrorMessage component, as the types of its Message and Details sub-components could not be reflected in this declaration file; this was trivially fixable by converting them to named exports instead (which is also consistent with other areas of the codebase). * Make Plexus a project reference in the root tsconfig, per the longstanding todo and per the changes above. Signed-off-by: Máté Szabó <[email protected]>
Which problem is this PR solving?
Short description of the changes
This is a conservative bump to minimize the amount of changes needed in tooling and dependencies. Version 3.8.3 was chosen because it is the version that implements support for type-only exports and imports (i.e.
import type { TFoo } from '@types/foo';
, which is the major source of incompatibility with upgraded type definitions in newer dependency versions.Notable changes:
@types/react
version used to type-checkjaeger-ui
is a transitive dependency on version16.8.7
, rather than the expected18
. Unfortunately, both newer16.x
type definitions as well as18.x
type definitions are incompatible with various dependencies such asantd
. As a workaround, downgrade the typing versions for now and add an explicit dependency on them to the project. Only index.tsx was using a React 18-specific API (createRoot), so convert it back to JS until the typings can be updated again.composite
projects must also generate declaration files, since that's what the project references system uses. Make it so. This required a small adjustment to the ErrorMessage component, as the types of its Message and Details sub-components could not be reflected in this declaration file; this was trivially fixable by converting them to named exports instead (which is also consistent with other areas of the codebase).