From 22c9111dd5c2231dd9f0f422135d08e506792ec4 Mon Sep 17 00:00:00 2001 From: abhishek305 Date: Fri, 22 Apr 2022 20:50:21 +0530 Subject: [PATCH 1/6] feat:azure NA support updates ECO-893 --- package.json | 6 +++--- src/utils.js | 2 +- utils.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 98b1cd0..5bb0761 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-source-contentstack", - "version": "3.1.4", + "version": "4.0.3", "description": "Gatsby source plugin for building websites using Contentstack as a data source", "scripts": { "prepublish": "npm run build", @@ -8,7 +8,7 @@ "watch": "babel -w src --out-dir ." }, "engines": { - "node": ">=12.13.0" + "node": ">=14.15.0" }, "main": "gatsby-node.js", "repository": { @@ -57,7 +57,7 @@ "semantic-release": "^17.4.4" }, "peerDependencies": { - "gatsby": "^3.0.0", + "gatsby": "^4.0.0", "gatsby-plugin-image": "^2.0.0-next" }, "husky": { diff --git a/src/utils.js b/src/utils.js index 67971f3..09239fc 100644 --- a/src/utils.js +++ b/src/utils.js @@ -40,7 +40,7 @@ exports.checkIfUnsupportedFormat = data => { }; exports.SUPPORTED_FILES_COUNT = 'SUPPORTED_FILES_COUNT'; -exports.IMAGE_REGEXP = new RegExp('https://(stag-images|(eu-)?images).(blz-)?contentstack.(io|com)/v3/assets/'); +exports.IMAGE_REGEXP = new RegExp('https://(stag-images|(eu-|azure-na-|azure-k8s-)?images).(blz-)?contentstack.(io|com)/v3/assets/'); exports.ASSET_NODE_UIDS = 'ASSET_NODE_UIDS'; exports.CODES = { diff --git a/utils.js b/utils.js index 455a749..e0f12d0 100644 --- a/utils.js +++ b/utils.js @@ -43,7 +43,7 @@ exports.checkIfUnsupportedFormat = function (data) { }; exports.SUPPORTED_FILES_COUNT = 'SUPPORTED_FILES_COUNT'; -exports.IMAGE_REGEXP = new RegExp('https://(stag-images|(eu-)?images).(blz-)?contentstack.(io|com)/v3/assets/'); +exports.IMAGE_REGEXP = new RegExp('https://(stag-images|(eu-|azure-na-|azure-k8s-)?images).(blz-)?contentstack.(io|com)/v3/assets/'); exports.ASSET_NODE_UIDS = 'ASSET_NODE_UIDS'; exports.CODES = { SyncError: '10001', From 88e4f7869000a68ccb4a0d5030428d8b00d3912c Mon Sep 17 00:00:00 2001 From: abhishek305 Date: Tue, 26 Apr 2022 11:28:58 +0530 Subject: [PATCH 2/6] fix:PR changes as commented ECO-893 --- .babelrc | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.babelrc b/.babelrc index e6f5ede..8253fda 100644 --- a/.babelrc +++ b/.babelrc @@ -5,7 +5,7 @@ "@babel/preset-env", { "targets": { - "node": 12.13 + "node": 14.15 }, "forceAllTransforms": true } diff --git a/package.json b/package.json index 5bb0761..df3d788 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "license": "MIT", "dependencies": { "gatsby-core-utils": "^3.3.0", - "gatsby-source-filesystem": "^3.13.0", + "gatsby-source-filesystem": "^4.4.0", "node-fetch": "2.1.2", "progress": "^2.0.3", "query-string": "6.0.0" @@ -65,4 +65,4 @@ "commit-msg": "npx --no-install commitlint --edit '$1'" } } -} +} \ No newline at end of file From 204d8e3ca562a48738050604913173dfb303b0eb Mon Sep 17 00:00:00 2001 From: abhishek305 Date: Tue, 26 Apr 2022 11:46:18 +0530 Subject: [PATCH 3/6] fix:package.json version update to 4.0.2ECO-893 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df3d788..d9f8108 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-source-contentstack", - "version": "4.0.3", + "version": "4.0.2", "description": "Gatsby source plugin for building websites using Contentstack as a data source", "scripts": { "prepublish": "npm run build", From 7c3e6b27ab48bee224df469ff96553bcdc49273f Mon Sep 17 00:00:00 2001 From: abhishek305 Date: Tue, 26 Apr 2022 16:57:28 +0530 Subject: [PATCH 4/6] fix:Added peer-dep support for gatsby 3 || 4 ECO-893 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d9f8108..a58a781 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "semantic-release": "^17.4.4" }, "peerDependencies": { - "gatsby": "^4.0.0", + "gatsby": "^3.0.0 || ^4.0.0", "gatsby-plugin-image": "^2.0.0-next" }, "husky": { From e6ed2ee2cb880f46497344c0a246b391e0b75e12 Mon Sep 17 00:00:00 2001 From: abhishek305 Date: Wed, 4 May 2022 13:27:02 +0530 Subject: [PATCH 5/6] fix:readme update for region support EC0-893 --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a3e94e0..133eb36 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ To use this, you need to have the following plugins installed: - gatsby-transformer-sharp - gatsby-plugin-sharp - gatsby-source-filesystem +- gatsby-plugin-image ```graphql { @@ -258,7 +259,9 @@ Here’s an example of the same: } ``` -For more information checkout gatsby's documentation on usage of the [new image plugin](https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/adding-gatsby-image-support/). +For more information checkout gatsby's image plugin documentation on usage of the [new image plugin](https://www.gatsbyjs.com/docs/how-to/plugins-and-themes/adding-gatsby-image-support/). + +For more information on region support please refer [About Region's](https://www.contentstack.com/docs/developers/contentstack-regions/api-endpoints/) [gatsby]: https://www.gatsbyjs.org/ [contentstack]: https://www.contentstack.com/ \ No newline at end of file From 66218e0a8145affb31b030163d60e4b5e273e0c2 Mon Sep 17 00:00:00 2001 From: abhishek305 Date: Wed, 18 May 2022 15:21:18 +0530 Subject: [PATCH 6/6] fix:Change Int type to Float type ECO-962 --- normalize.js | 8 ++++---- src/normalize.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/normalize.js b/normalize.js index 319e483..7423082 100644 --- a/normalize.js +++ b/normalize.js @@ -363,14 +363,14 @@ var buildCustomSchema = exports.buildCustomSchema = function (schema, types, ref if (field.mandatory && !disableMandatoryFields) { if (field.multiple) { - fields[field.uid].type = '[Int]!'; + fields[field.uid].type = '[Float]!'; } else { - fields[field.uid].type = 'Int!'; + fields[field.uid].type = 'Float!'; } } else if (field.multiple) { - fields[field.uid].type = '[Int]'; + fields[field.uid].type = '[Float]'; } else { - fields[field.uid].type = 'Int'; + fields[field.uid].type = 'Float'; } break; diff --git a/src/normalize.js b/src/normalize.js index cee106b..5079dfc 100644 --- a/src/normalize.js +++ b/src/normalize.js @@ -315,14 +315,14 @@ const buildCustomSchema = (exports.buildCustomSchema = (schema, types, reference }; if (field.mandatory && !disableMandatoryFields) { if (field.multiple) { - fields[field.uid].type = '[Int]!'; + fields[field.uid].type = '[Float]!'; } else { - fields[field.uid].type = 'Int!'; + fields[field.uid].type = 'Float!'; } } else if (field.multiple) { - fields[field.uid].type = '[Int]'; + fields[field.uid].type = '[Float]'; } else { - fields[field.uid].type = 'Int'; + fields[field.uid].type = 'Float'; } break; // This is to support custom field types nested inside groups, global_fields & modular_blocks