Comparing version 3.0.4 to 3.0.5
@@ -0,1 +1,7 @@ | ||
# v3.0.5 | ||
* Updated dependencies | ||
* Fix TS 2.7 compilation issue | ||
* Fix the `GlobWithOptions` type to include `LifetimeType` | ||
# v3.0.4 | ||
@@ -2,0 +8,0 @@ |
@@ -691,4 +691,4 @@ import { sync } from 'glob'; | ||
opts = makeOptions(defaults, opts, fn[RESOLVER]); | ||
const resolve = generateResolve(fn); | ||
let result = Object.assign({ resolve }, opts); | ||
const resolve$$1 = generateResolve(fn); | ||
let result = Object.assign({ resolve: resolve$$1 }, opts); | ||
return createDisposableResolver(createBuildResolver(result)); | ||
@@ -723,4 +723,4 @@ } | ||
}; | ||
const resolve = generateResolve(newClass, Type.prototype.constructor); | ||
return createDisposableResolver(createBuildResolver(Object.assign({}, opts, { resolve }))); | ||
const resolve$$1 = generateResolve(newClass, Type.prototype.constructor); | ||
return createDisposableResolver(createBuildResolver(Object.assign({}, opts, { resolve: resolve$$1 }))); | ||
} | ||
@@ -912,3 +912,3 @@ /** | ||
// Use a regular function instead of an arrow function to facilitate binding to the resolver. | ||
return function resolve(container) { | ||
return function resolve$$1(container) { | ||
// Because the container holds a global reolutionMode we need to determine it in the proper order or precedence: | ||
@@ -929,6 +929,6 @@ // resolver -> container -> default value | ||
if (dependencies.length > 0) { | ||
const resolve = this.injector | ||
const resolve$$1 = this.injector | ||
? wrapWithLocals(container, this.injector(container)) | ||
: container.resolve; | ||
const children = dependencies.map(p => resolve(p.name, { allowUnregistered: p.optional })); | ||
const children = dependencies.map(p => resolve$$1(p.name, { allowUnregistered: p.optional })); | ||
return fn(...children); | ||
@@ -1097,3 +1097,3 @@ } | ||
*/ | ||
get: (target, name) => resolve(name), | ||
get: (target, name) => resolve$$1(name), | ||
/** | ||
@@ -1132,3 +1132,3 @@ * Setting things on the cradle throws an error. | ||
cradle: cradle, | ||
inspect, | ||
inspect: inspect$$1, | ||
cache: new Map(), | ||
@@ -1139,5 +1139,6 @@ loadModules: loadModules$$1, | ||
build, | ||
resolve, | ||
resolve: resolve$$1, | ||
dispose, | ||
[inspect.custom]: inspect, | ||
[inspect.custom]: inspect$$1, | ||
// tslint:disable-next-line | ||
[ROLL_UP_REGISTRATIONS]: rollUpRegistrations, | ||
@@ -1160,3 +1161,3 @@ get registrations() { | ||
*/ | ||
function inspect(depth, opts) { | ||
function inspect$$1(depth, opts) { | ||
return `[AwilixContainer (${parentContainer ? 'scoped, ' : ''}registrations: ${Object.keys(container.registrations).length})]`; | ||
@@ -1230,3 +1231,3 @@ } | ||
*/ | ||
function resolve(name, resolveOpts) { | ||
function resolve$$1(name, resolveOpts) { | ||
resolveOpts = resolveOpts || {}; | ||
@@ -1233,0 +1234,0 @@ if (!resolutionStack.length) { |
@@ -106,2 +106,3 @@ "use strict"; | ||
[util.inspect.custom]: inspect, | ||
// tslint:disable-next-line | ||
[ROLL_UP_REGISTRATIONS]: rollUpRegistrations, | ||
@@ -108,0 +109,0 @@ get registrations() { |
import * as glob from 'glob'; | ||
import { ResolverOptions } from './resolvers'; | ||
import { LifetimeType } from './awilix'; | ||
/** | ||
@@ -24,3 +25,3 @@ * The options when invoking listModules(). | ||
*/ | ||
export declare type GlobWithOptions = [string] | [string, ResolverOptions<any>]; | ||
export declare type GlobWithOptions = [string] | [string, ResolverOptions<any> | LifetimeType]; | ||
/** | ||
@@ -27,0 +28,0 @@ * Returns a list of {name, path} pairs, |
@@ -8,3 +8,3 @@ import { LifetimeType } from './lifetime'; | ||
*/ | ||
export declare const RESOLVER: symbol; | ||
export declare const RESOLVER: unique symbol; | ||
/** | ||
@@ -11,0 +11,0 @@ * Gets passed the container and is expected to return an object |
{ | ||
"name": "awilix", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "Extremely powerful dependency injection container.", | ||
@@ -17,3 +17,3 @@ "main": "lib/awilix.js", | ||
"build": "rimraf lib && tsc -p tsconfig.build.json && rollup -c", | ||
"check": "tsc -p tsconfig.json --noEmit", | ||
"check": "tsc -p tsconfig.json --noEmit --pretty", | ||
"test": "npm run check && jest", | ||
@@ -50,4 +50,4 @@ "lint": "npm run check && tslint --project tsconfig.json --fix \"{src,examples}/**/*.ts\" && prettier --write \"{src,examples}/**/*.{ts,js}\"", | ||
"@types/glob": "^5.0.35", | ||
"@types/jest": "^22.1.0", | ||
"@types/node": "^9.3.0", | ||
"@types/jest": "^22.1.1", | ||
"@types/node": "^9.4.0", | ||
"@types/prettier": "^1.10.0", | ||
@@ -61,6 +61,6 @@ "babel-jest": "^22.1.0", | ||
"jest": "^22.1.4", | ||
"lint-staged": "^6.0.1", | ||
"lint-staged": "^6.1.0", | ||
"prettier": "^1.10.2", | ||
"rollup": "^0.55.0", | ||
"rollup-plugin-commonjs": "^8.2.6", | ||
"rollup": "^0.55.2", | ||
"rollup-plugin-commonjs": "^8.3.0", | ||
"rollup-plugin-node-resolve": "^3.0.2", | ||
@@ -70,7 +70,7 @@ "rollup-plugin-replace": "^2.0.0", | ||
"smid": "^0.1.1", | ||
"ts-jest": "^22.0.1", | ||
"ts-jest": "^22.0.2", | ||
"tslint": "^5.9.1", | ||
"tslint-config-prettier": "^1.6.0", | ||
"tslint-config-standard": "^7.0.0", | ||
"typescript": "^2.6.2" | ||
"typescript": "^2.7.1" | ||
}, | ||
@@ -77,0 +77,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
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
278219
6102