Skip to content

Commit 02908f3

Browse files
diningPhilosopher64rashedmyt
authored andcommitted
Update dependencies version to address security vulnerabilities flagged by GitHub dependabot.
Packages: react-use, vitest, js-yaml, js-cookie, form-data, vite, @babel/core and ws
1 parent 80bd1a8 commit 02908f3

7 files changed

Lines changed: 330 additions & 888 deletions

File tree

gui/package-lock.json

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

gui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"react-linkify": "^1.0.0-alpha",
2222
"react-redux": "^7.2.1",
2323
"react-tooltip": "^5.28.0",
24-
"react-use": "^15.3.4",
24+
"react-use": "^17.6.1",
2525
"redux": "^4.0.5",
2626
"redux-thunk": "^2.3.0",
2727
"reselect": "^4.0.0"
@@ -36,7 +36,7 @@
3636
"@testing-library/react-hooks": "^3.4.1",
3737
"@testing-library/user-event": "^14.4.3",
3838
"@vitejs/plugin-react": "^4.3.4",
39-
"@vitest/coverage-v8": "^3.0.5",
39+
"@vitest/coverage-v8": "^4.1.0",
4040
"eslint-plugin-node": "^11.1.0",
4141
"eslint-plugin-react": "^7.37.2",
4242
"eslint-plugin-react-hooks": "^5.0.0",
@@ -48,7 +48,7 @@
4848
"react-test-renderer": "^16.13.0",
4949
"redux-mock-store": "^1.5.4",
5050
"vite": "^6.3.6",
51-
"vitest": "^3.0.5",
51+
"vitest": "^4.1.0",
5252
"vitest-teamcity-reporter": "^0.3.1"
5353
}
5454
}

gui/src/components/App/App.spec.jsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2025 The MathWorks, Inc.
1+
// Copyright 2020-2026 The MathWorks, Inc.
22

33
import React from 'react';
44
import { render } from '../../test/utils/react-test';
@@ -34,13 +34,12 @@ describe('App Component', () => {
3434
// Set initial hasFetched to true to skip mocking the initial /get_status request
3535
initialState.serverStatus.hasFetched = true;
3636

37-
const mockIntersectionObserver = vi.fn();
38-
mockIntersectionObserver.mockReturnValue({
39-
observe: () => null,
40-
disconnect: () => null
37+
window.IntersectionObserver = vi.fn().mockImplementation(function () {
38+
return {
39+
observe: () => null,
40+
disconnect: () => null
41+
};
4142
});
42-
43-
window.IntersectionObserver = mockIntersectionObserver;
4443
});
4544

4645
afterEach(() => {

gui/src/components/Information/Information.spec.jsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2025 The MathWorks, Inc.
1+
// Copyright 2020-2026 The MathWorks, Inc.
22

33
import React from 'react';
44
import Information from './index';
@@ -24,13 +24,12 @@ describe('Information Component', () => {
2424
initialState.serverStatus.licensingInfo.entitlements = [initialState.serverStatus.licensingInfo.entitlements[0]];
2525
initialState.serverStatus.licensingInfo.entitlementId = initialState.serverStatus.licensingInfo.entitlements[0].id;
2626

27-
const mockIntersectionObserver = vi.fn();
28-
mockIntersectionObserver.mockReturnValue({
29-
observe: () => null,
30-
disconnect: () => null
27+
window.IntersectionObserver = vi.fn().mockImplementation(function () {
28+
return {
29+
observe: () => null,
30+
disconnect: () => null
31+
};
3132
});
32-
33-
window.IntersectionObserver = mockIntersectionObserver;
3433
});
3534
afterEach(() => {
3635
vi.clearAllMocks();

gui/src/components/LicensingGatherer/LicenseGatherer.spec.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2025 The MathWorks, Inc.
1+
// Copyright 2020-2026 The MathWorks, Inc.
22

33
import React from 'react';
44
import LicenseGatherer from './index';
@@ -28,7 +28,7 @@ describe('LicenseGatherer component', () => {
2828
render(<LicenseGatherer />);
2929
} catch (error) {
3030
expect(error).toBeInstanceOf(TypeError);
31-
expect(errorMock).toHaveBeenCalledTimes(2);
31+
expect(errorMock).toHaveBeenCalledTimes(1);
3232
}
3333
});
3434

gui/src/components/OverlayTrigger/OverlayTrigger.spec.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2025 The MathWorks, Inc.
1+
// Copyright 2020-2026 The MathWorks, Inc.
22

33
import { render } from '../../test/utils/react-test';
44
import { fireEvent } from '@testing-library/react';
@@ -19,13 +19,13 @@ describe('OverlayTrigger Component', () => {
1919
initialState.overlayVisibility = true;
2020
mockStore = configureMockStore();
2121

22-
const mockIntersectionObserver = vi.fn();
23-
mockIntersectionObserver.mockReturnValue({
24-
observe: () => null,
25-
unobserve: () => null,
26-
disconnect: () => null
22+
window.IntersectionObserver = vi.fn().mockImplementation(function () {
23+
return {
24+
observe: () => null,
25+
unobserve: () => null,
26+
disconnect: () => null
27+
};
2728
});
28-
window.IntersectionObserver = mockIntersectionObserver;
2929
});
3030

3131
afterEach(() => {

gui/src/components/OverlayTrigger/ResizeOverlayTrigger.spec.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2025 The MathWorks, Inc.
1+
// Copyright 2020-2026 The MathWorks, Inc.
22

33
import { render } from '../../test/utils/react-test';
44
import { fireEvent, waitFor } from '@testing-library/react';
@@ -22,10 +22,12 @@ describe('OverlayTrigger Component', () => {
2222
initialState.tutorialHidden = false;
2323
initialState.overlayVisibility = true;
2424

25-
mockIntersectionObserver.mockReturnValue({
26-
observe,
27-
unobserve,
28-
disconnect
25+
mockIntersectionObserver.mockImplementation(function () {
26+
return {
27+
observe,
28+
unobserve,
29+
disconnect
30+
};
2931
});
3032

3133
window.IntersectionObserver = mockIntersectionObserver;

0 commit comments

Comments
 (0)