From 79e02373d996066ee7c5fa1b9a6abdcd16e70dc0 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 8 Mar 2024 11:48:27 +0100 Subject: [PATCH 1/5] Update scim-patch pkg --- packages/pro | 2 +- packages/types/package.json | 2 +- yarn.lock | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/pro b/packages/pro index 0eca5d2fce..f8529e7a1c 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 0eca5d2fce599dbec35bb02e7ed46054bae9a28d +Subproject commit f8529e7a1c37902e782469b4e19d70d63d603320 diff --git a/packages/types/package.json b/packages/types/package.json index 558e55a632..f4c7b13344 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -23,6 +23,6 @@ "typescript": "5.2.2" }, "dependencies": { - "scim-patch": "^0.7.0" + "scim-patch": "^0.8.1" } } diff --git a/yarn.lock b/yarn.lock index 4025a537a3..235e28e85e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5666,6 +5666,13 @@ dependencies: undici-types "~5.26.4" +"@types/node@^20.4.5": + version "20.11.25" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.25.tgz#0f50d62f274e54dd7a49f7704cc16bfbcccaf49f" + integrity sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw== + dependencies: + undici-types "~5.26.4" + "@types/nodemailer@^6.4.4": version "6.4.14" resolved "https://registry.yarnpkg.com/@types/nodemailer/-/nodemailer-6.4.14.tgz#5c81a5e856db7f8ede80013e6dbad7c5fb2283e2" @@ -19491,11 +19498,12 @@ schema-utils@^3.1.1, schema-utils@^3.1.2: ajv "^6.12.5" ajv-keywords "^3.5.2" -scim-patch@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/scim-patch/-/scim-patch-0.7.0.tgz#3f6d94256c07be415a74a49c0ff48dc91e4e0219" - integrity sha512-wXKcsZl+aLfE0yId7MjiOd91v8as6dEYLFvm1gGu3yJxSPhl1Fl3vWiNN4V3D68UKpqO/umK5rwWc8wGpBaOHw== +scim-patch@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/scim-patch/-/scim-patch-0.8.1.tgz#611bfdb5538f6d8b97aba0ab0f8bd01055b70c1c" + integrity sha512-JRYTA+mJZ8Z5DJGO7kkFc0lGCDs100rNs7iN77mld7gQajTp1R1xjUzMfZTOMAkBDA75GSdbMmfdfMqMJCn/Yg== dependencies: + "@types/node" "^20.4.5" fast-deep-equal "3.1.3" scim2-parse-filter "0.2.8" From ca65e1d36b9d3e7ba04278b82c401dad9a0458d1 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 8 Mar 2024 12:16:33 +0100 Subject: [PATCH 2/5] Tests --- packages/pro | 2 +- packages/worker/src/api/routes/global/tests/scim.spec.ts | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/pro b/packages/pro index f8529e7a1c..70b9f4b263 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit f8529e7a1c37902e782469b4e19d70d63d603320 +Subproject commit 70b9f4b263cf0ed9d7f494c895a836caff77bad8 diff --git a/packages/worker/src/api/routes/global/tests/scim.spec.ts b/packages/worker/src/api/routes/global/tests/scim.spec.ts index 0c4a34be66..106dfb3b19 100644 --- a/packages/worker/src/api/routes/global/tests/scim.spec.ts +++ b/packages/worker/src/api/routes/global/tests/scim.spec.ts @@ -13,17 +13,11 @@ import { events } from "@budibase/backend-core" jest.setTimeout(30000) describe("scim", () => { - beforeAll(async () => { - tk.freeze(mocks.date.MOCK_DATE) - mocks.licenses.useScimIntegration() - - await config.setSCIMConfig(true) - }) - beforeEach(async () => { jest.resetAllMocks() tk.freeze(mocks.date.MOCK_DATE) mocks.licenses.useScimIntegration() + mocks.licenses.useGroups() await config.setSCIMConfig(true) }) @@ -718,7 +712,6 @@ describe("scim", () => { }) it("can fetch groups even if internal groups exist", async () => { - mocks.licenses.useGroups() await config.api.groups.saveGroup(structures.userGroups.userGroup()) await config.api.groups.saveGroup(structures.userGroups.userGroup()) From 37d519e8d35feb82425beff26c3ccc69d1fa1238 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 8 Mar 2024 12:49:37 +0100 Subject: [PATCH 3/5] Update ref --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 70b9f4b263..e2002ee0d1 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 70b9f4b263cf0ed9d7f494c895a836caff77bad8 +Subproject commit e2002ee0d1b93ef54d8a0afb754743fdeb419146 From 4ee7d20857e0d23617085d2b8c09718147fcf242 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 8 Mar 2024 13:01:57 +0100 Subject: [PATCH 4/5] Update pro ref --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index e2002ee0d1..ad9b4b7860 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit e2002ee0d1b93ef54d8a0afb754743fdeb419146 +Subproject commit ad9b4b78600b36c4ff112d343c8e8fbb0be5630c From 72e0388b628d3be0a7b11492f59018f735711b76 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 8 Mar 2024 13:14:20 +0100 Subject: [PATCH 5/5] Fix tests --- packages/pro | 2 +- packages/worker/src/api/routes/global/tests/scim.spec.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/pro b/packages/pro index ad9b4b7860..a1604e6a29 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit ad9b4b78600b36c4ff112d343c8e8fbb0be5630c +Subproject commit a1604e6a29ece75aba1e0b1fbbc074ef357493aa diff --git a/packages/worker/src/api/routes/global/tests/scim.spec.ts b/packages/worker/src/api/routes/global/tests/scim.spec.ts index 106dfb3b19..4766f54f96 100644 --- a/packages/worker/src/api/routes/global/tests/scim.spec.ts +++ b/packages/worker/src/api/routes/global/tests/scim.spec.ts @@ -13,14 +13,17 @@ import { events } from "@budibase/backend-core" jest.setTimeout(30000) describe("scim", () => { - beforeEach(async () => { + async function setup() { jest.resetAllMocks() tk.freeze(mocks.date.MOCK_DATE) mocks.licenses.useScimIntegration() mocks.licenses.useGroups() await config.setSCIMConfig(true) - }) + } + + beforeAll(setup) + beforeEach(setup) const config = new TestConfiguration()