From 542945030703ea7eb6fa19ff67392e6941308f58 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 30 Sep 2024 22:33:28 -0400 Subject: [PATCH 1/2] refactor: remove resize-observer-polyfill Signed-off-by: Adam Setch --- package.json | 1 - src/renderer/components/settings/AppearanceSettings.test.tsx | 2 -- src/renderer/components/settings/SettingsFooter.test.tsx | 2 -- src/renderer/routes/Settings.test.tsx | 2 -- 4 files changed, 7 deletions(-) diff --git a/package.json b/package.json index 068adae..5581b96 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,6 @@ "nock": "13.5.5", "postcss": "8.4.47", "postcss-loader": "8.1.1", - "resize-observer-polyfill": "1.5.1", "rimraf": "6.0.1", "tailwind-merge": "2.5.2", "tailwindcss": "3.4.13", diff --git a/src/renderer/components/settings/AppearanceSettings.test.tsx b/src/renderer/components/settings/AppearanceSettings.test.tsx index 0323cae..6ed5ab9 100644 --- a/src/renderer/components/settings/AppearanceSettings.test.tsx +++ b/src/renderer/components/settings/AppearanceSettings.test.tsx @@ -5,8 +5,6 @@ import { mockAuth, mockSettings } from '../../__mocks__/state-mocks'; import { AppContext } from '../../context/App'; import { AppearanceSettings } from './AppearanceSettings'; -global.ResizeObserver = require('resize-observer-polyfill'); - describe('renderer/routes/components/settings/AppearanceSettings.tsx', () => { const updateSetting = jest.fn(); const zoomTimeout = () => new Promise((r) => setTimeout(r, 300)); diff --git a/src/renderer/components/settings/SettingsFooter.test.tsx b/src/renderer/components/settings/SettingsFooter.test.tsx index 36bea5f..e1232e2 100644 --- a/src/renderer/components/settings/SettingsFooter.test.tsx +++ b/src/renderer/components/settings/SettingsFooter.test.tsx @@ -11,8 +11,6 @@ jest.mock('react-router-dom', () => ({ useNavigate: () => mockNavigate, })); -global.ResizeObserver = require('resize-observer-polyfill'); - describe('renderer/routes/components/settings/SettingsFooter.tsx', () => { let originalEnv: NodeJS.ProcessEnv; diff --git a/src/renderer/routes/Settings.test.tsx b/src/renderer/routes/Settings.test.tsx index 4ba84bc..a723944 100644 --- a/src/renderer/routes/Settings.test.tsx +++ b/src/renderer/routes/Settings.test.tsx @@ -4,8 +4,6 @@ import { mockAuth, mockSettings } from '../__mocks__/state-mocks'; import { AppContext } from '../context/App'; import { SettingsRoute } from './Settings'; -global.ResizeObserver = require('resize-observer-polyfill'); - const mockNavigate = jest.fn(); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), From 6c885d42f32bf29f2f708098bd962b4381bb1b58 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 30 Sep 2024 22:37:49 -0400 Subject: [PATCH 2/2] refactor: remove resize-observer-polyfill Signed-off-by: Adam Setch --- pnpm-lock.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a38b875..2143e9c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -165,9 +165,6 @@ importers: postcss-loader: specifier: 8.1.1 version: 8.1.1(postcss@8.4.47)(typescript@5.6.2)(webpack@5.95.0(webpack-cli@5.1.4)) - resize-observer-polyfill: - specifier: 1.5.1 - version: 1.5.1 rimraf: specifier: 6.0.1 version: 6.0.1 @@ -3674,9 +3671,6 @@ packages: resolution: {integrity: sha512-/FJ6/gKAXbcHtivannhecWsa43kGVFK3aHHv9Jm3x0eFiM31MoGihkAOWbm3UsvjYLRVw0zTkfARy2dI96JL1Q==} engines: {node: '>=12', npm: '>=6'} - resize-observer-polyfill@1.5.1: - resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} - resolve-alpn@1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} @@ -8787,8 +8781,6 @@ snapshots: dependencies: pe-library: 0.4.1 - resize-observer-polyfill@1.5.1: {} - resolve-alpn@1.2.1: {} resolve-cwd@3.0.0: