Skip to content

Commit

Permalink
[chore] Update Typescript to 5.1 (#1478)
Browse files Browse the repository at this point in the history
Summary: Updates the usual culprits to get TypeScript to v5.1.
This change is [fairly
minor](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/).
Also fixes two typing issues that were not discovered before (the type
checker has learned to detect more kinds of mistakes).

Type of change: /kind cleanup

Test Plan: `yarn; yarn lint; yarn test; yarn dev`. No new surprises.

Signed-off-by: Nick Lanam <[email protected]>
  • Loading branch information
NickLanam authored Jun 13, 2023
1 parent f3849ef commit ac85eb2
Show file tree
Hide file tree
Showing 9 changed files with 578 additions and 343 deletions.
2 changes: 1 addition & 1 deletion .vscode/workspace.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"**/.yarn": true,
"**/.pnp.*": true,
},
"typescript.tsdk": "src/ui/.yarn/sdks/typescript/lib",
"typescript.tsdk": "@pixielabs/ui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ui/.yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.41.0-sdk",
"version": "8.42.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion src/ui/.yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "5.0.4-sdk",
"version": "5.1.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion src/ui/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.5.1.cjs
yarnPath: .yarn/releases/yarn-3.6.0.cjs
25 changes: 13 additions & 12 deletions src/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@types/react-table": "^7.7.1",
"@types/react-window": "^1.8.3",
"@types/segment-analytics": "^0.0.32",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"@welldone-software/why-did-you-render": "^4.3.1",
"@yarnpkg/pnpify": "^3.1.0",
"archiver": "^5.0.2",
Expand All @@ -39,12 +39,12 @@
"concurrently": "^6.2.0",
"css-loader": "^5.2.6",
"cypress": "^9.3.0",
"esbuild": "^0.17.19",
"esbuild": "^0.18.2",
"esbuild-jest": "^0.5.0",
"esbuild-loader": "^3.0.1",
"eslint": "^8.41.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint": "^8.42.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -69,12 +69,12 @@
"regenerator-runtime": "^0.13.7",
"style-loader": "^2.0.0",
"svg-url-loader": "^6.0.0",
"typescript": "^5.0.4",
"typescript": "^5.1.3",
"url-loader": "^4.1.1",
"webpack": "^5.84.1",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.1.1",
"webpack-dev-server": "^4.15.0",
"webpack": "^5.86.0",
"webpack-bundle-analyzer": "^4.9.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"yaml": "^1.6.0"
},
"license": "SEE LICENSE IN LICENSE.txt",
Expand Down Expand Up @@ -164,5 +164,6 @@
"resolutions": {
"@types/react": "^18.0.9",
"multicast-dns": "7.2.3"
}
},
"packageManager": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const useMissingScriptProvider: CommandProvider = () => {
const { setScriptAndArgs } = React.useContext(ScriptContext);
const { setOpen } = React.useContext(CommandPaletteContext);

const [promises, setPromises] = React.useState<CancellablePromise[]>([]);
const [promises, setPromises] = React.useState<CancellablePromise<DecoratedCompletion[]>[]>([]);
const [state, setState] = React.useState<CommandProviderState>(DEFAULT);

const invoke = React.useCallback((
Expand Down
2 changes: 1 addition & 1 deletion src/ui/src/components/version-info/version-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ import { Tooltip } from '@mui/material';
import { PIXIE_CLOUD_VERSION } from 'app/utils/env';

export const VersionInfo = React.memo(() => (
<Tooltip title={PIXIE_CLOUD_VERSION.tag}><span>Built {PIXIE_CLOUD_VERSION.date}</span></Tooltip>
<Tooltip title={PIXIE_CLOUD_VERSION.tag ?? ''}><span>Built {PIXIE_CLOUD_VERSION.date}</span></Tooltip>
));
VersionInfo.displayName = 'VersionInfo';
Loading

0 comments on commit ac85eb2

Please sign in to comment.