From fc9b76c974b976371305d814faf8b549c9f10fd8 Mon Sep 17 00:00:00 2001 From: rodrigo Date: Sat, 20 Jan 2024 07:46:26 +0000 Subject: [PATCH] fix: new json format is broken --- .prettierrc | 1 + packages/api/CHANGELOG.md | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.prettierrc b/.prettierrc index 64ef04c..202830d 100644 --- a/.prettierrc +++ b/.prettierrc @@ -8,6 +8,7 @@ "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], "overrides": [ { "files": "*.md", "options": { "printWidth": 100, "proseWrap": "always" } }, + { "files": "*.json", "options": { "trailingComma": "none" } }, { "files": "*.yaml", "options": { "singleQuote": false, "printWidth": 100, "proseWrap": "never" } }, { "files": "*.astro", "options": { "parser": "astro", "astroAllowShorthand": true } } ] diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index e1ed3e0..dc9a65b 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -4,29 +4,29 @@ ### Major Changes -- 68f97ff: We strongly recommend visiting the new [website](https://untidy-thetvdb.netlify.app) for guidance on - updating your code to the latest stable major version, 1.0.0. In this version, we have addressed - almost all return types and missing properties, and added previously undocumented queries that were - not included in the original API documentation. +- 68f97ff: We strongly recommend visiting the new [website](https://untidy-thetvdb.netlify.app) for + guidance on updating your code to the latest stable major version, 1.0.0. In this version, we have + addressed almost all return types and missing properties, and added previously undocumented + queries that were not included in the original API documentation. We have also enhanced the methods to specifically handle a particular endpoint along with their paths or queries. For instance, in the previous version, if a user wanted to request a specific movie's extended record, they would write something like this: ```js - import { TheTVDB } from "@untidy/thetvdb"; + import { TheTVDB } from '@untidy/thetvdb'; - const client = new TheTVDB("access token"); - await client.getMovie({ id: "3646", extended: true }); + const client = new TheTVDB('access token'); + await client.getMovie({ id: '3646', extended: true }); ``` Now, with the new rewrite, there's no need to specify the `extended` argument or even the `id`. ```js - import { TheTVDB } from "@untidy/thetvdb"; + import { TheTVDB } from '@untidy/thetvdb'; - const client = new TheTVDB("access token"); - await client.movieByIdExtended("12586"); + const client = new TheTVDB('access token'); + await client.movieByIdExtended('12586'); ``` These changes streamline the code and provide a more intuitive and concise syntax for accessing @@ -39,9 +39,9 @@ - major: Rewrite methods for better handling of requests depending on the specific endpoint. - major: support to update your token. - major: bump minimum version of `Node.js` required `18.17.0`. - - major: Only throw `Errors` if the response is not `ok` or the `token` validation fails (previously - strictly throws an error if you miss an specific argument, now this is handle by the consumers of - this package). + - major: Only throw `Errors` if the response is not `ok` or the `token` validation fails + (previously strictly throws an error if you miss an specific argument, now this is handle by the + consumers of this package). - feat: add `jsdoc` for better documentation and examples of usage with the new [site](https://untidy-thetvdb.netlify.app). - feat: support more endpoints