diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 4fee1d91..90d2a1c3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,29 @@ # Releases +## VERSION 2.0.1 +- Added named export to MercadoPago configuration module +- Modified integration example in readme +- Adjusted PR template +- Adjusted gitflow files + ## VERSION 2.0.0 -* Search Method implementation +Release SDK Node Mercado Pago V2 + +- TypeScript Support ⭐️ +- Type of all requests and all responses +- Maintained compatibility with Vanilla Javascript + +Tests +- More than 90% coverage of unit tests +- Documentation +- Implementation examples from ALL clients +- Technical Documentation +- Melhorias no Readme +- Contribution template + +Technical debits +- Code registration +- Removal of vulnerable libraries and without recent updates +- Registration with other Mercado Pago SDKs +- Individual Request configuration for client diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index f8cb6294..a81176cf 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -6,6 +6,7 @@ ### ✅ Checklist: - [ ] I followed the instructions indicated in [Contribution Guidelines](CONTRIBUTING.md) +- [ ] I added the changes to CHANGELOG - [ ] Added the necessary tests for the code or functionality that I'm working on - [ ] I ran the tests and made sure they work - [ ] My branch coverage is at least 80% @@ -13,15 +14,18 @@ ## 🧰 How to reproduce -- Step by step of how to test, specially for bugs. -- Links of external docs. +- [ ] Not Apply. +- [ ] Step by step of how to test, specially for bugs. +- [ ] Links of external docs. ## 📸 Screenshots -- Before and after, if it's a fix for a bug. +- [ ] Not Apply. +- [ ] Before and after, if it's a fix for a bug. ## 📄 References -- Links do external documentation -- Diagrams -- Useful links \ No newline at end of file +- [ ] Not Apply. +- [ ] Links do external documentation. +- [ ] Diagrams. +- [ ] Useful links. diff --git a/README.md b/README.md index bf3c28a1..3818072e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![SDK Node MErcado Pago](https://github.com/lucmkz/sdk-nodejs/assets/31546923/84211022-6fc5-4db1-8772-117eca84f2d9) +![SDK Node Mercado Pago](https://github.com/lucmkz/sdk-nodejs/assets/31546923/84211022-6fc5-4db1-8772-117eca84f2d9) # Mercado Pago SDK for NodeJS @@ -32,7 +32,7 @@ That's it! Mercado Pago SDK has been successfully installed. ```javascript // Step 1: Import the parts of the module you want to use -import MercadoPago, { Payment } from 'mercadopago'; +import { MercadoPago, Payment } from 'mercadopago'; // Step 2: Initialize the client object const client = new MercadoPago({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } }); @@ -59,7 +59,7 @@ payment.create({ body }).then(console.log).catch(console.log); Import `MercadoPago` and API objects from the MercadoPago module. ``` javascript -import MercadoPago, { Payment } from 'mercadopago'; +import { MercadoPago, Payment } from 'mercadopago'; ``` ### Step 2: Initialize the client object @@ -103,7 +103,7 @@ const body = { Use the API object's method to make the request. For example, to make a request to the `/v1/payments` endpoint using the `payment` object: -``` +```javascript payment.create({ body }).then(console.log).catch(console.log); ``` diff --git a/package.json b/package.json index 614d97e0..a89eb2ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mercadopago", - "version": "2.0.0", + "version": "2.0.1", "description": "Mercadopago SDK for Node.js", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index ff67fafb..9e924065 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ -import { MercadoPagoConfig } from './mercadoPagoConfig'; -export default MercadoPagoConfig; +import { MercadoPagoConfig as MercadoPago } from './mercadoPagoConfig'; +export default MercadoPago; +export { MercadoPago }; export { CardToken } from './clients/cardToken'; export { CustomerCard } from './clients/customerCard'; diff --git a/src/utils/config/index.ts b/src/utils/config/index.ts index fe363552..0f673490 100644 --- a/src/utils/config/index.ts +++ b/src/utils/config/index.ts @@ -5,7 +5,7 @@ export class AppConfig { static readonly BASE_URL = 'https://api.mercadopago.com'; static readonly PRODUCT_ID = 'bc32b6ntrpp001u8nhkg'; - static SDK_VERSION = '2.0.0'; + static SDK_VERSION = '2.0.1'; static readonly Headers = { AUTHORIZATION: 'Authorization',