Comparing version 6.1.0 to 7.0.0
@@ -190,3 +190,2 @@ /*! ***************************************************************************** | ||
function AwilixResolutionError(name, resolutionStack, message) { | ||
var _this = this; | ||
if (typeof name === 'symbol') { | ||
@@ -206,4 +205,3 @@ name = name.toString(); | ||
msg += "Resolution path: ".concat(resolutionPathString); | ||
_this = _super.call(this, msg) || this; | ||
return _this; | ||
return _super.call(this, msg) || this; | ||
} | ||
@@ -1070,2 +1068,6 @@ return AwilixResolutionError; | ||
/** | ||
* The string representation when calling toString. | ||
*/ | ||
var CRADLE_STRING_TAG = 'AwilixContainerCradle'; | ||
/** | ||
* Creates an Awilix container instance. | ||
@@ -1250,7 +1252,7 @@ * | ||
/** | ||
* Returned to `util.inspect` when attempting to resolve | ||
* Returned to `util.inspect` and Symbol.toStringTag when attempting to resolve | ||
* a custom inspector function on the cradle. | ||
*/ | ||
function inspectCradle() { | ||
return '[AwilixContainer.cradle]'; | ||
function toStringRepresentationFn() { | ||
return Object.prototype.toString.call(cradle); | ||
} | ||
@@ -1295,3 +1297,3 @@ /** | ||
if (name === 'toJSON') { | ||
return inspectCradle; | ||
return toStringRepresentationFn; | ||
} | ||
@@ -1308,3 +1310,6 @@ // Used in console.log. | ||
case 'inspect': | ||
return inspectCradle; | ||
case 'toString': | ||
return toStringRepresentationFn; | ||
case Symbol.toStringTag: | ||
return CRADLE_STRING_TAG; | ||
// Edge case: Promise unwrapping will look for a "then" property and attempt to call it. | ||
@@ -1311,0 +1316,0 @@ // Return undefined so that we won't cause a resolution error. (issue #109) |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -1215,2 +1215,6 @@ import * as glob from 'fast-glob'; | ||
/** | ||
* The string representation when calling toString. | ||
*/ | ||
const CRADLE_STRING_TAG = 'AwilixContainerCradle'; | ||
/** | ||
* Creates an Awilix container instance. | ||
@@ -1242,3 +1246,3 @@ * | ||
const cradle = new Proxy({ | ||
[util.inspect.custom]: inspectCradle, | ||
[util.inspect.custom]: toStringRepresentationFn, | ||
}, { | ||
@@ -1370,7 +1374,7 @@ /** | ||
/** | ||
* Returned to `util.inspect` when attempting to resolve | ||
* Returned to `util.inspect` and Symbol.toStringTag when attempting to resolve | ||
* a custom inspector function on the cradle. | ||
*/ | ||
function inspectCradle() { | ||
return '[AwilixContainer.cradle]'; | ||
function toStringRepresentationFn() { | ||
return Object.prototype.toString.call(cradle); | ||
} | ||
@@ -1415,3 +1419,3 @@ /** | ||
if (name === 'toJSON') { | ||
return inspectCradle; | ||
return toStringRepresentationFn; | ||
} | ||
@@ -1429,3 +1433,6 @@ // Used in console.log. | ||
case 'inspect': | ||
return inspectCradle; | ||
case 'toString': | ||
return toStringRepresentationFn; | ||
case Symbol.toStringTag: | ||
return CRADLE_STRING_TAG; | ||
// Edge case: Promise unwrapping will look for a "then" property and attempt to call it. | ||
@@ -1432,0 +1439,0 @@ // Return undefined so that we won't cause a resolution error. (issue #109) |
@@ -196,3 +196,2 @@ (function (global, factory) { | ||
function AwilixResolutionError(name, resolutionStack, message) { | ||
var _this = this; | ||
if (typeof name === 'symbol') { | ||
@@ -212,4 +211,3 @@ name = name.toString(); | ||
msg += "Resolution path: ".concat(resolutionPathString); | ||
_this = _super.call(this, msg) || this; | ||
return _this; | ||
return _super.call(this, msg) || this; | ||
} | ||
@@ -1076,2 +1074,6 @@ return AwilixResolutionError; | ||
/** | ||
* The string representation when calling toString. | ||
*/ | ||
var CRADLE_STRING_TAG = 'AwilixContainerCradle'; | ||
/** | ||
* Creates an Awilix container instance. | ||
@@ -1256,7 +1258,7 @@ * | ||
/** | ||
* Returned to `util.inspect` when attempting to resolve | ||
* Returned to `util.inspect` and Symbol.toStringTag when attempting to resolve | ||
* a custom inspector function on the cradle. | ||
*/ | ||
function inspectCradle() { | ||
return '[AwilixContainer.cradle]'; | ||
function toStringRepresentationFn() { | ||
return Object.prototype.toString.call(cradle); | ||
} | ||
@@ -1301,3 +1303,3 @@ /** | ||
if (name === 'toJSON') { | ||
return inspectCradle; | ||
return toStringRepresentationFn; | ||
} | ||
@@ -1314,3 +1316,6 @@ // Used in console.log. | ||
case 'inspect': | ||
return inspectCradle; | ||
case 'toString': | ||
return toStringRepresentationFn; | ||
case Symbol.toStringTag: | ||
return CRADLE_STRING_TAG; | ||
// Edge case: Promise unwrapping will look for a "then" property and attempt to call it. | ||
@@ -1317,0 +1322,0 @@ // Return undefined so that we won't cause a resolution error. (issue #109) |
@@ -22,2 +22,6 @@ "use strict"; | ||
/** | ||
* The string representation when calling toString. | ||
*/ | ||
const CRADLE_STRING_TAG = 'AwilixContainerCradle'; | ||
/** | ||
* Creates an Awilix container instance. | ||
@@ -49,3 +53,3 @@ * | ||
const cradle = new Proxy({ | ||
[util.inspect.custom]: inspectCradle, | ||
[util.inspect.custom]: toStringRepresentationFn, | ||
}, { | ||
@@ -177,7 +181,7 @@ /** | ||
/** | ||
* Returned to `util.inspect` when attempting to resolve | ||
* Returned to `util.inspect` and Symbol.toStringTag when attempting to resolve | ||
* a custom inspector function on the cradle. | ||
*/ | ||
function inspectCradle() { | ||
return '[AwilixContainer.cradle]'; | ||
function toStringRepresentationFn() { | ||
return Object.prototype.toString.call(cradle); | ||
} | ||
@@ -222,3 +226,3 @@ /** | ||
if (name === 'toJSON') { | ||
return inspectCradle; | ||
return toStringRepresentationFn; | ||
} | ||
@@ -236,3 +240,6 @@ // Used in console.log. | ||
case 'inspect': | ||
return inspectCradle; | ||
case 'toString': | ||
return toStringRepresentationFn; | ||
case Symbol.toStringTag: | ||
return CRADLE_STRING_TAG; | ||
// Edge case: Promise unwrapping will look for a "then" property and attempt to call it. | ||
@@ -239,0 +246,0 @@ // Return undefined so that we won't cause a resolution error. (issue #109) |
{ | ||
"name": "awilix", | ||
"version": "6.1.0", | ||
"version": "7.0.0", | ||
"description": "Extremely powerful dependency injection container.", | ||
@@ -53,18 +53,18 @@ "main": "lib/awilix.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.16.12", | ||
"@babel/plugin-transform-runtime": "^7.16.10", | ||
"@babel/core": "^7.17.7", | ||
"@babel/plugin-transform-runtime": "^7.17.0", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/runtime": "^7.16.7", | ||
"@types/jest": "^27.4.0", | ||
"@types/node": "^17.0.13", | ||
"@types/prettier": "^2.4.3", | ||
"babel-jest": "^27.4.6", | ||
"@babel/runtime": "^7.17.7", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.21", | ||
"@types/prettier": "^2.4.4", | ||
"babel-jest": "^27.5.1", | ||
"coveralls": "^3.1.1", | ||
"husky": "^7.0.4", | ||
"istanbul": "^0.4.5", | ||
"jest": "^27.4.7", | ||
"lint-staged": "^12.3.2", | ||
"prettier": "^2.5.1", | ||
"jest": "^27.5.1", | ||
"lint-staged": "^12.3.6", | ||
"prettier": "^2.6.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.66.1", | ||
"rollup": "^2.70.1", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
@@ -74,3 +74,3 @@ "rollup-plugin-copy": "^3.4.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-typescript2": "^0.31.1", | ||
"rollup-plugin-typescript2": "^0.31.2", | ||
"smid": "^0.1.1", | ||
@@ -82,3 +82,3 @@ "ts-jest": "^27.1.3", | ||
"tslint-config-standard": "^9.0.0", | ||
"typescript": "^4.5.5" | ||
"typescript": "^4.6.2" | ||
}, | ||
@@ -85,0 +85,0 @@ "dependencies": { |
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
303881
6670