Skip to content

Commit a582800

Browse files
authored
[7.17] [APM][ML] Update cytoscape with new index.d.ts def, fix typing issues (elastic#206651) (elastic#207230)
# Backport This will backport the following commits from `main` to `7.17`: - [[APM][ML] Update cytoscape with new index.d.ts def, fix typing issues (elastic#206651)](elastic#206651) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-20T13:36:22Z","message":"[APM][ML] Update cytoscape with new index.d.ts def, fix typing issues (elastic#206651)\n\n## Summary\r\n\r\n`cytoscape` released yet another semver breaking change, affecting\r\ntyping once more in a couple of places. They now have their own\r\n`index.d.ts` file for Typescript support, but this causes some issues as\r\nthey don't always have the same type name as the `@types` version. Had\r\nto fix in a couple of places, both in APM and in ML codebases.\r\n\r\nSupersedes elastic#206498\r\n\r\n## How to test\r\n\r\n* This PR passes the CI with no typing issues, or failed tests\r\n* Going to APM or ML pages with cytoscape being loaded shows no\r\nregressions.","sha":"a0bdc1968456f0db02a18becefdc19bdcc5469f5","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:all-open","Team:obs-ux-infra_services"],"title":"[APM][ML] Update cytoscape with new index.d.ts def, fix typing issues","number":206651,"url":"https://github.com/elastic/kibana/pull/206651","mergeCommit":{"message":"[APM][ML] Update cytoscape with new index.d.ts def, fix typing issues (elastic#206651)\n\n## Summary\r\n\r\n`cytoscape` released yet another semver breaking change, affecting\r\ntyping once more in a couple of places. They now have their own\r\n`index.d.ts` file for Typescript support, but this causes some issues as\r\nthey don't always have the same type name as the `@types` version. Had\r\nto fix in a couple of places, both in APM and in ML codebases.\r\n\r\nSupersedes elastic#206498\r\n\r\n## How to test\r\n\r\n* This PR passes the CI with no typing issues, or failed tests\r\n* Going to APM or ML pages with cytoscape being loaded shows no\r\nregressions.","sha":"a0bdc1968456f0db02a18becefdc19bdcc5469f5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206651","number":206651,"mergeCommit":{"message":"[APM][ML] Update cytoscape with new index.d.ts def, fix typing issues (elastic#206651)\n\n## Summary\r\n\r\n`cytoscape` released yet another semver breaking change, affecting\r\ntyping once more in a couple of places. They now have their own\r\n`index.d.ts` file for Typescript support, but this causes some issues as\r\nthey don't always have the same type name as the `@types` version. Had\r\nto fix in a couple of places, both in APM and in ML codebases.\r\n\r\nSupersedes elastic#206498\r\n\r\n## How to test\r\n\r\n* This PR passes the CI with no typing issues, or failed tests\r\n* Going to APM or ML pages with cytoscape being loaded shows no\r\nregressions.","sha":"a0bdc1968456f0db02a18becefdc19bdcc5469f5"}}]}] BACKPORT-->
1 parent 8486791 commit a582800

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
"copy-to-clipboard": "^3.0.8",
213213
"core-js": "^3.19.1",
214214
"cronstrue": "^1.51.0",
215-
"cytoscape": "^3.30.4",
215+
"cytoscape": "^3.31.0",
216216
"cytoscape-dagre": "^2.5.0",
217217
"d3": "3.5.17",
218218
"d3-array": "1.2.4",
@@ -514,7 +514,6 @@
514514
"@types/cmd-shim": "^2.0.0",
515515
"@types/color": "^3.0.0",
516516
"@types/compression-webpack-plugin": "^2.0.2",
517-
"@types/cytoscape": "^3.21.8",
518517
"@types/d3": "^3.5.43",
519518
"@types/d3-array": "^1.2.7",
520519
"@types/d3-interpolate": "^2.0.0",

x-pack/plugins/apm/public/components/app/service_map/cytoscape_options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function isService(el: cytoscape.NodeSingular) {
100100
return el.data(SERVICE_NAME) !== undefined;
101101
}
102102

103-
const getStyle = (theme: EuiTheme): cytoscape.Stylesheet[] => {
103+
const getStyle = (theme: EuiTheme): cytoscape.StylesheetJson => {
104104
const lineColor = theme.eui.euiColorMediumShade;
105105
return [
106106
{

yarn.lock

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5504,11 +5504,6 @@
55045504
resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.2.tgz#66ad9331f63fe8a3d3d9d8c6e3906dd10f6446e8"
55055505
integrity sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==
55065506

5507-
"@types/cytoscape@^3.21.8":
5508-
version "3.21.8"
5509-
resolved "https://registry.yarnpkg.com/@types/cytoscape/-/cytoscape-3.21.8.tgz#6166a2eabd66d3ae3259024875e037492adb8db6"
5510-
integrity sha512-6Bo9ZDrv0vfwe8Sg/ERc5VL0yU0gYvP4dgZi0fAXYkKHfyHaNqWRMcwYm3mu4sLsXbB8ZuXE75sR7qnaOL5JgQ==
5511-
55125507
"@types/d3-array@^1.2.7":
55135508
version "1.2.7"
55145509
resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-1.2.7.tgz#34dc654d34fc058c41c31dbca1ed68071a8fcc17"
@@ -10758,10 +10753,10 @@ cytoscape-dagre@^2.5.0:
1075810753
dependencies:
1075910754
dagre "^0.8.5"
1076010755

10761-
cytoscape@^3.30.4:
10762-
version "3.30.4"
10763-
resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.30.4.tgz#3404da0a159c00a1a3df2c85b2b43fdc66a0e28e"
10764-
integrity sha512-OxtlZwQl1WbwMmLiyPSEBuzeTIQnwZhJYYWFzZ2PhEHVFwpeaqNIkUzSiso00D98qk60l8Gwon2RP304d3BJ1A==
10756+
cytoscape@^3.31.0:
10757+
version "3.31.0"
10758+
resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.31.0.tgz#cffbbb8ca51db01cbf360e0cf59088db6d429837"
10759+
integrity sha512-zDGn1K/tfZwEnoGOcHc0H4XazqAAXAuDpcYw9mUnUjATjqljyCNGJv8uEvbvxGaGHaVshxMecyl6oc6uKzRfbw==
1076510760

1076610761
"d3-array@1 - 3", "d3-array@2 - 3", "[email protected] - 3", "[email protected] - 3", [email protected], d3-array@^3.2.2:
1076710762
version "3.2.2"

0 commit comments

Comments
 (0)