-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[DX] Bump TS version to v4.1 #83397
[DX] Bump TS version to v4.1 #83397
Conversation
src/plugins/discover/public/application/components/sidebar/change_indexpattern.tsx
Outdated
Show resolved
Hide resolved
@@ -181,6 +181,7 @@ export abstract class Container< | |||
// If we hit this, the panel was removed before the embeddable finished loading. | |||
if (this.input.panels[id] === undefined) { | |||
subscription.unsubscribe(); | |||
// @ts-expect-error undefined in not assignable to TEmbeddable | ErrorEmbeddable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need either to change untilEmbeddableLoaded
signature or fix the code @elastic/kibana-app-arch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
reject(new Error('The panel was removed before the embeddable finished loading.'));
/cc @stacey-gammon
@@ -56,6 +56,7 @@ export class ContactCardEmbeddableFactory | |||
<ContactCardInitializer | |||
onCancel={() => { | |||
modalSession.close(); | |||
// @ts-expect-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined
is not assignable to Partial<ContactCardEmbeddableInput>
@elastic/kibana-app-arch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
reject(new Error('Cancelled!'));
@@ -23,6 +23,7 @@ export const Duration = React.memo<{ | |||
}>(({ contextId, eventId, fieldName, value }) => ( | |||
<DefaultDraggable | |||
id={`duration-default-draggable-${contextId}-${eventId}-${fieldName}-${value}`} | |||
// @ts-expect-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name
is not defined in the scope. It uses deprecated global var name
from lib.dom.d.ts
. See all other changes in security_solution
plugin code. @elastic/siem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@restrry thanks so much for catching this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are now tracking work to fix this. Thanks!
{...reactRouterNavigate(history, linkToAddRepository(name))} | ||
{...reactRouterNavigate( | ||
history, | ||
// @ts-expect-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name
is not defined in the scope. It uses deprecated global var name from lib.dom.d.ts
. @elastic/es-ui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you intended this comment to be on line 40 of hdfs_settings.tsx
, above, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, could you clarify the error that's expected on this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you intended this comment to be on line 40 of hdfs_settings.tsx, above, correct?
TS doesn't complain there, does it?
If so, could you clarify the error that's expected on this line?
Could you elaborate? As state in the comment: name
is not defined in the local scope and references a deprecated property name
from the global scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this locally and it looks like that name value can safely be removed. Would you mind removing the TS comment and the reference to the global "name" @restrry ? Otherwise I can do it as a follow up chore. Either way, no need to block on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer the owners to remove this code, as some nuances may pop up.
@elastic/kibana-telemetry telemetry tests are failing again |
@restrry, updating the snapshot should fix it, but I've created #83440 to permanently fix it for this one and any future updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This reverts commit 3de48db.
@@ -7,7 +7,7 @@ | |||
<b>Signature:</b> | |||
|
|||
```typescript | |||
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & { | |||
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>; | |||
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "intl" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elastic/kibana-app-services would it possible to fix the problem #77678 (comment), please ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alerting team code changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KibanaApp changes LGTM, code review only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Operations: LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fleet changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infra
changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kibana QA changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enterprise Search file changes look fine!
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me! Let me know what you decide RE the global name value @restrry
{...reactRouterNavigate(history, linkToAddRepository(name))} | ||
{...reactRouterNavigate( | ||
history, | ||
// @ts-expect-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this locally and it looks like that name value can safely be removed. Would you mind removing the TS comment and the reference to the global "name" @restrry ? Otherwise I can do it as a follow up chore. Either way, no need to block on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
* bump version to 4.1.1-rc * fix code to run kbn bootstrap * fix errors * DO NOT MERGE. mute errors and ping teams to fix them * Address EuiSelectableProps configuration in discover sidebar * use explicit type for EuiSelectable * update to ts v4.1.2 * fix ts error in EuiSelectable * update docs * update prettier with ts version support * Revert "update prettier with ts version support" This reverts commit 3de48db. * address another new problem Co-authored-by: Chandler Prall <chandler.prall@gmail.com> # Conflicts: # test/functional/services/remote/remote.ts
* bump version to 4.1.1-rc * fix code to run kbn bootstrap * fix errors * DO NOT MERGE. mute errors and ping teams to fix them * Address EuiSelectableProps configuration in discover sidebar * use explicit type for EuiSelectable * update to ts v4.1.2 * fix ts error in EuiSelectable * update docs * update prettier with ts version support * Revert "update prettier with ts version support" This reverts commit 3de48db. * address another new problem Co-authored-by: Chandler Prall <chandler.prall@gmail.com> # Conflicts: # test/functional/services/remote/remote.ts
* master: (41 commits) [Maps] fix code-owners (elastic#84265) [@kbn/utils] Clean target before build (elastic#84253) [code coverage] collect for oss integration tests (elastic#83907) [APM] Use `asTransactionRate` consistently everywhere (elastic#84213) Attempt to fix incremental build error (elastic#84152) Unskip "Copy dashboards to space" (elastic#84115) Remove expressions.legacy from README (elastic#79681) Expression: Add render mode and use it for canvas interactivity (elastic#83559) [deb/rpm] Move systemd service to /usr/lib/systemd/system (elastic#83571) [Security Solution][Resolver] Allow a configurable entity_id field (elastic#81679) [ML] Space permision checks for job deletion (elastic#83871) [build] Provide ARM build of RE2 (elastic#84163) TSVB should use "histogram:maxBars" and "histogram:barTarget" settings for auto instead of a default 100 buckets (elastic#83628) [Workplace Search] Initial rendering of Org Sources (elastic#84164) update geckodriver to 0.28 (elastic#84085) Fix timelion vis escapes single quotes (elastic#84196) [Security Solution] Fix incorrect time for dns histogram (elastic#83532) [DX] Bump TS version to v4.1 (elastic#83397) [Security Solution] Add endpoint policy revision number (elastic#83982) [Fleet] Integration Policies List view (elastic#83634) ...
Summary
Release notes: https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/
Breaking changes: https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#breaking-changes
I muted TS errors with
@ts-expect-error
in several places. Code owners, fix them in the branch or as the follow-up, please.