Skip to content

Commit

Permalink
CB-4818 refactor: update NPM dependencies (#2450)
Browse files Browse the repository at this point in the history
* CB-4818 refactor: update NPM dependencies

* CB-4818 chore: update react-data-grid fork

* CB-4818 fix: tests

---------

Co-authored-by: mr-anton-t <[email protected]>
  • Loading branch information
Wroud and mr-anton-t authored Mar 7, 2024
1 parent c3a85b6 commit e13368d
Show file tree
Hide file tree
Showing 127 changed files with 3,237 additions and 2,814 deletions.
32 changes: 20 additions & 12 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,41 @@
"**/core-cli/**"
]
},
"resolutions": {
"@types/react": "^18.2.63",
"@types/react-dom": "^18.2.19",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"mobx": "^6.12.0",
"mobx-react-lite": "^4.0.5"
},
"scripts": {
"prebuild": "lerna run gql:gen --stream --parallel",
"pretest": "lerna run gql:gen --stream --parallel && yarn lerna run test --scope @cloudbeaver/tests-runner"
},
"devDependencies": {
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.10",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.63",
"@types/react-dom": "^18.2.19",
"concurrently": "^8.2.2",
"lerna": "5.5.4",
"mobx": "^6.12.0",
"mobx-react-lite": "^4.0.5",
"msw": "^2.0.10",
"msw": "^2.2.2",
"path-browserify": "~1.0.1",
"prettier": "^2.8.8",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"reakit": "~1.3.11",
"reflect-metadata": "~0.1.13",
"reflect-metadata": "^0.2.1",
"reshadow": "^0.0.1",
"rimraf": "~5.0.5",
"typescript": "^5.3.2",
"typescript-plugin-css-modules": "^5.0.2"
"typescript": "^5.3.3",
"typescript-plugin-css-modules": "^5.1.0"
},
"dependencies": {},
"prettier": "@cloudbeaver/prettier-config"
Expand Down
6 changes: 3 additions & 3 deletions webapp/packages/core-administration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"@cloudbeaver/core-sdk": "~0.1.0",
"@cloudbeaver/core-settings": "~0.1.0",
"@cloudbeaver/tests-runner": "~0.1.0",
"@testing-library/jest-dom": "^6.1.5",
"@types/jest": "^29.5.10",
"typescript": "^5.3.2"
"@testing-library/jest-dom": "^6.4.2",
"@types/jest": "^29.5.12",
"typescript": "^5.3.3"
}
}
6 changes: 3 additions & 3 deletions webapp/packages/core-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
},
"peerDependencies": {},
"devDependencies": {
"@types/react": "^18.2.42",
"typescript": "^5.3.2",
"typescript-plugin-css-modules": "^5.0.2"
"@types/react": "^18.2.63",
"typescript": "^5.3.3",
"typescript-plugin-css-modules": "^5.1.0"
}
}
8 changes: 4 additions & 4 deletions webapp/packages/core-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"@cloudbeaver/core-settings": "~0.1.0",
"@cloudbeaver/core-theming": "~0.1.0",
"@cloudbeaver/tests-runner": "~0.1.0",
"@testing-library/jest-dom": "^6.1.5",
"@types/jest": "^29.5.10",
"msw": "~2.x.x",
"typescript": "^5.3.2"
"@testing-library/jest-dom": "^6.4.2",
"@types/jest": "^29.5.12",
"msw": "^2.2.2",
"typescript": "^5.3.3"
}
}
12 changes: 6 additions & 6 deletions webapp/packages/core-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"@cloudbeaver/core-settings": "~0.1.0",
"@cloudbeaver/core-theming": "~0.1.0",
"@cloudbeaver/tests-runner": "~0.1.0",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
"@types/jest": "^29.5.10",
"@types/react": "^18.2.42",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.63",
"react": "^18.2.0",
"typescript": "^5.3.2",
"typescript-plugin-css-modules": "^5.0.2"
"typescript": "^5.3.3",
"typescript-plugin-css-modules": "^5.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import { InputFieldBase, type InputFieldBaseProps } from './InputFieldBase';
import { InputFieldState, type InputFieldStateProps } from './InputFieldState';

interface InputFieldType {
(props: InputFieldBaseProps): React.ReactElement<any, any> | null;
<TState extends Record<string, any>, TKey extends keyof TState>(props: InputFieldStateProps<TState, TKey>): React.ReactElement<any, any> | null;
(props: InputFieldBaseProps & React.RefAttributes<HTMLInputElement>): React.ReactElement<any, any> | null;
<TState extends Record<string, any>, TKey extends keyof TState>(
props: InputFieldStateProps<TState, TKey> & React.RefAttributes<HTMLInputElement>,
): React.ReactElement<any, any> | null;
}

export const InputField: InputFieldType = observer<InputFieldBaseProps | InputFieldStateProps<any, any>, HTMLInputElement>(
Expand All @@ -27,9 +29,9 @@ export const InputField: InputFieldType = observer<InputFieldBaseProps | InputFi
const handleKeyDown = useCombinedHandler(onKeyDown, context?.keyDown);

if (isFormStateControl(rest)) {
return <InputFieldState ref={ref} {...rest} onChange={handleChange} onKeyDown={handleKeyDown} />;
return <InputFieldState {...rest} ref={ref} onChange={handleChange} onKeyDown={handleKeyDown} />;
}

return <InputFieldBase ref={ref} {...rest} onChange={handleChange} onKeyDown={handleKeyDown} />;
return <InputFieldBase {...rest} ref={ref} onChange={handleChange} onKeyDown={handleKeyDown} />;
}),
) as InputFieldType;
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ import { FieldLabel } from '../FieldLabel';
import { useCapsLockTracker } from '../useCapsLockTracker';
import inputFieldStyle from './InputField.m.css';

export type InputFieldBaseProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'style'> &
export type InputFieldBaseProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'style' | 'ref'> &
ILayoutSizeProps & {
value?: string;
error?: boolean;
loading?: boolean;
description?: string;
labelTooltip?: string;
ref?: React.ForwardedRef<HTMLInputElement>;
canShowPassword?: boolean;
icon?: React.ReactElement;
onCustomCopy?: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export type InputFieldStateProps<TState extends Record<string, any>, TKey extend
IFormStateControl<TState, TKey>;

interface InputFieldType {
<TState extends Record<string, any>, TKey extends keyof TState>(props: InputFieldStateProps<TState, TKey>): React.ReactElement<any, any> | null;
<TState extends Record<string, any>, TKey extends keyof TState>(
props: InputFieldStateProps<TState, TKey> & React.RefAttributes<HTMLInputElement>,
): React.ReactElement<any, any> | null;
}

export const InputFieldState: InputFieldType = observer<InputFieldStateProps<any, any>, HTMLInputElement>(
Expand All @@ -29,11 +31,11 @@ export const InputFieldState: InputFieldType = observer<InputFieldStateProps<any

return (
<InputFieldBase
{...rest}
ref={ref}
name={name}
value={(controlState.stringValue || controlState.defaultValue) ?? ''}
onChange={controlState.onChange}
{...rest}
/>
);
}),
Expand Down
6 changes: 3 additions & 3 deletions webapp/packages/core-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
},
"peerDependencies": {},
"devDependencies": {
"@types/react": "^18.2.42",
"typescript": "^5.3.2",
"typescript-plugin-css-modules": "^5.0.2"
"@types/react": "^18.2.63",
"typescript": "^5.3.3",
"typescript-plugin-css-modules": "^5.1.0"
}
}
2 changes: 1 addition & 1 deletion webapp/packages/core-browser-cookies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
},
"peerDependencies": {},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.3.3"
}
}
6 changes: 3 additions & 3 deletions webapp/packages/core-browser-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@cloudbeaver/core-sdk": "~0.1.0",
"@cloudbeaver/core-settings": "~0.1.0",
"@cloudbeaver/tests-runner": "~0.1.0",
"@testing-library/jest-dom": "^6.1.3",
"@types/jest": "^29.5.10",
"typescript": "^5.3.2"
"@testing-library/jest-dom": "^6.4.2",
"@types/jest": "^29.5.12",
"typescript": "^5.3.3"
}
}
11 changes: 6 additions & 5 deletions webapp/packages/core-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
"@cloudbeaver/core-di": "~0.1.0",
"@cloudbeaver/core-executor": "~0.1.0",
"@cloudbeaver/core-utils": "~0.1.0",
"dexie": "^3.2.4",
"dexie": "^3.2.6",
"karma": "^6.4.3",
"mobx": "^6.12.0",
"workbox-core": "~7.x.x",
"workbox-precaching": "~7.x.x",
"workbox-window": "~7.x.x"
"workbox-core": "^7.0.0",
"workbox-precaching": "^7.0.0",
"workbox-window": "^7.0.0"
},
"peerDependencies": {},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.3.3"
}
}
2 changes: 1 addition & 1 deletion webapp/packages/core-cli/configs/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
transformIgnorePatterns: [
'\\.pnp\\.[^\\/]+$',
'node_modules/(?!@ngrx|(?!deck.gl)|ng-dynamic)',
'/node_modules/(?!(uuid|go-split|@react-dnd|react-dnd-html5-backend|react-dnd|dnd-core|@cloudbeaver))(.*)',
'/node_modules/(?!(uuid|go-split|@react-dnd|react-dnd-html5-backend|@timohausmann|react-dnd|dnd-core|@cloudbeaver))(.*)',
],
testPathIgnorePatterns: ['/node_modules/'],
moduleNameMapper: {
Expand Down
10 changes: 6 additions & 4 deletions webapp/packages/core-cli/configs/webpack.product.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ module.exports = (env, argv) => {
overlay: false,
},
server,
proxy: {
'/api': {
proxy: [
{
context: ['/api'],
target: envServer,
secure: false,
},
'/api/ws': {
{
context: ['/api/ws'],
target: `${urlObject.protocol === 'https:' ? 'wss:' : 'ws:'}//${urlObject.hostname}:${urlObject.port}/api/ws`,
ws: true,
secure: false,
},
},
],
// onListening: function (devServer, ...args) {
// if (!devServer) {
// throw new Error('webpack-dev-server is not defined');
Expand Down
92 changes: 46 additions & 46 deletions webapp/packages/core-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,58 +25,58 @@
"node": ">=20.0.0"
},
"dependencies": {
"@babel/cli": "~7.22.15",
"@babel/core": "~7.23.2",
"@babel/plugin-proposal-decorators": "~7.22.3",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-transform-optional-chaining": "^7.21.0",
"@babel/plugin-transform-runtime": "~7.22.15",
"@babel/preset-env": "~7.22.15",
"@babel/preset-react": "~7.22.15",
"@babel/preset-typescript": "~7.22.15",
"babel-loader": "~9.1.3",
"babel-plugin-module-resolver": "~5.0.0",
"babel-plugin-transform-typescript-metadata": "~0.3.2",
"copy-webpack-plugin": "~11.0.0",
"css-loader": "~6.8.1",
"declaration-bundler-webpack-plugin": "~1.0.3",
"extra-watch-webpack-plugin": "~1.0.3",
"html-loader": "~4.2.0",
"html-replace-webpack-plugin": "~2.6.0",
"html-webpack-plugin": "~5.5.3",
"json5-loader": "~4.0.1",
"mini-css-extract-plugin": "~2.7.6",
"peer-deps-externals-webpack-plugin": "~1.0.4",
"pnp-webpack-plugin": "~1.7.0",
"postcss": "~8.4.31",
"postcss-discard-comments": "~6.0.0",
"postcss-loader": "~7.3.3",
"postcss-preset-env": "~8.4.2",
"sass": "~1.66.1",
"sass-loader": "~13.3.2",
"source-map-loader": "~4.0.1",
"style-loader": "~3.3.3",
"thread-loader": "~4.0.2",
"ts-loader": "~9.4.4",
"webpack": "~5.88.2",
"webpack-bundle-analyzer": "~4.9.1",
"webpack-cli": "~5.1.4",
"webpack-dev-server": "~4.15.1",
"webpack-merge": "~5.9.0"
"@babel/cli": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/plugin-proposal-decorators": "^7.24.0",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
"@babel/plugin-transform-optional-chaining": "^7.23.4",
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"babel-loader": "^9.1.3",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-typescript-metadata": "^0.3.2",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^6.10.0",
"declaration-bundler-webpack-plugin": "^1.0.3",
"extra-watch-webpack-plugin": "^1.0.3",
"html-loader": "^5.0.0",
"html-replace-webpack-plugin": "^2.6.0",
"html-webpack-plugin": "^5.6.0",
"json5-loader": "^4.0.1",
"mini-css-extract-plugin": "^2.8.1",
"peer-deps-externals-webpack-plugin": "^1.0.4",
"pnp-webpack-plugin": "^1.7.0",
"postcss": "^8.4.35",
"postcss-discard-comments": "^6.0.1",
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^9.4.0",
"sass": "^1.71.1",
"sass-loader": "^14.1.1",
"source-map-loader": "^5.0.0",
"style-loader": "^3.3.4",
"thread-loader": "^4.0.2",
"ts-loader": "^9.5.1",
"webpack": "^5.90.3",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2",
"webpack-merge": "^5.10.0"
},
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@types/jest": "^29.5.5",
"@types/madge": "^5.0.0",
"allure-commandline": "^2.22.1",
"babel-jest": "~29.6.4",
"fake-indexeddb": "^4.0.2",
"@types/jest": "^29.5.12",
"@types/madge": "^5.0.3",
"allure-commandline": "^2.27.0",
"babel-jest": "^29.7.0",
"fake-indexeddb": "^5.0.2",
"glob": "^10.3.10",
"http-proxy": "^1.18.1",
"jest": "~29.6.4",
"jest": "^29.7.0",
"jest-allure": "^0.1.3",
"jest-environment-jsdom": "~29.6.4",
"jest-jasmine2": "^29.6.4",
"jest-environment-jsdom": "^29.7.0",
"jest-jasmine2": "^29.7.0",
"madge": "^6.1.0",
"react-refresh": "^0.14.0",
"tsconfig-paths-webpack-plugin": "^4.1.0",
Expand Down
2 changes: 2 additions & 0 deletions webapp/packages/core-cli/tests/test.environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module.exports = class CustomTestEnvironment extends Environment {
this.global.TextDecoder = TextDecoder;
this.global.Response = Response;
this.global.Request = Request;
// FIXME https://github.com/jsdom/jsdom/issues/3363
this.global.structuredClone = structuredClone;

// different machine has its own timezones and some tests can fail because of it
process.env.TZ = 'UTC';
Expand Down
2 changes: 1 addition & 1 deletion webapp/packages/core-client-activity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
},
"peerDependencies": {},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.3.3"
}
}
2 changes: 1 addition & 1 deletion webapp/packages/core-connections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
},
"peerDependencies": {},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.3.3"
}
}
2 changes: 1 addition & 1 deletion webapp/packages/core-data-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
},
"peerDependencies": {},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit e13368d

Please sign in to comment.