Skip to content

Commit 0bcc268

Browse files
committed
Merge branch 'master' into feature/payments-integration-test
2 parents c7b56da + 544b3e6 commit 0bcc268

File tree

9 files changed

+1568
-3092
lines changed

9 files changed

+1568
-3092
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Node.js CI
1+
name: CI
22

33
on:
44
push:
5-
branches: [ "master", "master-v2" ]
5+
branches: [ "master" ]
66
pull_request:
7-
branches: [ "*" ]
7+
branches: [ "master" ]
88

99
jobs:
10-
build:
11-
10+
test:
11+
name: Test on Node v${{ matrix.node-version }}
1212
runs-on: ubuntu-latest
1313

1414
strategy:
1515
matrix:
16-
node-version: [12.x, 14.x, 16.x, 18.x]
16+
node-version: [14.x, 16.x, 18.x, 19.x]
1717

1818
steps:
1919
- uses: actions/checkout@v3
@@ -22,5 +22,5 @@ jobs:
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
cache: 'npm'
25-
- run: npm ci
25+
- run: npm ci --legacy-peer-deps
2626
- run: npm test
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
1-
name: Node.js Publish Package
1+
name: Publish to NPM
22

33
on:
44
release:
55
types: [created]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
13-
with:
14-
node-version: 18
15-
- run: npm ci
16-
- run: npm test
17-
18-
publish-npm:
19-
needs: build
8+
publish:
209
runs-on: ubuntu-latest
2110
steps:
2211
- uses: actions/checkout@v3
2312
- uses: actions/setup-node@v3
2413
with:
2514
node-version: 18
2615
registry-url: https://registry.npmjs.org/
27-
- run: npm ci
16+
- run: npm ci --legacy-peer-deps
17+
- run: npm run build
2818
- run: npm publish
2919
env:
3020
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

CHANGELOG.MD

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Releases
22

3+
## VERSION 2.0.1
4+
- Added named export to MercadoPago configuration module
5+
- Modified integration example in readme
6+
- Adjusted PR template
7+
- Adjusted gitflow files
8+
39
## VERSION 2.0.0
410

5-
* Search Method implementation
11+
Release SDK Node Mercado Pago V2
12+
13+
- TypeScript Support ⭐️
14+
- Type of all requests and all responses
15+
- Maintained compatibility with Vanilla Javascript
16+
17+
Tests
18+
- More than 90% coverage of unit tests
19+
- Documentation
20+
- Implementation examples from ALL clients
21+
- Technical Documentation
22+
- Melhorias no Readme
23+
- Contribution template
24+
25+
Technical debits
26+
- Code registration
27+
- Removal of vulnerable libraries and without recent updates
28+
- Registration with other Mercado Pago SDKs
29+
- Individual Request configuration for client

PULL_REQUEST_TEMPLATE.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,26 @@
66
### ✅ Checklist:
77

88
- [ ] I followed the instructions indicated in [Contribution Guidelines](CONTRIBUTING.md)
9+
- [ ] I added the changes to CHANGELOG
910
- [ ] Added the necessary tests for the code or functionality that I'm working on
1011
- [ ] I ran the tests and made sure they work
1112
- [ ] My branch coverage is at least 80%
1213
- [ ] I verified the style of my code matches the one in the project
1314

1415
## 🧰 How to reproduce
1516

16-
- Step by step of how to test, specially for bugs.
17-
- Links of external docs.
17+
- [ ] Not Apply.
18+
- [ ] Step by step of how to test, specially for bugs.
19+
- [ ] Links of external docs.
1820

1921
## 📸 Screenshots
2022

21-
- Before and after, if it's a fix for a bug.
23+
- [ ] Not Apply.
24+
- [ ] Before and after, if it's a fix for a bug.
2225

2326
## 📄 References
2427

25-
- Links do external documentation
26-
- Diagrams
27-
- Useful links
28+
- [ ] Not Apply.
29+
- [ ] Links do external documentation.
30+
- [ ] Diagrams.
31+
- [ ] Useful links.

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![SDK Node MErcado Pago](https://github.com/lucmkz/sdk-nodejs/assets/31546923/84211022-6fc5-4db1-8772-117eca84f2d9)
1+
![SDK Node Mercado Pago](https://github.com/lucmkz/sdk-nodejs/assets/31546923/84211022-6fc5-4db1-8772-117eca84f2d9)
22

33

44
# Mercado Pago SDK for NodeJS
@@ -32,10 +32,10 @@ That's it! Mercado Pago SDK has been successfully installed.
3232

3333
```javascript
3434
// Step 1: Import the parts of the module you want to use
35-
import MercadoPago, { Payment } from 'mercadopago';
35+
import { MercadoPagoConfig, Payment } from 'mercadopago';
3636

3737
// Step 2: Initialize the client object
38-
const client = new MercadoPago({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
38+
const client = new MercadoPagoConfig({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
3939

4040
// Step 3: Initialize the API object
4141
const payment = new Payment(client);
@@ -56,10 +56,10 @@ payment.create({ body }).then(console.log).catch(console.log);
5656

5757
### Step 1: Import the parts of the module you want to use
5858

59-
Import `MercadoPago` and API objects from the MercadoPago module.
59+
Import `MercadoPagoConfig` and API objects from the MercadoPago module.
6060

6161
``` javascript
62-
import MercadoPago, { Payment } from 'mercadopago';
62+
import { MercadoPagoConfig, Payment } from 'mercadopago';
6363
```
6464

6565
### Step 2: Initialize the client object
@@ -73,7 +73,7 @@ Initialize the client object, passing the following:
7373
For example:
7474

7575
``` javascript
76-
const client = new MercadoPago({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
76+
const client = new MercadoPagoConfig({ accessToken: 'access_token', options: { timeout: 5000, idempotencyKey: 'abc' } });
7777
```
7878

7979
### Step 3: Initialize the API object
@@ -103,7 +103,7 @@ const body = {
103103

104104
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:
105105

106-
```
106+
```javascript
107107
payment.create({ body }).then(console.log).catch(console.log);
108108
```
109109

0 commit comments

Comments
 (0)