From f904b829d1994417a177b0c7fb58e70ea31ad3ca Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Tue, 17 Dec 2024 15:00:35 +0800 Subject: [PATCH] fix(deps): update nwsapi to version 2.2.13 and add @vitejs/plugin-legacy --- package.json | 7 +++---- pnpm-lock.yaml | 13 ++++++++----- tests/table/index.test.tsx | 6 ++++++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 2c878bf94df7..e98e2e3f9d2b 100644 --- a/package.json +++ b/package.json @@ -173,6 +173,8 @@ "vitest": "^2.1.8", "write-pkg": "^4.0.0", "xhr-mock": "^2.5.1", + "@vitejs/plugin-legacy": "^6.0.0", + "nwsapi": "2.2.13", "yorkie": "^2.0.0", "zustand": "^4.5.5" }, @@ -181,8 +183,5 @@ "commit-msg": "fabric verify-commit" }, "packageManager": "pnpm@9.6.0", - "version": "", - "dependencies": { - "@vitejs/plugin-legacy": "^6.0.0" - } + "version": "" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa60f7a68116..9504951e9243 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,9 @@ importers: '@vitejs/plugin-legacy': specifier: ^6.0.0 version: 6.0.0(terser@5.37.0) + nwsapi: + specifier: 2.2.13 + version: 2.2.13 devDependencies: '@ant-design/antd-theme-variable': specifier: ^1.0.0 @@ -9868,8 +9871,8 @@ packages: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} engines: {node: '>=0.10.0'} - nwsapi@2.2.16: - resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} + nwsapi@2.2.13: + resolution: {integrity: sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==} oauth-sign@0.9.0: resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} @@ -23802,7 +23805,7 @@ snapshots: http-proxy-agent: 4.0.1 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.16 + nwsapi: 2.2.13 parse5: 6.0.1 saxes: 5.0.1 symbol-tree: 3.2.4 @@ -23830,7 +23833,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.16 + nwsapi: 2.2.13 parse5: 7.2.1 rrweb-cssom: 0.7.1 saxes: 6.0.0 @@ -25788,7 +25791,7 @@ snapshots: number-is-nan@1.0.1: {} - nwsapi@2.2.16: {} + nwsapi@2.2.13: {} oauth-sign@0.9.0: {} diff --git a/tests/table/index.test.tsx b/tests/table/index.test.tsx index 6b77eb77010d..95fc8d1cfa43 100644 --- a/tests/table/index.test.tsx +++ b/tests/table/index.test.tsx @@ -1,3 +1,5 @@ +/* eslint-disable @babel/no-unused-expressions */ +/* eslint-disable @typescript-eslint/no-unused-expressions */ /** * @vitest-environment jsdom */ @@ -169,6 +171,10 @@ describe('BasicTable', () => { } }); + vi.spyOn(document, 'visibilityState' as any, 'get').mockReturnValue( + 'visible', + ); + const html = render(