Skip to content

Commit 1bf2a57

Browse files
chore(all): prepare release 1.0.0-beta.1
1 parent d302651 commit 1bf2a57

12 files changed

+263
-37
lines changed

bower.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-metadata",
3-
"version": "0.10.1",
3+
"version": "1.0.0-beta.1",
44
"description": "Utilities for reading and writing the metadata of JavaScript functions.",
55
"keywords": [
66
"aurelia",
@@ -17,7 +17,7 @@
1717
"url": "https://github.com/aurelia/metadata"
1818
},
1919
"dependencies": {
20-
"aurelia-pal": "^0.3.0",
20+
"aurelia-pal": "^1.0.0-beta.1",
2121
"core-js": "zloirock/core-js"
2222
}
2323
}

build/tasks/doc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var typedocExtractor = require("gulp-typedoc-extractor");
55
var runSequence = require('run-sequence');
66

77
gulp.task('doc-generate', function(){
8-
return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/github/aurelia/*/*.d.ts'])
8+
return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/npm/*/*.d.ts'])
99
.pipe(typedoc({
1010
            target"es6",
1111
            includeDeclarationstrue,
@@ -30,4 +30,4 @@ gulp.task('doc', function(callback){
3030
'doc-extract',
3131
callback
3232
);
33-
});
33+
});

build/tasks/test.js

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
var gulp = require('gulp');
2-
var karma = require('karma').server;
2+
var Karma = require('karma').Server;
33

44
/**
55
* Run test once and exit
66
*/
77
gulp.task('test', function (done) {
8-
karma.start({
9-
configFile: __dirname + '/../../karma.conf.js',
10-
singleRun: true
11-
}, function(e) {
12-
done();
13-
});
8+
new Karma({
9+
configFile: __dirname + '/../../karma.conf.js',
10+
singleRun: true
11+
}, done).start();
1412
});
1513

1614
/**
1715
* Watch for file changes and re-run tests on each change
1816
*/
1917
gulp.task('tdd', function (done) {
20-
karma.start({
21-
configFile: __dirname + '/../../karma.conf.js'
22-
}, function(e) {
23-
done();
24-
});
18+
new Karma({
19+
configFile: __dirname + '/../../karma.conf.js'
20+
}, done).start();
2521
});
2622

2723
/**
2824
* Run test once with code coverage and exit
2925
*/
3026
gulp.task('cover', function (done) {
31-
karma.start({
27+
new Karma({
3228
configFile: __dirname + '/../../karma.conf.js',
3329
singleRun: true,
3430
reporters: ['coverage'],
@@ -40,7 +36,5 @@ gulp.task('cover', function (done) {
4036
type: 'html',
4137
dir: 'build/reports/coverage'
4238
}
43-
}, function (e) {
44-
done();
45-
});
39+
}, done).start();
4640
});

config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ System.config({
1313
},
1414

1515
map: {
16-
"aurelia-pal": "github:aurelia/pal@0.3.0",
16+
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1",
1717
"babel": "npm:[email protected]",
1818
"babel-runtime": "npm:[email protected]",
1919
"core-js": "npm:[email protected]",

dist/amd/aurelia-metadata.d.ts

+47-2
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,52 @@ declare module 'aurelia-metadata' {
2121
* The metadata key representing property information.
2222
*/
2323
properties: string;
24+
25+
/**
26+
* Gets metadata specified by a key on a target, searching up the inheritance hierarchy.
27+
* @param metadataKey The key for the metadata to lookup.
28+
* @param target The target to lookup the metadata on.
29+
* @param targetKey The member on the target to lookup the metadata on.
30+
*/
2431
get(metadataKey: string, target: Function, targetKey: string): Object;
32+
33+
/**
34+
* Gets metadata specified by a key on a target, only searching the own instance.
35+
* @param metadataKey The key for the metadata to lookup.
36+
* @param target The target to lookup the metadata on.
37+
* @param targetKey The member on the target to lookup the metadata on.
38+
*/
2539
getOwn(metadataKey: string, target: Function, targetKey: string): Object;
40+
41+
/**
42+
* Defines metadata specified by a key on a target.
43+
* @param metadataKey The key for the metadata to define.
44+
* @param target The target to set the metadata on.
45+
* @param targetKey The member on the target to set the metadata on.
46+
*/
2647
define(metadataKey: string, metadataValue: Object, target: Function, targetKey: string): void;
48+
49+
/**
50+
* Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found.
51+
* @param metadataKey The key for the metadata to lookup or create.
52+
* @param Type The type of metadata to create if existing metadata is not found.
53+
* @param target The target to lookup or create the metadata on.
54+
* @param targetKey The member on the target to lookup or create the metadata on.
55+
*/
2756
getOrCreateOwn(metadataKey: string, Type: Function, target: Function, targetKey: string): Object;
2857
}
2958

3059
/**
3160
* An object capable of applying it's captured decorators to a target.
3261
*/
3362
export interface DecoratorApplicator {
63+
64+
/**
65+
* Applies the decorators to the target.
66+
* @param target The target.
67+
* @param key If applying to a method, the member name.
68+
* @param key If applying to a method, you may supply an initial descriptor to pass to the decorators.
69+
*/
3470
on(target: any, key?: string, descriptor?: Object): any;
3571
}
3672

@@ -54,8 +90,17 @@ declare module 'aurelia-metadata' {
5490
* Options used during protocol creation.
5591
*/
5692
export interface ProtocolOptions {
57-
validate(target: any): string | boolean;
58-
compose(target: any): void;
93+
94+
/**
95+
* A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.
96+
* If the validation fails, a message should be returned which directs the developer in how to address the issue.
97+
*/
98+
validate?: (target: any) => string | boolean;
99+
100+
/**
101+
* A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied.
102+
*/
103+
compose?: (target: any) => void;
59104
}
60105

61106
/**

dist/aurelia-metadata.d.ts

+47-2
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,52 @@ declare module 'aurelia-metadata' {
2121
* The metadata key representing property information.
2222
*/
2323
properties: string;
24+
25+
/**
26+
* Gets metadata specified by a key on a target, searching up the inheritance hierarchy.
27+
* @param metadataKey The key for the metadata to lookup.
28+
* @param target The target to lookup the metadata on.
29+
* @param targetKey The member on the target to lookup the metadata on.
30+
*/
2431
get(metadataKey: string, target: Function, targetKey: string): Object;
32+
33+
/**
34+
* Gets metadata specified by a key on a target, only searching the own instance.
35+
* @param metadataKey The key for the metadata to lookup.
36+
* @param target The target to lookup the metadata on.
37+
* @param targetKey The member on the target to lookup the metadata on.
38+
*/
2539
getOwn(metadataKey: string, target: Function, targetKey: string): Object;
40+
41+
/**
42+
* Defines metadata specified by a key on a target.
43+
* @param metadataKey The key for the metadata to define.
44+
* @param target The target to set the metadata on.
45+
* @param targetKey The member on the target to set the metadata on.
46+
*/
2647
define(metadataKey: string, metadataValue: Object, target: Function, targetKey: string): void;
48+
49+
/**
50+
* Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found.
51+
* @param metadataKey The key for the metadata to lookup or create.
52+
* @param Type The type of metadata to create if existing metadata is not found.
53+
* @param target The target to lookup or create the metadata on.
54+
* @param targetKey The member on the target to lookup or create the metadata on.
55+
*/
2756
getOrCreateOwn(metadataKey: string, Type: Function, target: Function, targetKey: string): Object;
2857
}
2958

3059
/**
3160
* An object capable of applying it's captured decorators to a target.
3261
*/
3362
export interface DecoratorApplicator {
63+
64+
/**
65+
* Applies the decorators to the target.
66+
* @param target The target.
67+
* @param key If applying to a method, the member name.
68+
* @param key If applying to a method, you may supply an initial descriptor to pass to the decorators.
69+
*/
3470
on(target: any, key?: string, descriptor?: Object): any;
3571
}
3672

@@ -54,8 +90,17 @@ declare module 'aurelia-metadata' {
5490
* Options used during protocol creation.
5591
*/
5692
export interface ProtocolOptions {
57-
validate(target: any): string | boolean;
58-
compose(target: any): void;
93+
94+
/**
95+
* A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.
96+
* If the validation fails, a message should be returned which directs the developer in how to address the issue.
97+
*/
98+
validate?: (target: any) => string | boolean;
99+
100+
/**
101+
* A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied.
102+
*/
103+
compose?: (target: any) => void;
59104
}
60105

61106
/**

dist/commonjs/aurelia-metadata.d.ts

+47-2
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,52 @@ declare module 'aurelia-metadata' {
2121
* The metadata key representing property information.
2222
*/
2323
properties: string;
24+
25+
/**
26+
* Gets metadata specified by a key on a target, searching up the inheritance hierarchy.
27+
* @param metadataKey The key for the metadata to lookup.
28+
* @param target The target to lookup the metadata on.
29+
* @param targetKey The member on the target to lookup the metadata on.
30+
*/
2431
get(metadataKey: string, target: Function, targetKey: string): Object;
32+
33+
/**
34+
* Gets metadata specified by a key on a target, only searching the own instance.
35+
* @param metadataKey The key for the metadata to lookup.
36+
* @param target The target to lookup the metadata on.
37+
* @param targetKey The member on the target to lookup the metadata on.
38+
*/
2539
getOwn(metadataKey: string, target: Function, targetKey: string): Object;
40+
41+
/**
42+
* Defines metadata specified by a key on a target.
43+
* @param metadataKey The key for the metadata to define.
44+
* @param target The target to set the metadata on.
45+
* @param targetKey The member on the target to set the metadata on.
46+
*/
2647
define(metadataKey: string, metadataValue: Object, target: Function, targetKey: string): void;
48+
49+
/**
50+
* Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found.
51+
* @param metadataKey The key for the metadata to lookup or create.
52+
* @param Type The type of metadata to create if existing metadata is not found.
53+
* @param target The target to lookup or create the metadata on.
54+
* @param targetKey The member on the target to lookup or create the metadata on.
55+
*/
2756
getOrCreateOwn(metadataKey: string, Type: Function, target: Function, targetKey: string): Object;
2857
}
2958

3059
/**
3160
* An object capable of applying it's captured decorators to a target.
3261
*/
3362
export interface DecoratorApplicator {
63+
64+
/**
65+
* Applies the decorators to the target.
66+
* @param target The target.
67+
* @param key If applying to a method, the member name.
68+
* @param key If applying to a method, you may supply an initial descriptor to pass to the decorators.
69+
*/
3470
on(target: any, key?: string, descriptor?: Object): any;
3571
}
3672

@@ -54,8 +90,17 @@ declare module 'aurelia-metadata' {
5490
* Options used during protocol creation.
5591
*/
5692
export interface ProtocolOptions {
57-
validate(target: any): string | boolean;
58-
compose(target: any): void;
93+
94+
/**
95+
* A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.
96+
* If the validation fails, a message should be returned which directs the developer in how to address the issue.
97+
*/
98+
validate?: (target: any) => string | boolean;
99+
100+
/**
101+
* A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied.
102+
*/
103+
compose?: (target: any) => void;
59104
}
60105

61106
/**

dist/es6/aurelia-metadata.d.ts

+47-2
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,52 @@ declare module 'aurelia-metadata' {
2121
* The metadata key representing property information.
2222
*/
2323
properties: string;
24+
25+
/**
26+
* Gets metadata specified by a key on a target, searching up the inheritance hierarchy.
27+
* @param metadataKey The key for the metadata to lookup.
28+
* @param target The target to lookup the metadata on.
29+
* @param targetKey The member on the target to lookup the metadata on.
30+
*/
2431
get(metadataKey: string, target: Function, targetKey: string): Object;
32+
33+
/**
34+
* Gets metadata specified by a key on a target, only searching the own instance.
35+
* @param metadataKey The key for the metadata to lookup.
36+
* @param target The target to lookup the metadata on.
37+
* @param targetKey The member on the target to lookup the metadata on.
38+
*/
2539
getOwn(metadataKey: string, target: Function, targetKey: string): Object;
40+
41+
/**
42+
* Defines metadata specified by a key on a target.
43+
* @param metadataKey The key for the metadata to define.
44+
* @param target The target to set the metadata on.
45+
* @param targetKey The member on the target to set the metadata on.
46+
*/
2647
define(metadataKey: string, metadataValue: Object, target: Function, targetKey: string): void;
48+
49+
/**
50+
* Gets metadata specified by a key on a target, or creates an instance of the specified metadata if not found.
51+
* @param metadataKey The key for the metadata to lookup or create.
52+
* @param Type The type of metadata to create if existing metadata is not found.
53+
* @param target The target to lookup or create the metadata on.
54+
* @param targetKey The member on the target to lookup or create the metadata on.
55+
*/
2756
getOrCreateOwn(metadataKey: string, Type: Function, target: Function, targetKey: string): Object;
2857
}
2958

3059
/**
3160
* An object capable of applying it's captured decorators to a target.
3261
*/
3362
export interface DecoratorApplicator {
63+
64+
/**
65+
* Applies the decorators to the target.
66+
* @param target The target.
67+
* @param key If applying to a method, the member name.
68+
* @param key If applying to a method, you may supply an initial descriptor to pass to the decorators.
69+
*/
3470
on(target: any, key?: string, descriptor?: Object): any;
3571
}
3672

@@ -54,8 +90,17 @@ declare module 'aurelia-metadata' {
5490
* Options used during protocol creation.
5591
*/
5692
export interface ProtocolOptions {
57-
validate(target: any): string | boolean;
58-
compose(target: any): void;
93+
94+
/**
95+
* A function that will be run to validate the decorated class when the protocol is applied. It is also used to validate adhoc instances.
96+
* If the validation fails, a message should be returned which directs the developer in how to address the issue.
97+
*/
98+
validate?: (target: any) => string | boolean;
99+
100+
/**
101+
* A function which has the opportunity to compose additional behavior into the decorated class when the protocol is applied.
102+
*/
103+
compose?: (target: any) => void;
59104
}
60105

61106
/**

0 commit comments

Comments
 (0)