Skip to content

Commit 5febc26

Browse files
authored
dev: Update TS fomr 4.9.5 -> ~5.7.3 (#3647)
1 parent 54d7404 commit 5febc26

File tree

6 files changed

+109
-103
lines changed

6 files changed

+109
-103
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@
129129
"@types/react-modal": "^3.16.2",
130130
"@types/react-router-dom": "^5.3.3",
131131
"@types/semver": "^7",
132-
"@typescript-eslint/eslint-plugin": "^8.14.0",
133-
"@typescript-eslint/parser": "^8.14.0",
132+
"@typescript-eslint/eslint-plugin": "^8.19.1",
133+
"@typescript-eslint/parser": "^8.19.1",
134+
"@typescript-eslint/utils": "^8.19.1",
134135
"@vitejs/plugin-legacy": "^6.0.0",
135136
"@vitejs/plugin-react": "^4.3.4",
136137
"@vitest/coverage-istanbul": "^2.1.8",
@@ -162,7 +163,7 @@
162163
"storybook": "^8.4.7",
163164
"tailwindcss": "^3.4.4",
164165
"terser": "^5.34.1",
165-
"typescript": "^4.9.5",
166+
"typescript": "~5.7.3",
166167
"vite": "^6.0.6",
167168
"vite-plugin-ejs": "^1.7.0",
168169
"vite-plugin-svgr": "^4.3.0",

src/pages/RepoPage/context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createContext, useContext, useMemo, useState } from 'react'
22
import { useParams } from 'react-router-dom'
33

4-
type Breadcrumb = {
4+
export type Breadcrumb = {
55
pageName: string
66
text?: string
77
children?: JSX.Element

src/shared/AppLink/AppLink.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ function useCompleteProps(
3131
) {
3232
const path = pageConfig?.path(options)
3333

34-
const propsLink = pageConfig?.isExternalLink ? { href: path } : { to: path }
34+
const propsLink = pageConfig?.isExternalLink
35+
? { href: path }
36+
: Component === 'a'
37+
? { href: path }
38+
: { to: path || '/' }
39+
3540
const propsTarget = pageConfig?.openNewTab ? { target: '_blank' } : {}
36-
const propsActive =
37-
Component === NavLink
38-
? {
39-
activeClassName,
40-
}
41-
: {}
41+
const propsActive = Component === NavLink ? { activeClassName } : {}
4242

4343
return {
4444
...propsLink,
@@ -91,9 +91,9 @@ const AppLink = forwardRef<HTMLAnchorElement, AppLinkProps>(
9191
)
9292

9393
if (!pageConfig) return null
94-
9594
return (
9695
<Component
96+
to={pageConfig.path}
9797
/*
9898
data-cy: hook for cypress tests
9999
data-marketing: hook for marketing tools

src/ui/Breadcrumb/Breadcrumb.jsx renamed to src/ui/Breadcrumb/Breadcrumb.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import defaultTo from 'lodash/defaultTo'
2-
import PropTypes from 'prop-types'
32
import { Fragment } from 'react'
43

5-
import AppLink from 'shared/AppLink'
4+
import { Breadcrumb as BreadcrumbType } from 'pages/RepoPage/context'
65
import { cn } from 'shared/utils/cn'
76
import A from 'ui/A'
87

9-
function Breadcrumb({ paths = [], largeFont = false }) {
8+
interface BreadcrumbProps {
9+
paths?: BreadcrumbType[]
10+
largeFont?: boolean
11+
}
12+
13+
function Breadcrumb({ paths = [], largeFont = false }: BreadcrumbProps) {
1014
return (
1115
// space-x-1 doesn't work when text is rendered rtl, using margins
1216
<nav
@@ -23,7 +27,9 @@ function Breadcrumb({ paths = [], largeFont = false }) {
2327
{defaultTo(to.children, to.text)}
2428
</span>
2529
) : (
26-
<A to={to}>{defaultTo(to.children, to.text)}</A>
30+
<A to={to} hook={undefined} isExternal={false}>
31+
{defaultTo(to.children, to.text)}
32+
</A>
2733
)}
2834

2935
{i !== paths.length - 1 && <span>/</span>}
@@ -35,8 +41,3 @@ function Breadcrumb({ paths = [], largeFont = false }) {
3541
}
3642

3743
export default Breadcrumb
38-
39-
Breadcrumb.propTypes = {
40-
paths: PropTypes.arrayOf(PropTypes.shape(AppLink.propTypes)),
41-
largeFont: PropTypes.bool,
42-
}

yarn.lock

Lines changed: 86 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -5821,44 +5821,40 @@ __metadata:
58215821
languageName: node
58225822
linkType: hard
58235823

5824-
"@typescript-eslint/eslint-plugin@npm:^8.14.0":
5825-
version: 8.14.0
5826-
resolution: "@typescript-eslint/eslint-plugin@npm:8.14.0"
5824+
"@typescript-eslint/eslint-plugin@npm:^8.19.1":
5825+
version: 8.19.1
5826+
resolution: "@typescript-eslint/eslint-plugin@npm:8.19.1"
58275827
dependencies:
58285828
"@eslint-community/regexpp": "npm:^4.10.0"
5829-
"@typescript-eslint/scope-manager": "npm:8.14.0"
5830-
"@typescript-eslint/type-utils": "npm:8.14.0"
5831-
"@typescript-eslint/utils": "npm:8.14.0"
5832-
"@typescript-eslint/visitor-keys": "npm:8.14.0"
5829+
"@typescript-eslint/scope-manager": "npm:8.19.1"
5830+
"@typescript-eslint/type-utils": "npm:8.19.1"
5831+
"@typescript-eslint/utils": "npm:8.19.1"
5832+
"@typescript-eslint/visitor-keys": "npm:8.19.1"
58335833
graphemer: "npm:^1.4.0"
58345834
ignore: "npm:^5.3.1"
58355835
natural-compare: "npm:^1.4.0"
5836-
ts-api-utils: "npm:^1.3.0"
5836+
ts-api-utils: "npm:^2.0.0"
58375837
peerDependencies:
58385838
"@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0
58395839
eslint: ^8.57.0 || ^9.0.0
5840-
peerDependenciesMeta:
5841-
typescript:
5842-
optional: true
5843-
checksum: 10c0/46c82eb45be82ffec0ab04728a5180691b1d17002c669864861a3044b6d2105a75ca23cc80d18721b40b5e7dff1eff4ed68a43d726e25d55f3e466a9fbeeb873
5840+
typescript: ">=4.8.4 <5.8.0"
5841+
checksum: 10c0/993784b04533b13c3f3919c793cfc3a369fa61692e1a2d72de6fba27df247c275d852cdcbc4e393c310b73fce8d34d210a9b632b66f4d761a1a3b4781f8fa93f
58445842
languageName: node
58455843
linkType: hard
58465844

5847-
"@typescript-eslint/parser@npm:^8.14.0":
5848-
version: 8.14.0
5849-
resolution: "@typescript-eslint/parser@npm:8.14.0"
5845+
"@typescript-eslint/parser@npm:^8.19.1":
5846+
version: 8.19.1
5847+
resolution: "@typescript-eslint/parser@npm:8.19.1"
58505848
dependencies:
5851-
"@typescript-eslint/scope-manager": "npm:8.14.0"
5852-
"@typescript-eslint/types": "npm:8.14.0"
5853-
"@typescript-eslint/typescript-estree": "npm:8.14.0"
5854-
"@typescript-eslint/visitor-keys": "npm:8.14.0"
5849+
"@typescript-eslint/scope-manager": "npm:8.19.1"
5850+
"@typescript-eslint/types": "npm:8.19.1"
5851+
"@typescript-eslint/typescript-estree": "npm:8.19.1"
5852+
"@typescript-eslint/visitor-keys": "npm:8.19.1"
58555853
debug: "npm:^4.3.4"
58565854
peerDependencies:
58575855
eslint: ^8.57.0 || ^9.0.0
5858-
peerDependenciesMeta:
5859-
typescript:
5860-
optional: true
5861-
checksum: 10c0/522b7afd25cd302c0510cc71985ba55ff92ecc5dbe3fc74a76fefea0169252fdd4b8cad6291fef05f63dfc173951af450dca20859c7f23e387b2e7410e8b97b1
5856+
typescript: ">=4.8.4 <5.8.0"
5857+
checksum: 10c0/1afbd2d0a25f439943bdc94637417429574eb3889a2a1ce24bd425721713aca213808a975bb518a6616171783bc04fa973167f05fc6a96cfd88c1d1666077ad4
58625858
languageName: node
58635859
linkType: hard
58645860

@@ -5872,28 +5868,28 @@ __metadata:
58725868
languageName: node
58735869
linkType: hard
58745870

5875-
"@typescript-eslint/scope-manager@npm:8.14.0":
5876-
version: 8.14.0
5877-
resolution: "@typescript-eslint/scope-manager@npm:8.14.0"
5871+
"@typescript-eslint/scope-manager@npm:8.19.1":
5872+
version: 8.19.1
5873+
resolution: "@typescript-eslint/scope-manager@npm:8.19.1"
58785874
dependencies:
5879-
"@typescript-eslint/types": "npm:8.14.0"
5880-
"@typescript-eslint/visitor-keys": "npm:8.14.0"
5881-
checksum: 10c0/1e1295c6f9febadf63559aad328b23d960510ce6b4c9f74e10d881c3858fa7f1db767cd1af5272d2fe7c9c5c7daebee71854e6f841e413e5d70af282f6616e26
5875+
"@typescript-eslint/types": "npm:8.19.1"
5876+
"@typescript-eslint/visitor-keys": "npm:8.19.1"
5877+
checksum: 10c0/7dca0c28ad27a0c7e26499e0f584f98efdcf34087f46aadc661b36c310484b90655e83818bafd249b5a28c7094a69c54d553f6cd403869bf134f95a9148733f5
58825878
languageName: node
58835879
linkType: hard
58845880

5885-
"@typescript-eslint/type-utils@npm:8.14.0":
5886-
version: 8.14.0
5887-
resolution: "@typescript-eslint/type-utils@npm:8.14.0"
5881+
"@typescript-eslint/type-utils@npm:8.19.1":
5882+
version: 8.19.1
5883+
resolution: "@typescript-eslint/type-utils@npm:8.19.1"
58885884
dependencies:
5889-
"@typescript-eslint/typescript-estree": "npm:8.14.0"
5890-
"@typescript-eslint/utils": "npm:8.14.0"
5885+
"@typescript-eslint/typescript-estree": "npm:8.19.1"
5886+
"@typescript-eslint/utils": "npm:8.19.1"
58915887
debug: "npm:^4.3.4"
5892-
ts-api-utils: "npm:^1.3.0"
5893-
peerDependenciesMeta:
5894-
typescript:
5895-
optional: true
5896-
checksum: 10c0/42616a664b38ca418e13504247e5e1bad6ae85c045b48e5735ffab977d4bd58cc86fb9d2292bbb314fa408d78d4b0454c3a27dbf9f881f9921917a942825c806
5888+
ts-api-utils: "npm:^2.0.0"
5889+
peerDependencies:
5890+
eslint: ^8.57.0 || ^9.0.0
5891+
typescript: ">=4.8.4 <5.8.0"
5892+
checksum: 10c0/757592b515beec58c079c605aa648ba94d985ae48ba40460034e849c7bc2b603b1da6113e59688e284608c9d5ccaa27adf0a14fb032cb1782200c6acae51ddd2
58975893
languageName: node
58985894
linkType: hard
58995895

@@ -5904,10 +5900,10 @@ __metadata:
59045900
languageName: node
59055901
linkType: hard
59065902

5907-
"@typescript-eslint/types@npm:8.14.0":
5908-
version: 8.14.0
5909-
resolution: "@typescript-eslint/types@npm:8.14.0"
5910-
checksum: 10c0/7707f900e24e60e6780c5705f69627b7c0ef912cb3b095dfc8f4a0c84e866c66b1c4c10278cf99724560dc66985ec640750c4192786a09b853f9bb4c3ca5a7ce
5903+
"@typescript-eslint/types@npm:8.19.1":
5904+
version: 8.19.1
5905+
resolution: "@typescript-eslint/types@npm:8.19.1"
5906+
checksum: 10c0/e907bf096d5ed7a812a1e537a98dd881ab5d2d47e072225bfffaa218c1433115a148b27a15744db8374b46dac721617c6d13a1da255fdeb369cf193416533f6e
59115907
languageName: node
59125908
linkType: hard
59135909

@@ -5929,36 +5925,36 @@ __metadata:
59295925
languageName: node
59305926
linkType: hard
59315927

5932-
"@typescript-eslint/typescript-estree@npm:8.14.0":
5933-
version: 8.14.0
5934-
resolution: "@typescript-eslint/typescript-estree@npm:8.14.0"
5928+
"@typescript-eslint/typescript-estree@npm:8.19.1":
5929+
version: 8.19.1
5930+
resolution: "@typescript-eslint/typescript-estree@npm:8.19.1"
59355931
dependencies:
5936-
"@typescript-eslint/types": "npm:8.14.0"
5937-
"@typescript-eslint/visitor-keys": "npm:8.14.0"
5932+
"@typescript-eslint/types": "npm:8.19.1"
5933+
"@typescript-eslint/visitor-keys": "npm:8.19.1"
59385934
debug: "npm:^4.3.4"
59395935
fast-glob: "npm:^3.3.2"
59405936
is-glob: "npm:^4.0.3"
59415937
minimatch: "npm:^9.0.4"
59425938
semver: "npm:^7.6.0"
5943-
ts-api-utils: "npm:^1.3.0"
5944-
peerDependenciesMeta:
5945-
typescript:
5946-
optional: true
5947-
checksum: 10c0/5e890d22bd067095f871cf144907a8c302db5b5f014c58906ad58d7f23569951cba805042eac6844744e5abb0d3648c9cc221a91b0703da0a8d6345dc1f83e74
5939+
ts-api-utils: "npm:^2.0.0"
5940+
peerDependencies:
5941+
typescript: ">=4.8.4 <5.8.0"
5942+
checksum: 10c0/549d9d565a58a25fc8397a555506f2e8d29a740f5b6ed9105479e22de5aab89d9d535959034a8e9d4115adb435de09ee6987d28e8922052eea577842ddce1a7a
59485943
languageName: node
59495944
linkType: hard
59505945

5951-
"@typescript-eslint/utils@npm:8.14.0":
5952-
version: 8.14.0
5953-
resolution: "@typescript-eslint/utils@npm:8.14.0"
5946+
"@typescript-eslint/utils@npm:8.19.1, @typescript-eslint/utils@npm:^8.19.1":
5947+
version: 8.19.1
5948+
resolution: "@typescript-eslint/utils@npm:8.19.1"
59545949
dependencies:
59555950
"@eslint-community/eslint-utils": "npm:^4.4.0"
5956-
"@typescript-eslint/scope-manager": "npm:8.14.0"
5957-
"@typescript-eslint/types": "npm:8.14.0"
5958-
"@typescript-eslint/typescript-estree": "npm:8.14.0"
5951+
"@typescript-eslint/scope-manager": "npm:8.19.1"
5952+
"@typescript-eslint/types": "npm:8.19.1"
5953+
"@typescript-eslint/typescript-estree": "npm:8.19.1"
59595954
peerDependencies:
59605955
eslint: ^8.57.0 || ^9.0.0
5961-
checksum: 10c0/1fcc2651d870832a799a5d1c85fc9421853508a006d6a6073c8316b012489dda77e123d13aea8f53eb9030a2da2c0eb273a6946a9941caa2519b99b33e89b720
5956+
typescript: ">=4.8.4 <5.8.0"
5957+
checksum: 10c0/f7d2fe9a2bd8cb3ae6fafe5e465882a6784b2acf81d43d194c579381b92651c2ffc0fca69d2a35eee119f539622752a0e9ec063aaec7576d5d2bfe68b441980d
59625958
languageName: node
59635959
linkType: hard
59645960

@@ -5990,13 +5986,13 @@ __metadata:
59905986
languageName: node
59915987
linkType: hard
59925988

5993-
"@typescript-eslint/visitor-keys@npm:8.14.0":
5994-
version: 8.14.0
5995-
resolution: "@typescript-eslint/visitor-keys@npm:8.14.0"
5989+
"@typescript-eslint/visitor-keys@npm:8.19.1":
5990+
version: 8.19.1
5991+
resolution: "@typescript-eslint/visitor-keys@npm:8.19.1"
59965992
dependencies:
5997-
"@typescript-eslint/types": "npm:8.14.0"
5998-
eslint-visitor-keys: "npm:^3.4.3"
5999-
checksum: 10c0/d0faf70ed9ecff5e36694bbb161a90bea6db59e0e79a7d4f264d67d565c12b13733d664b736b2730935f013c87ce3155cea954a533d28e99987681bc5f6259c3
5993+
"@typescript-eslint/types": "npm:8.19.1"
5994+
eslint-visitor-keys: "npm:^4.2.0"
5995+
checksum: 10c0/117537450a099f51f3f0d39186f248ae370bdc1b7f6975dbdbffcfc89e6e1aa47c1870db790d4f778a48f2c1f6cd9c269b63867c12afaa424367c63dabee8fd0
60005996
languageName: node
60015997
linkType: hard
60025998

@@ -8595,6 +8591,13 @@ __metadata:
85958591
languageName: node
85968592
linkType: hard
85978593

8594+
"eslint-visitor-keys@npm:^4.2.0":
8595+
version: 4.2.0
8596+
resolution: "eslint-visitor-keys@npm:4.2.0"
8597+
checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269
8598+
languageName: node
8599+
linkType: hard
8600+
85988601
"eslint@npm:^8.57.1":
85998602
version: 8.57.1
86008603
resolution: "eslint@npm:8.57.1"
@@ -9109,8 +9112,9 @@ __metadata:
91099112
"@types/react-modal": "npm:^3.16.2"
91109113
"@types/react-router-dom": "npm:^5.3.3"
91119114
"@types/semver": "npm:^7"
9112-
"@typescript-eslint/eslint-plugin": "npm:^8.14.0"
9113-
"@typescript-eslint/parser": "npm:^8.14.0"
9115+
"@typescript-eslint/eslint-plugin": "npm:^8.19.1"
9116+
"@typescript-eslint/parser": "npm:^8.19.1"
9117+
"@typescript-eslint/utils": "npm:^8.19.1"
91149118
"@vitejs/plugin-legacy": "npm:^6.0.0"
91159119
"@vitejs/plugin-react": "npm:^4.3.4"
91169120
"@vitest/coverage-istanbul": "npm:^2.1.8"
@@ -9180,7 +9184,7 @@ __metadata:
91809184
tailwind-merge: "npm:^2.3.0"
91819185
tailwindcss: "npm:^3.4.4"
91829186
terser: "npm:^5.34.1"
9183-
typescript: "npm:^4.9.5"
9187+
typescript: "npm:~5.7.3"
91849188
vite: "npm:^6.0.6"
91859189
vite-plugin-ejs: "npm:^1.7.0"
91869190
vite-plugin-svgr: "npm:^4.3.0"
@@ -14060,12 +14064,12 @@ __metadata:
1406014064
languageName: node
1406114065
linkType: hard
1406214066

14063-
"ts-api-utils@npm:^1.3.0":
14064-
version: 1.4.0
14065-
resolution: "ts-api-utils@npm:1.4.0"
14067+
"ts-api-utils@npm:^2.0.0":
14068+
version: 2.0.0
14069+
resolution: "ts-api-utils@npm:2.0.0"
1406614070
peerDependencies:
14067-
typescript: ">=4.2.0"
14068-
checksum: 10c0/1b2bfa50ea52771d564bb143bb69010d25cda03ed573095fbac9b86f717012426443af6647e00e3db70fca60360482a30c1be7cf73c3521c321f6bf5e3594ea0
14071+
typescript: ">=4.8.4"
14072+
checksum: 10c0/6165e29a5b75bd0218e3cb0f9ee31aa893dbd819c2e46dbb086c841121eb0436ed47c2c18a20cb3463d74fd1fb5af62e2604ba5971cc48e5b38ebbdc56746dfc
1406914073
languageName: node
1407014074
linkType: hard
1407114075

@@ -14262,23 +14266,23 @@ __metadata:
1426214266
languageName: node
1426314267
linkType: hard
1426414268

14265-
"typescript@npm:^4.9.5":
14266-
version: 4.9.5
14267-
resolution: "typescript@npm:4.9.5"
14269+
"typescript@npm:~5.7.3":
14270+
version: 5.7.3
14271+
resolution: "typescript@npm:5.7.3"
1426814272
bin:
1426914273
tsc: bin/tsc
1427014274
tsserver: bin/tsserver
14271-
checksum: 10c0/5f6cad2e728a8a063521328e612d7876e12f0d8a8390d3b3aaa452a6a65e24e9ac8ea22beb72a924fd96ea0a49ea63bb4e251fb922b12eedfb7f7a26475e5c56
14275+
checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa
1427214276
languageName: node
1427314277
linkType: hard
1427414278

14275-
"typescript@patch:typescript@npm%3A^4.9.5#optional!builtin<compat/typescript>":
14276-
version: 4.9.5
14277-
resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin<compat/typescript>::version=4.9.5&hash=289587"
14279+
"typescript@patch:typescript@npm%3A~5.7.3#optional!builtin<compat/typescript>":
14280+
version: 5.7.3
14281+
resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin<compat/typescript>::version=5.7.3&hash=5786d5"
1427814282
bin:
1427914283
tsc: bin/tsc
1428014284
tsserver: bin/tsserver
14281-
checksum: 10c0/e3333f887c6829dfe0ab6c1dbe0dd1e3e2aeb56c66460cb85c5440c566f900c833d370ca34eb47558c0c69e78ced4bfe09b8f4f98b6de7afed9b84b8d1dd06a1
14285+
checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4
1428214286
languageName: node
1428314287
linkType: hard
1428414288

0 commit comments

Comments
 (0)