Skip to content

Commit 6577553

Browse files
chore(all): prepare release 1.3.2
1 parent 01b2988 commit 6577553

9 files changed

+60
-8
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-dependency-injection",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "A lightweight, extensible dependency injection container for JavaScript.",
55
"keywords": [
66
"aurelia",

dist/amd/aurelia-dependency-injection.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,16 @@ define(['exports', 'aurelia-metadata', 'aurelia-pal'], function (exports, _aurel
418418
function invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {
419419
var i = staticDependencies.length;
420420
var args = new Array(i);
421+
var lookup = void 0;
421422

422423
while (i--) {
423-
args[i] = container.get(staticDependencies[i]);
424+
lookup = staticDependencies[i];
425+
426+
if (lookup === null || lookup === undefined) {
427+
throw new Error('Constructor Parameter with index ' + i + ' cannot be null or undefined. Are you trying to inject/register something that doesn\'t exist with DI?');
428+
} else {
429+
args[i] = container.get(lookup);
430+
}
424431
}
425432

426433
if (dynamicDependencies !== undefined) {

dist/aurelia-dependency-injection.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,16 @@ export interface ContainerConfiguration {
669669
function invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {
670670
let i = staticDependencies.length;
671671
let args = new Array(i);
672+
let lookup;
672673

673674
while (i--) {
674-
args[i] = container.get(staticDependencies[i]);
675+
lookup = staticDependencies[i];
676+
677+
if (lookup === null || lookup === undefined) {
678+
throw new Error('Constructor Parameter with index ' + i + ' cannot be null or undefined. Are you trying to inject/register something that doesn\'t exist with DI?');
679+
} else {
680+
args[i] = container.get(lookup);
681+
}
675682
}
676683

677684
if (dynamicDependencies !== undefined) {

dist/commonjs/aurelia-dependency-injection.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,16 @@ var InvocationHandler = exports.InvocationHandler = function () {
422422
function invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {
423423
var i = staticDependencies.length;
424424
var args = new Array(i);
425+
var lookup = void 0;
425426

426427
while (i--) {
427-
args[i] = container.get(staticDependencies[i]);
428+
lookup = staticDependencies[i];
429+
430+
if (lookup === null || lookup === undefined) {
431+
throw new Error('Constructor Parameter with index ' + i + ' cannot be null or undefined. Are you trying to inject/register something that doesn\'t exist with DI?');
432+
} else {
433+
args[i] = container.get(lookup);
434+
}
428435
}
429436

430437
if (dynamicDependencies !== undefined) {

dist/es2015/aurelia-dependency-injection.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,16 @@ export let InvocationHandler = class InvocationHandler {
321321
function invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {
322322
let i = staticDependencies.length;
323323
let args = new Array(i);
324+
let lookup;
324325

325326
while (i--) {
326-
args[i] = container.get(staticDependencies[i]);
327+
lookup = staticDependencies[i];
328+
329+
if (lookup === null || lookup === undefined) {
330+
throw new Error('Constructor Parameter with index ' + i + ' cannot be null or undefined. Are you trying to inject/register something that doesn\'t exist with DI?');
331+
} else {
332+
args[i] = container.get(lookup);
333+
}
327334
}
328335

329336
if (dynamicDependencies !== undefined) {

dist/native-modules/aurelia-dependency-injection.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,16 @@ export var InvocationHandler = function () {
406406
function invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {
407407
var i = staticDependencies.length;
408408
var args = new Array(i);
409+
var lookup = void 0;
409410

410411
while (i--) {
411-
args[i] = container.get(staticDependencies[i]);
412+
lookup = staticDependencies[i];
413+
414+
if (lookup === null || lookup === undefined) {
415+
throw new Error('Constructor Parameter with index ' + i + ' cannot be null or undefined. Are you trying to inject/register something that doesn\'t exist with DI?');
416+
} else {
417+
args[i] = container.get(lookup);
418+
}
412419
}
413420

414421
if (dynamicDependencies !== undefined) {

dist/system/aurelia-dependency-injection.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,16 @@ System.register(['aurelia-metadata', 'aurelia-pal'], function (_export, _context
146146
function invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {
147147
var i = staticDependencies.length;
148148
var args = new Array(i);
149+
var lookup = void 0;
149150

150151
while (i--) {
151-
args[i] = container.get(staticDependencies[i]);
152+
lookup = staticDependencies[i];
153+
154+
if (lookup === null || lookup === undefined) {
155+
throw new Error('Constructor Parameter with index ' + i + ' cannot be null or undefined. Are you trying to inject/register something that doesn\'t exist with DI?');
156+
} else {
157+
args[i] = container.get(lookup);
158+
}
152159
}
153160

154161
if (dynamicDependencies !== undefined) {

doc/CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<a name="1.3.2"></a>
2+
## [1.3.2](https://github.com/aurelia/dependency-injection/compare/1.3.1...v1.3.2) (2017-08-22)
3+
4+
5+
### Performance Improvements
6+
7+
* **container:** improve dynamic construction of static depencies ([01b2988](https://github.com/aurelia/dependency-injection/commit/01b2988))
8+
9+
10+
111
<a name="1.3.1"></a>
212
## [1.3.1](https://github.com/aurelia/dependency-injection/compare/1.3.0...v1.3.1) (2017-04-05)
313

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-dependency-injection",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "A lightweight, extensible dependency injection container for JavaScript.",
55
"keywords": [
66
"aurelia",

0 commit comments

Comments
 (0)