Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3cb96b2
BREAKING CHANGE: v12.0.0 release beta [] (#2616)
whitelisab Apr 16, 2025
3998dc2
fix: move type-fest to a regular dependency
axe312ger Apr 29, 2025
00e4e72
chore: remove outdated types.d.ts file
axe312ger Apr 29, 2025
9c15f9c
Merge branch 'master' into beta
axe312ger Apr 29, 2025
25fb47a
chore: remove reference to outdated types.d.ts file
axe312ger Apr 29, 2025
1b762fb
fix: empty commit to trigger new beta (#2626)
whitelisab Apr 29, 2025
8340fa9
fix: trigger new beta release
whitelisab Apr 30, 2025
d353840
feat: add browser export
axe312ger May 21, 2025
02bc2ba
refactor: cjs is now available transpiled and bundled, while transpil…
axe312ger May 21, 2025
afb722e
docs: mention both ways of forcing cjs syntax
axe312ger May 21, 2025
f03cd16
Revert "feat: add browser export"
axe312ger May 28, 2025
420a7b4
fix: remove renaming of cjs files
axe312ger May 28, 2025
2188a34
fix: fix export for require and make cjs bundle importable
axe312ger May 28, 2025
c0750fd
Revert "fix: remove renaming of cjs files"
axe312ger May 28, 2025
7a20287
build: provide unbundled cjs by default
axe312ger May 29, 2025
1d6f3c5
fix: export additional types and remove old file from size-limit [DX-…
whitelisab May 30, 2025
6b47e75
fix: bump contentful-sdk-core to new beta [DX-4] (#2661)
whitelisab Jun 20, 2025
85038ef
build: add react-native bundle
axe312ger Jun 25, 2025
69b70d0
build: move our typescript to nodenext module resolution so we can su…
axe312ger Jun 27, 2025
a468a94
fix: update lib/index.js imports and merge in test fixes [DX-4] (#2672)
whitelisab Jun 27, 2025
1400aa8
feat: migrate to new Rollup setup (#2717)
axe312ger Sep 5, 2025
35da246
build: move puppeteer and es-check to dev dependencies
axe312ger Sep 12, 2025
98db87f
build: move to rollup-plugin-sourcemaps2 to support rollup 4+ and avo…
axe312ger Sep 12, 2025
519c876
build: add missing test dependency
axe312ger Sep 17, 2025
fdab2a4
Merge branch 'master' into beta
axe312ger Sep 17, 2025
2a7f0ce
Merge branch 'master' into beta
axe312ger Sep 29, 2025
3e38e85
fix: remove issues from merging master (especially removing updatePut)
axe312ger Sep 29, 2025
26aa1cf
Merge branch 'master' into beta
whitelisab Sep 29, 2025
610cc45
fix: bump sdk-core to new beta version [] (#2768)
whitelisab Sep 30, 2025
13a2418
Merge branch 'master' into beta
whitelisab Sep 30, 2025
0bcb629
Merge branch 'master' into beta
whitelisab Oct 1, 2025
2741a95
fix: trigger new beta release
whitelisab Oct 1, 2025
25f2faf
build: update rollup dependencies
axe312ger Oct 15, 2025
18d24b4
refactor: avoid mix of default and named exports which rollup complai…
axe312ger Oct 15, 2025
eb63161
fix: browser bundle is no more suggested for browser builds, because …
axe312ger Oct 15, 2025
bea7a2b
build: move to esm only version of type-fest
axe312ger Oct 15, 2025
81dd0a3
build: fix lock file urls which used local verdaccio
axe312ger Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
70 changes: 0 additions & 70 deletions .babelrc.js

This file was deleted.

16 changes: 4 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: 2.1
orbs:
vault: contentful/vault@1
node: circleci/node@5.2.0
browser-tools: circleci/browser-tools@1.4.8
node: circleci/node@7.1.1
browser-tools: circleci/browser-tools@2.3.1

executors:
docker-with-node:
docker:
- image: 'cimg/node:18.20.1-browsers'
- image: 'cimg/node:20.19.4-browsers'
working_directory: ~/build-and-test

commands:
Expand Down Expand Up @@ -71,17 +71,13 @@ jobs:
- with-workspace
- run: npm run prettier:check
- run: npm run lint
- run: npm run check-types
- run: npm run test:types

unit:
executor: docker-with-node
steps:
- with-workspace
- run: npm run test:cover-unit
- store_test_results:
path: reports
- store_artifacts:
path: ./reports/unit-results.xml

size:
executor: docker-with-node
Expand All @@ -94,10 +90,6 @@ jobs:
steps:
- with-workspace
- run: npm run test:cover-integration
- store_test_results:
path: reports
- store_artifacts:
path: ./reports/integration-results.xml

# Do not use the workspace for the release step
release:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dist
gh-pages
webpack-build-log.json

# Esdoc dirs
out
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules
dist
coverage
out
typings
typings
106 changes: 106 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!-- shared header START -->

<p align="center">
<a href="https://www.contentful.com/developers/docs/references/content-management-api/">
<img alt="Contentful Logo" title="Contentful" src="images/contentful-icon.png" width="150">
</a>
</p>

<h1 align='center'>Content Management API</h1>

<h3 align="center">Migration</h3>

<p align="center">
<a href="README.md">Readme</a> ·
<a href="MIGRATION.md">Migration</a> · ·
<a href="CONTRIBUTING.md">Contributing</a>
</p>

<p align="center">
<a href="https://www.contentful.com/slack/">
<img src="https://img.shields.io/badge/-Join%20Community%20Slack-2AB27B.svg?logo=slack&maxAge=31557600" alt="Join Contentful Community Slack">
</a>
</p>

<!-- shared header END -->

# Migration information

- [Migration information](#migration-information)
- [Migration to version 12.x](#migration-to-version-12x)
- [Breaking changes](#breaking-changes)
- [Node.js core modules](#nodejs-core-modules)
- [Pre-bundled code](#pre-bundled-code)
- [Webpack 5](#webpack-5)
- [Rollup](#rollup)
- [Improvements](#improvements)
- [Tree shaking](#tree-shaking)
- [Module support and package configuration](#module-support-and-package-configuration)
- [Testing framework](#testing-framework)
- [Security](#security)
- [Removal of eval](#removal-of-eval)

From version 3.0.0 onwards, you can access documentation for a specific version by visiting `https://contentful.github.io/contentful-management.js/contentful-management/<VERSION>`.

You can upgrade to a major version using `npm update contentful`

## Migration to version 12.x

Version 12.0.0 introduces full ESM support by default, with CJS variants still available for legacy environments. This version is a significant step forward in modernizing our build and improving performance while maintaining wide compatibility across various environments.

### Breaking changes

#### Node.js core modules

We no longer bundle Node.js core modules. If you’re bundling for the browser, you may need to configure your bundler to provide fallbacks or empty functions, particularly for the fs module. This change was introduced in version 12.x and may affect projects using Node.js-specific modules in the browser.

#### Pre-bundled code

Pre-bundled code for Node.js is no longer provided. If your setup relies on pre-bundled packages, you may need to adjust your build configuration.

##### Webpack 5

To make our project bundle properly for the browser with Webpack 5, you need to add this to your configuration:

```js
module.exports = {
resolve: {
fallback: {
os: false,
zlib: false,
tty: false,
},
},
}
```

##### Rollup

To make our project bundle properly for the browser with Rollup, you need to add this to your configuration:

```js
nodeResolve({ browser: true, preferBuiltins: false })
```

### Improvements

#### Tree shaking

Tree shaking is significantly improved, ensuring that only the necessary parts of the library are included in your final bundle.
Smaller browser bundles

Browser bundle sizes have been reduced by nearly threefold, from 128KB to 45KB, contributing to faster load times and improved performance.

#### Module support and package configuration

The package now uses "type": "module" in package.json to define the default module format as ESM, while also providing support for CJS through the exports field. This allows us to support a wide range of environments including Node.js (with and without TypeScript, both CJS and ESM), AngularJS, GatsbyJS, Next.js, Nuxt, React Native (Expo), Rollup, Svelte, Vite, Webpack, and more.

#### Testing framework

We’ve migrated our internal test environment from Jest to Vitest, aligning with modern testing frameworks and tools.

## Security

### Removal of eval

We have completely removed the use of eval in our exported code, improving security and compatibility with strict environments.
Loading