@pollyjs/core
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.1.0](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/compare/v2.0.0...v2.1.0) (2019-02-04) | ||
### Features | ||
* **core:** Add removeHeader, removeHeaders, and allow empty headers ([#176](https://github.com/netflix/pollyjs/tree/master/packages/[@pollyjs](https://github.com/pollyjs)/core/issues/176)) ([1dfae5a](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/commit/1dfae5a)) | ||
# [2.0.0](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/compare/v1.4.2...v2.0.0) (2019-01-29) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@pollyjs/core", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Record, replay, and stub HTTP Interactions", | ||
@@ -14,9 +14,5 @@ "main": "dist/cjs/pollyjs-core.js", | ||
"scripts": { | ||
"build": "npm-run-all clean rollup", | ||
"build:prod": "npm-run-all clean --parallel rollup rollup:prod", | ||
"build": "rollup -c ../../../scripts/rollup/default.config.js", | ||
"test:build": "rollup -c rollup.config.test.js", | ||
"clean": "rimraf dist", | ||
"rollup": "rollup -c ../../../rollup.config.js", | ||
"rollup:prod": "NODE_ENV=production yarn rollup", | ||
"watch": "yarn rollup -w" | ||
"watch": "yarn build -w" | ||
}, | ||
@@ -48,3 +44,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@pollyjs/utils": "^2.0.0", | ||
"@pollyjs/utils": "^2.1.0", | ||
"@sindresorhus/fnv1a": "^1.0.0", | ||
@@ -59,10 +55,7 @@ "blueimp-md5": "^2.10.0", | ||
"devDependencies": { | ||
"@pollyjs/adapter": "^2.0.0", | ||
"@pollyjs/adapter-fetch": "^2.0.0", | ||
"@pollyjs/persister": "^2.0.0", | ||
"npm-run-all": "^4.1.3", | ||
"rimraf": "^2.6.2", | ||
"@pollyjs/adapter": "^2.1.0", | ||
"@pollyjs/persister": "^2.1.0", | ||
"rollup": "^0.67.0" | ||
}, | ||
"gitHead": "9db417a2e41fd4a1bcb3dbe0ba183d93137f4847" | ||
"gitHead": "9f6dd8e8f79e13038d68b02d23053c4fde27cebf" | ||
} |
@@ -31,2 +31,16 @@ import stringify from 'fast-json-stable-stringify'; | ||
removeHeader(name) { | ||
this.setHeader(name, null); | ||
return this; | ||
} | ||
removeHeaders(headers = []) { | ||
for (const name of headers) { | ||
this.removeHeader(name); | ||
} | ||
return this; | ||
} | ||
hasHeader(name) { | ||
@@ -33,0 +47,0 @@ return !!this.getHeader(name); |
@@ -16,3 +16,3 @@ import isObjectLike from 'lodash-es/isObjectLike'; | ||
if (!value) { | ||
if (value === null || typeof value === 'undefined') { | ||
delete obj[prop.toLowerCase()]; | ||
@@ -24,2 +24,12 @@ } else { | ||
return true; | ||
}, | ||
deleteProperty(obj, prop) { | ||
if (typeof prop !== 'string') { | ||
return false; | ||
} | ||
delete obj[prop.toLowerCase()]; | ||
return true; | ||
} | ||
@@ -26,0 +36,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
3789665
3
41
24679
Updated@pollyjs/utils@^2.1.0