Skip to content

Commit

Permalink
chore(all): prepare release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Oct 14, 2016
1 parent b8b0175 commit 6bbde09
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 30 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-dependency-injection",
"version": "1.1.0",
"version": "1.2.0",
"description": "A lightweight, extensible dependency injection container for JavaScript.",
"keywords": [
"aurelia",
Expand Down
10 changes: 5 additions & 5 deletions dist/amd/aurelia-dependency-injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define(['exports', 'aurelia-metadata', 'aurelia-pal'], function (exports, _aurel
exports.factory = factory;
exports.newInstance = newInstance;
exports.invoker = invoker;
exports.factory = factory;
exports.invokeAsFactory = invokeAsFactory;
exports.registration = registration;
exports.transient = transient;
exports.singleton = singleton;
Expand Down Expand Up @@ -289,7 +289,7 @@ define(['exports', 'aurelia-metadata', 'aurelia-pal'], function (exports, _aurel
};
}

function factory(potentialTarget) {
function invokeAsFactory(potentialTarget) {
var deco = function deco(target) {
_aureliaMetadata.metadata.define(_aureliaMetadata.metadata.invoker, FactoryInvoker.instance, target);
};
Expand Down Expand Up @@ -703,10 +703,10 @@ define(['exports', 'aurelia-metadata', 'aurelia-pal'], function (exports, _aurel
var prevIndex = previousInject.indexOf(autoInject[i]);
if (prevIndex > -1) {
previousInject.splice(prevIndex, 1);
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions dist/aurelia-dependency-injection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ export declare function optional(checkParentOrTarget?: boolean): (target: any, k
*/
export declare function parent(target: any, key: any, index: any): void;
/**
* Decorator: Specifies the dependency to create a factory method, that can accept optional arguments
*/
export declare function factory(keyValue: any, asValue?: any): (target: any, key: any, index: any) => void;
/**
* Decorator: Specifies the dependency as a new instance
*/
export declare function newInstance(asKeyOrTarget?: any, ...dynamicDependencies: any[]): (target: any, key: any, index: any) => void;
Expand All @@ -206,6 +210,10 @@ export declare function newInstance(asKeyOrTarget?: any, ...dynamicDependencies:
*/
export declare function invoker(value: Invoker): any;
/**
* Decorator: Specifies that the decorated item should be called as a factory function, rather than a constructor.
*/
export declare function invokeAsFactory(potentialTarget?: any): any;
/**
* A strategy for invoking a function, resulting in an object instance.
*/
export interface Invoker {
Expand Down
8 changes: 4 additions & 4 deletions dist/aurelia-dependency-injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export function invoker(value: Invoker): any {
/**
* Decorator: Specifies that the decorated item should be called as a factory function, rather than a constructor.
*/
export function factory(potentialTarget?: any): any {
export function invokeAsFactory(potentialTarget?: any): any {
let deco = function(target) {
metadata.define(metadata.invoker, FactoryInvoker.instance, target);
};
Expand Down Expand Up @@ -1071,10 +1071,10 @@ export function autoinject(potentialTarget?: any): any {
const prevIndex = previousInject.indexOf(autoInject[i]);
if (prevIndex > -1) {
previousInject.splice(prevIndex, 1);
previousInject.splice((prevIndex > -1 && prevIndex < i) ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) { //else add
previousInject[i] = autoInject[i];
}
previousInject.splice((prevIndex > -1 && prevIndex < i) ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {//else add
previousInject[i] = autoInject[i];
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions dist/commonjs/aurelia-dependency-injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports.parent = parent;
exports.factory = factory;
exports.newInstance = newInstance;
exports.invoker = invoker;
exports.factory = factory;
exports.invokeAsFactory = invokeAsFactory;
exports.registration = registration;
exports.transient = transient;
exports.singleton = singleton;
Expand Down Expand Up @@ -293,7 +293,7 @@ function invoker(value) {
};
}

function factory(potentialTarget) {
function invokeAsFactory(potentialTarget) {
var deco = function deco(target) {
_aureliaMetadata.metadata.define(_aureliaMetadata.metadata.invoker, FactoryInvoker.instance, target);
};
Expand Down Expand Up @@ -707,10 +707,10 @@ function autoinject(potentialTarget) {
var prevIndex = previousInject.indexOf(autoInject[i]);
if (prevIndex > -1) {
previousInject.splice(prevIndex, 1);
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions dist/es2015/aurelia-dependency-injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export function invoker(value) {
};
}

export function factory(potentialTarget) {
export function invokeAsFactory(potentialTarget) {
let deco = function (target) {
metadata.define(metadata.invoker, FactoryInvoker.instance, target);
};
Expand Down Expand Up @@ -600,10 +600,10 @@ export function autoinject(potentialTarget) {
const prevIndex = previousInject.indexOf(autoInject[i]);
if (prevIndex > -1) {
previousInject.splice(prevIndex, 1);
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions dist/native-modules/aurelia-dependency-injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function invoker(value) {
};
}

export function factory(potentialTarget) {
export function invokeAsFactory(potentialTarget) {
var deco = function deco(target) {
metadata.define(metadata.invoker, FactoryInvoker.instance, target);
};
Expand Down Expand Up @@ -691,10 +691,10 @@ export function autoinject(potentialTarget) {
var prevIndex = previousInject.indexOf(autoInject[i]);
if (prevIndex > -1) {
previousInject.splice(prevIndex, 1);
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions dist/system/aurelia-dependency-injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ System.register(['aurelia-metadata', 'aurelia-pal'], function (_export, _context

_export('invoker', invoker);

function factory(potentialTarget) {
function invokeAsFactory(potentialTarget) {
var deco = function deco(target) {
metadata.define(metadata.invoker, FactoryInvoker.instance, target);
};

return potentialTarget ? deco(potentialTarget) : deco;
}

_export('factory', factory);
_export('invokeAsFactory', invokeAsFactory);

function registration(value) {
return function (target) {
Expand Down Expand Up @@ -182,10 +182,10 @@ System.register(['aurelia-metadata', 'aurelia-pal'], function (_export, _context
var prevIndex = previousInject.indexOf(autoInject[i]);
if (prevIndex > -1) {
previousInject.splice(prevIndex, 1);
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
previousInject.splice(prevIndex > -1 && prevIndex < i ? i - 1 : i, 0, autoInject[i]);
} else if (!previousInject[i]) {
previousInject[i] = autoInject[i];
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.2.0

## Bug Fixes

* **autoinject**: merge issue caused incorrect branching logic
* **invokers:** remove duplicate export name

<a name="1.1.0"></a>
# [1.1.0](https://github.com/aurelia/dependency-injection/compare/1.0.0...v1.1.0) (2016-10-05)

Expand Down
2 changes: 1 addition & 1 deletion doc/api.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-dependency-injection",
"version": "1.1.0",
"version": "1.2.0",
"description": "A lightweight, extensible dependency injection container for JavaScript.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 6bbde09

Please sign in to comment.