Comparing version 2.0.0 to 2.1.0
// This is so webpack can override this with a browser version | ||
module.exports = require('node-fetch') | ||
let fetchImpl | ||
// Try to load the hack-node-fetch package because jest allows remapping packages (useful for tests) | ||
try { | ||
fetchImpl = require('hack-node-fetch') | ||
} catch (err) { | ||
fetchImpl = require('node-fetch') | ||
} | ||
module.exports = fetchImpl |
// This is so webpack can override this with a browser version | ||
module.exports = require('node-fetch').Response | ||
module.exports = require('./fetch-node').Response |
{ | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"name": "fetch-vcr", | ||
@@ -19,5 +19,5 @@ "description": "Stop mocking HTTP Requests. Just record and then play them back", | ||
"jsdom": "^11.0.0", | ||
"rollup": "^0.54.1", | ||
"rollup-plugin-commonjs": "^9.0.0", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup": "^0.58.2", | ||
"rollup-plugin-commonjs": "^9.1.0", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"standard": "^11.0.0" | ||
@@ -24,0 +24,0 @@ }, |
@@ -72,3 +72,4 @@ # fetch-vcr | ||
"moduleNameMapper": { | ||
"fetch": "fetch-vcr" | ||
"hack-node-fetch": "node-fetch", | ||
"node-fetch": "fetch-vcr" | ||
} | ||
@@ -75,0 +76,0 @@ } |
@@ -6,3 +6,3 @@ // This is used for building the ./test/browser-bundle.js for testing | ||
export default { | ||
entry: './lib/index.js', | ||
input: './lib/index.js', | ||
plugins: [ | ||
@@ -15,10 +15,10 @@ resolve({ | ||
], | ||
targets: [ | ||
output: [ | ||
{ | ||
dest: './browser-bundle.js', | ||
file: './browser-bundle.js', | ||
format: 'umd', | ||
moduleName: 'fetchVCR', | ||
sourceMap: true | ||
name: 'fetchVCR', | ||
sourcemap: true | ||
} | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104535
366
130