[Uptime] Migrate to TypeScript project references#90510
[Uptime] Migrate to TypeScript project references#90510justinkambic merged 12 commits intoelastic:masterfrom
Conversation
… `x-pack/tsconfig.json`.
2119e40 to
51842a6
Compare
|
Pinging @elastic/uptime (Team:uptime) |
| }, | ||
| "state": { | ||
| "agent": null, | ||
| "checks": , |
There was a problem hiding this comment.
A little concerning that this didn't cause anything to break (until now).
| export type TLSActionGroup = ActionGroup<'xpack.uptime.alerts.actionGroups.tls'>; | ||
| export type DurationAnomalyActionGroup = ActionGroup<'xpack.uptime.alerts.actionGroups.durationAnomaly'>; | ||
|
|
||
| export const MONITOR_STATUS: MonitorStatusActionGroup = { |
There was a problem hiding this comment.
The compiler seemed to want these exported individually in the way we were referencing them.
|
|
||
| export type AppState = ReturnType<typeof rootReducer>; | ||
|
|
||
| type ComposeType = typeof compose; |
There was a problem hiding this comment.
This was copied from another plugin's solution for providing a global type for redux devtools.
x-pack/plugins/uptime/tsconfig.json
Outdated
| "public/**/*", | ||
| "server/**/*", | ||
| "../../../typings/**/*", | ||
| "public/**/*.json", |
There was a problem hiding this comment.
The glob syntax above appeared to ignore JSON files.
There was a problem hiding this comment.
since there are just two json files, maybe it doesn't make sense to use wildcard pattern
There was a problem hiding this comment.
Sure, we can make it more specific. The drawback will be when someone adds a dependency in the future this will need to be updated each time.
andrewvc
left a comment
There was a problem hiding this comment.
Mostly good, left some minor comments / questions
x-pack/plugins/uptime/tsconfig.json
Outdated
| "server/**/*", | ||
| "../../../typings/**/*", | ||
| "public/**/*.json", | ||
| "server/**/*.json" |
There was a problem hiding this comment.
| "server/**/*.json" | |
| "server/lib/requests/__fixtures__/monitor_charts_mock.json" |
x-pack/plugins/uptime/tsconfig.json
Outdated
| "public/**/*", | ||
| "server/**/*", | ||
| "../../../typings/**/*", | ||
| "public/**/*.json", |
There was a problem hiding this comment.
| "public/**/*.json", | |
| "server/lib/requests/__fixtures__/monitor_charts_mock.json" |
| declare global { | ||
| interface Window { | ||
| __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: ComposeType; | ||
| } | ||
| } | ||
|
|
||
| const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; |
There was a problem hiding this comment.
i would prefer to use this here, this package is already part of kibana, so it would be easier to use.
import { composeWithDevTools } from 'redux-devtools-extension';
export const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(sagaMW)));
|
@elasticmachine merge upstream |
…om:justinkambic/kibana into uptime-87170_migrate-to-typescript-project
justinkambic
left a comment
There was a problem hiding this comment.
I just implemented review feedback and pushed 3146d9a.
x-pack/plugins/uptime/tsconfig.json
Outdated
| "public/**/*", | ||
| "server/**/*", | ||
| "../../../typings/**/*", | ||
| "public/**/*.json", |
There was a problem hiding this comment.
Sure, we can make it more specific. The drawback will be when someone adds a dependency in the future this will need to be updated each time.
| declare global { | ||
| interface Window { | ||
| __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: ComposeType; | ||
| } | ||
| } | ||
|
|
||
| const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; |
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* Add reference to Uptime plugin to root tsconfig.refs.json. * Add Uptime path to excluded list, and reference to references prop in `x-pack/tsconfig.json`. * Add reference to Uptime project in `x-pack/test/tsconfig.json`. * Add `tsconfig.json` project file to Uptime. * Fix broken JSON structure in test fixture. * Fix broken type exports. Introduce missing types. * Implement PR feedback. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…timeline-and-rollover-info * 'master' of github.com:elastic/kibana: (47 commits) [Fleet] Use TS project references (elastic#87574) before/beforeEach clean up (elastic#90663) [Vega] user should be able to set a specific tilemap service using the mapStyle property (elastic#88440) [Security Solution][Case] ServiceNow SIR Connector (elastic#88655) [Search Sessions] Enable extend from management (elastic#90558) [ILM] Delete phase redesign (rework) (elastic#90291) [APM-UI][E2E] use withGithubStatus step (elastic#90651) Add folding in kb-monaco and update some viewers (elastic#90152) [Grok Debugger] Changed test to wait for grok debugger container to exist to fix test flakiness (elastic#90543) Strongly typed EUI theme for styled-components (elastic#90106) Fix vega renovate label (elastic#90591) [Uptime] Migrate to TypeScript project references (elastic#90510) [Monitoring] Migrate data source for legacy alerts to monitoring data directly (elastic#87377) [Upgrade Assistant] Add A11y Tests (elastic#90265) [Time to Visualize] Adds functional tests for linking/unlinking panel from embeddable library (elastic#89612) [dev-utils/ship-ci-stats] fail when CI stats is down (elastic#90678) chore(NA): remove write permissions on Bazel remote cache for PRs (elastic#90652) chore(NA): move bazel workspace status from bash script into nodejs executable (elastic#90560) Use default ES distribution for functional tests (elastic#88737) [Alerts] Jira: Disallow labels with spaces (elastic#90548) ... # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/timeline/timeline.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/absolute_timing_to_relative_timing.test.ts # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/absolute_timing_to_relative_timing.ts
|
Backported to: |
…astic#90721) * Add reference to Uptime plugin to root tsconfig.refs.json. * Add Uptime path to excluded list, and reference to references prop in `x-pack/tsconfig.json`. * Add reference to Uptime project in `x-pack/test/tsconfig.json`. * Add `tsconfig.json` project file to Uptime. * Fix broken JSON structure in test fixture. * Fix broken type exports. Introduce missing types. * Implement PR feedback. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Resolves #87170.
Author checklist
tscfromnode_modulesreferencesprop intsconfig.refs.jsonChecklist
Delete any items that are not applicable to this PR.
For maintainers