unexpected
Advanced tools
Comparing version 11.7.0 to 11.8.0
@@ -0,1 +1,3 @@ | ||
var utils = require('./utils'); | ||
var defaultDepth = 3; | ||
@@ -9,5 +11,8 @@ var matchDepthParameter = | ||
defaultDepth = parseInt(matchDepthParameter[1], 10); | ||
} else if (typeof process !== 'undefined' && process.env.UNEXPECTED_DEPTH) { | ||
defaultDepth = parseInt(process.env.UNEXPECTED_DEPTH, 10); | ||
} else { | ||
var defaultDepthFromEnv = utils.getEnv('UNEXPECTED_DEPTH'); | ||
if (defaultDepthFromEnv) { | ||
defaultDepth = parseInt(defaultDepthFromEnv, 10); | ||
} | ||
} | ||
module.exports = defaultDepth; |
var Promise = require('unexpected-bluebird'); | ||
var utils = require('./utils'); | ||
var useFullStackTrace = false; | ||
@@ -9,7 +11,3 @@ if (typeof window !== 'undefined' && typeof window.location !== 'undefined') { | ||
if ( | ||
typeof process !== 'undefined' && | ||
process.env && | ||
process.env.UNEXPECTED_FULL_TRACE | ||
) { | ||
if (utils.getEnv('UNEXPECTED_FULL_TRACE')) { | ||
Promise.longStackTraces(); | ||
@@ -16,0 +14,0 @@ useFullStackTrace = true; |
/* eslint-disable no-proto */ | ||
/* global Deno */ | ||
var canSetPrototype = | ||
@@ -374,3 +376,11 @@ Object.setPrototypeOf || { __proto__: [] } instanceof Array; | ||
} | ||
}, | ||
getEnv: function getEnv(varName) { | ||
if (typeof Deno === 'object' && Deno.permissions().env) { | ||
return Deno.env()[varName]; | ||
} else if (typeof process === 'object' && process.env) { | ||
return process.env[varName]; | ||
} | ||
} | ||
}); |
@@ -0,1 +1,3 @@ | ||
const utils = require('./utils'); | ||
let defaultDepth = 3; | ||
@@ -9,5 +11,8 @@ const matchDepthParameter = | ||
defaultDepth = parseInt(matchDepthParameter[1], 10); | ||
} else if (typeof process !== 'undefined' && process.env.UNEXPECTED_DEPTH) { | ||
defaultDepth = parseInt(process.env.UNEXPECTED_DEPTH, 10); | ||
} else { | ||
const defaultDepthFromEnv = utils.getEnv('UNEXPECTED_DEPTH'); | ||
if (defaultDepthFromEnv) { | ||
defaultDepth = parseInt(defaultDepthFromEnv, 10); | ||
} | ||
} | ||
module.exports = defaultDepth; |
const Promise = require('unexpected-bluebird'); | ||
const utils = require('./utils'); | ||
let useFullStackTrace = false; | ||
@@ -9,7 +11,3 @@ if (typeof window !== 'undefined' && typeof window.location !== 'undefined') { | ||
if ( | ||
typeof process !== 'undefined' && | ||
process.env && | ||
process.env.UNEXPECTED_FULL_TRACE | ||
) { | ||
if (utils.getEnv('UNEXPECTED_FULL_TRACE')) { | ||
Promise.longStackTraces(); | ||
@@ -16,0 +14,0 @@ useFullStackTrace = true; |
/* eslint-disable no-proto */ | ||
/* global Deno */ | ||
const canSetPrototype = | ||
@@ -361,3 +363,11 @@ Object.setPrototypeOf || { __proto__: [] } instanceof Array; | ||
} | ||
}, | ||
getEnv(varName) { | ||
if (typeof Deno === 'object' && Deno.permissions().env) { | ||
return Deno.env()[varName]; | ||
} else if (typeof process === 'object' && process.env) { | ||
return process.env[varName]; | ||
} | ||
} | ||
}); |
{ | ||
"name": "unexpected", | ||
"version": "11.7.0", | ||
"version": "11.8.0", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"leven": "2.1.0", | ||
"magicpen": "^6.0.2", | ||
"magicpen": "^6.1.0", | ||
"unexpected-bluebird": "2.9.34-longstack2" | ||
@@ -40,6 +40,6 @@ }, | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-config-standard": "^13.0.1", | ||
"eslint-config-standard": "^14.0.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"eslint-plugin-markdown": "^1.0.0", | ||
"eslint-plugin-mocha": "^5.2.0", | ||
"eslint-plugin-mocha": "^6.0.0", | ||
"eslint-plugin-node": "^9.0.1", | ||
@@ -55,3 +55,3 @@ "eslint-plugin-promise": "^4.0.1", | ||
"jest": "^24.4.0", | ||
"karma": "4.1.0", | ||
"karma": "4.2.0", | ||
"karma-browserstack-launcher": "1.5.1", | ||
@@ -69,2 +69,3 @@ "karma-chrome-launcher": "3.0.0", | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-multi-entry": "^2.1.0", | ||
"rollup-plugin-node-globals": "^1.1.0", | ||
@@ -76,3 +77,3 @@ "rollup-plugin-node-resolve": "^5.0.0", | ||
"unexpected-documentation-site-generator": "^6.0.0", | ||
"unexpected-magicpen": "^2.0.0", | ||
"unexpected-magicpen": "^2.1.0", | ||
"unexpected-markdown": "^4.0.0" | ||
@@ -83,2 +84,4 @@ }, | ||
"unexpected.js.map", | ||
"unexpected.esm.js", | ||
"unexpected.esm.js.map", | ||
"lib", | ||
@@ -85,0 +88,0 @@ "build/lib" |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
3112321
54
16814
40
10
10
Updatedmagicpen@^6.1.0