awilix 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/awilix.browser.js +13 -2
- package/lib/awilix.module.js +13 -2
- package/lib/awilix.umd.js +13 -2
- package/lib/errors.d.ts +0 -1
- package/lib/errors.js +13 -2
- package/lib/errors.js.map +1 -1
- package/package.json +5 -5
package/lib/awilix.browser.js
CHANGED
|
@@ -105,7 +105,19 @@ var ExtendableError = /** @class */ (function (_super) {
|
|
|
105
105
|
enumerable: false,
|
|
106
106
|
value: _this.constructor.name,
|
|
107
107
|
});
|
|
108
|
-
|
|
108
|
+
// Not all browsers have this function.
|
|
109
|
+
/* istanbul ignore else */
|
|
110
|
+
if ('captureStackTrace' in Error) {
|
|
111
|
+
Error.captureStackTrace(_this, _this.constructor);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
Object.defineProperty(_this, 'stack', {
|
|
115
|
+
enumerable: false,
|
|
116
|
+
value: Error(message).stack,
|
|
117
|
+
writable: true,
|
|
118
|
+
configurable: true,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
109
121
|
return _this;
|
|
110
122
|
}
|
|
111
123
|
return ExtendableError;
|
|
@@ -122,7 +134,6 @@ var AwilixError = /** @class */ (function (_super) {
|
|
|
122
134
|
}(ExtendableError));
|
|
123
135
|
/**
|
|
124
136
|
* Error thrown to indicate a type mismatch.
|
|
125
|
-
* TODO(v3): remove `AwilixNotAFunctionError` and use this.
|
|
126
137
|
*/
|
|
127
138
|
var AwilixTypeError = /** @class */ (function (_super) {
|
|
128
139
|
__extends(AwilixTypeError, _super);
|
package/lib/awilix.module.js
CHANGED
|
@@ -31,7 +31,19 @@ class ExtendableError extends Error {
|
|
|
31
31
|
enumerable: false,
|
|
32
32
|
value: this.constructor.name,
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
// Not all browsers have this function.
|
|
35
|
+
/* istanbul ignore else */
|
|
36
|
+
if ('captureStackTrace' in Error) {
|
|
37
|
+
Error.captureStackTrace(this, this.constructor);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
Object.defineProperty(this, 'stack', {
|
|
41
|
+
enumerable: false,
|
|
42
|
+
value: Error(message).stack,
|
|
43
|
+
writable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
35
47
|
}
|
|
36
48
|
}
|
|
37
49
|
/**
|
|
@@ -41,7 +53,6 @@ class AwilixError extends ExtendableError {
|
|
|
41
53
|
}
|
|
42
54
|
/**
|
|
43
55
|
* Error thrown to indicate a type mismatch.
|
|
44
|
-
* TODO(v3): remove `AwilixNotAFunctionError` and use this.
|
|
45
56
|
*/
|
|
46
57
|
class AwilixTypeError extends AwilixError {
|
|
47
58
|
/**
|
package/lib/awilix.umd.js
CHANGED
|
@@ -111,7 +111,19 @@
|
|
|
111
111
|
enumerable: false,
|
|
112
112
|
value: _this.constructor.name,
|
|
113
113
|
});
|
|
114
|
-
|
|
114
|
+
// Not all browsers have this function.
|
|
115
|
+
/* istanbul ignore else */
|
|
116
|
+
if ('captureStackTrace' in Error) {
|
|
117
|
+
Error.captureStackTrace(_this, _this.constructor);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
Object.defineProperty(_this, 'stack', {
|
|
121
|
+
enumerable: false,
|
|
122
|
+
value: Error(message).stack,
|
|
123
|
+
writable: true,
|
|
124
|
+
configurable: true,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
115
127
|
return _this;
|
|
116
128
|
}
|
|
117
129
|
return ExtendableError;
|
|
@@ -128,7 +140,6 @@
|
|
|
128
140
|
}(ExtendableError));
|
|
129
141
|
/**
|
|
130
142
|
* Error thrown to indicate a type mismatch.
|
|
131
|
-
* TODO(v3): remove `AwilixNotAFunctionError` and use this.
|
|
132
143
|
*/
|
|
133
144
|
var AwilixTypeError = /** @class */ (function (_super) {
|
|
134
145
|
__extends(AwilixTypeError, _super);
|
package/lib/errors.d.ts
CHANGED
package/lib/errors.js
CHANGED
|
@@ -27,7 +27,19 @@ class ExtendableError extends Error {
|
|
|
27
27
|
enumerable: false,
|
|
28
28
|
value: this.constructor.name,
|
|
29
29
|
});
|
|
30
|
-
|
|
30
|
+
// Not all browsers have this function.
|
|
31
|
+
/* istanbul ignore else */
|
|
32
|
+
if ('captureStackTrace' in Error) {
|
|
33
|
+
Error.captureStackTrace(this, this.constructor);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
Object.defineProperty(this, 'stack', {
|
|
37
|
+
enumerable: false,
|
|
38
|
+
value: Error(message).stack,
|
|
39
|
+
writable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
31
43
|
}
|
|
32
44
|
}
|
|
33
45
|
exports.ExtendableError = ExtendableError;
|
|
@@ -39,7 +51,6 @@ class AwilixError extends ExtendableError {
|
|
|
39
51
|
exports.AwilixError = AwilixError;
|
|
40
52
|
/**
|
|
41
53
|
* Error thrown to indicate a type mismatch.
|
|
42
|
-
* TODO(v3): remove `AwilixNotAFunctionError` and use this.
|
|
43
54
|
*/
|
|
44
55
|
class AwilixTypeError extends AwilixError {
|
|
45
56
|
/**
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAM,GAAG,GAAG,IAAI,CAAA;AAEhB;;;GAGG;AACH,MAAa,eAAgB,SAAQ,KAAK;IACxC;;;;;OAKG;IACH,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QAEd,4DAA4D;QAC5D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;YACrC,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,OAAO;SACf,CAAC,CAAA;QAEF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YAClC,UAAU,EAAE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|
|
1
1
|
{
|
|
2
2
|
"name": "awilix",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Extremely powerful dependency injection container.",
|
|
5
5
|
"main": "lib/awilix.js",
|
|
6
6
|
"module": "lib/awilix.module.js",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/jeffijoe/awilix#readme",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.17.
|
|
53
|
+
"@babel/core": "^7.17.8",
|
|
54
54
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
55
55
|
"@babel/preset-env": "^7.16.11",
|
|
56
|
-
"@babel/runtime": "^7.17.
|
|
56
|
+
"@babel/runtime": "^7.17.8",
|
|
57
57
|
"@types/jest": "^27.4.1",
|
|
58
|
-
"@types/node": "^17.0.
|
|
58
|
+
"@types/node": "^17.0.22",
|
|
59
59
|
"@types/prettier": "^2.4.4",
|
|
60
60
|
"babel-jest": "^27.5.1",
|
|
61
61
|
"coveralls": "^3.1.1",
|
|
62
62
|
"husky": "^7.0.4",
|
|
63
63
|
"istanbul": "^0.4.5",
|
|
64
64
|
"jest": "^27.5.1",
|
|
65
|
-
"lint-staged": "^12.3.
|
|
65
|
+
"lint-staged": "^12.3.7",
|
|
66
66
|
"prettier": "^2.6.0",
|
|
67
67
|
"rimraf": "^3.0.2",
|
|
68
68
|
"rollup": "^2.70.1",
|