Merge pull request #3799 from element-hq/toger5/fix-rollup-security-alert
Update vite, vitest and rollup
This commit is contained in:
@@ -79,7 +79,7 @@
|
|||||||
"@vector-im/compound-design-tokens": "^6.0.0",
|
"@vector-im/compound-design-tokens": "^6.0.0",
|
||||||
"@vector-im/compound-web": "^8.0.0",
|
"@vector-im/compound-web": "^8.0.0",
|
||||||
"@vitejs/plugin-react": "^4.0.1",
|
"@vitejs/plugin-react": "^4.0.1",
|
||||||
"@vitest/coverage-v8": "^3.0.0",
|
"@vitest/coverage-v8": "^4.0.18",
|
||||||
"babel-plugin-transform-vite-meta-env": "^1.0.3",
|
"babel-plugin-transform-vite-meta-env": "^1.0.3",
|
||||||
"classnames": "^2.3.1",
|
"classnames": "^2.3.1",
|
||||||
"copy-to-clipboard": "^3.3.3",
|
"copy-to-clipboard": "^3.3.3",
|
||||||
@@ -128,12 +128,12 @@
|
|||||||
"unique-names-generator": "^4.6.0",
|
"unique-names-generator": "^4.6.0",
|
||||||
"uuid": "^13.0.0",
|
"uuid": "^13.0.0",
|
||||||
"vaul": "^1.0.0",
|
"vaul": "^1.0.0",
|
||||||
"vite": "^7.0.0",
|
"vite": "^7.3.0",
|
||||||
"vite-plugin-generate-file": "^0.3.0",
|
"vite-plugin-generate-file": "^0.3.0",
|
||||||
"vite-plugin-html": "^3.2.2",
|
"vite-plugin-html": "^3.2.2",
|
||||||
"vite-plugin-node-stdlib-browser": "^0.2.1",
|
"vite-plugin-node-stdlib-browser": "^0.2.1",
|
||||||
"vite-plugin-svgr": "^4.0.0",
|
"vite-plugin-svgr": "^4.0.0",
|
||||||
"vitest": "^3.0.0",
|
"vitest": "^4.0.18",
|
||||||
"vitest-axe": "^1.0.0-pre.3"
|
"vitest-axe": "^1.0.0-pre.3"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
|||||||
@@ -30,7 +30,13 @@ import {
|
|||||||
} from "../utils/test";
|
} from "../utils/test";
|
||||||
import { initializeWidget } from "../widget";
|
import { initializeWidget } from "../widget";
|
||||||
initializeWidget();
|
initializeWidget();
|
||||||
export const TestAudioContextConstructor = vi.fn(() => testAudioContext);
|
export const TestAudioContextConstructor = vi.fn(
|
||||||
|
class {
|
||||||
|
public constructor() {
|
||||||
|
return testAudioContext;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const MediaDevicesProvider = MediaDevicesContext.MediaDevicesContext.Provider;
|
const MediaDevicesProvider = MediaDevicesContext.MediaDevicesContext.Provider;
|
||||||
|
|
||||||
|
|||||||
@@ -90,11 +90,18 @@ export const testAudioContext = {
|
|||||||
createStereoPanner: vi.fn().mockReturnValue(panNode),
|
createStereoPanner: vi.fn().mockReturnValue(panNode),
|
||||||
close: vi.fn().mockResolvedValue(undefined),
|
close: vi.fn().mockResolvedValue(undefined),
|
||||||
};
|
};
|
||||||
export const TestAudioContextConstructor = vi.fn(() => testAudioContext);
|
|
||||||
|
const TestAudioContext = vi.fn(
|
||||||
|
class {
|
||||||
|
public constructor() {
|
||||||
|
return testAudioContext;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
let user: UserEvent;
|
let user: UserEvent;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.stubGlobal("AudioContext", TestAudioContextConstructor);
|
vi.stubGlobal("AudioContext", TestAudioContext);
|
||||||
user = userEvent.setup();
|
user = userEvent.setup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -443,10 +443,10 @@ export class MockRTCSession extends TypedEventEmitter<
|
|||||||
public asMockedSession(): MockedObject<MatrixRTCSession> {
|
public asMockedSession(): MockedObject<MatrixRTCSession> {
|
||||||
const session = this as unknown as MockedObject<MatrixRTCSession>;
|
const session = this as unknown as MockedObject<MatrixRTCSession>;
|
||||||
|
|
||||||
vi.mocked(session).reemitEncryptionKeys = vi
|
session.reemitEncryptionKeys = vi
|
||||||
.fn<() => void>()
|
.fn<() => void>()
|
||||||
.mockReturnValue(undefined);
|
.mockReturnValue(undefined);
|
||||||
vi.mocked(session).getOldestMembership = vi
|
session.getOldestMembership = vi
|
||||||
.fn<() => CallMembership | undefined>()
|
.fn<() => CallMembership | undefined>()
|
||||||
.mockReturnValue(this.memberships[0]);
|
.mockReturnValue(this.memberships[0]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user