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

[ts] enable "resolveJsonModule" and disable existing failures #78855

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Sep 29, 2020

TypeScript has supported the resolveJsonModule compiler option since v2.9. We have tried to do this several times (#24425, #25516) and each time we weren't quite ready. The repo seems to be in a state now were we can enable this feature, get automatic type generation for JSON files, and identify places where JSON is outdated based on the expectations defined in the types (especially in tests). This feature is also needed for the Vega upgrade under way in #78390.

Several existing JSON imports which were taking advantage of the fact that all JSON imports were using the any type. With these imports now getting types defined the flaws in either the JSON itself, or the automatically generated types, are causing type errors. In order to allow code owners to determine the correct action for the JSON in their code I've used @ts-expect-error directives to hide those errors.

Once this PR is merged I'll create issues for each team to detail the work they should schedule to remove the expected error directives.

@spalger spalger added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v8.0.0 labels Sep 29, 2020
@spalger spalger marked this pull request as ready for review September 29, 2020 23:00
@spalger spalger requested review from a team as code owners September 29, 2020 23:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger requested a review from a team September 29, 2020 23:01
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Sep 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id value diff baseline
securitySolution 10.2MB +216.0B 10.2MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

ES UI changes look good to me!

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

ML/Transform changes LGTM.

Copy link
Contributor

@smith smith left a comment

Choose a reason for hiding this comment

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

APM changes look good!

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

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

Canvas changes lgtm

Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

Security changes LGTM! Thanks @spalger! 🙂

@spalger spalger merged commit 06d1628 into elastic:master Sep 30, 2020
@spalger spalger deleted the implement/ts-resolveJsonModule branch September 30, 2020 22:44
spalger pushed a commit that referenced this pull request Oct 1, 2020
…78855) (#79043)

Co-authored-by: spalger <[email protected]>
# Conflicts:
#	x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx
#	x-pack/typings/index.d.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Oct 1, 2020
* master: (36 commits)
  [I18n] fix eui tokens (elastic#78951)
  Changed the color of the confirm button in trusted app deletion dialog. (elastic#78768)
  Make the actual Vislib import async (elastic#78949)
  Fix ML conditionals links Cypress tests (elastic#78568)
  [Drilldowns][Docs] Communicate the visualization types that support drilldowns (elastic#78761)
  [UX] Improve page-load axis (elastic#78392)
  [SECURITY SOLUTIONS] Map embeddable working with index patterns selection (elastic#78610)
  Data plugin README (elastic#78750)
  [TSVB] Request validation error: [panels.0.series.0.metrics.0.percentiles.1.value] (elastic#79009)
  fixing api test (elastic#78964)
  [Task names in TaskManager] Rename "telemetry" to "usage" (elastic#78129)
  [Loggers] Rename "telemetry" to "usage" (elastic#78130)
  [Usage Collection] [schema] `ui_metric` (elastic#78827)
  [Actions][Jira] Set parent issue for Sub-task issue type (elastic#78772)
  [Discover] Unskip doc link functional test (elastic#78600)
  [ML] Functional tests - stabilize calendar edit tests (elastic#78950)
  [UX] Improve page responsive  (elastic#78759)
  [QA][Code Coverage] Team Assignment Docs Update (elastic#78890)
  [ML] Migrate machine learning URLs to BrowserRouter format for APM, Security, and Infra  (elastic#78209)
  [ts] enable "resolveJsonModule" and disable existing failures (elastic#78855)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Operations Team label for Operations Team v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.