Skip to content

Commit 88b660e

Browse files
authored
Merge pull request #51 from contentstack/bugfix/ie11-node-fetch-error
Bugfix: IE11 node fetch error
2 parents d6d3180 + 47e9df8 commit 88b660e

16 files changed

Lines changed: 83 additions & 66 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11

2+
3+
### Version: 3.13.1
4+
#### Date: Apr-16-2021
5+
##### Bug fix:
6+
- IE 11 request method issue resolved
7+
28
### Version: 3.13.0
3-
#### Date:
9+
#### Date: Apr-05-2021
410

511
##### Update API:
612
- [Query]: Added support for method includeEmbeddedItems

dist/nativescript/contentstack.js

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

dist/node/contentstack.js

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

dist/react-native/contentstack.js

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

dist/web/contentstack.js

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

examples/node/contentstack-demo.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class ContentstackDemo {
1515
//console.log("datattatata", Contentstack.Region.EUROPE)
1616

1717
this.Stack = Contentstack.Stack(...config);
18-
console.log(Contentstack.Utils.render());
1918
}
2019

2120

package-lock.json

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

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "contentstack",
3-
"version": "3.13.0",
3+
"version": "3.13.1",
44
"description": "Contentstack Javascript SDK",
55
"homepage": "https://www.contentstack.com/",
66
"author": {
@@ -10,7 +10,7 @@
1010
"main": "dist/node/contentstack.js",
1111
"browser": "dist/web/contentstack.js",
1212
"types": "./index.d.ts",
13-
"_id": "contentstack@3.13.0",
13+
"_id": "contentstack@3.13.1",
1414
"scripts": {
1515
"test": "npm run test:e2e && npm run test:typescript",
1616
"test:e2e": "istanbul cover tape test/index.js | tap-html --out ./tap-html.html",
@@ -22,7 +22,8 @@
2222
"buildnativescript": "webpack --config webpack/webpack.nativescript.js",
2323
"build": "NODE_ENV=production && npm run buildnode && npm run buildweb && npm run buildreactnative && npm run buildnativescript",
2424
"generate-docs": "node_modules/.bin/jsdoc --configure docs-config.json --verbose",
25-
"prepare": "npm run build"
25+
"prepare": "npm run build",
26+
"pretest": "npm run build"
2627
},
2728
"repository": {
2829
"type": "git",
@@ -53,14 +54,14 @@
5354
],
5455
"dist": {
5556
"shasum": "a328ed07240476a26b31a23261355dc929e1da63",
56-
"tarball": "https://registry.npmjs.org/contentstack/-/contentstack-3.13.0.tgz"
57+
"tarball": "https://registry.npmjs.org/contentstack/-/contentstack-3.13.1.tgz"
5758
},
5859
"license": "MIT",
5960
"directories": {},
60-
"_resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.13.0.tgz",
61+
"_resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.13.1.tgz",
6162
"_npmOperationalInternal": {
6263
"host": "packages-18-east.internal.npmjs.com",
63-
"tmp": "tmp/contentstack-3.13.0.tgz_1477830884275_0.9869455888401717"
64+
"tmp": "tmp/contentstack-3.13.1.tgz_1477830884275_0.9869455888401717"
6465
},
6566
"devDependencies": {
6667
"@types/jest": "^26.0.13",
@@ -99,7 +100,7 @@
99100
"dependencies": {
100101
"@contentstack/utils": "1.0.0",
101102
"es6-promise": "4.1.1",
102-
"localStorage": "1.0.3",
103-
"node-fetch": "^2.6.1"
103+
"isomorphic-fetch": "^3.0.0",
104+
"localStorage": "1.0.3"
104105
}
105106
}

src/core/lib/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async function safeParseJSON(response) {
6161
const body = await response.text();
6262
}
6363
function fetchRetry(url, headers, retryDelay = 300, retryLimit = 5, fetchOptions, resolve, reject) {
64-
var option = Object.assign({
64+
var option = Utils.mergeDeep({
6565
method: 'GET',
6666
headers: headers,
6767
timeout: 30000,

src/core/lib/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ export function sendRequest(queryObject, options) {
238238
let tojson = (typeof self.tojson !== 'undefined') ? self.tojson : false;
239239
let isSingle = (self.entry_uid || self.singleEntry || self.asset_uid) ? true : false;
240240
let hashQuery = getHash(parseQueryFromParams(self, isSingle, tojson));
241-
if (queryObject.requestParams.url.includes(config.urls.sync)) {
242-
cachePolicy = -1;
243-
}
241+
244242
/**
245243
for new api v3
246244
*/

0 commit comments

Comments
 (0)