Skip to content
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

dev: Update TS from 4.9.5 -> ~5.7.3 #3647

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@
"@types/react-modal": "^3.16.2",
"@types/react-router-dom": "^5.3.3",
"@types/semver": "^7",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"@typescript-eslint/utils": "^8.19.1",
"@vitejs/plugin-legacy": "^6.0.0",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/coverage-istanbul": "^2.1.8",
Expand Down Expand Up @@ -162,7 +163,7 @@
"storybook": "^8.4.7",
"tailwindcss": "^3.4.4",
"terser": "^5.34.1",
"typescript": "^4.9.5",
"typescript": "~5.7.3",
"vite": "^6.0.6",
"vite-plugin-ejs": "^1.7.0",
"vite-plugin-svgr": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RepoPage/context.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createContext, useContext, useMemo, useState } from 'react'
import { useParams } from 'react-router-dom'

type Breadcrumb = {
export type Breadcrumb = {
pageName: string
text?: string
children?: JSX.Element
Expand Down
16 changes: 8 additions & 8 deletions src/shared/AppLink/AppLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ function useCompleteProps(
) {
const path = pageConfig?.path(options)

const propsLink = pageConfig?.isExternalLink ? { href: path } : { to: path }
const propsLink = pageConfig?.isExternalLink
? { href: path }
: Component === 'a'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a" link wasn't accounted for previously, now it is

? { href: path }
: { to: path || '/' }

const propsTarget = pageConfig?.openNewTab ? { target: '_blank' } : {}
const propsActive =
Component === NavLink
? {
activeClassName,
}
: {}
const propsActive = Component === NavLink ? { activeClassName } : {}

return {
...propsLink,
Expand Down Expand Up @@ -91,9 +91,9 @@ const AppLink = forwardRef<HTMLAnchorElement, AppLinkProps>(
)

if (!pageConfig) return null

return (
<Component
to={pageConfig.path}
/*
data-cy: hook for cypress tests
data-marketing: hook for marketing tools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import defaultTo from 'lodash/defaultTo'
import PropTypes from 'prop-types'
import { Fragment } from 'react'

import AppLink from 'shared/AppLink'
import { Breadcrumb as BreadcrumbType } from 'pages/RepoPage/context'
import { cn } from 'shared/utils/cn'
import A from 'ui/A'

function Breadcrumb({ paths = [], largeFont = false }) {
interface BreadcrumbProps {
paths?: BreadcrumbType[]
largeFont?: boolean
}

function Breadcrumb({ paths = [], largeFont = false }: BreadcrumbProps) {
return (
// space-x-1 doesn't work when text is rendered rtl, using margins
<nav
Expand All @@ -23,7 +27,9 @@ function Breadcrumb({ paths = [], largeFont = false }) {
{defaultTo(to.children, to.text)}
</span>
) : (
<A to={to}>{defaultTo(to.children, to.text)}</A>
<A to={to} hook={undefined} isExternal={false}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just set these to undefined to preserve original behavior

{defaultTo(to.children, to.text)}
</A>
)}

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

export default Breadcrumb

Breadcrumb.propTypes = {
paths: PropTypes.arrayOf(PropTypes.shape(AppLink.propTypes)),
largeFont: PropTypes.bool,
}
168 changes: 86 additions & 82 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5821,44 +5821,40 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/eslint-plugin@npm:8.14.0"
"@typescript-eslint/eslint-plugin@npm:^8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/eslint-plugin@npm:8.19.1"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:8.14.0"
"@typescript-eslint/type-utils": "npm:8.14.0"
"@typescript-eslint/utils": "npm:8.14.0"
"@typescript-eslint/visitor-keys": "npm:8.14.0"
"@typescript-eslint/scope-manager": "npm:8.19.1"
"@typescript-eslint/type-utils": "npm:8.19.1"
"@typescript-eslint/utils": "npm:8.19.1"
"@typescript-eslint/visitor-keys": "npm:8.19.1"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
ts-api-utils: "npm:^1.3.0"
ts-api-utils: "npm:^2.0.0"
peerDependencies:
"@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/46c82eb45be82ffec0ab04728a5180691b1d17002c669864861a3044b6d2105a75ca23cc80d18721b40b5e7dff1eff4ed68a43d726e25d55f3e466a9fbeeb873
typescript: ">=4.8.4 <5.8.0"
checksum: 10c0/993784b04533b13c3f3919c793cfc3a369fa61692e1a2d72de6fba27df247c275d852cdcbc4e393c310b73fce8d34d210a9b632b66f4d761a1a3b4781f8fa93f
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/parser@npm:8.14.0"
"@typescript-eslint/parser@npm:^8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/parser@npm:8.19.1"
dependencies:
"@typescript-eslint/scope-manager": "npm:8.14.0"
"@typescript-eslint/types": "npm:8.14.0"
"@typescript-eslint/typescript-estree": "npm:8.14.0"
"@typescript-eslint/visitor-keys": "npm:8.14.0"
"@typescript-eslint/scope-manager": "npm:8.19.1"
"@typescript-eslint/types": "npm:8.19.1"
"@typescript-eslint/typescript-estree": "npm:8.19.1"
"@typescript-eslint/visitor-keys": "npm:8.19.1"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/522b7afd25cd302c0510cc71985ba55ff92ecc5dbe3fc74a76fefea0169252fdd4b8cad6291fef05f63dfc173951af450dca20859c7f23e387b2e7410e8b97b1
typescript: ">=4.8.4 <5.8.0"
checksum: 10c0/1afbd2d0a25f439943bdc94637417429574eb3889a2a1ce24bd425721713aca213808a975bb518a6616171783bc04fa973167f05fc6a96cfd88c1d1666077ad4
languageName: node
linkType: hard

Expand All @@ -5872,28 +5868,28 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/scope-manager@npm:8.14.0"
"@typescript-eslint/scope-manager@npm:8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/scope-manager@npm:8.19.1"
dependencies:
"@typescript-eslint/types": "npm:8.14.0"
"@typescript-eslint/visitor-keys": "npm:8.14.0"
checksum: 10c0/1e1295c6f9febadf63559aad328b23d960510ce6b4c9f74e10d881c3858fa7f1db767cd1af5272d2fe7c9c5c7daebee71854e6f841e413e5d70af282f6616e26
"@typescript-eslint/types": "npm:8.19.1"
"@typescript-eslint/visitor-keys": "npm:8.19.1"
checksum: 10c0/7dca0c28ad27a0c7e26499e0f584f98efdcf34087f46aadc661b36c310484b90655e83818bafd249b5a28c7094a69c54d553f6cd403869bf134f95a9148733f5
languageName: node
linkType: hard

"@typescript-eslint/type-utils@npm:8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/type-utils@npm:8.14.0"
"@typescript-eslint/type-utils@npm:8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/type-utils@npm:8.19.1"
dependencies:
"@typescript-eslint/typescript-estree": "npm:8.14.0"
"@typescript-eslint/utils": "npm:8.14.0"
"@typescript-eslint/typescript-estree": "npm:8.19.1"
"@typescript-eslint/utils": "npm:8.19.1"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/42616a664b38ca418e13504247e5e1bad6ae85c045b48e5735ffab977d4bd58cc86fb9d2292bbb314fa408d78d4b0454c3a27dbf9f881f9921917a942825c806
ts-api-utils: "npm:^2.0.0"
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
typescript: ">=4.8.4 <5.8.0"
checksum: 10c0/757592b515beec58c079c605aa648ba94d985ae48ba40460034e849c7bc2b603b1da6113e59688e284608c9d5ccaa27adf0a14fb032cb1782200c6acae51ddd2
languageName: node
linkType: hard

Expand All @@ -5904,10 +5900,10 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/types@npm:8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/types@npm:8.14.0"
checksum: 10c0/7707f900e24e60e6780c5705f69627b7c0ef912cb3b095dfc8f4a0c84e866c66b1c4c10278cf99724560dc66985ec640750c4192786a09b853f9bb4c3ca5a7ce
"@typescript-eslint/types@npm:8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/types@npm:8.19.1"
checksum: 10c0/e907bf096d5ed7a812a1e537a98dd881ab5d2d47e072225bfffaa218c1433115a148b27a15744db8374b46dac721617c6d13a1da255fdeb369cf193416533f6e
languageName: node
linkType: hard

Expand All @@ -5929,36 +5925,36 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/typescript-estree@npm:8.14.0"
"@typescript-eslint/typescript-estree@npm:8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/typescript-estree@npm:8.19.1"
dependencies:
"@typescript-eslint/types": "npm:8.14.0"
"@typescript-eslint/visitor-keys": "npm:8.14.0"
"@typescript-eslint/types": "npm:8.19.1"
"@typescript-eslint/visitor-keys": "npm:8.19.1"
debug: "npm:^4.3.4"
fast-glob: "npm:^3.3.2"
is-glob: "npm:^4.0.3"
minimatch: "npm:^9.0.4"
semver: "npm:^7.6.0"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/5e890d22bd067095f871cf144907a8c302db5b5f014c58906ad58d7f23569951cba805042eac6844744e5abb0d3648c9cc221a91b0703da0a8d6345dc1f83e74
ts-api-utils: "npm:^2.0.0"
peerDependencies:
typescript: ">=4.8.4 <5.8.0"
checksum: 10c0/549d9d565a58a25fc8397a555506f2e8d29a740f5b6ed9105479e22de5aab89d9d535959034a8e9d4115adb435de09ee6987d28e8922052eea577842ddce1a7a
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/utils@npm:8.14.0"
"@typescript-eslint/utils@npm:8.19.1, @typescript-eslint/utils@npm:^8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/utils@npm:8.19.1"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:8.14.0"
"@typescript-eslint/types": "npm:8.14.0"
"@typescript-eslint/typescript-estree": "npm:8.14.0"
"@typescript-eslint/scope-manager": "npm:8.19.1"
"@typescript-eslint/types": "npm:8.19.1"
"@typescript-eslint/typescript-estree": "npm:8.19.1"
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
checksum: 10c0/1fcc2651d870832a799a5d1c85fc9421853508a006d6a6073c8316b012489dda77e123d13aea8f53eb9030a2da2c0eb273a6946a9941caa2519b99b33e89b720
typescript: ">=4.8.4 <5.8.0"
checksum: 10c0/f7d2fe9a2bd8cb3ae6fafe5e465882a6784b2acf81d43d194c579381b92651c2ffc0fca69d2a35eee119f539622752a0e9ec063aaec7576d5d2bfe68b441980d
languageName: node
linkType: hard

Expand Down Expand Up @@ -5990,13 +5986,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:8.14.0":
version: 8.14.0
resolution: "@typescript-eslint/visitor-keys@npm:8.14.0"
"@typescript-eslint/visitor-keys@npm:8.19.1":
version: 8.19.1
resolution: "@typescript-eslint/visitor-keys@npm:8.19.1"
dependencies:
"@typescript-eslint/types": "npm:8.14.0"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/d0faf70ed9ecff5e36694bbb161a90bea6db59e0e79a7d4f264d67d565c12b13733d664b736b2730935f013c87ce3155cea954a533d28e99987681bc5f6259c3
"@typescript-eslint/types": "npm:8.19.1"
eslint-visitor-keys: "npm:^4.2.0"
checksum: 10c0/117537450a099f51f3f0d39186f248ae370bdc1b7f6975dbdbffcfc89e6e1aa47c1870db790d4f778a48f2c1f6cd9c269b63867c12afaa424367c63dabee8fd0
languageName: node
linkType: hard

Expand Down Expand Up @@ -8595,6 +8591,13 @@ __metadata:
languageName: node
linkType: hard

"eslint-visitor-keys@npm:^4.2.0":
version: 4.2.0
resolution: "eslint-visitor-keys@npm:4.2.0"
checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269
languageName: node
linkType: hard

"eslint@npm:^8.57.1":
version: 8.57.1
resolution: "eslint@npm:8.57.1"
Expand Down Expand Up @@ -9109,8 +9112,9 @@ __metadata:
"@types/react-modal": "npm:^3.16.2"
"@types/react-router-dom": "npm:^5.3.3"
"@types/semver": "npm:^7"
"@typescript-eslint/eslint-plugin": "npm:^8.14.0"
"@typescript-eslint/parser": "npm:^8.14.0"
"@typescript-eslint/eslint-plugin": "npm:^8.19.1"
"@typescript-eslint/parser": "npm:^8.19.1"
"@typescript-eslint/utils": "npm:^8.19.1"
"@vitejs/plugin-legacy": "npm:^6.0.0"
"@vitejs/plugin-react": "npm:^4.3.4"
"@vitest/coverage-istanbul": "npm:^2.1.8"
Expand Down Expand Up @@ -9180,7 +9184,7 @@ __metadata:
tailwind-merge: "npm:^2.3.0"
tailwindcss: "npm:^3.4.4"
terser: "npm:^5.34.1"
typescript: "npm:^4.9.5"
typescript: "npm:~5.7.3"
vite: "npm:^6.0.6"
vite-plugin-ejs: "npm:^1.7.0"
vite-plugin-svgr: "npm:^4.3.0"
Expand Down Expand Up @@ -14060,12 +14064,12 @@ __metadata:
languageName: node
linkType: hard

"ts-api-utils@npm:^1.3.0":
version: 1.4.0
resolution: "ts-api-utils@npm:1.4.0"
"ts-api-utils@npm:^2.0.0":
version: 2.0.0
resolution: "ts-api-utils@npm:2.0.0"
peerDependencies:
typescript: ">=4.2.0"
checksum: 10c0/1b2bfa50ea52771d564bb143bb69010d25cda03ed573095fbac9b86f717012426443af6647e00e3db70fca60360482a30c1be7cf73c3521c321f6bf5e3594ea0
typescript: ">=4.8.4"
checksum: 10c0/6165e29a5b75bd0218e3cb0f9ee31aa893dbd819c2e46dbb086c841121eb0436ed47c2c18a20cb3463d74fd1fb5af62e2604ba5971cc48e5b38ebbdc56746dfc
languageName: node
linkType: hard

Expand Down Expand Up @@ -14262,23 +14266,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:^4.9.5":
version: 4.9.5
resolution: "typescript@npm:4.9.5"
"typescript@npm:~5.7.3":
version: 5.7.3
resolution: "typescript@npm:5.7.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/5f6cad2e728a8a063521328e612d7876e12f0d8a8390d3b3aaa452a6a65e24e9ac8ea22beb72a924fd96ea0a49ea63bb4e251fb922b12eedfb7f7a26475e5c56
checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A^4.9.5#optional!builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#optional!builtin<compat/typescript>::version=4.9.5&hash=289587"
"typescript@patch:typescript@npm%3A~5.7.3#optional!builtin<compat/typescript>":
version: 5.7.3
resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin<compat/typescript>::version=5.7.3&hash=5786d5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/e3333f887c6829dfe0ab6c1dbe0dd1e3e2aeb56c66460cb85c5440c566f900c833d370ca34eb47558c0c69e78ced4bfe09b8f4f98b6de7afed9b84b8d1dd06a1
checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4
languageName: node
linkType: hard

Expand Down
Loading