File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 33 "version" : " 3.0.9" ,
44 "description" : " Busca por CEP integrado diretamente aos serviços dos Correios e ViaCEP" ,
55 "main" : " dist/cep-promise.min.js" ,
6- "module" : " dist/cep-promise-browser .min.js" ,
6+ "module" : " dist/cep-promise.min.js" ,
77 "scripts" : {
88 "test" : " npm run coverage" ,
99 "coverage" : " babel-node node_modules/.bin/babel-istanbul cover _mocha -- --timeout 60000 test/**/*.spec.js" ,
5454 "rollup-plugin-babel" : " 3.0.3" ,
5555 "rollup-plugin-commonjs" : " 8.3.0" ,
5656 "rollup-plugin-node-resolve" : " 3.0.3" ,
57+ "rollup-plugin-replace" : " 2.2.0" ,
5758 "standard" : " 8.6.0" ,
5859 "uglify-js" : " 2.7.5"
5960 },
6667 ]
6768 },
6869 "dependencies" : {
69- "isomorphic-unfetch" : " 3.0.0"
70+ "node-fetch" : " 2.6.0" ,
71+ "unfetch" : " 4.1.0"
7072 },
7173 "files" : [
7274 " dist" ,
Original file line number Diff line number Diff line change 11import babel from 'rollup-plugin-babel'
22import commonjs from 'rollup-plugin-commonjs'
33import resolve from 'rollup-plugin-node-resolve'
4+ import replace from 'rollup-plugin-replace'
45
56const input = 'src/cep-promise.js'
67const defaultPlugins = [
@@ -25,7 +26,11 @@ export default [
2526 } ,
2627 {
2728 input,
28- plugins : [ ] . concat ( defaultPlugins , [
29+ plugins : [
30+ replace ( {
31+ 'node-fetch' : 'unfetch' ,
32+ } )
33+ ] . concat ( defaultPlugins , [
2934 resolve ( {
3035 browser : true
3136 } ) ,
Original file line number Diff line number Diff line change 11'use strict'
22
3- import fetch from 'isomorphic-unfetch '
3+ import fetch from 'node-fetch '
44import ServiceError from '../errors/service.js'
55
66export default function fetchCorreiosService ( cepWithLeftPad , proxyURL = '' ) {
Original file line number Diff line number Diff line change 11'use strict'
22
3- import fetch from 'isomorphic-unfetch '
3+ import fetch from 'node-fetch '
44import ServiceError from '../errors/service.js'
55
66export default function fetchViaCepService ( cepWithLeftPad , proxyURL = '' ) {
Original file line number Diff line number Diff line change 11'use strict'
22
3- import fetch from 'isomorphic-unfetch '
3+ import fetch from 'node-fetch '
44import ServiceError from '../errors/service.js'
55
66export default function fetchWideNetService ( cepWithLeftPad , proxyURL = '' ) {
You can’t perform that action at this time.
0 commit comments