From 7e53a15b7ad4e7b985bc92cc38cc7ee131e05f73 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Thu, 31 Jul 2025 14:26:23 -0400 Subject: [PATCH 1/5] Remove react-is dependency --- package.json | 3 +- renovate.json | 4 +- .../datasources/form_based/form_based.test.ts | 23 +++++----- yarn.lock | 43 +++++++++++++++---- 4 files changed, 49 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 729c9a38928de..7c43eeda89b8b 100644 --- a/package.json +++ b/package.json @@ -1945,7 +1945,6 @@ "prettier": "^2.8.8", "proxy": "^2.1.1", "qs": "^6.14.0", - "react-is": "~18.2.0", "react-refresh": "^0.16.0", "react-test-renderer": "~18.2.0", "recast": "^0.23.9", @@ -1997,4 +1996,4 @@ "yarn-deduplicate": "^6.0.2" }, "packageManager": "yarn@1.22.21" -} \ No newline at end of file +} diff --git a/renovate.json b/renovate.json index a52a4e5a57677..6374af1316f84 100644 --- a/renovate.json +++ b/renovate.json @@ -511,11 +511,9 @@ "prop-types", "react", "react-dom", - "react-is", "@types/prop-types", "@types/react", "@types/react-dom", - "@types/react-is", "csstype" ], "reviewers": [ @@ -4743,4 +4741,4 @@ "datasourceTemplate": "docker" } ] -} +} \ No newline at end of file diff --git a/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts b/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts index c8f1bffe36849..948748c799891 100644 --- a/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts +++ b/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -import { ReactElement } from 'react'; -import { isFragment } from 'react-is'; +import React, { ReactElement } from 'react'; import type { Reference } from '@kbn/content-management-utils'; import { coreMock } from '@kbn/core/public/mocks'; @@ -194,6 +193,10 @@ const dateRange = { toDate: '2022-04-17T08:25:00.000Z', }; +function isFragment(element: unknown): element is ReactElement { + return React.isValidElement(element) && element.type === React.Fragment; +} + describe('IndexPattern Data Source', () => { let baseState: FormBasedPrivateState; let FormBasedDatasource: Datasource; @@ -3057,7 +3060,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => {}, + setState: () => { }, }) ).toMatchInlineSnapshot(` Array [ @@ -3113,7 +3116,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => {}, + setState: () => { }, }) ).toMatchInlineSnapshot(` Array [ @@ -3202,7 +3205,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => {}, + setState: () => { }, }); expect(messages.length).toBe(1); @@ -3243,7 +3246,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => {}, + setState: () => { }, }); expect(messages.length).toBe(1); @@ -3409,7 +3412,7 @@ describe('IndexPattern Data Source', () => { it('should return mismatched time shifts', () => { const warnings = FormBasedDatasource.getUserMessages!(state, { frame: framePublicAPI, - setState: () => {}, + setState: () => { }, }); expect(extractTranslationIdsFromWarnings(warnings)).toMatchInlineSnapshot(` @@ -3425,7 +3428,7 @@ describe('IndexPattern Data Source', () => { const warnings = FormBasedDatasource.getUserMessages!(state, { frame: framePublicAPI, - setState: () => {}, + setState: () => { }, }); expect(extractTranslationIdsFromWarnings(warnings)).toMatchInlineSnapshot(` @@ -3527,7 +3530,7 @@ describe('IndexPattern Data Source', () => { indexPatterns: expectedIndexPatterns, }), }), - setState: () => {}, + setState: () => { }, visualizationInfo: { layers: [] }, } ); @@ -3553,7 +3556,7 @@ describe('IndexPattern Data Source', () => { indexPatterns: expectedIndexPatterns, }), }), - setState: () => {}, + setState: () => { }, visualizationInfo: { layers: [] }, }); const infoMessages = messages.filter(({ severity }) => severity === 'info'); diff --git a/yarn.lock b/yarn.lock index d10c911430196..b6d83b2f7caeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28345,11 +28345,6 @@ react-is@^17.0.0, react-is@^17.0.1, react-is@^17.0.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-is@~18.2.0: - version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -30902,7 +30897,7 @@ string-replace-loader@^3.1.0: loader-utils "^2.0.0" schema-utils "^3.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -30920,6 +30915,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -31012,7 +31016,7 @@ stringify-object@^3.2.1: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -31026,6 +31030,13 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -33822,7 +33833,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -33848,6 +33859,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -33958,7 +33978,7 @@ xpath@^0.0.33: resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.33.tgz#5136b6094227c5df92002e7c3a13516a5074eb07" integrity sha512-NNXnzrkDrAzalLhIUc01jO2mOzXGXh1JwPgkihcLLzw98c0WgYDmmjSh1Kl3wzaxSVWMuA+fe0WTWOBDWCBmNA== -"xstate5@npm:xstate@^5.19.2", xstate@^5.19.2: +"xstate5@npm:xstate@^5.19.2": version "5.19.2" resolved "https://registry.yarnpkg.com/xstate/-/xstate-5.19.2.tgz#db3f1ee614bbb6a49ad3f0c96ddbf98562d456ba" integrity sha512-B8fL2aP0ogn5aviAXFzI5oZseAMqN00fg/TeDa3ZtatyDcViYLIfuQl4y8qmHCiKZgGEzmnTyNtNQL9oeJE2gw== @@ -33968,6 +33988,11 @@ xstate@^4.38.3: resolved "https://registry.yarnpkg.com/xstate/-/xstate-4.38.3.tgz#4e15e7ad3aa0ca1eea2010548a5379966d8f1075" integrity sha512-SH7nAaaPQx57dx6qvfcIgqKRXIh4L0A1iYEqim4s1u7c9VoCgzZc+63FY90AKU4ZzOC2cfJzTnpO4zK7fCUzzw== +xstate@^5.19.2: + version "5.19.2" + resolved "https://registry.yarnpkg.com/xstate/-/xstate-5.19.2.tgz#db3f1ee614bbb6a49ad3f0c96ddbf98562d456ba" + integrity sha512-B8fL2aP0ogn5aviAXFzI5oZseAMqN00fg/TeDa3ZtatyDcViYLIfuQl4y8qmHCiKZgGEzmnTyNtNQL9oeJE2gw== + "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" From 2cef3719b718010a4955a0cfa8c456da77ac2b5c Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 31 Jul 2025 18:48:06 +0000 Subject: [PATCH 2/5] [CI] Auto-commit changed files from 'node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c43eeda89b8b..67b09022881c0 100644 --- a/package.json +++ b/package.json @@ -1996,4 +1996,4 @@ "yarn-deduplicate": "^6.0.2" }, "packageManager": "yarn@1.22.21" -} +} \ No newline at end of file From 46a1feb8eeff2edf69af783be9f0237ca8be21f6 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:27:24 +0000 Subject: [PATCH 3/5] [CI] Auto-commit changed files from 'node scripts/eslint_all_files --no-cache --fix' --- .../datasources/form_based/form_based.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts b/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts index 948748c799891..976ea1a311571 100644 --- a/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts +++ b/x-pack/platform/plugins/shared/lens/public/datasources/form_based/form_based.test.ts @@ -3060,7 +3060,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => { }, + setState: () => {}, }) ).toMatchInlineSnapshot(` Array [ @@ -3116,7 +3116,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => { }, + setState: () => {}, }) ).toMatchInlineSnapshot(` Array [ @@ -3205,7 +3205,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => { }, + setState: () => {}, }); expect(messages.length).toBe(1); @@ -3246,7 +3246,7 @@ describe('IndexPattern Data Source', () => { frame: createMockFramePublicAPI({ dataViews: createMockDataViewsState({ indexPatterns }), }), - setState: () => { }, + setState: () => {}, }); expect(messages.length).toBe(1); @@ -3412,7 +3412,7 @@ describe('IndexPattern Data Source', () => { it('should return mismatched time shifts', () => { const warnings = FormBasedDatasource.getUserMessages!(state, { frame: framePublicAPI, - setState: () => { }, + setState: () => {}, }); expect(extractTranslationIdsFromWarnings(warnings)).toMatchInlineSnapshot(` @@ -3428,7 +3428,7 @@ describe('IndexPattern Data Source', () => { const warnings = FormBasedDatasource.getUserMessages!(state, { frame: framePublicAPI, - setState: () => { }, + setState: () => {}, }); expect(extractTranslationIdsFromWarnings(warnings)).toMatchInlineSnapshot(` @@ -3530,7 +3530,7 @@ describe('IndexPattern Data Source', () => { indexPatterns: expectedIndexPatterns, }), }), - setState: () => { }, + setState: () => {}, visualizationInfo: { layers: [] }, } ); @@ -3556,7 +3556,7 @@ describe('IndexPattern Data Source', () => { indexPatterns: expectedIndexPatterns, }), }), - setState: () => { }, + setState: () => {}, visualizationInfo: { layers: [] }, }); const infoMessages = messages.filter(({ severity }) => severity === 'info'); From 44653b99b4e525396cc4c0d91c85e9f2782a4186 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Fri, 1 Aug 2025 14:15:35 -0400 Subject: [PATCH 4/5] Remove types --- package.json | 3 +-- yarn.lock | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/package.json b/package.json index 67b09022881c0..7c0790ad9a40c 100644 --- a/package.json +++ b/package.json @@ -1767,7 +1767,6 @@ "@types/rbush": "^4.0.0", "@types/react": "~18.2.0", "@types/react-dom": "~18.2.0", - "@types/react-is": "~18.2.0", "@types/react-recompose": "^0.33.4", "@types/react-router": "^5.1.20", "@types/react-router-config": "^5.0.7", @@ -1996,4 +1995,4 @@ "yarn-deduplicate": "^6.0.2" }, "packageManager": "yarn@1.22.21" -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index b6d83b2f7caeb..5853f07c37ec8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13283,13 +13283,6 @@ dependencies: "@types/react" "*" -"@types/react-is@~18.2.0": - version "18.2.4" - resolved "https://registry.yarnpkg.com/@types/react-is/-/react-is-18.2.4.tgz#95a92829de452662348ce08349ca65623c50daf7" - integrity sha512-wBc7HgmbCcrvw0fZjxbgz/xrrlZKzEqmABBMeSvpTvdm25u6KI6xdIi9pRE2G0C1Lw5ETFdcn4UbYZ4/rpqUYw== - dependencies: - "@types/react" "*" - "@types/react-native@*": version "0.60.22" resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.22.tgz#ba199a441cb0612514244ffb1d0fe6f04c878575" From 6e66c3544e55024a05106f48f09df63d5130d1ae Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 1 Aug 2025 19:03:27 +0000 Subject: [PATCH 5/5] [CI] Auto-commit changed files from 'node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c0790ad9a40c..a359784f01af8 100644 --- a/package.json +++ b/package.json @@ -1995,4 +1995,4 @@ "yarn-deduplicate": "^6.0.2" }, "packageManager": "yarn@1.22.21" -} +} \ No newline at end of file