From 96e320e4784b9d20d1814b921407e89c484d6724 Mon Sep 17 00:00:00 2001 From: Soapbox Bot Date: Thu, 5 Jan 2023 18:32:41 +0000 Subject: [PATCH 1/3] Update dependency uuid to v9 --- package.json | 4 ++-- yarn.lock | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index ece6c7fb49..f2b7783caa 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "@types/redux-mock-store": "^1.0.3", "@types/seedrandom": "^3.0.2", "@types/semver": "^7.3.9", - "@types/uuid": "^8.3.4", + "@types/uuid": "^9.0.0", "@types/webpack-assets-manifest": "^5.1.0", "@types/webpack-bundle-analyzer": "^4.6.0", "@types/webpack-deadcode-plugin": "^0.1.2", @@ -198,7 +198,7 @@ "twemoji": "https://github.com/twitter/twemoji#v14.0.2", "typescript": "^4.4.4", "util": "^0.12.4", - "uuid": "^8.3.2", + "uuid": "^9.0.0", "webpack": "^5.72.1", "webpack-assets-manifest": "^5.1.0", "webpack-bundle-analyzer": "^4.5.0", diff --git a/yarn.lock b/yarn.lock index d8df4b0bb0..169db65760 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2986,10 +2986,10 @@ resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== -"@types/uuid@^8.3.4": - version "8.3.4" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" - integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== +"@types/uuid@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.0.tgz#53ef263e5239728b56096b0a869595135b7952d2" + integrity sha512-kr90f+ERiQtKWMz5rP32ltJ/BtULDI5RVO0uavn1HQUOwjx0R1h0rnDYNL0CepF1zL5bSY6FISAfd9tOdDhU5Q== "@types/webpack-assets-manifest@^5.1.0": version "5.1.0" @@ -11699,6 +11699,11 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" From 5297d8dde332bf076f2c4177f28658ae660b5555 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 5 Jan 2023 15:47:26 -0600 Subject: [PATCH 2/3] Remove uuid mock from Jest --- .../components/ui/form-group/__tests__/form-group.test.tsx | 2 -- app/soapbox/jest/test-setup.ts | 3 --- 2 files changed, 5 deletions(-) diff --git a/app/soapbox/components/ui/form-group/__tests__/form-group.test.tsx b/app/soapbox/components/ui/form-group/__tests__/form-group.test.tsx index 676631a3b5..a762000922 100644 --- a/app/soapbox/components/ui/form-group/__tests__/form-group.test.tsx +++ b/app/soapbox/components/ui/form-group/__tests__/form-group.test.tsx @@ -3,8 +3,6 @@ import React from 'react'; import { render, screen } from '../../../../jest/test-helpers'; import FormGroup from '../form-group'; -jest.mock('uuid', () => jest.requireActual('uuid')); - describe('', () => { it('connects the label and input', () => { render( diff --git a/app/soapbox/jest/test-setup.ts b/app/soapbox/jest/test-setup.ts index 02b746f181..dc27e9a89d 100644 --- a/app/soapbox/jest/test-setup.ts +++ b/app/soapbox/jest/test-setup.ts @@ -15,9 +15,6 @@ jest.mock('soapbox/queries/client'); // https://dev.to/andyhaskell/testing-your-indexeddb-code-with-jest-2o17 require('fake-indexeddb/auto'); -// Mock external dependencies -jest.mock('uuid', () => ({ v4: jest.fn(() => '1') })); - // Clear toasts after each test. afterEach(() => { toast.remove(); From 31ba2409bee6ca9df5b26acf49873b1868d14331 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 5 Jan 2023 15:49:11 -0600 Subject: [PATCH 3/3] Jest: remove unneeded moduleNameMapper for uuid --- jest.config.js | Bin 1689 -> 1550 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jest.config.js b/jest.config.js index 804234ebc1a1fb275a85776b70cb9d11c2d395af..0974fb6217eedac8c2a0b2772daf21ba9c951330 100644 GIT binary patch delta 12 TcmbQq+sCuv9P{Q#76&E(9%KX* delta 125 zcmeC