From 9634594df3263855fa92a9a6ee14c5f7354bdc35 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Fri, 2 Feb 2024 04:33:10 +0000 Subject: [PATCH 1/4] fix: upgrade @slack/bolt from 3.17.0 to 3.17.1 Snyk has created this PR to upgrade @slack/bolt from 3.17.0 to 3.17.1. See this package in npm: https://www.npmjs.com/package/@slack/bolt See this project in Snyk: https://app.snyk.io/org/sunil-lakshman/project/d82509a3-a3c4-432f-b8d9-068ef2579b9b?utm_source=github&utm_medium=referral&page=upgrade-pr --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index e723019e..58273d3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@contentstack/management", - "version": "1.14.1", + "version": "1.15.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@contentstack/management", - "version": "1.14.1", + "version": "1.15.1", "license": "MIT", "dependencies": { - "@slack/bolt": "^3.17.0", + "@slack/bolt": "^3.17.1", "axios": "^1.6.5", "form-data": "^3.0.1", "lodash": "^4.17.21", @@ -2911,15 +2911,15 @@ "dev": true }, "node_modules/@slack/bolt": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@slack/bolt/-/bolt-3.17.0.tgz", - "integrity": "sha512-gxZygJj/wnrrSPCAlXO4D5FIYre2McPC+Vwrkq6CS74S4MI+0/gRvdUUXMHoF+oSGfsGs3ul6Fk+Bc/EE7Waig==", + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/@slack/bolt/-/bolt-3.17.1.tgz", + "integrity": "sha512-N+4WxpkM59RXi7BL3IXUtENnn9cF7TOBn7ttaHpgvlnjUaro+yQyY60arXTlP4ytVDFJ1w0mSdfftcM17h+i2w==", "dependencies": { "@slack/logger": "^4.0.0", - "@slack/oauth": "^2.6.1", - "@slack/socket-mode": "^1.3.2", + "@slack/oauth": "^2.6.2", + "@slack/socket-mode": "^1.3.3", "@slack/types": "^2.11.0", - "@slack/web-api": "^6.11.0", + "@slack/web-api": "^6.11.2", "@types/express": "^4.16.1", "@types/promise.allsettled": "^1.0.3", "@types/tsscmp": "^1.0.0", @@ -15770,15 +15770,15 @@ "dev": true }, "@slack/bolt": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/@slack/bolt/-/bolt-3.17.0.tgz", - "integrity": "sha512-gxZygJj/wnrrSPCAlXO4D5FIYre2McPC+Vwrkq6CS74S4MI+0/gRvdUUXMHoF+oSGfsGs3ul6Fk+Bc/EE7Waig==", + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/@slack/bolt/-/bolt-3.17.1.tgz", + "integrity": "sha512-N+4WxpkM59RXi7BL3IXUtENnn9cF7TOBn7ttaHpgvlnjUaro+yQyY60arXTlP4ytVDFJ1w0mSdfftcM17h+i2w==", "requires": { "@slack/logger": "^4.0.0", - "@slack/oauth": "^2.6.1", - "@slack/socket-mode": "^1.3.2", + "@slack/oauth": "^2.6.2", + "@slack/socket-mode": "^1.3.3", "@slack/types": "^2.11.0", - "@slack/web-api": "^6.11.0", + "@slack/web-api": "^6.11.2", "@types/express": "^4.16.1", "@types/promise.allsettled": "^1.0.3", "@types/tsscmp": "^1.0.0", diff --git a/package.json b/package.json index ec1c5e7f..0e7373cd 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "author": "Contentstack", "license": "MIT", "dependencies": { - "@slack/bolt": "^3.17.0", + "@slack/bolt": "^3.17.1", "axios": "^1.6.5", "form-data": "^3.0.1", "lodash": "^4.17.21", From aea5991033ed59382d688e02abac74ca8d3b7fe6 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Fri, 16 Feb 2024 13:17:53 +0530 Subject: [PATCH 2/4] fix: :bug: fixed update entry which was failing the function cleanAssets was checking with null value --- lib/entity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entity.js b/lib/entity.js index c81776ba..768d3fc4 100644 --- a/lib/entity.js +++ b/lib/entity.js @@ -317,10 +317,10 @@ function isAsset (data) { } export function cleanAssets (data) { - if (data && typeof data === "object" && Object.keys(data).length > 0) { + if (data && typeof data === "object") { const keys = Object.keys(data); for (const key of keys) { - if (typeof data[key] === "object" && Object.keys(data[key]).length > 0) { + if (data[key] !== null && data[key] !== undefined && typeof data[key] === "object") { if (isAsset(data[key])) { data[key] = (Array.isArray(data[key])) ? data[key].map(element => element.uid) : data[key].uid; } else { From 419f294fbd4095e7d2097dc78d04ae3963ead9bf Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Fri, 16 Feb 2024 13:18:35 +0530 Subject: [PATCH 3/4] test: removed organization name in assertion --- test/sanity-check/api/organization-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sanity-check/api/organization-test.js b/test/sanity-check/api/organization-test.js index da25c4b9..11866ed9 100644 --- a/test/sanity-check/api/organization-test.js +++ b/test/sanity-check/api/organization-test.js @@ -43,7 +43,7 @@ describe('Organization api test', () => { it('should fetch organization', done => { organization.fetch() .then((organizations) => { - expect(organizations.name).to.be.equal('CLI Branches', 'Organization name dose not match') + expect(organizations.name).not.to.be.equal(null, 'Organization does not exist') done() }) .catch(done) From 8dff8969e89551e2214e1aab38b5a7cfb318a6d8 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Fri, 16 Feb 2024 13:45:11 +0530 Subject: [PATCH 4/4] chore: updated changeLog and version --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47d38c36..919e210e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [v1.15.3](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.3) (2024-02-16) + - Fix + - Fix for updating entry +## [v1.15.2](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.2) (2024-02-09) + - Fix + - Adds params support in taxonomy export method + - Adds sanity test cases ## [v1.15.1](https://github.com/contentstack/contentstack-management-javascript/tree/v1.15.1) (2024-01-29) - Feature - Taxonomy Import/Export test cases are added diff --git a/package-lock.json b/package-lock.json index b02fe8b5..07a42b34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/management", - "version": "1.15.2", + "version": "1.15.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@contentstack/management", - "version": "1.15.2", + "version": "1.15.3", "license": "MIT", "dependencies": { "@slack/bolt": "^3.17.0", diff --git a/package.json b/package.json index 7681b86a..017ca6e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/management", - "version": "1.15.2", + "version": "1.15.3", "description": "The Content Management API is used to manage the content of your Contentstack account", "main": "./dist/node/contentstack-management.js", "browser": "./dist/web/contentstack-management.js",