-
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
[Uptime] Migrate to TypeScript project references #90510
[Uptime] Migrate to TypeScript project references #90510
Conversation
… `x-pack/tsconfig.json`.
2119e40
to
51842a6
Compare
Pinging @elastic/uptime (Team:uptime) |
@@ -261,7 +261,25 @@ | |||
}, | |||
"state": { | |||
"agent": null, | |||
"checks": , |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler seemed to want these exported individually in the way we were referencing them.
@@ -12,6 +12,13 @@ import { rootReducer } from './reducers'; | |||
|
|||
export type AppState = ReturnType<typeof rootReducer>; | |||
|
|||
type ComposeType = typeof compose; |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The glob syntax above appeared to ignore JSON files.
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.
since there are just two json files, maybe it doesn't make sense to use wildcard pattern
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.
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.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)));
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.
👏
@elasticmachine merge upstream |
…om:justinkambic/kibana into uptime-87170_migrate-to-typescript-project
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
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.
👏
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, WFG !!
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
@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 <[email protected]>
…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 <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
Resolves #87170.
Author checklist
tsc
fromnode_modules
references
prop intsconfig.refs.json
Checklist
Delete any items that are not applicable to this PR.
For maintainers