From eda846e1da4d9810dd51a1a9c146c401af148de0 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:07 +0300 Subject: [PATCH 01/20] typescript bump: 4.1.6 Signed-off-by: Danila Gulderov --- i18ntokens.json | 4 ++-- package.json | 4 ++-- src/components/icon/icon.test.tsx | 2 +- .../selectable_templates/selectable_template_sitewide.tsx | 2 +- src/components/suggest/suggest_item.tsx | 4 ++-- yarn.lock | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/i18ntokens.json b/i18ntokens.json index 96c4356734..893dd1cc09 100644 --- a/i18ntokens.json +++ b/i18ntokens.json @@ -3535,12 +3535,12 @@ "start": { "line": 267, "column": 12, - "index": 7947 + "index": 7990 }, "end": { "line": 270, "column": 14, - "index": 8069 + "index": 8112 } }, "filepath": "src/components/selectable/selectable_templates/selectable_template_sitewide.tsx" diff --git a/package.json b/package.json index aabf546629..7b6f59a962 100644 --- a/package.json +++ b/package.json @@ -243,7 +243,7 @@ "start-server-and-test": "^2.0.0", "style-loader": "^1.2.1", "terser-webpack-plugin": "^4.1.0", - "typescript": "4.0.5", + "typescript": "4.1.6", "url-loader": "^4.1.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", @@ -257,6 +257,6 @@ "moment": "^2.13.0", "react": "^16.12", "react-dom": "^16.12", - "typescript": "^4.0.5" + "typescript": "^4.1.6" } } diff --git a/src/components/icon/icon.test.tsx b/src/components/icon/icon.test.tsx index 43e706cfff..03faf02305 100644 --- a/src/components/icon/icon.test.tsx +++ b/src/components/icon/icon.test.tsx @@ -56,7 +56,7 @@ const prettyHtml = cheerio.load(''); function testIcon(props: PropsOf) { return () => { expect.assertions(1); - return new Promise((resolve) => { + return new Promise((resolve) => { const onIconLoad = () => { component.update(); expect(prettyHtml(component.html())).toMatchSnapshot(); diff --git a/src/components/selectable/selectable_templates/selectable_template_sitewide.tsx b/src/components/selectable/selectable_templates/selectable_template_sitewide.tsx index 258bac6ffc..a70540e78e 100644 --- a/src/components/selectable/selectable_templates/selectable_template_sitewide.tsx +++ b/src/components/selectable/selectable_templates/selectable_template_sitewide.tsx @@ -252,7 +252,7 @@ export const OuiSelectableTemplateSitewide: FunctionComponent), onFocus: searchOnFocus, onBlur: searchOnBlur, onInput: onSearchInput, diff --git a/src/components/suggest/suggest_item.tsx b/src/components/suggest/suggest_item.tsx index f8c1ffbfe8..b190c876e7 100644 --- a/src/components/suggest/suggest_item.tsx +++ b/src/components/suggest/suggest_item.tsx @@ -193,9 +193,9 @@ export const OuiSuggestItem: FunctionComponent = ({ if (onClick) { return ( ); diff --git a/yarn.lock b/yarn.lock index 6b73a41f4d..59c81f25cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16449,10 +16449,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" - integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== +typescript@4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" + integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow== unbox-primitive@^1.0.2: version "1.0.2" From 6da59ae67f429b1201921c575448dc57750a57cf Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:08 +0300 Subject: [PATCH 02/20] typescript bump: 4.2.4 Signed-off-by: Danila Gulderov --- i18ntokens.json | 8 ++++---- package.json | 4 ++-- .../pinnable_list_group/pinnable_list_group.tsx | 2 +- yarn.lock | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/i18ntokens.json b/i18ntokens.json index 893dd1cc09..e7621a5edc 100644 --- a/i18ntokens.json +++ b/i18ntokens.json @@ -2653,12 +2653,12 @@ "start": { "line": 143, "column": 4, - "index": 4714 + "index": 4700 }, "end": { "line": 148, "column": 44, - "index": 4899 + "index": 4885 } }, "filepath": "src/components/list_group/pinnable_list_group/pinnable_list_group.tsx" @@ -2671,12 +2671,12 @@ "start": { "line": 143, "column": 4, - "index": 4714 + "index": 4700 }, "end": { "line": 148, "column": 44, - "index": 4899 + "index": 4885 } }, "filepath": "src/components/list_group/pinnable_list_group/pinnable_list_group.tsx" diff --git a/package.json b/package.json index 7b6f59a962..71e74a3f51 100644 --- a/package.json +++ b/package.json @@ -243,7 +243,7 @@ "start-server-and-test": "^2.0.0", "style-loader": "^1.2.1", "terser-webpack-plugin": "^4.1.0", - "typescript": "4.1.6", + "typescript": "4.2.4", "url-loader": "^4.1.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", @@ -257,6 +257,6 @@ "moment": "^2.13.0", "react": "^16.12", "react-dom": "^16.12", - "typescript": "^4.1.6" + "typescript": "^4.2.4" } } diff --git a/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx b/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx index d08a1fa1a5..e4233d3c7f 100644 --- a/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx +++ b/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx @@ -115,7 +115,7 @@ export const OuiPinnableListGroup: FunctionComponent ); // Add the pinning action unless the item has it's own extra action - if (onPinClick && !itemProps.extraAction && pinnable) { + if (pinnable && !itemProps.extraAction) { // Different displays for pinned vs unpinned if (pinned) { itemProps.extraAction = { diff --git a/yarn.lock b/yarn.lock index 59c81f25cf..3cc93f1503 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16449,10 +16449,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" - integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow== +typescript@4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" + integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== unbox-primitive@^1.0.2: version "1.0.2" From 281aff073d43b32324b2a40dbbfb4d7298b0617f Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:08 +0300 Subject: [PATCH 03/20] typescript bump: 4.3.5 Signed-off-by: Danila Gulderov --- i18ntokens.json | 16 ++++++++-------- package.json | 4 ++-- .../datagrid/data_grid_inmemory_renderer.tsx | 6 +----- .../header/header_links/header_links.tsx | 7 +++---- yarn.lock | 8 ++++---- 5 files changed, 18 insertions(+), 23 deletions(-) diff --git a/i18ntokens.json b/i18ntokens.json index e7621a5edc..51d5c7ed53 100644 --- a/i18ntokens.json +++ b/i18ntokens.json @@ -2543,14 +2543,14 @@ "highlighting": "string", "loc": { "start": { - "line": 125, + "line": 124, "column": 4, - "index": 3690 + "index": 3665 }, "end": { - "line": 125, + "line": 124, "column": 75, - "index": 3761 + "index": 3736 } }, "filepath": "src/components/header/header_links/header_links.tsx" @@ -2561,14 +2561,14 @@ "highlighting": "string", "loc": { "start": { - "line": 138, + "line": 137, "column": 4, - "index": 4083 + "index": 4058 }, "end": { - "line": 138, + "line": 137, "column": 69, - "index": 4148 + "index": 4123 } }, "filepath": "src/components/header/header_links/header_links.tsx" diff --git a/package.json b/package.json index 71e74a3f51..b8405f7d10 100644 --- a/package.json +++ b/package.json @@ -243,7 +243,7 @@ "start-server-and-test": "^2.0.0", "style-loader": "^1.2.1", "terser-webpack-plugin": "^4.1.0", - "typescript": "4.2.4", + "typescript": "4.3.5", "url-loader": "^4.1.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", @@ -257,6 +257,6 @@ "moment": "^2.13.0", "react": "^16.12", "react-dom": "^16.12", - "typescript": "^4.2.4" + "typescript": "^4.3.5" } } diff --git a/src/components/datagrid/data_grid_inmemory_renderer.tsx b/src/components/datagrid/data_grid_inmemory_renderer.tsx index 92bedab0ed..5fb464db1a 100644 --- a/src/components/datagrid/data_grid_inmemory_renderer.tsx +++ b/src/components/datagrid/data_grid_inmemory_renderer.tsx @@ -56,11 +56,7 @@ export interface OuiDataGridInMemoryRendererProps { function noop() {} function getElementText(element: HTMLElement) { - return 'innerText' in element - ? element.innerText - : // (this line left here to satisfy Prettier since a ts-ignore is used on the next line) - // @ts-ignore TypeScript thinks element.innerText always exists, however it doesn't in jest/jsdom environment - element.textContent || undefined; + return 'innerText' in element ? element.innerText : element.textContent || ''; } export const OuiDataGridInMemoryRenderer: FunctionComponent = ({ diff --git a/src/components/header/header_links/header_links.tsx b/src/components/header/header_links/header_links.tsx index caf2de45e0..4624fcd5ee 100644 --- a/src/components/header/header_links/header_links.tsx +++ b/src/components/header/header_links/header_links.tsx @@ -95,16 +95,15 @@ export const OuiHeaderLinks: FunctionComponent = ({ popoverProps, ...rest }) => { - const { onClick: _onClick, iconType = 'apps', ...popoverButtonRest } = { - ...popoverButtonProps, - }; + const { onClick, iconType = 'apps', ...popoverButtonRest } = + popoverButtonProps || {}; const [mobileMenuIsOpen, setMobileMenuIsOpen] = useState(false); const onMenuButtonClick: MouseEventHandler< HTMLButtonElement & HTMLAnchorElement > = (e) => { - _onClick && _onClick(e); + onClick?.(e); setMobileMenuIsOpen(!mobileMenuIsOpen); }; diff --git a/yarn.lock b/yarn.lock index 3cc93f1503..21c6b91357 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16449,10 +16449,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" - integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== +typescript@4.3.5: + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== unbox-primitive@^1.0.2: version "1.0.2" From 94b257dde4df5c4b154c8c03eda4984c7fa89498 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:09 +0300 Subject: [PATCH 04/20] typescript bump: 4.4.4 Signed-off-by: Danila Gulderov --- package.json | 4 ++-- src-docs/src/components/guide_section/guide_section.tsx | 2 +- tsconfig.json | 3 +++ yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index b8405f7d10..170a53fe12 100644 --- a/package.json +++ b/package.json @@ -243,7 +243,7 @@ "start-server-and-test": "^2.0.0", "style-loader": "^1.2.1", "terser-webpack-plugin": "^4.1.0", - "typescript": "4.3.5", + "typescript": "4.4.4", "url-loader": "^4.1.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", @@ -257,6 +257,6 @@ "moment": "^2.13.0", "react": "^16.12", "react-dom": "^16.12", - "typescript": "^4.3.5" + "typescript": "^4.0.5" } } diff --git a/src-docs/src/components/guide_section/guide_section.tsx b/src-docs/src/components/guide_section/guide_section.tsx index 40dcb70055..04c685258f 100644 --- a/src-docs/src/components/guide_section/guide_section.tsx +++ b/src-docs/src/components/guide_section/guide_section.tsx @@ -135,7 +135,7 @@ export const GuideSection: FunctionComponent = ({ const isPlaygroundUnsupported = typeof window !== 'undefined' && typeof document !== 'undefined' && - !!window.MSInputMethodContext && + !!(window as any).MSInputMethodContext && // @ts-ignore doesn't exist? !!document.documentMode; diff --git a/tsconfig.json b/tsconfig.json index 54444a2ed5..9bad02c5e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,6 +40,9 @@ // Disallow inconsistently-cased references to the same file. "forceConsistentCasingInFileNames": true, + // Keep type of the variable in a catch clause as `any` + "useUnknownInCatchVariables": false, + // enables "core language features" "lib": [ // ESNext auto includes previous versions all the way back to es5 diff --git a/yarn.lock b/yarn.lock index 21c6b91357..75565c5fe5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16449,10 +16449,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== +typescript@4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== unbox-primitive@^1.0.2: version "1.0.2" From 32383d62e2bba78b9bfb3b4d97e39e920470038c Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:09 +0300 Subject: [PATCH 05/20] typescript bump: 4.5.5 Signed-off-by: Danila Gulderov --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 170a53fe12..c4e864fe68 100644 --- a/package.json +++ b/package.json @@ -243,7 +243,7 @@ "start-server-and-test": "^2.0.0", "style-loader": "^1.2.1", "terser-webpack-plugin": "^4.1.0", - "typescript": "4.4.4", + "typescript": "4.5.5", "url-loader": "^4.1.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", diff --git a/yarn.lock b/yarn.lock index 75565c5fe5..12758041b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16449,10 +16449,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.4.4: - version "4.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" - integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== +typescript@4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== unbox-primitive@^1.0.2: version "1.0.2" From a19f30968df307a006b60cc3475f4fae85805fcc Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:10 +0300 Subject: [PATCH 06/20] typescript bump: 4.6.4 Signed-off-by: Danila Gulderov --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c4e864fe68..d882ac64e1 100644 --- a/package.json +++ b/package.json @@ -243,7 +243,7 @@ "start-server-and-test": "^2.0.0", "style-loader": "^1.2.1", "terser-webpack-plugin": "^4.1.0", - "typescript": "4.5.5", + "typescript": "4.6.4", "url-loader": "^4.1.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", diff --git a/yarn.lock b/yarn.lock index 12758041b2..0f4d9f8bf4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16449,10 +16449,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.5.5: - version "4.5.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" - integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== +typescript@4.6.4: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== unbox-primitive@^1.0.2: version "1.0.2" From f4eea57f8d13b00637e82eb0d4b74299ca7f20ed Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:10 +0300 Subject: [PATCH 07/20] CHANGELOG.md updated Signed-off-by: Danila Gulderov --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62187429cc..4f2f175369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### 💥 Breaking Changes +- Upgraded to TypeScript v4.6.4 + ### Deprecations ### 🛡 Security From e8e7915001c5d1829b34375d13f4c83f4db789ee Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:10 +0300 Subject: [PATCH 08/20] bump typescript-eslint/eslint-plugin: 5.62.0 bump typescript-eslint/parser: 5.62.0 node 16 is required for typescript-eslint: 6.0.0 Signed-off-by: Danila Gulderov --- package.json | 4 +- yarn.lock | 201 +++++++++++++++++++++++++++++---------------------- 2 files changed, 117 insertions(+), 88 deletions(-) diff --git a/package.json b/package.json index d882ac64e1..303907976d 100644 --- a/package.json +++ b/package.json @@ -159,8 +159,8 @@ "@types/react-router-dom": "^5.3.3", "@types/url-parse": "^1.4.8", "@types/uuid": "^9.0.1", - "@typescript-eslint/eslint-plugin": "^4.8.1", - "@typescript-eslint/parser": "^4.8.1", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", "autoprefixer": "^9.8.6", "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.1.0", diff --git a/yarn.lock b/yarn.lock index 0f4d9f8bf4..a68f9eb617 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1309,6 +1309,18 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-config-kibana/-/eslint-config-kibana-0.15.0.tgz#a552793497cdfc1829c2f9b7cd7018eb008f1606" integrity sha1-pVJ5NJfN/Bgpwvm3zXAY6wCPFgY= +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" + integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== + "@eslint/eslintrc@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085" @@ -2312,7 +2324,7 @@ dependencies: jest-diff "^24.3.0" -"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5": +"@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5": version "7.0.6" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== @@ -2322,6 +2334,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json-schema@^7.0.9": + version "7.0.12" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -2497,6 +2514,11 @@ dependencies: "@types/node" "*" +"@types/semver@^7.3.12": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" + integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" @@ -2592,30 +2614,21 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769" - integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ== - dependencies: - "@typescript-eslint/experimental-utils" "4.8.1" - "@typescript-eslint/scope-manager" "4.8.1" - debug "^4.1.1" - functional-red-black-tree "^1.0.1" - regexpp "^3.0.0" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/experimental-utils@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d" - integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.8.1" - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/typescript-estree" "4.8.1" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" +"@typescript-eslint/eslint-plugin@^5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" + tsutils "^3.21.0" "@typescript-eslint/experimental-utils@^4.0.1": version "4.33.0" @@ -2629,15 +2642,15 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.1.tgz#4fe2fbdbb67485bafc4320b3ae91e34efe1219d1" - integrity sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw== +"@typescript-eslint/parser@^5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "4.8.1" - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/typescript-estree" "4.8.1" - debug "^4.1.1" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + debug "^4.3.4" "@typescript-eslint/scope-manager@4.33.0": version "4.33.0" @@ -2647,23 +2660,33 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" -"@typescript-eslint/scope-manager@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce" - integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ== +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/visitor-keys" "4.8.1" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + tsutils "^3.21.0" "@typescript-eslint/types@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/types@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222" - integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== "@typescript-eslint/typescript-estree@1.11.0": version "1.11.0" @@ -2686,19 +2709,32 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32" - integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ== +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/visitor-keys" "4.8.1" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + eslint-scope "^5.1.1" + semver "^7.3.7" "@typescript-eslint/visitor-keys@4.33.0": version "4.33.0" @@ -2708,13 +2744,13 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3" - integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ== +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "4.8.1" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -5660,7 +5696,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -6743,14 +6779,6 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" - integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -6759,13 +6787,6 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" - integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== - dependencies: - eslint-visitor-keys "^1.1.0" - eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -6795,6 +6816,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== +eslint-visitor-keys@^3.3.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" + integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== + eslint@^2.7.0, eslint@^7.10.0: version "7.10.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.10.0.tgz#494edb3e4750fb791133ca379e786a8f648c72b9" @@ -8236,6 +8262,11 @@ graceful-fs@^4.1.5, graceful-fs@^4.2.6: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + grouped-queue@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-2.0.0.tgz#a2c6713f2171e45db2c300a3a9d7c119d694dac8" @@ -11579,6 +11610,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -14198,7 +14234,7 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" -regexpp@^3.0.0, regexpp@^3.1.0: +regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== @@ -14935,7 +14971,7 @@ semver-truncate@^1.1.2: dependencies: semver "^5.3.0" -"semver@2 || 3 || 4 || 5", semver@5.4.1, semver@5.5.0, semver@7.0.0, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1, semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3: +"semver@2 || 3 || 4 || 5", semver@5.4.1, semver@5.5.0, semver@7.0.0, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1, semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.5.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== @@ -16325,13 +16361,6 @@ tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== - dependencies: - tslib "^1.8.1" - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" From c445087a4728af52e4fec5d102f40e085c561473 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:11 +0300 Subject: [PATCH 09/20] CHANGELOG.md update Signed-off-by: Danila Gulderov --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f2f175369..2121759e12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,12 @@ ## [Unreleased](https://github.com/opensearch-project/oui/tree/main) +- Bump @typescript-eslint/eslint-plugin to v5.62.0 ([#879](https://github.com/opensearch-project/oui/pull/879)) +- Bump @typescript-eslint/parser to v5.62.0 ([#879](https://github.com/opensearch-project/oui/pull/879)) + ### 💥 Breaking Changes -- Upgraded to TypeScript v4.6.4 +- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) ### Deprecations From cdc3344a3212fc7ce9f47ca808335ef2625e8c1c Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:11 +0300 Subject: [PATCH 10/20] move typescript update to regular section Signed-off-by: Danila Gulderov --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2121759e12..6d60b3b1d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,12 @@ ## [Unreleased](https://github.com/opensearch-project/oui/tree/main) +- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) - Bump @typescript-eslint/eslint-plugin to v5.62.0 ([#879](https://github.com/opensearch-project/oui/pull/879)) - Bump @typescript-eslint/parser to v5.62.0 ([#879](https://github.com/opensearch-project/oui/pull/879)) ### 💥 Breaking Changes -- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) - ### Deprecations ### 🛡 Security From 84d5c7e4ef289452826e067ba9bf569299016451 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:11 +0300 Subject: [PATCH 11/20] changelog message improvement Signed-off-by: Danila Gulderov --- CHANGELOG.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d60b3b1d4..f0a80bf072 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,6 @@ ## [Unreleased](https://github.com/opensearch-project/oui/tree/main) -- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) -- Bump @typescript-eslint/eslint-plugin to v5.62.0 ([#879](https://github.com/opensearch-project/oui/pull/879)) -- Bump @typescript-eslint/parser to v5.62.0 ([#879](https://github.com/opensearch-project/oui/pull/879)) - ### 💥 Breaking Changes ### Deprecations @@ -28,6 +24,8 @@ ### 🛠 Maintenance +- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) + ### 🪛 Refactoring ### 🔩 Tests From 8fba865d426631f2a555afb6790c0d7fa4760812 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 11:41:12 +0300 Subject: [PATCH 12/20] fix typings Signed-off-by: Danila Gulderov --- src/components/suggest/suggest_item.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/suggest/suggest_item.tsx b/src/components/suggest/suggest_item.tsx index b190c876e7..bfe07c7d9d 100644 --- a/src/components/suggest/suggest_item.tsx +++ b/src/components/suggest/suggest_item.tsx @@ -32,7 +32,6 @@ import React, { FunctionComponent, HTMLAttributes, ButtonHTMLAttributes, - MouseEventHandler, } from 'react'; import { CommonProps, ExclusiveUnion, keysOf } from '../common'; import classNames from 'classnames'; @@ -77,12 +76,7 @@ interface OuiSuggestItemPropsBase { } type PropsForDiv = Omit, 'onClick'>; -type PropsForButton = Omit< - ButtonHTMLAttributes, - 'onClick' | 'type' -> & { - onClick: MouseEventHandler | undefined; -}; +type PropsForButton = Omit, 'type'>; export type OuiSuggestItemProps = CommonProps & OuiSuggestItemPropsBase & @@ -194,8 +188,8 @@ export const OuiSuggestItem: FunctionComponent = ({ return ( ); From df82abe1248fb39df459af9c48512f6237de4a11 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Tue, 18 Jul 2023 14:38:45 +0300 Subject: [PATCH 13/20] cleanup useUnknownInCatchVariables Signed-off-by: Danila Gulderov --- src/components/markdown_editor/markdown_editor.tsx | 2 +- src/components/search_bar/query/default_syntax.ts | 4 +++- src/components/search_bar/search_bar.tsx | 6 +++++- tsconfig.json | 3 --- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/markdown_editor/markdown_editor.tsx b/src/components/markdown_editor/markdown_editor.tsx index 3b83e14228..ebec30f822 100644 --- a/src/components/markdown_editor/markdown_editor.tsx +++ b/src/components/markdown_editor/markdown_editor.tsx @@ -260,7 +260,7 @@ export const OuiMarkdownEditor = forwardRef< const parsed = parser.processSync(value); return [parsed, null]; } catch (e) { - return [null, e]; + return [null, e as OuiMarkdownParseError]; } }, [parser, value]); diff --git a/src/components/search_bar/query/default_syntax.ts b/src/components/search_bar/query/default_syntax.ts index 354855d244..d1474eeafb 100644 --- a/src/components/search_bar/query/default_syntax.ts +++ b/src/components/search_bar/query/default_syntax.ts @@ -353,8 +353,10 @@ const validateFieldValue = ( try { schemaField.validate(value); } catch (e) { + const message = e instanceof Error ? e.message : e; + error( - `Invalid value \`${expression}\` set for field \`${field}\` - ${e.message}`, + `Invalid value \`${expression}\` set for field \`${field}\` - ${message}`, location ); } diff --git a/src/components/search_bar/search_bar.tsx b/src/components/search_bar/search_bar.tsx index 57cacc6056..f18d91ebd2 100644 --- a/src/components/search_bar/search_bar.tsx +++ b/src/components/search_bar/search_bar.tsx @@ -189,7 +189,11 @@ export class OuiSearchBar extends Component { this.notifyControllingParent({ query, queryText, error: null }); this.setState({ query, queryText, error: null }); } catch (e) { - const error: Error = { name: e.name, message: e.message }; + const error: Error = + e instanceof Error + ? { name: e.name, message: e.message } + : { name: 'Unexpected error', message: String(e) }; + this.notifyControllingParent({ query: null, queryText, error }); this.setState({ queryText, error }); } diff --git a/tsconfig.json b/tsconfig.json index 9bad02c5e7..54444a2ed5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,9 +40,6 @@ // Disallow inconsistently-cased references to the same file. "forceConsistentCasingInFileNames": true, - // Keep type of the variable in a catch clause as `any` - "useUnknownInCatchVariables": false, - // enables "core language features" "lib": [ // ESNext auto includes previous versions all the way back to es5 From 18855530dd78615a82152fa0ace7febf62678534 Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Wed, 19 Jul 2023 10:12:31 +0300 Subject: [PATCH 14/20] logical or => nullish coalescing Signed-off-by: Danila Gulderov --- src/components/header/header_links/header_links.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/header/header_links/header_links.tsx b/src/components/header/header_links/header_links.tsx index 4624fcd5ee..643951a540 100644 --- a/src/components/header/header_links/header_links.tsx +++ b/src/components/header/header_links/header_links.tsx @@ -96,7 +96,7 @@ export const OuiHeaderLinks: FunctionComponent = ({ ...rest }) => { const { onClick, iconType = 'apps', ...popoverButtonRest } = - popoverButtonProps || {}; + popoverButtonProps ?? {}; const [mobileMenuIsOpen, setMobileMenuIsOpen] = useState(false); From ed34ef52637d9546670fdef4a2a89910feacaa4f Mon Sep 17 00:00:00 2001 From: Danila Gulderov Date: Thu, 20 Jul 2023 10:01:39 +0300 Subject: [PATCH 15/20] wrap with String Signed-off-by: Danila Gulderov --- src/components/search_bar/query/default_syntax.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/search_bar/query/default_syntax.ts b/src/components/search_bar/query/default_syntax.ts index d1474eeafb..176a2c35d1 100644 --- a/src/components/search_bar/query/default_syntax.ts +++ b/src/components/search_bar/query/default_syntax.ts @@ -353,7 +353,7 @@ const validateFieldValue = ( try { schemaField.validate(value); } catch (e) { - const message = e instanceof Error ? e.message : e; + const message = e instanceof Error ? e.message : String(e); error( `Invalid value \`${expression}\` set for field \`${field}\` - ${message}`, From 1450d66fc30273405acc875d8df8bcd37d34c9df Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 27 Sep 2023 16:17:20 -0700 Subject: [PATCH 16/20] Update CHANGELOG.md Move CHANGELOG entry to the unreleased section Signed-off-by: Miki --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 601e5ee858..8469381fcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ ### 🛠 Maintenance - Update caniuse database ([#1046](https://github.com/opensearch-project/oui/pull/1046)) +- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) ### 🪛 Refactoring @@ -74,7 +75,6 @@ ### 🛠 Maintenance -- Bump TypeScript to v4.6.4 ([#879](https://github.com/opensearch-project/oui/pull/879)) - [CVE-2023-26136] Add resolution for tough-cookie to ^4.1.3 ([#889](https://github.com/opensearch-project/oui/pull/889)) - [CVE-2023-26115] Bump word-wrap from 1.2.3 to 1.2.4 ([#891](https://github.com/opensearch-project/oui/pull/891)) - Bump Node version to 18.16.0 ([#900](https://github.com/opensearch-project/oui/pull/900)) From dbfb6b4268558468f49627bfcb5b71e96c63dbbd Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 27 Sep 2023 16:25:23 -0700 Subject: [PATCH 17/20] Add back `onPinClick` check in `OuiPinnableListGroup` Update pinnable_list_group.tsx Signed-off-by: Miki --- .../list_group/pinnable_list_group/pinnable_list_group.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx b/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx index e4233d3c7f..8dfcd677c4 100644 --- a/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx +++ b/src/components/list_group/pinnable_list_group/pinnable_list_group.tsx @@ -132,8 +132,8 @@ export const OuiPinnableListGroup: FunctionComponent 'aria-label': pinTitle ? pinTitle(item) : pinExtraActionLabel, }; } - // Return the item on click - itemProps.extraAction.onClick = () => onPinClick(item); + // On click, return the item + if (onPinClick) itemProps.extraAction.onClick = () => onPinClick(item); } return itemProps; From 23dde588f0afefd4240e3783eeebb7e9cf2f08ad Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 27 Sep 2023 16:29:47 -0700 Subject: [PATCH 18/20] Enhance error message extraction in `validateFieldValue` Update default_syntax.ts Signed-off-by: Miki --- src/components/search_bar/query/default_syntax.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/search_bar/query/default_syntax.ts b/src/components/search_bar/query/default_syntax.ts index 176a2c35d1..de585cf39b 100644 --- a/src/components/search_bar/query/default_syntax.ts +++ b/src/components/search_bar/query/default_syntax.ts @@ -353,10 +353,11 @@ const validateFieldValue = ( try { schemaField.validate(value); } catch (e) { - const message = e instanceof Error ? e.message : String(e); + // While e.message is the normal convention, it is optional. e.code and e.name are checked for completeness + const message = (e instanceof Error ? e.message || e.code || e.name : String(e))?.trim(); error( - `Invalid value \`${expression}\` set for field \`${field}\` - ${message}`, + `Invalid value \`${expression}\` set for field \`${field}\`${message ? ` - ${message}` : '' }`, location ); } From 2c4d894d08f9b2f836731c2a4c8074b613fd0d27 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 27 Sep 2023 16:37:37 -0700 Subject: [PATCH 19/20] Remove e.code from default_syntax.ts Update default_syntax.ts Signed-off-by: Miki --- src/components/search_bar/query/default_syntax.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/search_bar/query/default_syntax.ts b/src/components/search_bar/query/default_syntax.ts index de585cf39b..8e950729cb 100644 --- a/src/components/search_bar/query/default_syntax.ts +++ b/src/components/search_bar/query/default_syntax.ts @@ -353,8 +353,8 @@ const validateFieldValue = ( try { schemaField.validate(value); } catch (e) { - // While e.message is the normal convention, it is optional. e.code and e.name are checked for completeness - const message = (e instanceof Error ? e.message || e.code || e.name : String(e))?.trim(); + // While e.message is the normal convention, it is optional. e.name is used for completeness + const message = (e instanceof Error ? e.message || e.name : String(e))?.trim(); error( `Invalid value \`${expression}\` set for field \`${field}\`${message ? ` - ${message}` : '' }`, From 4be4cbba4937b8bd4363dfd7e8cdbbedb513fe89 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 27 Sep 2023 16:46:34 -0700 Subject: [PATCH 20/20] Lint default_syntax.ts Signed-off-by: Miki --- src/components/search_bar/query/default_syntax.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/search_bar/query/default_syntax.ts b/src/components/search_bar/query/default_syntax.ts index 8e950729cb..6f8ed3d727 100644 --- a/src/components/search_bar/query/default_syntax.ts +++ b/src/components/search_bar/query/default_syntax.ts @@ -354,10 +354,15 @@ const validateFieldValue = ( schemaField.validate(value); } catch (e) { // While e.message is the normal convention, it is optional. e.name is used for completeness - const message = (e instanceof Error ? e.message || e.name : String(e))?.trim(); + const message = (e instanceof Error + ? e.message || e.name + : String(e) + )?.trim(); error( - `Invalid value \`${expression}\` set for field \`${field}\`${message ? ` - ${message}` : '' }`, + `Invalid value \`${expression}\` set for field \`${field}\`${ + message ? ` - ${message}` : '' + }`, location ); }