Skip to content

Commit 2c4c135

Browse files
raghavaggarwal2308raghavaggarwal2308
andauthored
[MM-1442] Update mattermost-redux and related dependencies to 10.9.0 (#101)
* [MM-1442] Update mattermost-redux and related dependencies * [MM-1442] Remvoed unused iles * [MM-1442] Fix lint issue --------- Co-authored-by: raghavaggarwal2308 <[email protected]>
1 parent 650181e commit 2c4c135

File tree

8 files changed

+15765
-22344
lines changed

8 files changed

+15765
-22344
lines changed

webapp/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
}
379379
],
380380
"no-use-before-define": [
381-
2,
381+
0,
382382
{
383383
"classes": false,
384384
"functions": false,

webapp/package-lock.json

Lines changed: 15725 additions & 22313 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webapp/package.json

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"devDependencies": {
1616
"@babel/cli": "7.16.8",
17-
"@babel/core": "7.16.12",
17+
"@babel/core": "7.28.0",
1818
"@babel/plugin-proposal-class-properties": "7.16.7",
1919
"@babel/plugin-proposal-object-rest-spread": "7.16.7",
2020
"@babel/plugin-proposal-optional-chaining": "7.16.7",
@@ -25,12 +25,14 @@
2525
"@babel/runtime": "7.16.7",
2626
"@emotion/babel-preset-css-prop": "11.2.0",
2727
"@emotion/core": "10.3.1",
28-
"@mattermost/types": "6.7.0-0",
28+
"@mattermost/client": "10.9.0",
29+
"@mattermost/types": "10.9.0",
2930
"@testing-library/jest-dom": "5.16.1",
3031
"@types/babel__core": "7.1.18",
3132
"@types/babel__template": "7.4.1",
33+
"@types/cheerio": "0.22.30",
3234
"@types/enzyme": "3.10.11",
33-
"@types/jest": "27.4.0",
35+
"@types/jest": "29.5.11",
3436
"@types/node": "17.0.12",
3537
"@types/react": "16.14.26",
3638
"@types/react-dom": "17.0.11",
@@ -41,21 +43,22 @@
4143
"@typescript-eslint/parser": "5.10.1",
4244
"@typescript-eslint/typescript-estree": "5.52.0",
4345
"babel-eslint": "10.1.0",
46+
"babel-jest": "29.7.0",
4447
"babel-loader": "8.2.2",
4548
"babel-plugin-formatjs": "10.3.7",
46-
"babel-plugin-typescript-to-proptypes": "2.0.0",
49+
"babel-plugin-typescript-to-proptypes": "2.1.0",
50+
"cheerio": "0.22.0",
4751
"css-loader": "6.5.1",
48-
"enzyme": "3.11.0",
52+
"enzyme": "3.10.0",
4953
"enzyme-adapter-react-16": "1.15.6",
5054
"enzyme-to-json": "3.6.2",
51-
"eslint": "8.8.0",
52-
"eslint-import-resolver-alias": "1.1.2",
53-
"eslint-import-resolver-typescript": "2.7.1",
54-
"eslint-import-resolver-webpack": "0.13.2",
55+
"eslint": "7.9.0",
56+
"eslint-import-resolver-typescript": "3.6.1",
57+
"eslint-import-resolver-webpack": "0.12.2",
5558
"eslint-plugin-babel": "5.3.1",
5659
"eslint-plugin-cypress": "2.12.1",
5760
"eslint-plugin-header": "3.1.1",
58-
"eslint-plugin-import": "2.25.4",
61+
"eslint-plugin-import": "2.22.0",
5962
"eslint-plugin-jest": "26.5.3",
6063
"eslint-plugin-mattermost": "github:mattermost/eslint-plugin-mattermost",
6164
"eslint-plugin-no-only-tests": "2.6.0",
@@ -64,8 +67,9 @@
6467
"file-loader": "6.2.0",
6568
"identity-obj-proxy": "3.0.0",
6669
"isomorphic-fetch": "3.0.0",
67-
"jest": "27.4.7",
70+
"jest": "29.7.0",
6871
"jest-canvas-mock": "2.3.1",
72+
"jest-environment-jsdom": "29.7.0",
6973
"jest-junit": "13.0.0",
7074
"sass": "1.52.3",
7175
"sass-loader": "13.0.0",
@@ -75,13 +79,15 @@
7579
},
7680
"dependencies": {
7781
"core-js": "3.22.8",
78-
"mattermost-redux": "5.33.1",
82+
"mattermost-redux": "10.9.0",
7983
"react": "16.14.0",
80-
"react-bootstrap": "2.8.0",
84+
"react-bootstrap": "1.3.0",
85+
"react-dom": "16.13.1",
8186
"react-redux": "8.0.2",
8287
"react-select": "5.7.4",
8388
"redux": "4.2.0",
84-
"typescript": "4.6.4"
89+
"reselect": "5.1.1",
90+
"typescript": "5.6.3"
8591
},
8692
"jest": {
8793
"snapshotSerializers": [
@@ -105,8 +111,10 @@
105111
"^.*i18n.*\\.(json)$": "<rootDir>/tests/i18n_mock.json",
106112
"^bundle-loader\\?lazy\\!(.*)$": "$1"
107113
},
114+
"transform": {
115+
"^.+\\.[jt]sx?$": "babel-jest"
116+
},
108117
"moduleDirectories": [
109-
"",
110118
"node_modules",
111119
"non_npm_dependencies"
112120
],
@@ -115,14 +123,17 @@
115123
"jest-junit"
116124
],
117125
"transformIgnorePatterns": [
118-
"node_modules/(?!react-native|react-router|mattermost-webapp)"
126+
"node_modules/(?!react-native|react-router|mattermost-webapp|enzyme|cheerio)"
119127
],
120128
"setupFiles": [
121129
"jest-canvas-mock"
122130
],
123131
"setupFilesAfterEnv": [
124132
"<rootDir>/tests/setup.tsx"
125133
],
126-
"testURL": "http://localhost:8065"
134+
"testEnvironment": "jsdom",
135+
"testEnvironmentOptions": {
136+
"url": "http://localhost:8065"
137+
}
127138
}
128139
}

webapp/src/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import Client4 from 'mattermost-redux/client/client4';
1+
import {Client4} from '@mattermost/client';
22
import {PostTypes} from 'mattermost-redux/action_types';
3-
import {GlobalState} from 'mattermost-redux/types/store';
3+
import {GlobalState} from '@mattermost/types/store';
44
import {getConfig} from 'mattermost-redux/selectors/entities/general';
55
import {haveIChannelPermission} from 'mattermost-redux/selectors/entities/roles';
66
import Permissions from 'mattermost-redux/constants/permissions';
7-
import {Channel} from '@mattermost/types/lib/channels';
7+
import {Channel} from '@mattermost/types/channels';
88

99
import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/common';
1010

webapp/src/client/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Client4} from 'mattermost-redux/client';
2-
import {ClientError} from 'mattermost-redux/client/client4';
3-
import {Options} from 'mattermost-redux/types/client4';
2+
import {ClientError} from '@mattermost/client';
3+
import {Options} from '@mattermost/types/client4';
44

55
export const doFetch = async (url: string, options: Options) => {
66
const {data} = await doFetchWithResponse(url, options);

webapp/src/components/react_select_setting.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ReactSelect, {ActionMeta} from 'react-select';
66
import AsyncSelect, {Props as ReactSelectProps} from 'react-select/async';
77
import CreatableSelect from 'react-select/creatable';
88

9-
import {Theme} from 'mattermost-redux/types/preferences';
9+
import {Theme} from 'mattermost-redux/selectors/entities/preferences';
1010

1111
import Setting from '@/components/setting';
1212

webapp/src/utils/styles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
22
// See LICENSE.txt for license information.
33

4-
import {Theme} from '@mattermost/types/lib/preferences';
4+
import {Theme} from 'mattermost-redux/selectors/entities/preferences';
55

66
import {changeOpacity} from 'mattermost-redux/utils/theme_utils';
77

@@ -18,7 +18,7 @@ export const getBaseStyles = (theme: Theme) => {
1818
};
1919
};
2020

21-
export const getModalStyles = (theme) => ({
21+
export const getModalStyles = (theme: Theme) => ({
2222
modalBody: {
2323
padding: '2em 2em 3em',
2424
color: theme.centerChannelColor,
@@ -34,7 +34,7 @@ export const getModalStyles = (theme) => ({
3434
},
3535
});
3636

37-
export const getStyleForReactSelect = (theme) => {
37+
export const getStyleForReactSelect = (theme: Theme) => {
3838
if (!theme) {
3939
return {};
4040
}

webapp/tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@
3131
],
3232
},
3333
"include": [
34-
"src",
35-
"tests"
34+
"./**/*"
3635
],
3736
"exclude": [
3837
"dist",
39-
"node_modules",
4038
"!node_modules/@types"
41-
],
39+
]
4240
}

0 commit comments

Comments
 (0)