Skip to content

Commit 619910b

Browse files
CopilotmaximizeIT
andcommitted
Fix TypeScript compatibility issues for CI type checking
Co-authored-by: maximizeIT <8626039+maximizeIT@users.noreply.github.com>
1 parent 55a1b40 commit 619910b

5 files changed

Lines changed: 19 additions & 33 deletions

File tree

samples/weather-forecast/dev/widget-api-mock/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* limitations under the License.
1212
*/
1313

14-
import { WidgetApi } from "@staffbase/widget-sdk";
14+
import { WidgetApi, BranchInformation } from "@staffbase/widget-sdk";
1515
import getLegacyAppTheme from "./legacyTheme";
1616
import {
1717
getUserInformation,
@@ -26,7 +26,14 @@ const apiMock: WidgetApi = {
2626
getUserInformation,
2727
getUserList,
2828
getUserInformationByExternalId,
29-
getIntegration
29+
getIntegration,
30+
getBranchInformation(): BranchInformation {
31+
return {
32+
slug: "test-branch",
33+
branchId: "test-branch-id",
34+
webUrl: "https://test.staffbase.com"
35+
};
36+
}
3037
};
3138

3239
export default apiMock;

samples/weather-forecast/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,12 @@
4949
"@testing-library/dom": "^10.4.1",
5050
"@testing-library/jest-dom": "^6.8.0",
5151
"@testing-library/react": "^16.3.0",
52-
"@types/copy-webpack-plugin": "^10.1.3",
5352
"@types/jest": "^29.5.14",
5453
"@types/json-schema": "^7.0.15",
5554
"@types/node": "24.3.0",
5655
"@types/react": "^18.3.12",
5756
"@types/react-dom": "^18.3.1",
5857
"@types/webpack": "5.28.5",
59-
"@types/webpack-dev-server": "4.7.2",
6058
"@typescript-eslint/eslint-plugin": "5.62.0",
6159
"@typescript-eslint/parser": "5.62.0",
6260
"@ungap/custom-elements": "1.3.0",
@@ -75,7 +73,7 @@
7573
"react-svg-loader": "^3.0.3",
7674
"ts-loader": "^9.5.4",
7775
"ts-node": "10.9.2",
78-
"typescript": "4.5.2",
76+
"typescript": "5.1.6",
7977
"url-loader": "^4.1.1",
8078
"webpack": "^5.101.3",
8179
"webpack-cli": "^6.0.1",

samples/weather-forecast/src/index.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import { screen } from "@testing-library/dom";
1515
import axios, { AxiosRequestConfig } from "axios";
16+
import "@testing-library/jest-dom";
1617

1718
import "../dev/bootstrap";
1819

samples/weather-forecast/src/weather-forecast.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import React from "react";
1515
import axios, { AxiosRequestConfig } from "axios";
1616
import { screen, render } from "@testing-library/react";
17+
import "@testing-library/jest-dom";
1718

1819
import { WeatherForecast } from "./weather-forecast";
1920

samples/weather-forecast/yarn.lock

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,13 +1871,6 @@
18711871
dependencies:
18721872
"@types/node" "*"
18731873

1874-
"@types/copy-webpack-plugin@^10.1.3":
1875-
version "10.1.3"
1876-
resolved "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-10.1.3.tgz"
1877-
integrity sha512-p0/EiNsnH/t/BSKG2DBSULzEg75L1mRn1pqe2lGCC89Yjih5krNjMi8OoBy6SAPN0fhcpZhRIk4KV3lqKQ8Png==
1878-
dependencies:
1879-
copy-webpack-plugin "*"
1880-
18811874
"@types/eslint-scope@^3.7.7":
18821875
version "3.7.7"
18831876
resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz"
@@ -2083,13 +2076,6 @@
20832076
resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz"
20842077
integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
20852078

2086-
"@types/webpack-dev-server@4.7.2":
2087-
version "4.7.2"
2088-
resolved "https://registry.npmjs.org/@types/webpack-dev-server/-/webpack-dev-server-4.7.2.tgz"
2089-
integrity sha512-Y3p0Fmfvp0MHBDoCzo+xFJaWTw0/z37mWIo6P15j+OtmUDLvznJWdZNeD7Q004R+MpQlys12oXbXsrXRmxwg4Q==
2090-
dependencies:
2091-
webpack-dev-server "*"
2092-
20932079
"@types/webpack@5.28.5":
20942080
version "5.28.5"
20952081
resolved "https://registry.npmjs.org/@types/webpack/-/webpack-5.28.5.tgz"
@@ -3156,7 +3142,7 @@ cookie@0.7.1:
31563142
resolved "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz"
31573143
integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==
31583144

3159-
copy-webpack-plugin@*, copy-webpack-plugin@^12.0.2:
3145+
copy-webpack-plugin@^12.0.2:
31603146
version "12.0.2"
31613147
resolved "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz"
31623148
integrity sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==
@@ -4346,14 +4332,7 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
43464332
once "^1.3.0"
43474333
path-is-absolute "^1.0.0"
43484334

4349-
globals@^13.19.0:
4350-
version "13.24.0"
4351-
resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz"
4352-
integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==
4353-
dependencies:
4354-
type-fest "^0.20.2"
4355-
4356-
globals@^13.6.0:
4335+
globals@^13.19.0, globals@^13.6.0:
43574336
version "13.24.0"
43584337
resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz"
43594338
integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==
@@ -7446,10 +7425,10 @@ typedarray-to-buffer@^3.1.5:
74467425
dependencies:
74477426
is-typedarray "^1.0.0"
74487427

7449-
typescript@*, typescript@>=2.7, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@4.5.2:
7450-
version "4.5.2"
7451-
resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz"
7452-
integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==
7428+
typescript@*, typescript@>=2.7, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@5.1.6:
7429+
version "5.1.6"
7430+
resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz"
7431+
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
74537432

74547433
typescript@>=4.9.5:
74557434
version "5.9.2"
@@ -7710,7 +7689,7 @@ webpack-dev-middleware@^7.4.2:
77107689
range-parser "^1.2.1"
77117690
schema-utils "^4.0.0"
77127691

7713-
webpack-dev-server@*, webpack-dev-server@^5.2.2:
7692+
webpack-dev-server@^5.2.2:
77147693
version "5.2.2"
77157694
resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.2.2.tgz"
77167695
integrity sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==

0 commit comments

Comments
 (0)