From b579fa7a5583014576cb6ab12f594feb350973d5 Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Wed, 11 Sep 2024 15:55:57 +0300 Subject: [PATCH] chore: v2.0.0 --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- website/docs/releases/migration-2.mdx | 23 +++++++++++++++++++++++ website/sidebars.js | 5 ++++- 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 website/docs/releases/migration-2.mdx diff --git a/README.md b/README.md index 9eafc20..11cf783 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ # Crowdin OTA JavaScript client [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Fcrowdin%2Fota-client-js&text=Lightweight%20library%20for%20Crowdin%20Over-The-Air%20Content%20Delivery.%20The%20best%20way%20to%20deliver%20translations%20to%20your%20site%20Over-The-Air) [![GitHub Repo stars](https://img.shields.io/github/stars/crowdin/ota-client-js?style=social&cacheSeconds=1800)](https://github.com/crowdin/ota-client-js/stargazers) -Lightweight library for Crowdin Over-The-Air Content Delivery. The best way to deliver translations to your site Over-The-Air :dizzy: +Lightweight library (zero-dependencies) for Crowdin Over-The-Air Content Delivery. The best way to deliver translations to your site Over-The-Air :dizzy:
diff --git a/package-lock.json b/package-lock.json index e1466cf..8f33323 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@crowdin/ota-client", - "version": "1.1.3", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@crowdin/ota-client", - "version": "1.1.3", + "version": "2.0.0", "license": "MIT", "devDependencies": { "@types/jest": "^29.5.0", diff --git a/package.json b/package.json index 43496d9..ea85c01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@crowdin/ota-client", - "version": "1.1.3", + "version": "2.0.0", "description": "JavaScript library for Crowdin OTA Content Delivery", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/website/docs/releases/migration-2.mdx b/website/docs/releases/migration-2.mdx new file mode 100644 index 0000000..92665c1 --- /dev/null +++ b/website/docs/releases/migration-2.mdx @@ -0,0 +1,23 @@ +# Migration from 1.x to 2.x + +Migrating to 2.x is a major update, but should be straightforward and easy. The changes that may affect your integration are described below. + +### Node.js Version + +The minimum required version of Node.js is **18.x**. + +### Axios Dependency Removed + +In this release, we've removed the Axios dependency from the Crowdin OTA JS client. This change addresses security concerns and streamlines the client by using the native Fetch API instead. + +Axios was only used for a few GET operations that can be handled by the native Node.js `fetch`. In addition, developers were experiencing issues with Axios in modern build environments, making it cumbersome to use. + +#### Benefits + +- **Smaller Bundle**: Reduces the size of the client for better performance. +- **Improved Security**: Fewer dependencies means less potential vulnerabilities. Now OTA JS client is **zero-dependency** library. +- **Simplified Setup**: No more manual Axios installation or configuration needed. + +#### Migration Steps + +If you have a custom Axios instance used for the OTA JS client, you can now remove it and uninstall the Axios package if it's not being used elsewhere. Otherwise, no changes are required. diff --git a/website/sidebars.js b/website/sidebars.js index 2d4e227..d94b2f9 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -53,7 +53,10 @@ const sidebars = { { type: 'category', label: 'Releases', - items: ['releases/migration-1'], + items: [ + 'releases/migration-1', + 'releases/migration-2', + ], }, ], };