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

Upgrade Typescript to v5 #7421

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
19 changes: 8 additions & 11 deletions docs/extensions/get-started/anatomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,10 @@ Some of the most-important fields include:
"react-open-doodles": "^1.0.5"
},
"devDependencies": {
"@k8slens/typescript": "^6.5.0-alpha.1",
"@k8slens/webpack": "^6.5.0-alpha.1",
"@k8slens/extensions": "^5.4.6",
"ts-loader": "^8.0.4",
"typescript": "^4.5.5",
"@types/react": "^17.0.44",
"@types/node": "^16.14.2",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.11"
"@types/react": "^17.0.44"
}
}
```
Expand Down Expand Up @@ -102,11 +99,11 @@ For example, the following is how you would specify these within your webpack co
"externals": [
...
{
"mobx": "var global.Mobx"
"mobx-react": "var global.MobxReact"
"react": "var global.React"
"react-router": "var global.ReactRouter"
"react-router-dom": "var global.ReactRouterDom"
"mobx": "var global.Mobx",
"mobx-react": "var global.MobxReact",
"react": "var global.React",
"react-router": "var global.ReactRouter",
"react-router-dom": "var global.ReactRouterDom",
"react-dom": "var global.ReactDOM"
}
]
Expand Down
71,201 changes: 46,401 additions & 24,800 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 3 additions & 23 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
}
},
"dependencies": {
"@k8slens/typescript": "^6.5.0-alpha.1",
"@k8slens/webpack": "^6.5.0-alpha.1",
"@astronautlabs/jsonpath": "^1.1.0",
"@hapi/call": "^9.0.1",
"@hapi/subtext": "^7.1.0",
Expand Down Expand Up @@ -240,10 +242,6 @@
"@types/triple-beam": "^1.3.2",
"@types/url-parse": "^1.4.8",
"@types/uuid": "^8.3.4",
"@types/webpack": "^5.28.0",
"@types/webpack-dev-server": "^4.7.2",
"@types/webpack-env": "^1.18.0",
"@types/webpack-node-externals": "^2.5.3",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"adr": "^1.4.3",
Expand All @@ -255,23 +253,19 @@
"command-line-args": "^5.2.1",
"concurrently": "^7.6.0",
"cross-env": "^7.0.3",
"css-loader": "^6.7.3",
"deepdash": "^5.3.9",
"dompurify": "^2.4.4",
"electron": "^22.3.3",
"electron-builder": "^23.6.0",
"esbuild": "^0.17.8",
"esbuild-loader": "^2.21.0",
"eslint": "^8.33.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unused-imports": "^2.0.0",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"identity-obj-proxy": "^3.0.0",
"ignore-loader": "^0.1.2",
"include-media": "^1.4.9",
"jest": "^28.1.3",
"jest-canvas-mock": "^2.3.1",
Expand All @@ -283,13 +277,9 @@
"mini-css-extract-plugin": "^2.7.2",
"mock-http": "^1.1.0",
"monaco-editor": "^0.29.1",
"monaco-editor-webpack-plugin": "^5.0.0",
"node-gyp": "^8.3.0",
"node-loader": "^2.0.0",
"nodemon": "^2.0.20",
"playwright": "^1.30.0",
"postcss": "^8.4.21",
"postcss-loader": "^6.2.1",
"query-string": "^7.1.3",
"randomcolor": "^0.6.2",
"react-beautiful-dnd": "^13.1.1",
Expand All @@ -301,22 +291,12 @@
"react-table": "^7.8.0",
"react-window": "^1.8.8",
"rimraf": "^4.1.2",
"sass": "^1.58.2",
"sass-loader": "^12.6.0",
"style-loader": "^3.3.1",
"tailwindcss": "^3.2.4",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"type-fest": "^2.14.0",
"typed-emitter": "^1.4.0",
"typedoc": "0.23.25",
"typedoc-plugin-markdown": "^3.13.6",
"typescript": "^4.9.5",
"typescript-plugin-css-modules": "^3.4.0",
"webpack": "^5.75.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.11.1",
"webpack-node-externals": "^3.0.0",
"ts-node": "^10.9.1",
"xterm": "^4.19.0",
"xterm-addon-fit": "^0.5.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe("computeUnixShellEnvironment technical tests", () => {
});
});
di.override(spawnInjectable, () => spawnMock);
di.override(randomUUIDInjectable, () => () => "deadbeef");
di.override(randomUUIDInjectable, () => () => "xxx-xxx-xxx-xxx-xxx");

di.override(processEnvInjectable, () => ({
SOME_ENV_VAR: "some-env-value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const sidebarItemsInjectable = getInjectable({
);

const getSidebarItemsHierarchy = (registrations: SidebarItemRegistration[]) => {
const _getSidebarItemsHierarchy = (parentId: string | null): HierarchicalSidebarItem[] =>
const _getSidebarItemsHierarchy = (parentId: string | null): (HierarchicalSidebarItem | any)[] =>
pipeline(
registrations,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function VirtualListInner<T extends { getId(): string } | string>({
? renderList(fixedHeight)
: (
<AutoSizer disableWidth>
{({ height }) => renderList(height)}
{({ height }) => renderList(height as number)}
</AutoSizer>
)
}
Expand Down
17 changes: 3 additions & 14 deletions packages/extension-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,11 @@
"@k8slens/core": "^6.5.0-alpha.3"
},
"devDependencies": {
"@types/node": "^16.18.6",
"@types/webpack": "^5.28.0",
"@types/webpack-env": "^1.18.0",
"@types/webpack-node-externals": "2.5.3",
"css-loader": "^6.7.2",
"node-loader": "^2.0.0",
"@k8slens/typescript": "^6.5.0-alpha.1",
"@k8slens/webpack": "^6.5.0-alpha.1",
"rimraf": "^4.1.2",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typed-emitter": "^2.1.0",
"typedoc": "0.23.25",
"typedoc-plugin-markdown": "^3.13.6",
"typescript": "^4.9.5",
"typescript-plugin-css-modules": "^4.1.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
"typedoc-plugin-markdown": "^3.13.6"
}
}
5 changes: 3 additions & 2 deletions packages/infrastructure/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"license": "MIT",
"homepage": "https://github.com/lensapp/lens",
"dependencies": {
"typescript": "^4.9.3",
"typescript-plugin-css-modules": "^3.4.0"
"@types/node": "^16.18.6",
"typescript": "^5.0.2",
"typescript-plugin-css-modules": "^5.0.0"
}
}
17 changes: 15 additions & 2 deletions packages/infrastructure/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,29 @@
"scripts": {
"test:unit": "jest --coverage --runInBand"
},
"dependencies": {
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@types/webpack": "^5.28.0",
"@types/webpack-node-externals": "2.5.3",
"@types/webpack-env": "^1.18.0",
"copy-webpack-plugin": "^11.0.0",
"postcss": "^8.4.21",
"postcss-loader": "^6.2.1",
"sass": "^1.58.2",
"sass-loader": "^13.2.2",
"node-loader": "^2.0.0",
"css-loader": "^6.7.2",
"esbuild-loader": "^2.21.0",
"ignore-loader": "^0.1.2",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.7.3",
"sass-loader": "^13.2.0",
"monaco-editor-webpack-plugin": "^5.0.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.1",
"webpack": "^5.76.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"webpack-node-externals": "^3.0.0"
}
}
7 changes: 3 additions & 4 deletions packages/legacy-extension-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
},
"devDependencies": {
"@k8slens/extensions": "^6.5.0-alpha.3",
"@types/node": "^16.18.16",
"typescript": "^4.9.5",
"webpack": "^5.76.1",
"webpack-cli": "^5.0.1"
"@k8slens/typescript": "^6.5.0-alpha.1",
"@k8slens/webpack": "^6.5.0-alpha.1",
"@types/node": "^16.18.16"
}
}
9 changes: 3 additions & 6 deletions packages/node-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@
"rimraf": "^4.1.2"
},
"devDependencies": {
"rimraf": "^4.1.2",
ixrock marked this conversation as resolved.
Show resolved Hide resolved
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
"@k8slens/typescript": "^6.5.0-alpha.1",
"@k8slens/webpack": "^6.5.0-alpha.1",
"ts-node": "^10.9.1"
}
}
26 changes: 4 additions & 22 deletions packages/open-lens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@
}
},
"dependencies": {
"@k8slens/typescript": "^6.5.0-alpha.1",
"@k8slens/webpack": "^6.5.0-alpha.1",
"@k8slens/node-fetch": "^6.5.0-alpha.1",
"@k8slens/application": "^6.5.0-alpha.2",
"@k8slens/application-for-electron-main": "^6.5.0-alpha.1",
"@k8slens/core": "^6.5.0-alpha.3",
Expand All @@ -220,8 +223,6 @@
},
"devDependencies": {
"@electron/rebuild": "^3.2.10",
"@k8slens/node-fetch": "^6.5.0-alpha.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@swc/cli": "^0.1.61",
"@swc/core": "^1.3.37",
"@swc/jest": "^0.2.24",
Expand All @@ -241,48 +242,29 @@
"@types/tcp-port-used": "^1.0.1",
"@types/url-parse": "^1.4.8",
"@types/uuid": "^8.3.4",
"@types/webpack": "^5.28.0",
"@types/webpack-dev-server": "^4.7.2",
"@types/webpack-env": "^1.18.0",
"@types/webpack-node-externals": "2.5.3",
"autoprefixer": "^10.4.13",
"circular-dependency-plugin": "^5.2.2",
"concurrently": "^7.6.0",
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.7.2",
"electron": "^22.3.3",
"electron-builder": "^23.6.0",
"electron-notarize": "^0.3.0",
"esbuild-loader": "^2.20.0",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"jsonfile": "^6.1.0",
"mini-css-extract-plugin": "^2.7.1",
"monaco-editor": "^0.29.1",
"monaco-editor-webpack-plugin": "^5.0.0",
"node-loader": "^2.0.0",
"nodemon": "^2.0.20",
"playwright": "^1.30.0",
"react-refresh": "^0.14.0",
"react-refresh-typescript": "^2.0.7",
"react-select": "^5.7.0",
"rimraf": "^4.1.2",
"run-script-os": "^1.1.6",
"style-loader": "^3.3.1",
"tailwindcss": "^3.2.4",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"type-fest": "^2.14.0",
"ts-node": "^10.9.1",
"typed-emitter": "^1.4.0",
"typescript": "^4.9.5",
"typescript-plugin-css-modules": "^4.1.1",
"webpack": "^5.75.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.11.1",
"webpack-node-externals": "^3.0.0",
"xterm-addon-fit": "^0.5.0"
}
}