From 961fd8ea99228128aeb4010922f141dbccc3203c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:16:00 +0800 Subject: [PATCH] fix(deps): update dependency snakecase-keys to v7 (#5556) * fix(deps): update dependency snakecase-keys to v7 * test: wait for 1ms for every api test --------- Co-authored-by: Gao Sun --- packages/connectors/templates/package.json | 2 +- packages/core/package.json | 2 +- packages/integration-tests/jest.setup.api.js | 10 ++ .../src/tests/api/admin-user.test.ts | 13 +- .../happy-path.test.ts | 6 - pnpm-lock.yaml | 140 +++++++++--------- 6 files changed, 83 insertions(+), 90 deletions(-) diff --git a/packages/connectors/templates/package.json b/packages/connectors/templates/package.json index e4f90ce335f..d750610fe60 100644 --- a/packages/connectors/templates/package.json +++ b/packages/connectors/templates/package.json @@ -24,7 +24,7 @@ "dependencies": { "@silverhand/essentials": "^2.9.0", "got": "^14.0.0", - "snakecase-keys": "^6.0.0", + "snakecase-keys": "^7.0.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index efd7edf481c..53616bfe172 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -87,7 +87,7 @@ "semver": "^7.3.8", "@silverhand/slonik": "31.0.0-beta.2", "snake-case": "^3.0.4", - "snakecase-keys": "^6.0.0", + "snakecase-keys": "^7.0.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/packages/integration-tests/jest.setup.api.js b/packages/integration-tests/jest.setup.api.js index d31c2670de6..8f0fcd63c65 100644 --- a/packages/integration-tests/jest.setup.api.js +++ b/packages/integration-tests/jest.setup.api.js @@ -5,3 +5,13 @@ import { authedAdminTenantApi } from './lib/api/api.js'; await authedAdminTenantApi.patch('sign-in-exp', { json: { signInMode: 'SignInAndRegister' }, }); + +const waitFor = async (ms) => + new Promise((resolve) => { + setTimeout(resolve, ms); + }); + +global.afterEach(async () => { + // Try to mitigate the issue of "Socket hang up". See https://github.com/nodejs/node/issues/47130 + await waitFor(1); +}); diff --git a/packages/integration-tests/src/tests/api/admin-user.test.ts b/packages/integration-tests/src/tests/api/admin-user.test.ts index 789a01ec674..b8b04231a41 100644 --- a/packages/integration-tests/src/tests/api/admin-user.test.ts +++ b/packages/integration-tests/src/tests/api/admin-user.test.ts @@ -25,21 +25,10 @@ import { import { clearConnectorsByTypes } from '#src/helpers/connector.js'; import { createUserByAdmin, expectRejects } from '#src/helpers/index.js'; import { createNewSocialUserWithUsernameAndPassword } from '#src/helpers/interactions.js'; -import { - generateUsername, - generateEmail, - generatePhone, - generatePassword, - waitFor, -} from '#src/utils.js'; +import { generateUsername, generateEmail, generatePhone, generatePassword } from '#src/utils.js'; const randomString = () => crypto.randomBytes(8).toString('hex'); -afterEach(async () => { - // Try to mitigate the issue of "Socket hang up". See https://github.com/nodejs/node/issues/47130 - await waitFor(0); -}); - describe('admin console user management', () => { beforeAll(async () => { await clearConnectorsByTypes([ConnectorType.Social]); diff --git a/packages/integration-tests/src/tests/api/interaction/register-with-identifier/happy-path.test.ts b/packages/integration-tests/src/tests/api/interaction/register-with-identifier/happy-path.test.ts index 8d739c89e56..94f7c04e955 100644 --- a/packages/integration-tests/src/tests/api/interaction/register-with-identifier/happy-path.test.ts +++ b/packages/integration-tests/src/tests/api/interaction/register-with-identifier/happy-path.test.ts @@ -24,12 +24,6 @@ import { resetPasswordPolicy, } from '#src/helpers/sign-in-experience.js'; import { generateNewUserProfile, generateNewUser } from '#src/helpers/user.js'; -import { waitFor } from '#src/utils.js'; - -afterEach(async () => { - // Try to mitigate the issue of "Socket hang up". See https://github.com/nodejs/node/issues/47130 - await waitFor(0); -}); describe('register with username and password', () => { it('register with username and password', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7d4c7d9496..f4d4db44daa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -249,8 +249,8 @@ importers: specifier: ^0.6.3 version: 0.6.3 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -331,8 +331,8 @@ importers: specifier: ^0.6.3 version: 0.6.3 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -407,8 +407,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -480,8 +480,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -559,8 +559,8 @@ importers: specifier: ^5.0.0 version: 5.0.1 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -638,8 +638,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -714,8 +714,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -787,8 +787,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -860,8 +860,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -933,8 +933,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1009,8 +1009,8 @@ importers: specifier: ^9.0.0 version: 9.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1082,8 +1082,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1155,8 +1155,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1228,8 +1228,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1304,8 +1304,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1377,8 +1377,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1450,8 +1450,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1523,8 +1523,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1596,8 +1596,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1669,8 +1669,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1742,8 +1742,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1815,8 +1815,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1891,8 +1891,8 @@ importers: specifier: ^9.0.0 version: 9.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -1973,8 +1973,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2052,8 +2052,8 @@ importers: specifier: 2.8.10 version: 2.8.10 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2125,8 +2125,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2198,8 +2198,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2274,8 +2274,8 @@ importers: specifier: ^6.9.9 version: 6.9.9 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2350,8 +2350,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2423,8 +2423,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2496,8 +2496,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2569,8 +2569,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -2642,8 +2642,8 @@ importers: specifier: ^14.0.0 version: 14.0.0 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -3195,8 +3195,8 @@ importers: specifier: ^3.0.4 version: 3.0.4 snakecase-keys: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^7.0.0 + version: 7.0.0 zod: specifier: ^3.22.4 version: 3.22.4 @@ -19907,8 +19907,8 @@ packages: tslib: 2.4.1 dev: false - /snakecase-keys@6.0.0: - resolution: {integrity: sha512-E5a0C3rcj+Cvq+dt41mw6tV6Wx78/JpQyR71GDiyGSXdp3jEvKxv8pIP0tOHmEMiqKVZSwflXtlWwqNn5oTbbQ==} + /snakecase-keys@7.0.0: + resolution: {integrity: sha512-yFnXqBIFFpXlIWiGPvYhfelzQqRVchuM1XIQXVwIFrZuNWBPE6vBkuJitzbl6yMIjjpA40IYxqi88BE9RX2Yxw==} engines: {node: '>=18'} dependencies: map-obj: 4.3.0