Skip to content

Commit 6b9c061

Browse files
chasepoirierclaude
andauthored
fix!: update to CMA.js v12 and drop Node <22 support [DX-781] (#2194)
* chore: update to v12 * chore: bump contentful-management to 12.0.0-new-beta.14 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * fix: update get-space-data to use PlainClientAPI Replace chain client entity methods with PlainClientAPI equivalents: - client.space.get() / client.environment.get() for connecting - client.contentType/entry/asset/locale/tag/webhook/role.getMany() - client.editorInterface.get() instead of contentType.getEditorInterface() - Refactor pagedGet to accept a fetcher function Update unit tests to mock the new PlainClientAPI structure. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * chore: bump contentful-management to 12.0.0-new-beta.16 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update contentful-management to 12.0.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix!: drop Node <22 support, bump CI and .nvmrc to Node 24 LTS BREAKING CHANGE: Node >=22 is now required. Older Node versions are no longer supported. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use CMA v12 legacy client to preserve existing API surface Passes { type: 'legacy' } to createClient so get-space-data.js continues using the high-level nested client (space.getEnvironment, environment.getEntries, etc.) without requiring a functional migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: bump contentful-management to ^12.2.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent b9f9ee2 commit 6b9c061

7 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Node.js
1818
uses: actions/setup-node@v6
1919
with:
20-
node-version: '22'
20+
node-version: '24'
2121
cache: 'npm'
2222

2323
- name: Install dependencies

.github/workflows/check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v6
2828
with:
29-
node-version: '22'
29+
node-version: '24'
3030
cache: 'npm'
3131

3232
- name: Install dependencies

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup Node.js
4848
uses: actions/setup-node@v6
4949
with:
50-
node-version: '22'
50+
node-version: '24'
5151
cache: 'npm'
5252

5353
- name: Install latest npm

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
24

lib/tasks/init-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ export default function initClient (opts, useCda = false) {
2525
}
2626
return createCdaClient(cdaConfig).withoutLinkResolution
2727
}
28-
return createCmaClient(config)
28+
return createCmaClient(config, { type: 'legacy' })
2929
}

package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"types": "types.d.ts",
77
"engines": {
8-
"node": ">=18"
8+
"node": ">=22"
99
},
1010
"bin": {
1111
"contentful-export": "./bin/contentful-export"
@@ -51,7 +51,7 @@
5151
"cli-table3": "^0.6.0",
5252
"contentful": "^11.5.10",
5353
"contentful-batch-libs": "^10.1.3",
54-
"contentful-management": "^11.48.1",
54+
"contentful-management": "^12.2.0",
5555
"date-fns": "^4.1.0",
5656
"figures": "^3.2.0",
5757
"jsonwebtoken": "^9.0.0",

0 commit comments

Comments
 (0)