Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge staging with master #149

Merged
merged 8 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@babel/preset-env",
{
"targets": {
"node": 12.13
"node": 14.15
},
"forceAllTransforms": true
}
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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/
8 changes: 4 additions & 4 deletions normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "gatsby-source-contentstack",
"version": "3.1.4",
"version": "4.0.2",
"description": "Gatsby source plugin for building websites using Contentstack as a data source",
"scripts": {
"prepublish": "npm run build",
"build": "babel src --out-dir .",
"watch": "babel -w src --out-dir ."
},
"engines": {
"node": ">=12.13.0"
"node": ">=14.15.0"
},
"main": "gatsby-node.js",
"repository": {
Expand All @@ -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"
Expand Down Expand Up @@ -57,12 +57,12 @@
"semantic-release": "^17.4.4"
},
"peerDependencies": {
"gatsby": "^3.0.0",
"gatsby": "^3.0.0 || ^4.0.0",
"gatsby-plugin-image": "^2.0.0-next"
},
"husky": {
"hooks": {
"commit-msg": "npx --no-install commitlint --edit '$1'"
}
}
}
}
8 changes: 4 additions & 4 deletions src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down