From 45355e3adef6a177ba69aec9005a6ca6f5b33dea Mon Sep 17 00:00:00 2001 From: Tyler Pina Date: Thu, 15 Jan 2026 10:52:24 -0700 Subject: [PATCH 1/4] feat: cma-v12 --- package-lock.json | 261 +++++++++++++++++++++++++++++++++++++--------- package.json | 2 +- 2 files changed, 214 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96076684c..a0bcd0c67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "contentful-collection": "^0.0.4", "contentful-export": "^7.21.78", "contentful-import": "9.4.127", - "contentful-management": "^11.39.0", + "contentful-management": "12.0.0-new-beta.10", "contentful-migration": "^4.21.0", "emojic": "^1.1.11", "execa": "^5.0.0", @@ -6281,6 +6281,22 @@ "node": ">= 0.4" } }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -7141,6 +7157,40 @@ "url": "https://opencollective.com/date-fns" } }, + "node_modules/contentful-export/node_modules/contentful-management": { + "version": "11.67.2", + "resolved": "https://registry.npmjs.org/contentful-management/-/contentful-management-11.67.2.tgz", + "integrity": "sha512-QBcQMcGo2rHcEpRq3hIK2nflhQc4AH+g8nlBhnVkOJueGhwQ+kcfY6dnN2x9mQqvp4vGXM0hPWiooPS1cfS1Cg==", + "license": "MIT", + "dependencies": { + "@contentful/rich-text-types": "^16.6.1", + "axios": "^1.12.2", + "contentful-sdk-core": "^9.4.1", + "fast-copy": "^3.0.0", + "globals": "^15.15.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/contentful-export/node_modules/contentful-sdk-core": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/contentful-sdk-core/-/contentful-sdk-core-9.4.1.tgz", + "integrity": "sha512-l/DRjiabawlX4fb5WZoClWZfNynSNeN/+xnP5qaNAxnBZYtDMXQcEvRDKb4S7qn7aBehNWKhhajnidbBL8n7HA==", + "license": "MIT", + "dependencies": { + "fast-copy": "^3.0.2", + "lodash": "^4.17.21", + "process": "^0.11.10", + "qs": "^6.14.1" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.18.0" + } + }, "node_modules/contentful-export/node_modules/emoji-regex": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", @@ -7304,6 +7354,40 @@ "node": ">=18" } }, + "node_modules/contentful-import/node_modules/contentful-management": { + "version": "11.67.2", + "resolved": "https://registry.npmjs.org/contentful-management/-/contentful-management-11.67.2.tgz", + "integrity": "sha512-QBcQMcGo2rHcEpRq3hIK2nflhQc4AH+g8nlBhnVkOJueGhwQ+kcfY6dnN2x9mQqvp4vGXM0hPWiooPS1cfS1Cg==", + "license": "MIT", + "dependencies": { + "@contentful/rich-text-types": "^16.6.1", + "axios": "^1.12.2", + "contentful-sdk-core": "^9.4.1", + "fast-copy": "^3.0.0", + "globals": "^15.15.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/contentful-import/node_modules/contentful-sdk-core": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/contentful-sdk-core/-/contentful-sdk-core-9.4.1.tgz", + "integrity": "sha512-l/DRjiabawlX4fb5WZoClWZfNynSNeN/+xnP5qaNAxnBZYtDMXQcEvRDKb4S7qn7aBehNWKhhajnidbBL8n7HA==", + "license": "MIT", + "dependencies": { + "fast-copy": "^3.0.2", + "lodash": "^4.17.21", + "process": "^0.11.10", + "qs": "^6.14.1" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.18.0" + } + }, "node_modules/contentful-import/node_modules/date-fns": { "version": "2.30.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", @@ -7371,31 +7455,32 @@ } }, "node_modules/contentful-management": { - "version": "11.62.1", - "resolved": "https://registry.npmjs.org/contentful-management/-/contentful-management-11.62.1.tgz", - "integrity": "sha512-E7WctyR/POVntaacPpY965JljHbthOqtIv9oOTHPKd9UMoAgyogR+hgiB2GLswUxFnSumVVDh3VoG/e2/79aFg==", + "version": "12.0.0-new-beta.10", + "resolved": "https://registry.npmjs.org/contentful-management/-/contentful-management-12.0.0-new-beta.10.tgz", + "integrity": "sha512-zNuH+czKWFiZxQxSWJkGCozUcsVw7uIuKt7h9pqi8kGDSzLt+tiEaFr9kmCVgxXr0AKc7B/9VFvUOc7RW1sYWQ==", "license": "MIT", "dependencies": { "@contentful/rich-text-types": "^16.6.1", "axios": "^1.12.2", - "contentful-sdk-core": "^9.0.1", + "contentful-sdk-core": "^9.4.1", "fast-copy": "^3.0.0", - "globals": "^15.15.0" + "globals": "^15.15.0", + "process": "^0.11.10" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/contentful-management/node_modules/contentful-sdk-core": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/contentful-sdk-core/-/contentful-sdk-core-9.0.1.tgz", - "integrity": "sha512-Ao/5Y74ERPn6kjzb/8okYPuQJnikMtR+dnv0plLw8IvPomwXonLq3qom0rLSyo5KuvQkBMa9AApy1izunxW4mw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/contentful-sdk-core/-/contentful-sdk-core-9.4.1.tgz", + "integrity": "sha512-l/DRjiabawlX4fb5WZoClWZfNynSNeN/+xnP5qaNAxnBZYtDMXQcEvRDKb4S7qn7aBehNWKhhajnidbBL8n7HA==", + "license": "MIT", "dependencies": { "fast-copy": "^3.0.2", "lodash": "^4.17.21", - "p-throttle": "^6.1.0", "process": "^0.11.10", - "qs": "^6.12.3" + "qs": "^6.14.1" }, "engines": { "node": ">=18" @@ -7404,29 +7489,6 @@ "@rollup/rollup-linux-x64-gnu": "^4.18.0" } }, - "node_modules/contentful-management/node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/contentful-management/node_modules/p-throttle": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-throttle/-/p-throttle-6.2.0.tgz", - "integrity": "sha512-NCKkOVj6PZa6NiTmfvGilDdf6vO1rFCD3KDnkHko8dTOtkpk4cSR/VTAhhLMG9aiQ7/A9HYgEDNmxzf6hxzR3g==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/contentful-migration": { "version": "4.31.5", "resolved": "https://registry.npmjs.org/contentful-migration/-/contentful-migration-4.31.5.tgz", @@ -7487,6 +7549,40 @@ "wrap-ansi": "^6.2.0" } }, + "node_modules/contentful-migration/node_modules/contentful-management": { + "version": "11.67.2", + "resolved": "https://registry.npmjs.org/contentful-management/-/contentful-management-11.67.2.tgz", + "integrity": "sha512-QBcQMcGo2rHcEpRq3hIK2nflhQc4AH+g8nlBhnVkOJueGhwQ+kcfY6dnN2x9mQqvp4vGXM0hPWiooPS1cfS1Cg==", + "license": "MIT", + "dependencies": { + "@contentful/rich-text-types": "^16.6.1", + "axios": "^1.12.2", + "contentful-sdk-core": "^9.4.1", + "fast-copy": "^3.0.0", + "globals": "^15.15.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/contentful-migration/node_modules/contentful-sdk-core": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/contentful-sdk-core/-/contentful-sdk-core-9.4.1.tgz", + "integrity": "sha512-l/DRjiabawlX4fb5WZoClWZfNynSNeN/+xnP5qaNAxnBZYtDMXQcEvRDKb4S7qn7aBehNWKhhajnidbBL8n7HA==", + "license": "MIT", + "dependencies": { + "fast-copy": "^3.0.2", + "lodash": "^4.17.21", + "process": "^0.11.10", + "qs": "^6.14.1" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.18.0" + } + }, "node_modules/contentful-migration/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -10370,6 +10466,18 @@ "which": "bin/which" } }, + "node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -19305,9 +19413,10 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -20544,11 +20653,12 @@ } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -21788,14 +21898,69 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" diff --git a/package.json b/package.json index 43749bd01..f4eadf1d0 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "contentful-collection": "^0.0.4", "contentful-export": "^7.21.78", "contentful-import": "9.4.127", - "contentful-management": "^11.39.0", + "contentful-management": "12.0.0-new-beta.10", "contentful-migration": "^4.21.0", "emojic": "^1.1.11", "execa": "^5.0.0", From c2bac8dcb1b7e72466ea6112ee0ccb204295f840 Mon Sep 17 00:00:00 2001 From: Tyler Pina Date: Thu, 15 Jan 2026 11:10:39 -0700 Subject: [PATCH 2/4] test: retrigger tests From 5ecd4b2b3cfdc206d74313f2ef5fccd62a0599ed Mon Sep 17 00:00:00 2001 From: Tyler Pina Date: Thu, 15 Jan 2026 11:15:19 -0700 Subject: [PATCH 3/4] chore: gha jobs on pull request --- .github/workflows/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b0972f04e..940971506 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,6 +5,8 @@ permissions: on: push: branches: ["*"] + pull_request: + branches: ["*"] jobs: build: From cf87ec7c09f9ef2aed482dd4ded1318b168d329f Mon Sep 17 00:00:00 2001 From: Tyler Pina Date: Tue, 20 Jan 2026 13:55:12 -0700 Subject: [PATCH 4/4] chore: updatePut -> update --- .nvmrc | 2 +- .../taxonomy/taxonomy-import.ts | 4 ++-- package-lock.json | 2 +- package.json | 2 +- .../unit/cmds/organization_cmds/import.test.ts | 18 +++++++++--------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.nvmrc b/.nvmrc index b714151ef..85aee5a53 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.18.0 \ No newline at end of file +v20 \ No newline at end of file diff --git a/lib/cmds/organization_cmds/taxonomy/taxonomy-import.ts b/lib/cmds/organization_cmds/taxonomy/taxonomy-import.ts index 2bbd81870..b0dd17c79 100644 --- a/lib/cmds/organization_cmds/taxonomy/taxonomy-import.ts +++ b/lib/cmds/organization_cmds/taxonomy/taxonomy-import.ts @@ -38,7 +38,7 @@ const taxonomyImport = async ( concepts.map((concept: ConceptProps | CreateConceptWithIdProps) => ctx.requestQueue.add(() => { if (entityHasVersion(concept)) { - return ctx.cmaClient.concept.updatePut( + return ctx.cmaClient.concept.update( { organizationId: organizationId, conceptId: concept.sys.id, @@ -126,7 +126,7 @@ const taxonomyImport = async ( ) => ctx.requestQueue.add(() => { if (entityHasVersion(conceptScheme)) { - return ctx.cmaClient.conceptScheme.updatePut( + return ctx.cmaClient.conceptScheme.update( { organizationId: organizationId, conceptSchemeId: conceptScheme.sys.id, diff --git a/package-lock.json b/package-lock.json index a0bcd0c67..445791b57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -99,7 +99,7 @@ "typescript": "^5.0.2" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@actions/core": { diff --git a/package.json b/package.json index f4eadf1d0..1f2f9816d 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "yargs": "~13.3.2" }, "engines": { - "node": ">=18" + "node": ">=20" }, "files": [ "dist", diff --git a/test/unit/cmds/organization_cmds/import.test.ts b/test/unit/cmds/organization_cmds/import.test.ts index e5a391d18..ff91e51ab 100644 --- a/test/unit/cmds/organization_cmds/import.test.ts +++ b/test/unit/cmds/organization_cmds/import.test.ts @@ -129,12 +129,12 @@ const createTaxonomyConceptSchemeMock = ( const fakeClient = { concept: { createWithId: jest.fn(), - updatePut: jest.fn(), + update: jest.fn(), patch: jest.fn() }, conceptScheme: { createWithId: jest.fn(), - updatePut: jest.fn() + update: jest.fn() } } @@ -169,13 +169,13 @@ test('initializes client w/ taxonomy data - createWithId', async () => { expect(mockCreatePlainClient).toHaveBeenCalledTimes(1) expect(mockReadContentFile).toHaveBeenCalledTimes(1) expect(fakeClient.concept.createWithId).toHaveBeenCalledTimes(2) - expect(fakeClient.concept.updatePut).toHaveBeenCalledTimes(0) + expect(fakeClient.concept.update).toHaveBeenCalledTimes(0) expect(fakeClient.concept.patch).toHaveBeenCalledTimes(2) expect(fakeClient.conceptScheme.createWithId).toHaveBeenCalledTimes(1) - expect(fakeClient.conceptScheme.updatePut).toHaveBeenCalledTimes(0) + expect(fakeClient.conceptScheme.update).toHaveBeenCalledTimes(0) }) -test('initializes client w/ taxonomy data - updatePut', async () => { +test('initializes client w/ taxonomy data - update', async () => { mockReadContentFile.mockResolvedValue({ taxonomy: { concepts: [ @@ -196,10 +196,10 @@ test('initializes client w/ taxonomy data - updatePut', async () => { expect(mockCreatePlainClient).toHaveBeenCalledTimes(1) expect(mockReadContentFile).toHaveBeenCalledTimes(1) expect(fakeClient.concept.createWithId).toHaveBeenCalledTimes(0) - expect(fakeClient.concept.updatePut).toHaveBeenCalledTimes(2) + expect(fakeClient.concept.update).toHaveBeenCalledTimes(2) expect(fakeClient.concept.patch).toHaveBeenCalledTimes(2) expect(fakeClient.conceptScheme.createWithId).toHaveBeenCalledTimes(0) - expect(fakeClient.conceptScheme.updatePut).toHaveBeenCalledTimes(1) + expect(fakeClient.conceptScheme.update).toHaveBeenCalledTimes(1) }) test('initializes client without taxonomy data', async () => { @@ -215,8 +215,8 @@ test('initializes client without taxonomy data', async () => { expect(mockCreatePlainClient).toHaveBeenCalledTimes(1) expect(mockReadContentFile).toHaveBeenCalledTimes(1) expect(fakeClient.concept.createWithId).toHaveBeenCalledTimes(0) - expect(fakeClient.concept.updatePut).toHaveBeenCalledTimes(0) + expect(fakeClient.concept.update).toHaveBeenCalledTimes(0) expect(fakeClient.concept.patch).toHaveBeenCalledTimes(0) expect(fakeClient.conceptScheme.createWithId).toHaveBeenCalledTimes(0) - expect(fakeClient.conceptScheme.updatePut).toHaveBeenCalledTimes(0) + expect(fakeClient.conceptScheme.update).toHaveBeenCalledTimes(0) })