Update dependencies

This commit is contained in:
Timothy Gu 2018-01-27 11:39:47 -08:00
parent 19b115f9dc
commit 5774bf4229
No known key found for this signature in database
GPG Key ID: 7FE6B095B582B0D4
3 changed files with 17 additions and 17 deletions

View File

@ -4,7 +4,7 @@ export default function tweakDefault() {
var lines = source.split('\n');
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
var matches = /^exports\['default'] = (.*);$/.exec(line);
var matches = /^exports(?:\['default']|\.default) = (.*);$/.exec(line);
if (matches) {
lines[i] = 'module.exports = exports = ' + matches[1] + ';';
break;

View File

@ -36,24 +36,25 @@
},
"homepage": "https://github.com/bitinn/node-fetch",
"devDependencies": {
"babel-plugin-istanbul": "^4.0.0",
"babel-preset-env": "^1.1.10",
"babel-core": "^6.26.0",
"babel-plugin-istanbul": "^4.1.5",
"babel-preset-env": "^1.6.1",
"babel-register": "^6.16.3",
"chai": "^3.5.0",
"chai-as-promised": "^7.1.1",
"chai-iterator": "^1.1.1",
"chai-string": "^1.3.0",
"codecov": "^2.2.0",
"cross-env": "^5.0.1",
"form-data": ">=1.0.0",
"mocha": "^3.1.2",
"nyc": "^11.1.0",
"codecov": "^3.0.0",
"cross-env": "^5.1.3",
"form-data": "^2.3.1",
"mocha": "^5.0.0",
"nyc": "^11.4.1",
"parted": "^0.1.1",
"promise": "^8.0.1",
"resumer": "0.0.0",
"rollup": "^0.45.2",
"rollup-plugin-babel": "^2.6.1",
"url-search-params": "^0.9.0",
"rollup": "^0.55.1",
"rollup-plugin-babel": "^3.0.3",
"url-search-params": "^0.10.0",
"whatwg-url": "^5.0.0"
},
"dependencies": {}

View File

@ -4,18 +4,17 @@ import tweakDefault from './build/rollup-plugin';
process.env.BABEL_ENV = 'rollup';
export default {
entry: 'src/index.js',
exports: 'named',
input: 'src/index.js',
output: [
{ file: 'lib/index.js', format: 'cjs', exports: 'named' },
{ file: 'lib/index.es.js', format: 'es', exports: 'named' }
],
plugins: [
babel({
runtimeHelpers: true
}),
tweakDefault()
],
targets: [
{ dest: 'lib/index.js', format: 'cjs' },
{ dest: 'lib/index.es.js', format: 'es' }
],
external: function (id) {
id = id.split('/').slice(0, id[0] === '@' ? 2 : 1).join('/');
return !!require('./package.json').dependencies[id];