From f8a87298ec3889541212ba7c56d7697caa1ac5f7 Mon Sep 17 00:00:00 2001 From: pwkad Date: Mon, 12 Oct 2015 23:00:21 -0500 Subject: [PATCH] fix(update): update to latest release names Fixes #156 by updating names to latest changes --- config.js | 90 +++++++---- dist/amd/aurelia-validation.d.ts | 2 +- dist/amd/decorators.js | 2 +- dist/amd/validation-group.js | 2 +- dist/amd/validation-rules.js | 3 + dist/commonjs/aurelia-validation.d.ts | 2 +- dist/commonjs/decorators.js | 2 +- dist/commonjs/validation-group.js | 2 +- dist/commonjs/validation-rules.js | 3 + dist/es6/aurelia-validation.d.ts | 2 +- dist/es6/decorators.js | 4 +- dist/es6/validation-group.js | 4 +- dist/es6/validation-rules.js | 3 + dist/system/aurelia-validation.d.ts | 2 +- dist/system/decorators.js | 6 +- dist/system/validation-group.js | 6 +- dist/system/validation-rules.js | 3 + package.json | 11 +- sample/config.js | 216 +++++++++++++++----------- sample/package.json | 8 +- src/decorators.js | 4 +- src/validation-group.js | 4 +- test/path-observer.spec.js | 1 - test/setup.js | 3 + 24 files changed, 230 insertions(+), 155 deletions(-) diff --git a/config.js b/config.js index de6c6e0c..deecafe1 100644 --- a/config.js +++ b/config.js @@ -13,62 +13,88 @@ System.config({ }, map: { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-templating": "github:aurelia/templating@0.15.3", + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal-browser": "github:aurelia/pal-browser@0.2.0", + "aurelia-templating": "github:aurelia/templating@0.16.0", "babel": "npm:babel-core@5.8.22", "babel-runtime": "npm:babel-runtime@5.8.20", "core-js": "npm:core-js@1.1.0", "traceur": "github:jmcriffey/bower-traceur@0.0.91", "traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.91", - "github:aurelia/binding@0.9.1": { - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.7.0", + "github:aurelia/binding@0.10.0": { + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/dependency-injection@0.10.1": { - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", + "github:aurelia/dependency-injection@0.11.0": { + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/loader@0.9.0": { - "aurelia-html-template-element": "github:aurelia/html-template-element@0.3.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "core-js": "github:zloirock/core-js@0.8.4" + "github:aurelia/loader@0.10.0": { + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-path": "github:aurelia/path@0.10.0" }, - "github:aurelia/metadata@0.8.0": { + "github:aurelia/metadata@0.9.0": { + "aurelia-pal": "github:aurelia/pal@0.2.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/templating@0.15.3": { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-html-template-element": "github:aurelia/html-template-element@0.3.0", - "aurelia-loader": "github:aurelia/loader@0.9.0", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.7.0", + "github:aurelia/pal-browser@0.2.0": { + "aurelia-pal": "github:aurelia/pal@0.2.0" + }, + "github:aurelia/task-queue@0.8.0": { + "aurelia-pal": "github:aurelia/pal@0.2.0" + }, + "github:aurelia/templating@0.16.0": { + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-loader": "github:aurelia/loader@0.10.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-path": "github:aurelia/path@0.10.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", "core-js": "npm:core-js@0.9.18" }, - "github:jspm/nodelibs-process@0.1.1": { - "process": "npm:process@0.10.1" + "github:jspm/nodelibs-assert@0.1.0": { + "assert": "npm:assert@1.3.0" + }, + "github:jspm/nodelibs-process@0.1.2": { + "process": "npm:process@0.11.2" + }, + "github:jspm/nodelibs-util@0.1.0": { + "util": "npm:util@0.10.3" + }, + "npm:assert@1.3.0": { + "util": "npm:util@0.10.3" }, "npm:babel-runtime@5.8.20": { - "process": "github:jspm/nodelibs-process@0.1.1" + "process": "github:jspm/nodelibs-process@0.1.2" }, "npm:core-js@0.9.18": { "fs": "github:jspm/nodelibs-fs@0.1.2", - "process": "github:jspm/nodelibs-process@0.1.1", + "process": "github:jspm/nodelibs-process@0.1.2", "systemjs-json": "github:systemjs/plugin-json@0.1.0" }, "npm:core-js@1.1.0": { "fs": "github:jspm/nodelibs-fs@0.1.2", - "process": "github:jspm/nodelibs-process@0.1.1", + "process": "github:jspm/nodelibs-process@0.1.2", "systemjs-json": "github:systemjs/plugin-json@0.1.0" + }, + "npm:inherits@2.0.1": { + "util": "github:jspm/nodelibs-util@0.1.0" + }, + "npm:process@0.11.2": { + "assert": "github:jspm/nodelibs-assert@0.1.0" + }, + "npm:util@0.10.3": { + "inherits": "npm:inherits@2.0.1", + "process": "github:jspm/nodelibs-process@0.1.2" } } }); diff --git a/dist/amd/aurelia-validation.d.ts b/dist/amd/aurelia-validation.d.ts index 85f01ba9..cca211bc 100644 --- a/dist/amd/aurelia-validation.d.ts +++ b/dist/amd/aurelia-validation.d.ts @@ -1,5 +1,5 @@ declare module 'aurelia-validation' { - import { Metadata } from 'aurelia-metadata'; + import { metadata } from 'aurelia-metadata'; import { inject } from 'aurelia-dependency-injection'; import { customAttribute } from 'aurelia-templating'; import { ObserverLocator } from 'aurelia-binding'; diff --git a/dist/amd/decorators.js b/dist/amd/decorators.js index 782667f7..26aa078e 100644 --- a/dist/amd/decorators.js +++ b/dist/amd/decorators.js @@ -68,7 +68,7 @@ define(['exports', 'aurelia-metadata'], function (exports, _aureliaMetadata) { function ensure(setupStep) { return function (target, propertyName) { - var validationMetadata = _aureliaMetadata.Metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); + var validationMetadata = _aureliaMetadata.metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); var property = validationMetadata.getOrCreateProperty(propertyName); property.addSetupStep(setupStep); }; diff --git a/dist/amd/validation-group.js b/dist/amd/validation-group.js index 8b25a4b8..1106cfae 100644 --- a/dist/amd/validation-group.js +++ b/dist/amd/validation-group.js @@ -23,7 +23,7 @@ define(['exports', 'aurelia-metadata', './validation-group-builder', './validati this.onDestroy = config.onLocaleChanged(function () { _this.validate(false, true); }); - validationMetadata = _aureliaMetadata.Metadata.getOwn(_decorators.ValidationMetadata.metadataKey, this.subject); + validationMetadata = _aureliaMetadata.metadata.getOwn(_decorators.ValidationMetadata.metadataKey, this.subject); if (validationMetadata) { validationMetadata.setup(this); } diff --git a/dist/amd/validation-rules.js b/dist/amd/validation-rules.js index 86aeecb1..ce46401b 100644 --- a/dist/amd/validation-rules.js +++ b/dist/amd/validation-rules.js @@ -292,6 +292,7 @@ define(['exports', './utilities', './validation-locale'], function (exports, _ut _classCallCheck(this, MinimumLengthValidationRule); _ValidationRule3.call(this, minimumLength, function (newValue, minLength) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= minLength; }, null, 'MinimumLengthValidationRule'); } @@ -308,6 +309,7 @@ define(['exports', './utilities', './validation-locale'], function (exports, _ut _classCallCheck(this, MaximumLengthValidationRule); _ValidationRule4.call(this, maximumLength, function (newValue, maxLength) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length <= maxLength; }, null, 'MaximumLengthValidationRule'); } @@ -324,6 +326,7 @@ define(['exports', './utilities', './validation-locale'], function (exports, _ut _classCallCheck(this, BetweenLengthValidationRule); _ValidationRule5.call(this, { minimumLength: minimumLength, maximumLength: maximumLength }, function (newValue, threshold) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= threshold.minimumLength && newValue.length <= threshold.maximumLength; }, null, 'BetweenLengthValidationRule'); } diff --git a/dist/commonjs/aurelia-validation.d.ts b/dist/commonjs/aurelia-validation.d.ts index 85f01ba9..cca211bc 100644 --- a/dist/commonjs/aurelia-validation.d.ts +++ b/dist/commonjs/aurelia-validation.d.ts @@ -1,5 +1,5 @@ declare module 'aurelia-validation' { - import { Metadata } from 'aurelia-metadata'; + import { metadata } from 'aurelia-metadata'; import { inject } from 'aurelia-dependency-injection'; import { customAttribute } from 'aurelia-templating'; import { ObserverLocator } from 'aurelia-binding'; diff --git a/dist/commonjs/decorators.js b/dist/commonjs/decorators.js index a147632b..f30698dd 100644 --- a/dist/commonjs/decorators.js +++ b/dist/commonjs/decorators.js @@ -69,7 +69,7 @@ var ValidationPropertyMetadata = (function () { function ensure(setupStep) { return function (target, propertyName) { - var validationMetadata = _aureliaMetadata.Metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); + var validationMetadata = _aureliaMetadata.metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); var property = validationMetadata.getOrCreateProperty(propertyName); property.addSetupStep(setupStep); }; diff --git a/dist/commonjs/validation-group.js b/dist/commonjs/validation-group.js index 1ca3f608..60191ac1 100644 --- a/dist/commonjs/validation-group.js +++ b/dist/commonjs/validation-group.js @@ -30,7 +30,7 @@ var ValidationGroup = (function () { this.onDestroy = config.onLocaleChanged(function () { _this.validate(false, true); }); - validationMetadata = _aureliaMetadata.Metadata.getOwn(_decorators.ValidationMetadata.metadataKey, this.subject); + validationMetadata = _aureliaMetadata.metadata.getOwn(_decorators.ValidationMetadata.metadataKey, this.subject); if (validationMetadata) { validationMetadata.setup(this); } diff --git a/dist/commonjs/validation-rules.js b/dist/commonjs/validation-rules.js index 774a9a19..6fbc3129 100644 --- a/dist/commonjs/validation-rules.js +++ b/dist/commonjs/validation-rules.js @@ -295,6 +295,7 @@ var MinimumLengthValidationRule = (function (_ValidationRule3) { _classCallCheck(this, MinimumLengthValidationRule); _ValidationRule3.call(this, minimumLength, function (newValue, minLength) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= minLength; }, null, 'MinimumLengthValidationRule'); } @@ -311,6 +312,7 @@ var MaximumLengthValidationRule = (function (_ValidationRule4) { _classCallCheck(this, MaximumLengthValidationRule); _ValidationRule4.call(this, maximumLength, function (newValue, maxLength) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length <= maxLength; }, null, 'MaximumLengthValidationRule'); } @@ -327,6 +329,7 @@ var BetweenLengthValidationRule = (function (_ValidationRule5) { _classCallCheck(this, BetweenLengthValidationRule); _ValidationRule5.call(this, { minimumLength: minimumLength, maximumLength: maximumLength }, function (newValue, threshold) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= threshold.minimumLength && newValue.length <= threshold.maximumLength; }, null, 'BetweenLengthValidationRule'); } diff --git a/dist/es6/aurelia-validation.d.ts b/dist/es6/aurelia-validation.d.ts index 85f01ba9..cca211bc 100644 --- a/dist/es6/aurelia-validation.d.ts +++ b/dist/es6/aurelia-validation.d.ts @@ -1,5 +1,5 @@ declare module 'aurelia-validation' { - import { Metadata } from 'aurelia-metadata'; + import { metadata } from 'aurelia-metadata'; import { inject } from 'aurelia-dependency-injection'; import { customAttribute } from 'aurelia-templating'; import { ObserverLocator } from 'aurelia-binding'; diff --git a/dist/es6/decorators.js b/dist/es6/decorators.js index 1901d1fd..e20d95af 100644 --- a/dist/es6/decorators.js +++ b/dist/es6/decorators.js @@ -1,4 +1,4 @@ -import {Metadata} from 'aurelia-metadata'; +import {metadata} from 'aurelia-metadata'; export class ValidationMetadata { static metadataKey = 'aurelia:validation'; @@ -37,7 +37,7 @@ class ValidationPropertyMetadata { export function ensure(setupStep) { return function(target, propertyName) { - let validationMetadata = Metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); + let validationMetadata = metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); let property = validationMetadata.getOrCreateProperty(propertyName); property.addSetupStep(setupStep); }; diff --git a/dist/es6/validation-group.js b/dist/es6/validation-group.js index 616c8d45..8c5666ac 100644 --- a/dist/es6/validation-group.js +++ b/dist/es6/validation-group.js @@ -1,4 +1,4 @@ -import {Metadata} from 'aurelia-metadata'; +import {metadata} from 'aurelia-metadata'; import {ValidationGroupBuilder} from './validation-group-builder'; import {ValidationResult} from './validation-result'; import {ValidationMetadata} from './decorators'; @@ -28,7 +28,7 @@ export class ValidationGroup { this.onDestroy = config.onLocaleChanged(() => { this.validate(false, true); }); - validationMetadata = Metadata.getOwn(ValidationMetadata.metadataKey, this.subject); + validationMetadata = metadata.getOwn(ValidationMetadata.metadataKey, this.subject); if (validationMetadata) { validationMetadata.setup(this); } diff --git a/dist/es6/validation-rules.js b/dist/es6/validation-rules.js index 3f810316..d1e63d17 100644 --- a/dist/es6/validation-rules.js +++ b/dist/es6/validation-rules.js @@ -290,6 +290,7 @@ export class MinimumLengthValidationRule extends ValidationRule { super( minimumLength, (newValue, minLength) => { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= minLength; }, null, @@ -303,6 +304,7 @@ export class MaximumLengthValidationRule extends ValidationRule { super( maximumLength, (newValue, maxLength) => { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length <= maxLength; }, null, @@ -316,6 +318,7 @@ export class BetweenLengthValidationRule extends ValidationRule { super( {minimumLength: minimumLength, maximumLength: maximumLength}, (newValue, threshold) => { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= threshold.minimumLength && newValue.length <= threshold.maximumLength; diff --git a/dist/system/aurelia-validation.d.ts b/dist/system/aurelia-validation.d.ts index 85f01ba9..cca211bc 100644 --- a/dist/system/aurelia-validation.d.ts +++ b/dist/system/aurelia-validation.d.ts @@ -1,5 +1,5 @@ declare module 'aurelia-validation' { - import { Metadata } from 'aurelia-metadata'; + import { metadata } from 'aurelia-metadata'; import { inject } from 'aurelia-dependency-injection'; import { customAttribute } from 'aurelia-templating'; import { ObserverLocator } from 'aurelia-binding'; diff --git a/dist/system/decorators.js b/dist/system/decorators.js index b1745d8d..4e881323 100644 --- a/dist/system/decorators.js +++ b/dist/system/decorators.js @@ -1,7 +1,7 @@ System.register(['aurelia-metadata'], function (_export) { 'use strict'; - var Metadata, ValidationMetadata, ValidationPropertyMetadata; + var metadata, ValidationMetadata, ValidationPropertyMetadata; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); @@ -11,7 +11,7 @@ System.register(['aurelia-metadata'], function (_export) { function ensure(setupStep) { return function (target, propertyName) { - var validationMetadata = Metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); + var validationMetadata = metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); var property = validationMetadata.getOrCreateProperty(propertyName); property.addSetupStep(setupStep); }; @@ -19,7 +19,7 @@ System.register(['aurelia-metadata'], function (_export) { return { setters: [function (_aureliaMetadata) { - Metadata = _aureliaMetadata.Metadata; + metadata = _aureliaMetadata.metadata; }], execute: function () { ValidationMetadata = (function () { diff --git a/dist/system/validation-group.js b/dist/system/validation-group.js index 887bc1fa..e842ee5e 100644 --- a/dist/system/validation-group.js +++ b/dist/system/validation-group.js @@ -1,13 +1,13 @@ System.register(['aurelia-metadata', './validation-group-builder', './validation-result', './decorators'], function (_export) { 'use strict'; - var Metadata, ValidationGroupBuilder, ValidationResult, ValidationMetadata, ValidationGroup; + var metadata, ValidationGroupBuilder, ValidationResult, ValidationMetadata, ValidationGroup; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } return { setters: [function (_aureliaMetadata) { - Metadata = _aureliaMetadata.Metadata; + metadata = _aureliaMetadata.metadata; }, function (_validationGroupBuilder) { ValidationGroupBuilder = _validationGroupBuilder.ValidationGroupBuilder; }, function (_validationResult) { @@ -34,7 +34,7 @@ System.register(['aurelia-metadata', './validation-group-builder', './validation this.onDestroy = config.onLocaleChanged(function () { _this.validate(false, true); }); - validationMetadata = Metadata.getOwn(ValidationMetadata.metadataKey, this.subject); + validationMetadata = metadata.getOwn(ValidationMetadata.metadataKey, this.subject); if (validationMetadata) { validationMetadata.setup(this); } diff --git a/dist/system/validation-rules.js b/dist/system/validation-rules.js index 5014eede..5428ac76 100644 --- a/dist/system/validation-rules.js +++ b/dist/system/validation-rules.js @@ -299,6 +299,7 @@ System.register(['./utilities', './validation-locale'], function (_export) { _classCallCheck(this, MinimumLengthValidationRule); _ValidationRule3.call(this, minimumLength, function (newValue, minLength) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= minLength; }, null, 'MinimumLengthValidationRule'); } @@ -315,6 +316,7 @@ System.register(['./utilities', './validation-locale'], function (_export) { _classCallCheck(this, MaximumLengthValidationRule); _ValidationRule4.call(this, maximumLength, function (newValue, maxLength) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length <= maxLength; }, null, 'MaximumLengthValidationRule'); } @@ -331,6 +333,7 @@ System.register(['./utilities', './validation-locale'], function (_export) { _classCallCheck(this, BetweenLengthValidationRule); _ValidationRule5.call(this, { minimumLength: minimumLength, maximumLength: maximumLength }, function (newValue, threshold) { + newValue = typeof newValue === 'number' ? newValue.toString() : newValue; return newValue.length !== undefined && newValue.length >= threshold.minimumLength && newValue.length <= threshold.maximumLength; }, null, 'BetweenLengthValidationRule'); } diff --git a/package.json b/package.json index 05b65f10..ccc22291 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,14 @@ "lib": "dist/amd" }, "dependencies": { - "aurelia-binding": "github:aurelia/binding@^0.9.1", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.10.1", - "aurelia-logging": "github:aurelia/logging@^0.7.0", - "aurelia-metadata": "github:aurelia/metadata@^0.8.0", - "aurelia-templating": "github:aurelia/templating@^0.15.3" + "aurelia-binding": "github:aurelia/binding@^0.10.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@^0.11.0", + "aurelia-logging": "github:aurelia/logging@^0.8.0", + "aurelia-metadata": "github:aurelia/metadata@^0.9.0", + "aurelia-templating": "github:aurelia/templating@^0.16.0" }, "devDependencies": { + "aurelia-pal-browser": "github:aurelia/pal-browser@^0.2.0", "babel": "npm:babel-core@^5.8.22", "babel-runtime": "npm:babel-runtime@^5.8.20", "core-js": "npm:core-js@^1.1.0", diff --git a/sample/config.js b/sample/config.js index 2c8b6336..c1df2f56 100644 --- a/sample/config.js +++ b/sample/config.js @@ -28,141 +28,175 @@ System.config({ }, map: { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-bootstrapper": "github:aurelia/bootstrapper@0.17.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-templating": "github:aurelia/templating@0.15.3", + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-bootstrapper": "github:aurelia/bootstrapper@0.18.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-templating": "github:aurelia/templating@0.16.0", "babel": "npm:babel-core@5.8.23", "babel-runtime": "npm:babel-runtime@5.8.20", "core-js": "npm:core-js@1.1.4", "font-awesome": "npm:font-awesome@4.4.0", "twbs/bootstrap": "github:twbs/bootstrap@3.3.5", - "github:aurelia/binding@0.9.1": { - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.7.0", + "github:aurelia/binding@0.10.0": { + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/bootstrapper@0.17.0": { - "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.8.0", - "aurelia-framework": "github:aurelia/framework@0.16.0", - "aurelia-history": "github:aurelia/history@0.7.0", - "aurelia-history-browser": "github:aurelia/history-browser@0.8.0", - "aurelia-loader-default": "github:aurelia/loader-default@0.10.0", - "aurelia-logging-console": "github:aurelia/logging-console@0.7.1", - "aurelia-router": "github:aurelia/router@0.12.0", - "aurelia-templating": "github:aurelia/templating@0.15.3", - "aurelia-templating-binding": "github:aurelia/templating-binding@0.15.0", - "aurelia-templating-resources": "github:aurelia/templating-resources@0.15.2", - "aurelia-templating-router": "github:aurelia/templating-router@0.16.1", + "github:aurelia/bootstrapper@0.18.0": { + "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.9.0", + "aurelia-framework": "github:aurelia/framework@0.17.0", + "aurelia-history": "github:aurelia/history@0.8.0", + "aurelia-history-browser": "github:aurelia/history-browser@0.9.0", + "aurelia-loader-default": "github:aurelia/loader-default@0.11.0", + "aurelia-logging-console": "github:aurelia/logging-console@0.8.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-pal-browser": "github:aurelia/pal-browser@0.2.0", + "aurelia-router": "github:aurelia/router@0.13.0", + "aurelia-templating": "github:aurelia/templating@0.16.0", + "aurelia-templating-binding": "github:aurelia/templating-binding@0.16.0", + "aurelia-templating-resources": "github:aurelia/templating-resources@0.16.0", + "aurelia-templating-router": "github:aurelia/templating-router@0.17.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/dependency-injection@0.10.1": { - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", + "github:aurelia/dependency-injection@0.11.0": { + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/event-aggregator@0.8.0": { - "aurelia-logging": "github:aurelia/logging@0.7.0" - }, - "github:aurelia/framework@0.16.0": { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-loader": "github:aurelia/loader@0.9.0", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.7.0", - "aurelia-templating": "github:aurelia/templating@0.15.3", + "github:aurelia/event-aggregator@0.9.0": { + "aurelia-logging": "github:aurelia/logging@0.8.0" + }, + "github:aurelia/framework@0.17.0": { + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-loader": "github:aurelia/loader@0.10.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-path": "github:aurelia/path@0.10.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", + "aurelia-templating": "github:aurelia/templating@0.16.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/history-browser@0.8.0": { - "aurelia-history": "github:aurelia/history@0.7.0", + "github:aurelia/history-browser@0.9.0": { + "aurelia-history": "github:aurelia/history@0.8.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/loader-default@0.10.0": { - "aurelia-loader": "github:aurelia/loader@0.9.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0" + "github:aurelia/loader-default@0.11.0": { + "aurelia-loader": "github:aurelia/loader@0.10.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0" }, - "github:aurelia/loader@0.9.0": { - "aurelia-html-template-element": "github:aurelia/html-template-element@0.3.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "core-js": "github:zloirock/core-js@0.8.4" + "github:aurelia/loader@0.10.0": { + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-path": "github:aurelia/path@0.10.0" }, - "github:aurelia/logging-console@0.7.1": { - "aurelia-logging": "github:aurelia/logging@0.7.0" + "github:aurelia/logging-console@0.8.0": { + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-pal": "github:aurelia/pal@0.2.0" }, - "github:aurelia/metadata@0.8.0": { + "github:aurelia/metadata@0.9.0": { + "aurelia-pal": "github:aurelia/pal@0.2.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/route-recognizer@0.7.0": { - "aurelia-path": "github:aurelia/path@0.9.0", + "github:aurelia/pal-browser@0.2.0": { + "aurelia-pal": "github:aurelia/pal@0.2.0" + }, + "github:aurelia/route-recognizer@0.8.0": { + "aurelia-path": "github:aurelia/path@0.10.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/router@0.12.0": { - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.8.0", - "aurelia-history": "github:aurelia/history@0.7.0", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "aurelia-route-recognizer": "github:aurelia/route-recognizer@0.7.0", + "github:aurelia/router@0.13.0": { + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-event-aggregator": "github:aurelia/event-aggregator@0.9.0", + "aurelia-history": "github:aurelia/history@0.8.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-path": "github:aurelia/path@0.10.0", + "aurelia-route-recognizer": "github:aurelia/route-recognizer@0.8.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/templating-binding@0.15.0": { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-templating": "github:aurelia/templating@0.15.3" - }, - "github:aurelia/templating-resources@0.15.2": { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-loader": "github:aurelia/loader@0.9.0", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.7.0", - "aurelia-templating": "github:aurelia/templating@0.15.3", + "github:aurelia/task-queue@0.8.0": { + "aurelia-pal": "github:aurelia/pal@0.2.0" + }, + "github:aurelia/templating-binding@0.16.0": { + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-templating": "github:aurelia/templating@0.16.0" + }, + "github:aurelia/templating-resources@0.16.0": { + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-loader": "github:aurelia/loader@0.10.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-path": "github:aurelia/path@0.10.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", + "aurelia-templating": "github:aurelia/templating@0.16.0", "core-js": "npm:core-js@0.9.18" }, - "github:aurelia/templating-router@0.16.1": { - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "aurelia-router": "github:aurelia/router@0.12.0", - "aurelia-templating": "github:aurelia/templating@0.15.3" - }, - "github:aurelia/templating@0.15.3": { - "aurelia-binding": "github:aurelia/binding@0.9.1", - "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.1", - "aurelia-html-template-element": "github:aurelia/html-template-element@0.3.0", - "aurelia-loader": "github:aurelia/loader@0.9.0", - "aurelia-logging": "github:aurelia/logging@0.7.0", - "aurelia-metadata": "github:aurelia/metadata@0.8.0", - "aurelia-path": "github:aurelia/path@0.9.0", - "aurelia-task-queue": "github:aurelia/task-queue@0.7.0", + "github:aurelia/templating-router@0.17.0": { + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-path": "github:aurelia/path@0.10.0", + "aurelia-router": "github:aurelia/router@0.13.0", + "aurelia-templating": "github:aurelia/templating@0.16.0" + }, + "github:aurelia/templating@0.16.0": { + "aurelia-binding": "github:aurelia/binding@0.10.0", + "aurelia-dependency-injection": "github:aurelia/dependency-injection@0.11.0", + "aurelia-loader": "github:aurelia/loader@0.10.0", + "aurelia-logging": "github:aurelia/logging@0.8.0", + "aurelia-metadata": "github:aurelia/metadata@0.9.0", + "aurelia-pal": "github:aurelia/pal@0.2.0", + "aurelia-path": "github:aurelia/path@0.10.0", + "aurelia-task-queue": "github:aurelia/task-queue@0.8.0", "core-js": "npm:core-js@0.9.18" }, - "github:jspm/nodelibs-process@0.1.1": { - "process": "npm:process@0.10.1" + "github:jspm/nodelibs-assert@0.1.0": { + "assert": "npm:assert@1.3.0" + }, + "github:jspm/nodelibs-process@0.1.2": { + "process": "npm:process@0.11.2" + }, + "github:jspm/nodelibs-util@0.1.0": { + "util": "npm:util@0.10.3" }, "github:twbs/bootstrap@3.3.5": { "jquery": "github:components/jquery@2.1.4" }, + "npm:assert@1.3.0": { + "util": "npm:util@0.10.3" + }, "npm:babel-runtime@5.8.20": { - "process": "github:jspm/nodelibs-process@0.1.1" + "process": "github:jspm/nodelibs-process@0.1.2" }, "npm:core-js@0.9.18": { "fs": "github:jspm/nodelibs-fs@0.1.2", - "process": "github:jspm/nodelibs-process@0.1.1", + "process": "github:jspm/nodelibs-process@0.1.2", "systemjs-json": "github:systemjs/plugin-json@0.1.0" }, "npm:core-js@1.1.4": { "fs": "github:jspm/nodelibs-fs@0.1.2", - "process": "github:jspm/nodelibs-process@0.1.1", + "process": "github:jspm/nodelibs-process@0.1.2", "systemjs-json": "github:systemjs/plugin-json@0.1.0" }, "npm:font-awesome@4.4.0": { "css": "github:systemjs/plugin-css@0.1.16" + }, + "npm:inherits@2.0.1": { + "util": "github:jspm/nodelibs-util@0.1.0" + }, + "npm:process@0.11.2": { + "assert": "github:jspm/nodelibs-assert@0.1.0" + }, + "npm:util@0.10.3": { + "inherits": "npm:inherits@2.0.1", + "process": "github:jspm/nodelibs-process@0.1.2" } } }); diff --git a/sample/package.json b/sample/package.json index 5f6eec68..e290db4d 100644 --- a/sample/package.json +++ b/sample/package.json @@ -2,10 +2,10 @@ "jspm": { "directories": {}, "dependencies": { - "aurelia-binding": "github:aurelia/binding@^0.9.1", - "aurelia-bootstrapper": "github:aurelia/bootstrapper@^0.17.0", - "aurelia-metadata": "github:aurelia/metadata@^0.8.0", - "aurelia-templating": "github:aurelia/templating@^0.15.3", + "aurelia-binding": "github:aurelia/binding@^0.10.0", + "aurelia-bootstrapper": "github:aurelia/bootstrapper@^0.18.0", + "aurelia-metadata": "github:aurelia/metadata@^0.9.0", + "aurelia-templating": "github:aurelia/templating@^0.16.0", "font-awesome": "npm:font-awesome@^4.4.0", "twbs/bootstrap": "github:twbs/bootstrap@3.3.5" }, diff --git a/src/decorators.js b/src/decorators.js index 1901d1fd..e20d95af 100644 --- a/src/decorators.js +++ b/src/decorators.js @@ -1,4 +1,4 @@ -import {Metadata} from 'aurelia-metadata'; +import {metadata} from 'aurelia-metadata'; export class ValidationMetadata { static metadataKey = 'aurelia:validation'; @@ -37,7 +37,7 @@ class ValidationPropertyMetadata { export function ensure(setupStep) { return function(target, propertyName) { - let validationMetadata = Metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); + let validationMetadata = metadata.getOrCreateOwn(ValidationMetadata.metadataKey, ValidationMetadata, target); let property = validationMetadata.getOrCreateProperty(propertyName); property.addSetupStep(setupStep); }; diff --git a/src/validation-group.js b/src/validation-group.js index 616c8d45..8c5666ac 100644 --- a/src/validation-group.js +++ b/src/validation-group.js @@ -1,4 +1,4 @@ -import {Metadata} from 'aurelia-metadata'; +import {metadata} from 'aurelia-metadata'; import {ValidationGroupBuilder} from './validation-group-builder'; import {ValidationResult} from './validation-result'; import {ValidationMetadata} from './decorators'; @@ -28,7 +28,7 @@ export class ValidationGroup { this.onDestroy = config.onLocaleChanged(() => { this.validate(false, true); }); - validationMetadata = Metadata.getOwn(ValidationMetadata.metadataKey, this.subject); + validationMetadata = metadata.getOwn(ValidationMetadata.metadataKey, this.subject); if (validationMetadata) { validationMetadata.setup(this); } diff --git a/test/path-observer.spec.js b/test/path-observer.spec.js index 505a137b..1b146fce 100644 --- a/test/path-observer.spec.js +++ b/test/path-observer.spec.js @@ -1,7 +1,6 @@ import {ObserverLocator} from 'aurelia-binding'; import {PathObserver} from '../src/path-observer'; - describe('PathObserver tests', () => { it('should be able to track a path (2 parts)', (done) => { var subject = { diff --git a/test/setup.js b/test/setup.js index ecf26753..c5c2f057 100644 --- a/test/setup.js +++ b/test/setup.js @@ -1,6 +1,9 @@ import {ValidationLocale} from '../src/validation-locale'; import {data} from '../src/resources/en-US'; import {ValidationConfigDefaults} from '../src/validation-config' +import {initialize} from 'aurelia-pal-browser'; + +initialize(); ValidationLocale.Repository.default = ValidationLocale.Repository.addLocale('en-US', data);