From ad34e78f16cc481b2bb1c2d48656b352ab483457 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 11:47:21 -0700 Subject: [PATCH 01/13] edit: move legacy content field to metadata --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d25e10..2733d3b 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,8 @@ Use the `objects.insertOne()` method to create an Object. await cosmic.objects.insertOne({ title: 'Blog Post Title', type: 'posts', - content: 'Here is the blog post content... still learning', metadata: { + content: 'Here is the blog post content... still learning', seo_description: 'This is the blog post SEO description.', featured_post: true, tags: ['javascript', 'cms'], @@ -106,8 +106,8 @@ Use the `objects.updateOne()` method to update an Object by specifying the Objec ```jsx await cosmic.objects.updateOne('5ff75368c2dfa81a91695cec', { - content: 'This is the updated blog post content... I got it now!', metadata: { + content: 'This is the updated blog post content... I got it now!', featured_post: false, }, }); From cdb5f9167a1b9e20e094cf459709dd3ee955d559 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 11:49:26 -0700 Subject: [PATCH 02/13] edit: remove slack, add contact link --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2733d3b..4aeaa00 100644 --- a/README.md +++ b/README.md @@ -129,11 +129,14 @@ Go to the [Cosmic docs](https://docs-v3.cosmicjs.com) to learn more capabilities For general help, please refer to [the official Cosmic documentation (v3)](https://docs-v3.cosmicjs.com). For additional help, you can use one of these channels to ask a question: -- [Slack](https://www.cosmicjs.com/community) (For live discussions with the Cosmic community and team) - [GitHub](https://github.com/cosmicjs/cosmicjs/cosmic-sdk-js) (Bug reports, contributions) - [Twitter](https://twitter.com/cosmicjs) (Get the latest news about Cosmic features and notifications) - [YouTube](https://www.youtube.com/cosmicjs) (Learn from video tutorials) +## Cosmic support + +- [Contact us](https://www.cosmicjs.com/contact) for help with any service questions and custom plan inquiries. + ## License This project is published under the [MIT](https://github.com/cosmicjs/cosmic-sdk-js/blob/HEAD/LICENSE) license. From 2f5ece903b23cbbf018c0f3407ded293120f67c1 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 11:50:29 -0700 Subject: [PATCH 03/13] edit: remove beta links --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4aeaa00..c6b8913 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + Cosmic dashboard darkmode @@ -6,7 +6,7 @@ [Cosmic](https://www.cosmicjs.com/) is a [headless CMS](https://www.cosmicjs.com/headless-cms) (content management system) that provides a web dashboard to create content and an API toolkit to deliver content to any website or application. Nearly any type of content can be built using the dashboard and delivered using this SDK. -[Get started free →](https://beta.cosmicjs.com/signup) +[Get started free →](https://app.cosmicjs.com/signup) ## Install @@ -30,7 +30,7 @@ import { createBucketClient } from '@cosmicjs/sdk'; ## Authentication -In the [Cosmic admin dashboard](https://beta.cosmicjs.com/login) go to _Bucket > Settings > API Access_ and get your Bucket slug and read key then set the variables in your app to connect to your Bucket. +In the [Cosmic admin dashboard](https://app.cosmicjs.com/login) go to _Bucket > Settings > API Access_ and get your Bucket slug and read key then set the variables in your app to connect to your Bucket. ```jsx const cosmic = createBucketClient({ From 2c06b8be1ca12bf856a251829d2599b130488652 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 11:51:35 -0700 Subject: [PATCH 04/13] edit: remove docs-v3 from URLs --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c6b8913..864db88 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ const cosmic = createBucketClient({ Objects are the basic building blocks of content in Cosmic. -### Get multiple Objects [[see docs](https://docs-v3.cosmicjs.com/docs/api/objects#get-objects)] +### Get multiple Objects [[see docs](https://www.cosmicjs.com/docs/api/objects#get-objects)] Use the `objects.find()` method to fetch Objects. @@ -58,7 +58,7 @@ const posts = await cosmic.objects The above example fetches Objects in the `posts` Object type returning the `title`, `slug`, and `metadata` properties, limiting the response to `10` Objects. -### Get single Object by slug [[see docs](https://docs-v3.cosmicjs.com/docs/api/objects#get-a-single-object-by-slug)] +### Get single Object by slug [[see docs](https://www.cosmicjs.com/docs/api/objects#get-a-single-object-by-slug)] Use the `objects.findOne()` method with `type` and `slug` to fetch a single Object. @@ -83,7 +83,7 @@ const cosmic = createBucketClient({ }); ``` -### Create Object [[see docs](https://docs-v3.cosmicjs.com/docs/api/objects#create-an-object)] +### Create Object [[see docs](https://www.cosmicjs.com/docs/api/objects#create-an-object)] Use the `objects.insertOne()` method to create an Object. @@ -100,7 +100,7 @@ await cosmic.objects.insertOne({ }); ``` -### Update Object [[see docs](https://docs-v3.cosmicjs.com/docs/api/objects#update-an-object)] +### Update Object [[see docs](https://www.cosmicjs.com/docs/api/objects#update-an-object)] Use the `objects.updateOne()` method to update an Object by specifying the Object `id` and include properties that you want to update. @@ -113,7 +113,7 @@ await cosmic.objects.updateOne('5ff75368c2dfa81a91695cec', { }); ``` -### Delete Object [[see docs](https://docs-v3.cosmicjs.com/docs/api/objects#delete-an-object)] +### Delete Object [[see docs](https://www.cosmicjs.com/docs/api/objects#delete-an-object)] Use the `objects.deleteOne()` method to delete an Object by specifying the Object `id`. @@ -123,11 +123,11 @@ await cosmic.objects.deleteOne('5ff75368c2dfa81a91695cec'); ## Learn more -Go to the [Cosmic docs](https://docs-v3.cosmicjs.com) to learn more capabilities. +Go to the [Cosmic docs](https://www.cosmicjs.com) to learn more capabilities. ## Community support -For general help, please refer to [the official Cosmic documentation (v3)](https://docs-v3.cosmicjs.com). For additional help, you can use one of these channels to ask a question: +For general help, please refer to [the official Cosmic documentation (v3)](https://www.cosmicjs.com). For additional help, you can use one of these channels to ask a question: - [GitHub](https://github.com/cosmicjs/cosmicjs/cosmic-sdk-js) (Bug reports, contributions) - [Twitter](https://twitter.com/cosmicjs) (Get the latest news about Cosmic features and notifications) From 44ded3bf6a2f2094521a564d0bca04e7c8a92373 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 11:53:08 -0700 Subject: [PATCH 05/13] edit: docs link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 864db88..3a5f1c6 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ Go to the [Cosmic docs](https://www.cosmicjs.com) to learn more capabilities. ## Community support -For general help, please refer to [the official Cosmic documentation (v3)](https://www.cosmicjs.com). For additional help, you can use one of these channels to ask a question: +For general help, please refer to [the official Cosmic documentation](https://www.cosmicjs.com/docs). For additional help, you can use one of these channels to ask a question: - [GitHub](https://github.com/cosmicjs/cosmicjs/cosmic-sdk-js) (Bug reports, contributions) - [Twitter](https://twitter.com/cosmicjs) (Get the latest news about Cosmic features and notifications) From 0a38521c46ef63b7365d5e99d107f81e29ed6ed7 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 11:59:13 -0700 Subject: [PATCH 06/13] edit: docs link --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a5f1c6..09f663e 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,11 @@ await cosmic.objects.deleteOne('5ff75368c2dfa81a91695cec'); ## Learn more -Go to the [Cosmic docs](https://www.cosmicjs.com) to learn more capabilities. +Go to the [Cosmic docs](https://www.cosmicjs.com/docs) to learn more capabilities. ## Community support -For general help, please refer to [the official Cosmic documentation](https://www.cosmicjs.com/docs). For additional help, you can use one of these channels to ask a question: +For additional help, you can use one of these channels to ask a question: - [GitHub](https://github.com/cosmicjs/cosmicjs/cosmic-sdk-js) (Bug reports, contributions) - [Twitter](https://twitter.com/cosmicjs) (Get the latest news about Cosmic features and notifications) From ab7ba13e569554f48562bf7a474d2f36389dde68 Mon Sep 17 00:00:00 2001 From: Tony Spiro Date: Wed, 28 Jun 2023 12:41:08 -0700 Subject: [PATCH 07/13] edit: npm version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa44fca..dda1eba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cosmicjs/sdk", - "version": "1.0.6", + "version": "1.0.7", "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", "keywords": [ "headlesscms", From 32374ccebccdd8a7fc290b9d4e71bf0260fbdab8 Mon Sep 17 00:00:00 2001 From: jazibsawar Date: Thu, 29 Jun 2023 00:39:44 +0300 Subject: [PATCH 08/13] dump version --- package.json | 128 +++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index dda1eba..dd327a8 100644 --- a/package.json +++ b/package.json @@ -1,65 +1,65 @@ { - "name": "@cosmicjs/sdk", - "version": "1.0.7", - "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", - "keywords": [ - "headlesscms", - "cms", - "node", - "content", - "api", - "react", - "reactjs", - "vue", - "vuejs", - "nextjs" - ], - "homepage": "https://www.cosmicjs.com", - "bugs": { - "url": "https://github.com/cosmicjs/cosmic-sdk-js/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/cosmicjs/cosmic-sdk-js.git" - }, - "license": "MIT", - "author": "Tony Spiro ", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "scripts": { - "build": "tsup src/index.ts --format cjs,esm --dts --minify", - "tsc:lint": "tsc", - "lint": "eslint --fix 'src/**/*.{ts,js}'", - "format": "prettier --write './src/**/*.{ts,js}'", - "release": "npm run build && changeset publish", - "prepare": "husky install", - "prepublishOnly": "npm run build" - }, - "dependencies": { - "axios": "^1.3.4", - "form-data": "^4.0.0" - }, - "devDependencies": { - "@changesets/cli": "^2.26.1", - "@semantic-release/changelog": "^6.0.2", - "@types/node": "^18.15.5", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "eslint": "^8.36.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.8.0", - "eslint-import-resolver-typescript": "^3.5.3", - "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.3", - "lint-staged": "^13.2.0", - "prettier": "^2.8.6", - "tsup": "^6.7.0", - "typescript": "^5.0.2" - }, - "lint-staged": { - "src/**/*.{ts,js}": [ - "npx prettier --write", - "npx eslint --fix" - ] - } -} \ No newline at end of file + "name": "@cosmicjs/sdk", + "version": "1.0.6", + "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", + "keywords": [ + "headlesscms", + "cms", + "node", + "content", + "api", + "react", + "reactjs", + "vue", + "vuejs", + "nextjs" + ], + "homepage": "https://www.cosmicjs.com", + "bugs": { + "url": "https://github.com/cosmicjs/cosmic-sdk-js/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cosmicjs/cosmic-sdk-js.git" + }, + "license": "MIT", + "author": "Tony Spiro ", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsup src/index.ts --format cjs,esm --dts --minify", + "tsc:lint": "tsc", + "lint": "eslint --fix 'src/**/*.{ts,js}'", + "format": "prettier --write './src/**/*.{ts,js}'", + "release": "npm run build && changeset publish", + "prepare": "husky install", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "axios": "^1.3.4", + "form-data": "^4.0.0" + }, + "devDependencies": { + "@changesets/cli": "^2.26.1", + "@semantic-release/changelog": "^6.0.2", + "@types/node": "^18.15.5", + "@typescript-eslint/eslint-plugin": "^5.56.0", + "eslint": "^8.36.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^8.8.0", + "eslint-import-resolver-typescript": "^3.5.3", + "eslint-plugin-prettier": "^4.2.1", + "husky": "^8.0.3", + "lint-staged": "^13.2.0", + "prettier": "^2.8.6", + "tsup": "^6.7.0", + "typescript": "^5.0.2" + }, + "lint-staged": { + "src/**/*.{ts,js}": [ + "npx prettier --write", + "npx eslint --fix" + ] + } +} From 914eb19a96c25fac1ce4842723aa8cbcb627837c Mon Sep 17 00:00:00 2001 From: jazibsawar Date: Thu, 29 Jun 2023 00:43:51 +0300 Subject: [PATCH 09/13] add: changeset --- .changeset/honest-pans-mix.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/honest-pans-mix.md diff --git a/.changeset/honest-pans-mix.md b/.changeset/honest-pans-mix.md new file mode 100644 index 0000000..9a84cba --- /dev/null +++ b/.changeset/honest-pans-mix.md @@ -0,0 +1,5 @@ +--- +'@cosmicjs/sdk': patch +--- + +Edit Readme links From 839f9667204c2050904eda906c9da830d40b0d69 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 Jun 2023 21:45:08 +0000 Subject: [PATCH 10/13] Version Packages --- .changeset/honest-pans-mix.md | 5 ----- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/honest-pans-mix.md diff --git a/.changeset/honest-pans-mix.md b/.changeset/honest-pans-mix.md deleted file mode 100644 index 9a84cba..0000000 --- a/.changeset/honest-pans-mix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@cosmicjs/sdk': patch ---- - -Edit Readme links diff --git a/CHANGELOG.md b/CHANGELOG.md index e40ee48..2b50852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @cosmicjs/sdk +## 1.0.7 + +### Patch Changes + +- 914eb19: Edit Readme links + ## 1.0.6 ### Patch Changes diff --git a/package.json b/package.json index dd327a8..49bbb7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cosmicjs/sdk", - "version": "1.0.6", + "version": "1.0.7", "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", "keywords": [ "headlesscms", From 70d40fa5c95a85373427e23d6d0373280fe7269c Mon Sep 17 00:00:00 2001 From: jazibsawar Date: Thu, 29 Jun 2023 01:01:33 +0300 Subject: [PATCH 11/13] add: contributing section in readme --- .changeset/modern-llamas-hammer.md | 5 +++++ README.md | 8 ++++++++ package.json | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .changeset/modern-llamas-hammer.md diff --git a/.changeset/modern-llamas-hammer.md b/.changeset/modern-llamas-hammer.md new file mode 100644 index 0000000..14097a3 --- /dev/null +++ b/.changeset/modern-llamas-hammer.md @@ -0,0 +1,5 @@ +--- +'@cosmicjs/sdk': patch +--- + +Added contributing section in Readme diff --git a/README.md b/README.md index 09f663e..40fcb30 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,14 @@ For additional help, you can use one of these channels to ask a question: - [Contact us](https://www.cosmicjs.com/contact) for help with any service questions and custom plan inquiries. +## Contributing + +This project uses [changeset](https://www.npmjs.com/package/@changesets/cli) to manage releases. Follow the following steps to add a changeset: + +- Run `npm run changeset` command and select type of release with description of changes. +- When PR with changeset is merged into `main` branch, Github will create a new PR with correct version change and changelog edits. +- When `codeowner` merges the generated PR, it will publish the package and create a Github release. + ## License This project is published under the [MIT](https://github.com/cosmicjs/cosmic-sdk-js/blob/HEAD/LICENSE) license. diff --git a/package.json b/package.json index 49bbb7d..162da52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cosmicjs/sdk", - "version": "1.0.7", + "version": "1.0.6", "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", "keywords": [ "headlesscms", @@ -33,6 +33,7 @@ "lint": "eslint --fix 'src/**/*.{ts,js}'", "format": "prettier --write './src/**/*.{ts,js}'", "release": "npm run build && changeset publish", + "changeset": "changeset", "prepare": "husky install", "prepublishOnly": "npm run build" }, From 381234eeda23f58591056b40b5900fd9d1c90393 Mon Sep 17 00:00:00 2001 From: jazibsawar Date: Thu, 29 Jun 2023 01:05:40 +0300 Subject: [PATCH 12/13] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 162da52..19b9b94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cosmicjs/sdk", - "version": "1.0.6", + "version": "1.0.7", "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", "keywords": [ "headlesscms", From c82cf618a39f29da8a80e8f09dcb29a764192f3f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 Jun 2023 22:07:04 +0000 Subject: [PATCH 13/13] Version Packages --- .changeset/modern-llamas-hammer.md | 5 ----- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/modern-llamas-hammer.md diff --git a/.changeset/modern-llamas-hammer.md b/.changeset/modern-llamas-hammer.md deleted file mode 100644 index 14097a3..0000000 --- a/.changeset/modern-llamas-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@cosmicjs/sdk': patch ---- - -Added contributing section in Readme diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b50852..9834c8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @cosmicjs/sdk +## 1.0.8 + +### Patch Changes + +- 70d40fa: Added contributing section in Readme + ## 1.0.7 ### Patch Changes diff --git a/package.json b/package.json index 19b9b94..bc8934b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cosmicjs/sdk", - "version": "1.0.7", + "version": "1.0.8", "description": "The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.", "keywords": [ "headlesscms",