From 98bbd86d74d399de45aece73e6bd841fe6cc04c7 Mon Sep 17 00:00:00 2001 From: Brian Donovan <1938+eventualbuddha@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:25:11 -0700 Subject: [PATCH] chore: update `@types/luxon` and fix `ui` tests --- apps/central-scan/backend/package.json | 2 +- apps/mark/frontend/package.json | 2 +- apps/scan/backend/package.json | 2 +- libs/ballot-interpreter-nh/package.json | 2 +- libs/test-utils/package.json | 2 +- libs/types/package.json | 2 +- libs/ui/package.json | 2 +- libs/ui/src/set_clock.test.tsx | 40 ++++++++------ libs/ui/src/tally_report_metadata.test.tsx | 2 +- libs/utils/package.json | 2 +- pnpm-lock.yaml | 64 +++++++++------------- 11 files changed, 56 insertions(+), 66 deletions(-) diff --git a/apps/central-scan/backend/package.json b/apps/central-scan/backend/package.json index 8231f2e1b3..298e9fb3f9 100644 --- a/apps/central-scan/backend/package.json +++ b/apps/central-scan/backend/package.json @@ -82,7 +82,7 @@ "@types/express": "^4.17.14", "@types/fs-extra": "^9.0.6", "@types/jest": "^26.0.6", - "@types/luxon": "^1.26.5", + "@types/luxon": "^3.0.0", "@types/multer": "^1.4.7", "@types/node": "16.11.29", "@types/supertest": "^2.0.10", diff --git a/apps/mark/frontend/package.json b/apps/mark/frontend/package.json index 80771bfdb2..1d4bb76941 100644 --- a/apps/mark/frontend/package.json +++ b/apps/mark/frontend/package.json @@ -132,7 +132,7 @@ "@types/debug": "^4.1.6", "@types/history": "^4.7.8", "@types/kiosk-browser": "workspace:*", - "@types/luxon": "^1.26.2", + "@types/luxon": "^3.0.0", "@types/react-gamepad": "^1.0.0", "@types/setimmediate": "^1.0.2", "@types/testing-library__jest-dom": "^5.14.3", diff --git a/apps/scan/backend/package.json b/apps/scan/backend/package.json index 95ff376931..5db1e5733f 100644 --- a/apps/scan/backend/package.json +++ b/apps/scan/backend/package.json @@ -79,7 +79,7 @@ "@types/express": "^4.17.13", "@types/fs-extra": "^9.0.6", "@types/jest": "^26.0.6", - "@types/luxon": "^1.26.5", + "@types/luxon": "^3.0.0", "@types/multer": "^1.4.7", "@types/node": "16.11.29", "@types/supertest": "^2.0.10", diff --git a/libs/ballot-interpreter-nh/package.json b/libs/ballot-interpreter-nh/package.json index c33fd407ee..3849f790c4 100644 --- a/libs/ballot-interpreter-nh/package.json +++ b/libs/ballot-interpreter-nh/package.json @@ -43,7 +43,7 @@ "@types/he": "^1.1.2", "@types/jest": "^27.4.0", "@types/jsdom": "^20.0.0", - "@types/luxon": "^2.0.9", + "@types/luxon": "^3.0.0", "@types/tmp": "^0.2.3", "@typescript-eslint/eslint-plugin": "^5.37.0", "@typescript-eslint/parser": "^5.37.0", diff --git a/libs/test-utils/package.json b/libs/test-utils/package.json index 5530db4b43..13c9fa6d46 100644 --- a/libs/test-utils/package.json +++ b/libs/test-utils/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/jest": "^27.0.3", "@types/kiosk-browser": "workspace:*", - "@types/luxon": "^1.26.5", + "@types/luxon": "^3.0.0", "@types/react": "17.0.39", "@types/zip-stream": "workspace:*", "@typescript-eslint/eslint-plugin": "^5.37.0", diff --git a/libs/types/package.json b/libs/types/package.json index d4dd8033c6..251dbdd8c9 100644 --- a/libs/types/package.json +++ b/libs/types/package.json @@ -47,7 +47,7 @@ "devDependencies": { "@types/jest": "^27.0.3", "@types/kiosk-browser": "workspace:*", - "@types/luxon": "^2.3.2", + "@types/luxon": "^3.0.0", "@types/node": "16.11.29", "@types/react": "17.0.39", "@typescript-eslint/eslint-plugin": "^5.37.0", diff --git a/libs/ui/package.json b/libs/ui/package.json index 73b2d09854..03b3030b1b 100644 --- a/libs/ui/package.json +++ b/libs/ui/package.json @@ -80,7 +80,7 @@ "@types/history": "4", "@types/jest": "^27.0.3", "@types/kiosk-browser": "workspace:*", - "@types/luxon": "^1.26.5", + "@types/luxon": "^3.0.0", "@types/node": "16.11.29", "@types/pluralize": "^0.0.29", "@types/react": "17.0.39", diff --git a/libs/ui/src/set_clock.test.tsx b/libs/ui/src/set_clock.test.tsx index 70b8bb68ff..76b4994ef8 100644 --- a/libs/ui/src/set_clock.test.tsx +++ b/libs/ui/src/set_clock.test.tsx @@ -23,15 +23,17 @@ function getSelect(testId: string): HTMLSelectElement { return screen.getByTestId(testId); } -const aDate = DateTime.fromObject({ - year: 2021, - month: 3, - day: 31, - hour: 19, - minute: 34, - second: 56, - zone: 'America/Los_Angeles', -}); +const aDate = DateTime.fromObject( + { + year: 2021, + month: 3, + day: 31, + hour: 19, + minute: 34, + second: 56, + }, + { zone: 'America/Los_Angeles' } +); describe('PickDateTimeModal', () => { test('shows pickers for the datetime parts of the given time', () => { @@ -141,15 +143,17 @@ describe('PickDateTimeModal', () => { // Expect a changed timezone expect(onSave).toHaveBeenNthCalledWith( 3, - DateTime.fromObject({ - year: aDate.year, - month: aDate.month, - day: changedDay, - hour: aDate.hour, - minute: aDate.minute, - second: 0, - zone: 'America/Chicago', - }) + DateTime.fromObject( + { + year: aDate.year, + month: aDate.month, + day: changedDay, + hour: aDate.hour, + minute: aDate.minute, + second: 0, + }, + { zone: 'America/Chicago' } + ) ); }); diff --git a/libs/ui/src/tally_report_metadata.test.tsx b/libs/ui/src/tally_report_metadata.test.tsx index 89bd75b24f..f465929cee 100644 --- a/libs/ui/src/tally_report_metadata.test.tsx +++ b/libs/ui/src/tally_report_metadata.test.tsx @@ -25,6 +25,6 @@ test('Renders report metadata', () => { getByText(/Choctaw County/); getByText(/State of Mississippi/); getByText( - /This report was created on Tuesday, November 3, 2020 at 10:22:00 PM UTC/ + /This report was created on Tuesday, November 3, 2020, 10:22:00 PM UTC/ ); }); diff --git a/libs/utils/package.json b/libs/utils/package.json index a12c20f354..eb44bb34c1 100644 --- a/libs/utils/package.json +++ b/libs/utils/package.json @@ -56,7 +56,7 @@ "@types/fast-text-encoding": "^1.0.1", "@types/jest": "^27.0.3", "@types/kiosk-browser": "workspace:*", - "@types/luxon": "^1.26.5", + "@types/luxon": "^3.0.0", "@types/randombytes": "^2.0.0", "@types/yargs": "^17.0.12", "@typescript-eslint/eslint-plugin": "^5.37.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 229b23c5e4..82f6522522 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -616,7 +616,7 @@ importers: '@types/express': ^4.17.14 '@types/fs-extra': ^9.0.6 '@types/jest': ^26.0.6 - '@types/luxon': ^1.26.5 + '@types/luxon': ^3.0.0 '@types/multer': ^1.4.7 '@types/node': 16.11.29 '@types/supertest': ^2.0.10 @@ -729,7 +729,7 @@ importers: '@types/express': 4.17.14 '@types/fs-extra': 9.0.13 '@types/jest': 26.0.23 - '@types/luxon': 1.27.1 + '@types/luxon': 3.2.0 '@types/multer': 1.4.7 '@types/node': 16.11.29 '@types/supertest': 2.0.10 @@ -1123,7 +1123,7 @@ importers: '@types/jest': 25.2.2 '@types/kiosk-browser': workspace:* '@types/lodash.camelcase': ^4.3.6 - '@types/luxon': ^1.26.2 + '@types/luxon': ^3.0.0 '@types/pluralize': ^0.0.29 '@types/react': 17.0.39 '@types/react-dom': ^17.0.0 @@ -1299,7 +1299,7 @@ importers: '@types/debug': 4.1.7 '@types/history': 4.7.11 '@types/kiosk-browser': link:../../../libs/@types/kiosk-browser - '@types/luxon': 1.27.1 + '@types/luxon': 3.2.0 '@types/react-gamepad': 1.0.0 '@types/setimmediate': 1.0.2 '@types/testing-library__jest-dom': 5.14.3 @@ -1425,7 +1425,7 @@ importers: '@types/express': ^4.17.13 '@types/fs-extra': ^9.0.6 '@types/jest': ^26.0.6 - '@types/luxon': ^1.26.5 + '@types/luxon': ^3.0.0 '@types/multer': ^1.4.7 '@types/node': 16.11.29 '@types/supertest': ^2.0.10 @@ -1532,7 +1532,7 @@ importers: '@types/express': 4.17.14 '@types/fs-extra': 9.0.13 '@types/jest': 26.0.23 - '@types/luxon': 1.27.1 + '@types/luxon': 3.2.0 '@types/multer': 1.4.7 '@types/node': 16.11.29 '@types/supertest': 2.0.10 @@ -2114,7 +2114,7 @@ importers: '@types/he': ^1.1.2 '@types/jest': ^27.4.0 '@types/jsdom': ^20.0.0 - '@types/luxon': ^2.0.9 + '@types/luxon': ^3.0.0 '@types/tmp': ^0.2.3 '@typescript-eslint/eslint-plugin': ^5.37.0 '@typescript-eslint/parser': ^5.37.0 @@ -2174,7 +2174,7 @@ importers: '@types/he': 1.1.2 '@types/jest': 27.4.1 '@types/jsdom': 20.0.0 - '@types/luxon': 2.3.0 + '@types/luxon': 3.2.0 '@types/tmp': 0.2.3 '@typescript-eslint/eslint-plugin': 5.37.0_clqnhij63k7sxivgn64qsibvv4 '@typescript-eslint/parser': 5.37.0_2owex2qphpdtje5ztrbqluisqa @@ -3175,7 +3175,7 @@ importers: '@types/deep-eql': ^4.0.0 '@types/jest': ^27.0.3 '@types/kiosk-browser': workspace:* - '@types/luxon': ^1.26.5 + '@types/luxon': ^3.0.0 '@types/node': 16.11.29 '@types/react': 17.0.39 '@types/zip-stream': workspace:* @@ -3224,7 +3224,7 @@ importers: devDependencies: '@types/jest': 27.0.3 '@types/kiosk-browser': link:../@types/kiosk-browser - '@types/luxon': 1.27.1 + '@types/luxon': 3.2.0 '@types/react': 17.0.39 '@types/zip-stream': link:../@types/zip-stream '@typescript-eslint/eslint-plugin': 5.37.0_clqnhij63k7sxivgn64qsibvv4 @@ -3253,7 +3253,7 @@ importers: '@antongolub/iso8601': ^1.2.1 '@types/jest': ^27.0.3 '@types/kiosk-browser': workspace:* - '@types/luxon': ^2.3.2 + '@types/luxon': ^3.0.0 '@types/node': 16.11.29 '@types/react': 17.0.39 '@typescript-eslint/eslint-plugin': ^5.37.0 @@ -3295,7 +3295,7 @@ importers: devDependencies: '@types/jest': 27.0.3 '@types/kiosk-browser': link:../@types/kiosk-browser - '@types/luxon': 2.3.2 + '@types/luxon': 3.2.0 '@types/node': 16.11.29 '@types/react': 17.0.39 '@typescript-eslint/eslint-plugin': 5.37.0_clqnhij63k7sxivgn64qsibvv4 @@ -3344,7 +3344,7 @@ importers: '@types/jest': ^27.0.3 '@types/kiosk-browser': workspace:* '@types/lodash.clonedeep': ^4.5.7 - '@types/luxon': ^1.26.5 + '@types/luxon': ^3.0.0 '@types/node': 16.11.29 '@types/pluralize': ^0.0.29 '@types/react': 17.0.39 @@ -3460,7 +3460,7 @@ importers: '@types/history': 4.7.11 '@types/jest': 27.0.3 '@types/kiosk-browser': link:../@types/kiosk-browser - '@types/luxon': 1.27.1 + '@types/luxon': 3.2.0 '@types/node': 16.11.29 '@types/pluralize': 0.0.29 '@types/react': 17.0.39 @@ -3518,7 +3518,7 @@ importers: '@types/fast-text-encoding': ^1.0.1 '@types/jest': ^27.0.3 '@types/kiosk-browser': workspace:* - '@types/luxon': ^1.26.5 + '@types/luxon': ^3.0.0 '@types/node': 16.11.29 '@types/randombytes': ^2.0.0 '@types/yargs': ^17.0.12 @@ -3582,7 +3582,7 @@ importers: '@types/fast-text-encoding': 1.0.1 '@types/jest': 27.0.3 '@types/kiosk-browser': link:../@types/kiosk-browser - '@types/luxon': 1.26.5 + '@types/luxon': 3.2.0 '@types/randombytes': 2.0.0 '@types/yargs': 17.0.12 '@typescript-eslint/eslint-plugin': 5.37.0_clqnhij63k7sxivgn64qsibvv4 @@ -10218,20 +10218,8 @@ packages: /@types/lodash/4.14.191: resolution: {integrity: sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==} - /@types/luxon/1.26.5: - resolution: {integrity: sha512-XeQxxRMyJi1znfzHw4CGDLyup/raj84SnjjkI2fDootZPGlB0yqtvlvEIAmzHDa5wiEI5JJevZOWxpcofsaV+A==} - dev: true - - /@types/luxon/1.27.1: - resolution: {integrity: sha512-cPiXpOvPFDr2edMnOXlz3UBDApwUfR+cpizvxCy0n3vp9bz/qe8BWzHPIEFcy+ogUOyjKuCISgyq77ELZPmkkg==} - dev: true - - /@types/luxon/2.3.0: - resolution: {integrity: sha512-mWXdRlg+5dWvxU+uaijB2RY5NrJtMEXR6j+D6W66hPuezSVXrQqQvWa/JNHntgEYgjzeoVRrQVmMWAbKjUJiFQ==} - dev: true - - /@types/luxon/2.3.2: - resolution: {integrity: sha512-WOehptuhKIXukSUUkRgGbj2c997Uv/iUgYgII8U7XLJqq9W2oF0kQ6frEznRQbdurioz+L/cdaIm4GutTQfgmA==} + /@types/luxon/3.2.0: + resolution: {integrity: sha512-lGmaGFoaXHuOLXFvuju2bfvZRqxAqkHPx9Y9IQdQABrinJJshJwfNCKV+u7rR3kJbiqfTF/NhOkcxxAFrObyaA==} dev: true /@types/mdast/3.0.3: @@ -17526,7 +17514,7 @@ packages: '@typescript-eslint/eslint-plugin': 5.37.0_clqnhij63k7sxivgn64qsibvv4 '@typescript-eslint/utils': 5.22.0_2owex2qphpdtje5ztrbqluisqa eslint: 8.23.1 - jest: 27.3.1_canvas@2.9.1 + jest: 27.3.1 transitivePeerDependencies: - supports-color - typescript @@ -18966,7 +18954,7 @@ packages: inherits: 2.0.4 readable-stream: 2.3.7 - /follow-redirects/1.14.1_debug@4.3.2: + /follow-redirects/1.14.1: resolution: {integrity: sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==} engines: {node: '>=4.0'} peerDependencies: @@ -18974,11 +18962,9 @@ packages: peerDependenciesMeta: debug: optional: true - dependencies: - debug: 4.3.2 dev: false - /follow-redirects/1.14.1_debug@4.3.4: + /follow-redirects/1.14.1_debug@4.3.2: resolution: {integrity: sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==} engines: {node: '>=4.0'} peerDependencies: @@ -18987,7 +18973,7 @@ packages: debug: optional: true dependencies: - debug: 4.3.4 + debug: 4.3.2 dev: false /for-each/0.3.3: @@ -19945,7 +19931,7 @@ packages: engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.14.1_debug@4.3.2 + follow-redirects: 1.14.1 requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -19956,7 +19942,7 @@ packages: engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.14.1_debug@4.3.4 + follow-redirects: 1.14.1_debug@4.3.2 requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -30824,7 +30810,7 @@ packages: '@types/jest': 27.0.3 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 27.3.1_canvas@2.9.1 + jest: 27.3.1 jest-util: 27.3.1 json5: 2.2.0 lodash.memoize: 4.1.2