Comparing version 6.0.0 to 6.1.0
@@ -71,6 +71,10 @@ /*! ***************************************************************************** | ||
function __spreadArray(to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
function __spreadArray(to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
} | ||
@@ -143,3 +147,3 @@ | ||
function AwilixTypeError(funcDescription, paramName, expectedType, givenType) { | ||
return _super.call(this, funcDescription + ": expected " + paramName + " to be " + expectedType + ", but got " + givenType + ".") || this; | ||
return _super.call(this, "".concat(funcDescription, ": expected ").concat(paramName, " to be ").concat(expectedType, ", but got ").concat(givenType, ".")) || this; | ||
} | ||
@@ -197,8 +201,8 @@ /** | ||
var resolutionPathString = resolutionStack.join(' -> '); | ||
var msg = "Could not resolve '" + name + "'."; | ||
var msg = "Could not resolve '".concat(name, "'."); | ||
if (message) { | ||
msg += " " + message; | ||
msg += " ".concat(message); | ||
} | ||
msg += EOL + EOL; | ||
msg += "Resolution path: " + resolutionPathString; | ||
msg += "Resolution path: ".concat(resolutionPathString); | ||
_this = _super.call(this, msg) || this; | ||
@@ -706,3 +710,3 @@ return _this; | ||
function unexpected() { | ||
return new SyntaxError("Parsing parameter list, did not expect " + t.type + " token" + (t.value ? " (" + t.value + ")" : '')); | ||
return new SyntaxError("Parsing parameter list, did not expect ".concat(t.type, " token").concat(t.value ? " (".concat(t.value, ")") : '')); | ||
} | ||
@@ -869,3 +873,3 @@ } | ||
} | ||
return Object.assign.apply(Object, __spreadArray([{}, defaults], rest)); | ||
return Object.assign.apply(Object, __spreadArray([{}, defaults], rest, false)); | ||
} | ||
@@ -908,3 +912,3 @@ /** | ||
var locals = injector(container); | ||
var allKeys = uniq(__spreadArray(__spreadArray([], Reflect.ownKeys(container.cradle), true), Reflect.ownKeys(locals))); | ||
var allKeys = uniq(__spreadArray(__spreadArray([], Reflect.ownKeys(container.cradle), true), Reflect.ownKeys(locals), true)); | ||
// TODO: Lots of duplication here from the container proxy. | ||
@@ -1119,3 +1123,3 @@ // Need to refactor. | ||
set: function (_target, name) { | ||
throw new Error("Attempted setting property \"" + name + "\" on container cradle - this is not allowed."); | ||
throw new Error("Attempted setting property \"".concat(name, "\" on container cradle - this is not allowed.")); | ||
}, | ||
@@ -1181,3 +1185,3 @@ /** | ||
function inspect() { | ||
return "[AwilixContainer (" + (parentContainer ? 'scoped, ' : '') + "registrations: " + Object.keys(container.registrations).length + ")]"; | ||
return "[AwilixContainer (".concat(parentContainer ? 'scoped, ' : '', "registrations: ").concat(Object.keys(container.registrations).length, ")]"); | ||
} | ||
@@ -1242,3 +1246,3 @@ /** | ||
var obj = nameValueToObject(arg1, arg2); | ||
var keys = __spreadArray(__spreadArray([], Object.keys(obj), true), Object.getOwnPropertySymbols(obj)); | ||
var keys = __spreadArray(__spreadArray([], Object.keys(obj), true), Object.getOwnPropertySymbols(obj), true); | ||
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { | ||
@@ -1360,3 +1364,3 @@ var key = keys_1[_i]; | ||
default: | ||
throw new AwilixResolutionError(name, resolutionStack, "Unknown lifetime \"" + resolver.lifetime + "\""); | ||
throw new AwilixResolutionError(name, resolutionStack, "Unknown lifetime \"".concat(resolver.lifetime, "\"")); | ||
} | ||
@@ -1363,0 +1367,0 @@ // Pop it from the stack again, ready for the next resolution |
@@ -1,2 +0,2 @@ | ||
import * as glob from 'glob'; | ||
import * as glob from 'fast-glob'; | ||
import * as path from 'path'; | ||
@@ -3,0 +3,0 @@ import * as util from 'util'; |
@@ -77,6 +77,10 @@ (function (global, factory) { | ||
function __spreadArray(to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
function __spreadArray(to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
} | ||
@@ -149,3 +153,3 @@ | ||
function AwilixTypeError(funcDescription, paramName, expectedType, givenType) { | ||
return _super.call(this, funcDescription + ": expected " + paramName + " to be " + expectedType + ", but got " + givenType + ".") || this; | ||
return _super.call(this, "".concat(funcDescription, ": expected ").concat(paramName, " to be ").concat(expectedType, ", but got ").concat(givenType, ".")) || this; | ||
} | ||
@@ -203,8 +207,8 @@ /** | ||
var resolutionPathString = resolutionStack.join(' -> '); | ||
var msg = "Could not resolve '" + name + "'."; | ||
var msg = "Could not resolve '".concat(name, "'."); | ||
if (message) { | ||
msg += " " + message; | ||
msg += " ".concat(message); | ||
} | ||
msg += EOL + EOL; | ||
msg += "Resolution path: " + resolutionPathString; | ||
msg += "Resolution path: ".concat(resolutionPathString); | ||
_this = _super.call(this, msg) || this; | ||
@@ -712,3 +716,3 @@ return _this; | ||
function unexpected() { | ||
return new SyntaxError("Parsing parameter list, did not expect " + t.type + " token" + (t.value ? " (" + t.value + ")" : '')); | ||
return new SyntaxError("Parsing parameter list, did not expect ".concat(t.type, " token").concat(t.value ? " (".concat(t.value, ")") : '')); | ||
} | ||
@@ -875,3 +879,3 @@ } | ||
} | ||
return Object.assign.apply(Object, __spreadArray([{}, defaults], rest)); | ||
return Object.assign.apply(Object, __spreadArray([{}, defaults], rest, false)); | ||
} | ||
@@ -914,3 +918,3 @@ /** | ||
var locals = injector(container); | ||
var allKeys = uniq(__spreadArray(__spreadArray([], Reflect.ownKeys(container.cradle), true), Reflect.ownKeys(locals))); | ||
var allKeys = uniq(__spreadArray(__spreadArray([], Reflect.ownKeys(container.cradle), true), Reflect.ownKeys(locals), true)); | ||
// TODO: Lots of duplication here from the container proxy. | ||
@@ -1125,3 +1129,3 @@ // Need to refactor. | ||
set: function (_target, name) { | ||
throw new Error("Attempted setting property \"" + name + "\" on container cradle - this is not allowed."); | ||
throw new Error("Attempted setting property \"".concat(name, "\" on container cradle - this is not allowed.")); | ||
}, | ||
@@ -1187,3 +1191,3 @@ /** | ||
function inspect() { | ||
return "[AwilixContainer (" + (parentContainer ? 'scoped, ' : '') + "registrations: " + Object.keys(container.registrations).length + ")]"; | ||
return "[AwilixContainer (".concat(parentContainer ? 'scoped, ' : '', "registrations: ").concat(Object.keys(container.registrations).length, ")]"); | ||
} | ||
@@ -1248,3 +1252,3 @@ /** | ||
var obj = nameValueToObject(arg1, arg2); | ||
var keys = __spreadArray(__spreadArray([], Object.keys(obj), true), Object.getOwnPropertySymbols(obj)); | ||
var keys = __spreadArray(__spreadArray([], Object.keys(obj), true), Object.getOwnPropertySymbols(obj), true); | ||
for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { | ||
@@ -1366,3 +1370,3 @@ var key = keys_1[_i]; | ||
default: | ||
throw new AwilixResolutionError(name, resolutionStack, "Unknown lifetime \"" + resolver.lifetime + "\""); | ||
throw new AwilixResolutionError(name, resolutionStack, "Unknown lifetime \"".concat(resolver.lifetime, "\"")); | ||
} | ||
@@ -1369,0 +1373,0 @@ // Pop it from the stack again, ready for the next resolution |
@@ -1,2 +0,2 @@ | ||
import * as glob from 'glob'; | ||
import * as glob from 'fast-glob'; | ||
import { BuildResolverOptions } from './resolvers'; | ||
@@ -3,0 +3,0 @@ import { LifetimeType } from './awilix'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.listModules = void 0; | ||
const glob = require("glob"); | ||
const glob = require("fast-glob"); | ||
const path = require("path"); | ||
@@ -6,0 +6,0 @@ const utils_1 = require("./utils"); |
{ | ||
"name": "awilix", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Extremely powerful dependency injection container.", | ||
@@ -53,19 +53,18 @@ "main": "lib/awilix.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.16.0", | ||
"@babel/plugin-transform-runtime": "^7.16.0", | ||
"@babel/preset-env": "^7.16.0", | ||
"@babel/runtime": "^7.16.0", | ||
"@types/glob": "^7.2.0", | ||
"@types/jest": "^27.0.2", | ||
"@types/node": "^16.11.6", | ||
"@types/prettier": "^2.4.1", | ||
"babel-jest": "^27.3.1", | ||
"@babel/core": "^7.16.12", | ||
"@babel/plugin-transform-runtime": "^7.16.10", | ||
"@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", | ||
"coveralls": "^3.1.1", | ||
"husky": "^7.0.4", | ||
"istanbul": "^0.4.5", | ||
"jest": "^27.3.1", | ||
"lint-staged": "^11.2.6", | ||
"prettier": "^2.4.1", | ||
"jest": "^27.4.7", | ||
"lint-staged": "^12.3.2", | ||
"prettier": "^2.5.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.58.3", | ||
"rollup": "^2.66.1", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
@@ -75,5 +74,5 @@ "rollup-plugin-copy": "^3.4.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"rollup-plugin-typescript2": "^0.31.1", | ||
"smid": "^0.1.1", | ||
"ts-jest": "^27.0.7", | ||
"ts-jest": "^27.1.3", | ||
"tslib": "^2.3.1", | ||
@@ -83,7 +82,7 @@ "tslint": "^6.1.3", | ||
"tslint-config-standard": "^9.0.0", | ||
"typescript": "^4.4.4" | ||
"typescript": "^4.5.5" | ||
}, | ||
"dependencies": { | ||
"camel-case": "^4.1.2", | ||
"glob": "^7.2.0" | ||
"fast-glob": "^3.2.11" | ||
}, | ||
@@ -90,0 +89,0 @@ "lint-staged": { |
@@ -50,3 +50,3 @@ # Awilix | ||
- [`container.register()`](#containerregister) | ||
- [`container.has()`](#containerhas) | ||
- [`container.hasRegistration()`](#containerhasregistration) | ||
- [`container.loadModules()`](#containerloadmodules) | ||
@@ -668,3 +668,3 @@ - [`container.createScope()`](#containercreatescope) | ||
Additionally, if we add a `name` field and use `loadModules`, the `name` is used | ||
for registration. | ||
for registration (ignoring `formatName` if provided). | ||
@@ -1047,5 +1047,5 @@ ```diff | ||
### `container.has()` | ||
### `container.hasRegistration()` | ||
- `container.has(name: string | symbol): boolean` | ||
- `container.hasRegistration(name: string | symbol): boolean` | ||
@@ -1052,0 +1052,0 @@ Determines if the container has a registration with the given name. Also checks ancestor containers. |
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
302341
28
6642
+ Addedfast-glob@^3.2.11
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removedglob@^7.2.0
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedwrappy@1.0.2(transitive)