contentful 11.1.4 → 11.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/MIGRATION.md CHANGED
@@ -29,10 +29,23 @@
29
29
  # Migration information
30
30
 
31
31
  - [Migration information](#migration-information)
32
- - [Migration to contentful.js 10.x](#migration-to-contentfuljs-10x)
32
+ - [Migration to version 11.x](#migration-to-version-11x)
33
33
  - [Breaking changes](#breaking-changes)
34
+ - [Node.js core modules](#nodejs-core-modules)
35
+ - [Webpack 5](#webpack-5)
36
+ - [Rollup](#rollup)
37
+ - [Improvements](#improvements)
38
+ - [Tree shaking](#tree-shaking)
39
+ - [Module support and package configuration](#module-support-and-package-configuration)
40
+ - [Testing framework](#testing-framework)
41
+ - [Security](#security)
42
+ - [Removal of eval](#removal-of-eval)
43
+ - [Migration to contentful.js 10.x](#migration-to-contentfuljs-10x)
44
+ - [Breaking changes](#breaking-changes-1)
34
45
  - [Version compatibility](#version-compatibility)
35
46
  - [Response modifiers](#response-modifiers)
47
+ - [Query params `resolveLinks` and `removeUnresolved`](#query-params-resolvelinks-and-removeunresolved)
48
+ - [Query param `locale='*'`](#query-param-locale)
36
49
  - [TypeScript](#typescript)
37
50
  - [Migration to contentful.js 9.x](#migration-to-contentfuljs-9x)
38
51
  - [Migration to contentful.js 8.x](#migration-to-contentfuljs-8x)
@@ -64,6 +77,29 @@ Pre-bundled code
64
77
 
65
78
  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.
66
79
 
80
+ ##### Webpack 5
81
+
82
+ To make our project bundle properly for the browser with Webpack 5, you need to add this to your configuration:
83
+
84
+ ```js
85
+ module.exports = {
86
+ resolve: {
87
+ fallback: {
88
+ os: false,
89
+ zlib: false,
90
+ tty: false,
91
+ },
92
+ },
93
+ };
94
+ ```
95
+
96
+ ##### Rollup
97
+
98
+ To make our project bundle properly for the browser with Rollup, you need to add this to your configuration:
99
+
100
+ ```js
101
+ nodeResolve({ browser: true, preferBuiltins: false })
102
+ ```
67
103
 
68
104
  ### Improvements
69
105
 
@@ -8367,17 +8367,11 @@ var contentful = (function (exports) {
8367
8367
  origin: "contentful.com",
8368
8368
  href: "".concat("".concat(u || "https://app.contentful.com", "/spaces/").concat(o, "/environments/").concat(n), "/", t === "Entry" ? "entries" : "assets", "/").concat(e, "/?focusedField=").concat(r, "&focusedLocale=").concat(s, "&source=vercel-content-link"),
8369
8369
  contentful: {
8370
- space: o,
8371
- environment: n,
8372
- field: r,
8373
- locale: s,
8374
- entity: e,
8375
- entityType: t,
8376
8370
  editorInterface: i,
8377
8371
  fieldType: c
8378
8372
  }
8379
8373
  };
8380
- return f === "vercel" && delete d.contentful, f === "contentful" && delete d.href, d;
8374
+ return f === "vercel" && delete d.contentful, d;
8381
8375
  },
8382
8376
  W = function W(e) {
8383
8377
  return ["builtin", "sidebar-builtin", "editor-builtin"].includes(e);
@@ -8475,7 +8469,7 @@ var contentful = (function (exports) {
8475
8469
  });
8476
8470
  C(h, m, E, e, l, i);
8477
8471
  } else Object.keys(m).forEach(function (w) {
8478
- var N = x({
8472
+ var I = x({
8479
8473
  entityId: g,
8480
8474
  entityType: v,
8481
8475
  space: f,
@@ -8487,7 +8481,7 @@ var contentful = (function (exports) {
8487
8481
  targetOrigin: n,
8488
8482
  platform: r
8489
8483
  });
8490
- C(h, m, N, e, "".concat(l, "/").concat(w), i, w);
8484
+ C(h, m, I, e, "".concat(l, "/").concat(w), i, w);
8491
8485
  });
8492
8486
  }
8493
8487
  },
@@ -10251,7 +10245,7 @@ var contentful = (function (exports) {
10251
10245
  http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
10252
10246
  }
10253
10247
  return {
10254
- version: "11.1.4",
10248
+ version: "11.2.1",
10255
10249
  getSpace: getSpace,
10256
10250
  getContentType: getContentType,
10257
10251
  getContentTypes: getContentTypes,
@@ -10374,7 +10368,7 @@ var contentful = (function (exports) {
10374
10368
  environment: 'master'
10375
10369
  };
10376
10370
  var config = Object.assign(Object.assign({}, defaultConfig), params);
10377
- var userAgentHeader = getUserAgentHeader("contentful.js/".concat("11.1.4"), config.application, config.integration);
10371
+ var userAgentHeader = getUserAgentHeader("contentful.js/".concat("11.2.1"), config.application, config.integration);
10378
10372
  config.headers = Object.assign(Object.assign({}, config.headers), {
10379
10373
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
10380
10374
  'X-Contentful-User-Agent': userAgentHeader