http-auth-utils
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -0,1 +1,5 @@ | ||
# [2.5.0](https://github.com/nfroidure/http-auth-utils/compare/v2.4.0...v2.5.0) (2020-04-01) | ||
# [2.4.0](https://github.com/nfroidure/http-auth-utils/compare/v2.3.0...v2.4.0) (2020-01-19) | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "http-auth-utils", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Parse, build and deal with HTTP authorization headers.", | ||
"main": "dist/index.js", | ||
"main": "dist/index", | ||
"module": "dist/index.mjs", | ||
"types": "src/index.d.ts", | ||
@@ -33,3 +34,5 @@ "metapak": { | ||
"cli": "env NODE_ENV=${NODE_ENV:-cli}", | ||
"compile": "babel src --out-dir=dist --source-maps=true", | ||
"compile": "rimraf -f 'dist' && npm run compile:cjs && npm run compile:mjs", | ||
"compile:cjs": "babel --env-name=cjs --out-dir=dist --source-maps=true src", | ||
"compile:mjs": "babel --env-name=mjs --out-file-extension=.mjs --out-dir=dist --source-maps=true src", | ||
"cover": "nyc npm test && nyc report --reporter=html --reporter=text", | ||
@@ -73,21 +76,21 @@ "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls && rm -rf ./coverage", | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.3", | ||
"@babel/core": "^7.8.3", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3", | ||
"@babel/preset-env": "^7.8.3", | ||
"@babel/register": "^7.8.3", | ||
"babel-eslint": "^10.0.3", | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.9.0", | ||
"@babel/preset-env": "^7.9.0", | ||
"@babel/register": "^7.9.0", | ||
"babel-eslint": "^10.1.0", | ||
"commitizen": "^4.0.3", | ||
"conventional-changelog-cli": "^2.0.31", | ||
"coveralls": "^3.0.9", | ||
"cz-conventional-changelog": "^3.0.2", | ||
"coveralls": "^3.0.11", | ||
"cz-conventional-changelog": "^3.1.0", | ||
"eslint": "^6.8.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"jsdoc-to-markdown": "^5.0.3", | ||
"metapak": "^3.1.6", | ||
"metapak-nfroidure": "9.8.1", | ||
"mocha": "^7.0.0", | ||
"metapak": "^3.1.8", | ||
"metapak-nfroidure": "10.1.2", | ||
"mocha": "^7.1.1", | ||
"neatequal": "^1.0.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "^1.19.1", | ||
"prettier": "^2.0.2", | ||
"sinon": "^8.1.0" | ||
@@ -99,3 +102,3 @@ }, | ||
"engines": { | ||
"node": ">=8.12.0" | ||
"node": ">=10.19.0" | ||
}, | ||
@@ -128,2 +131,5 @@ "config": { | ||
"babel": { | ||
"plugins": [ | ||
"@babel/plugin-proposal-object-rest-spread" | ||
], | ||
"presets": [ | ||
@@ -134,3 +140,3 @@ [ | ||
"targets": { | ||
"node": "8.12.0" | ||
"node": "10.19.0" | ||
} | ||
@@ -140,5 +146,33 @@ } | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-object-rest-spread" | ||
] | ||
"env": { | ||
"cjs": { | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"targets": { | ||
"node": "10" | ||
}, | ||
"modules": "commonjs" | ||
} | ||
] | ||
], | ||
"comments": true | ||
}, | ||
"mjs": { | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"targets": { | ||
"node": "12" | ||
}, | ||
"modules": "false" | ||
} | ||
] | ||
], | ||
"comments": false | ||
} | ||
}, | ||
"sourceMaps": true | ||
}, | ||
@@ -145,0 +179,0 @@ "eslintConfig": { |
@@ -70,3 +70,3 @@ import YError from 'yerror'; | ||
authMechanisms.some(authMechanism => { | ||
authMechanisms.some((authMechanism) => { | ||
if ( | ||
@@ -121,3 +121,3 @@ 0 === header.indexOf(authMechanism.type + ' ') || | ||
authMechanisms.some(function(authMechanism) { | ||
authMechanisms.some(function (authMechanism) { | ||
if ( | ||
@@ -124,0 +124,0 @@ 0 === header.indexOf(authMechanism.type + ' ') || |
@@ -29,3 +29,3 @@ import YError from 'yerror'; | ||
}) | ||
.reduce(function(parsedValues, [name, value], valuePosition) { | ||
.reduce(function (parsedValues, [name, value], valuePosition) { | ||
if (-1 === authorizedKeys.indexOf(name)) { | ||
@@ -52,3 +52,3 @@ throw new YError('E_UNAUTHORIZED_KEY', valuePosition, name); | ||
_checkRequiredKeys(requiredKeys, data); | ||
return authorizedKeys.reduce(function(contents, key) { | ||
return authorizedKeys.reduce(function (contents, key) { | ||
if (data[key]) { | ||
@@ -70,3 +70,3 @@ return ( | ||
function _checkRequiredKeys(requiredKeys, data) { | ||
requiredKeys.forEach(name => { | ||
requiredKeys.forEach((name) => { | ||
if ('undefined' === typeof data[name]) { | ||
@@ -73,0 +73,0 @@ throw new YError('E_REQUIRED_KEY', name); |
Sorry, the diff of this file is not supported yet
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
282786
55
3250