Skip to content

Commit 51e8815

Browse files
authored
Merge branch 'master' into website
2 parents 6f47f4e + 52d3bc7 commit 51e8815

36 files changed

+9724
-4338
lines changed

.babelrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"presets": ["env"],
2+
"presets": ["@babel/preset-env"],
33
"plugins": [
44
[
5-
"babel-plugin-transform-builtin-extend",
6-
{ globals: ["Error"] }
5+
"@babel/plugin-transform-runtime"
76
]
87
]
98
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node: [ '10', '11', '12', '13', '14' ]
17+
name: Node ${{ matrix.node }} sample
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Setup node
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node }}
24+
- run: npm install
25+
- run: npm test
26+
27+
- name: Coveralls
28+
uses: coverallsapp/github-action@master
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ node_modules
3333
dist/*
3434
!dist/cep-promise*.js
3535

36+
#Intellij Ide
37+
.idea
38+
3639
#Yarn
3740
yarn.lock
3841

42+
3943
# Website
4044
website/dist

.mocharc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"timeout": 60000,
3+
"require": "@babel/register"
4+
}

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Agora pronto, você já pode começar a contribuir com o projeto!
1818

1919
## Reportando Issues
2020

21-
Você pode criar uma issue [aqui](https://github.com/filipedeschamps/cep-promise/issues), mas, lembre-se de ser claro e informar o máximo de detalhes possíveis.
21+
Você pode criar uma issue [aqui](https://github.com/BrasilAPI/cep-promise/issues), mas, lembre-se de ser claro e informar o máximo de detalhes possíveis.
2222

2323
## Submetendo Pull Requests
2424
* Crie pull requests pequenos, para que a revisão seja feita mais facilmente

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,33 @@
88
<a href="https://npm-stat.com/charts.html?package=cep-promise">
99
<img src="https://img.shields.io/npm/dm/cep-promise.svg">
1010
</a>
11-
<a href="https://coveralls.io/github/filipedeschamps/cep-promise?branch=master">
12-
<img src="https://coveralls.io/repos/github/filipedeschamps/cep-promise/badge.svg?branch=master">
11+
<a href="https://coveralls.io/github/BrasilAPI/cep-promise?branch=master">
12+
<img src="https://coveralls.io/repos/github/BrasilAPI/cep-promise/badge.svg?branch=master">
1313
</a>
1414
<a href="https://www.npmjs.com/package/cep-promise">
1515
<img src="https://badge.fury.io/js/cep-promise.svg">
1616
</a>
1717
<a href="http://standardjs.com/">
1818
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg">
1919
</a>
20-
<a href="https://snyk.io/test/github/filipedeschamps/cep-promise">
21-
<img src="https://snyk.io/test/github/filipedeschamps/cep-promise/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/filipedeschamps/cep-promise" style="max-width:100%;">
20+
<a href="https://snyk.io/test/github/BrasilAPI/cep-promise">
21+
<img src="https://snyk.io/test/github/BrasilAPI/cep-promise/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/BrasilAPI/cep-promise" style="max-width:100%;">
2222
</a>
2323
</p>
2424

2525
<p align="center">
26-
Busca por CEP integrado diretamente aos serviços dos Correios, ViaCEP e outros (Node.js e Browser)
26+
Busca por CEP integrado diretamente aos serviços dos Correios, ViaCEP e WideNet (Node.js e Browser)
2727
</p>
2828

2929
## Features
3030

31-
* Sempre atualizado em tempo-real por se conectar diretamente aos serviços dos Correios, ViaCEP e outros.
31+
* Sempre atualizado em tempo-real por se conectar diretamente aos serviços dos Correios, ViaCEP e WideNet.
3232
* Possui alta disponibilidade por usar vários serviços como fallback.
3333
* Sempre retorna a resposta mais rápida por fazer as consultas de forma concorrente.
3434
* Sem limites de uso (rate limits) conhecidos.
3535
* Interface de Promise extremamente simples.
36-
* Suporte ao Node.js `4.x`, `5.x`, `6.x`, `7.x`, `8.x`, `9.x`, `10.x` e `@stable`.
36+
* Suporte ao Node.js `10.x`, `11.x`, `12.x`, `13.x`, `14.x` e `@stable`.
37+
* Suporte ao Node.js `4.x`, `5.x`, `6.x`, `7.x`, `8.x`, `9.x`, até cep-promise versão `3.0.9`.
3738
* Suporte ao Node.js `0.10.x` e `0.12.x` até cep-promise versão `2.0.8`.
3839
* 100% de code coverage com testes unitários e E2E.
3940
* Desenvolvido utilizando ES6.
@@ -103,9 +104,6 @@ cep('99999999')
103104
// }, {
104105
// message: 'CEP não encontrado na base do ViaCEP.',
105106
// service: 'viacep'
106-
// }, {
107-
// message: 'CEP não encontrado na base do Cep Aberto.',
108-
// service: 'cepaberto'
109107
// }]
110108
// }
111109

@@ -131,7 +129,16 @@ cep('123456789123456789')
131129
// }]
132130
// }
133131
```
132+
### Options
133+
- `timeout`: Timeout em milisegundos das consultas em cada serviço. O tempo total poderá ser maior devido a limites no paralelismo.
134+
- `providers`: Lista de providers a serem usados na consulta. Default é usar todos os providers disponíveis.
135+
136+
```js
137+
import cep from 'cep-promise'
138+
cep('5010000', { timeout: 5000, providers: ['brasilapi'] })
139+
.then(console.log)
134140

141+
```
135142

136143
### Instalação
137144

@@ -151,6 +158,11 @@ $ npm install --save cep-promise
151158
```
152159
$ bower install --save cep-promise
153160
```
161+
#### yarn
162+
163+
```
164+
$ yarn add cep-promise
165+
```
154166

155167
#### Angular 2
156168

@@ -167,12 +179,9 @@ Leia nosso guia de contribuição [aqui](CONTRIBUTING.md)
167179

168180
## Contribuidores
169181

170-
| [<img src="https://avatars1.githubusercontent.com/u/8251208?v=3&s=115"><br><sub>@lucianopf</sub>](https://github.com/lucianopf) | [<img src="https://avatars1.githubusercontent.com/u/7863230?v=3&s=115"><br><sub>@MarcoWorms</sub>](https://github.com/MarcoWorms) | [<img src="https://avatars1.githubusercontent.com/u/551228?v=3&s=115"><br><sub>@caio-ribeiro-pereira</sub>](https://github.com/caio-ribeiro-pereira) | [<img src="https://avatars1.githubusercontent.com/u/1225447?v=3&s=115"><br><sub>@chrisbenseler</sub>](https://github.com/chrisbenseler) | [<img src="https://avatars0.githubusercontent.com/u/3428149?v=3&s=115"><br><sub>@luanmuniz</sub>](https://github.com/luanmuniz) | [<img src="https://avatars3.githubusercontent.com/u/3094496?v=3&s=115"><br><sub>@AlbertoTrindade</sub>](https://github.com/AlbertoTrindade) |
171-
|:-:|:-:|:-:|:-:|:-:|:-:|
172-
| [<img src="https://avatars1.githubusercontent.com/u/4137355?v=3&s=115"><br><sub>@pedrro</sub>](https://github.com/pedrro) | [<img src="https://avatars1.githubusercontent.com/u/8260778?v=3&s=115"><br><sub>@petronetto</sub>](https://github.com/Petronetto) | [<img src="https://avatars3.githubusercontent.com/u/434364?v=3&s=115"><br><sub>@olegon</sub>](https://github.com/olegon) | [<img src="https://avatars3.githubusercontent.com/u/2177742?v=3&s=115"><br><sub>@jhonnymoreira</sub>](https://github.com/jhonnymoreira) | [<img src="https://avatars3.githubusercontent.com/u/2955087?s=115&v=4"><br><sub>@claytonsilva</sub>](https://github.com/claytonsilva) | [<img src="https://avatars1.githubusercontent.com/u/13632762?s=115"><br><sub>@thiamsantos</sub>](https://github.com/thiamsantos) |
173-
| [<img src="https://avatars2.githubusercontent.com/u/6232791?v=3&s=115"><br><sub>@flyingluscas</sub>](https://github.com/flyingluscas) | [<img src="https://avatars1.githubusercontent.com/u/15306309?s=115&v=4"><br><sub>@otaviopace</sub>](https://github.com/otaviopace) |
182+
<a href="https://github.com/brasilapi/cep-promise/graphs/contributors"><img src="https://contrib.rocks/image?repo=brasilapi/cep-promise" /></a>
174183

175184
## Autor
176185

177186
| [<img src="https://avatars0.githubusercontent.com/u/4248081?v=3&s=115"><br><sub>@filipedeschamps</sub>](https://github.com/filipedeschamps) |
178-
| :---: |
187+
| :---: |

0 commit comments

Comments
 (0)