Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aurelia-validation

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-validation - npm Package Compare versions

Comparing version 0.9.2 to 0.10.0

3

.eslintrc.json
{
"extends": "./node_modules/aurelia-tools/.eslintrc.json",
"rules": {
"no-unused-vars": 0
"no-unused-vars": 0,
"no-cond-assign": 0
}
}
{
"name": "aurelia-validation",
"version": "0.9.2",
"version": "0.10.0",
"description": "This is a validation interface for hooking in to Aurelia's binding and templating engines.",

@@ -22,8 +22,8 @@ "keywords": [

"dependencies": {
"aurelia-binding": "^1.0.0-beta.2.0.6",
"aurelia-dependency-injection": "^1.0.0-beta.2.1.0",
"aurelia-metadata": "^1.0.0-beta.2.0.0",
"aurelia-task-queue": "^1.0.0-beta.2.0.0",
"aurelia-templating": "^1.0.0-beta.3.0.2"
"aurelia-binding": "^1.0.0-rc.1.0.0",
"aurelia-dependency-injection": "^1.0.0-rc.1.0.0",
"aurelia-metadata": "^1.0.0-rc.1.0.0",
"aurelia-task-queue": "^1.0.0-rc.1.0.0",
"aurelia-templating": "^1.0.0-rc.1.0.0"
}
}
var gulp = require('gulp');
var runSequence = require('run-sequence');
var paths = require('../paths');
var changelog = require('conventional-changelog');
var fs = require('fs');
var bump = require('gulp-bump');
var args = require('../args');
var conventionalChangelog = require('gulp-conventional-changelog');
gulp.task('changelog', function () {
return gulp.src(paths.doc + '/CHANGELOG.md', {
buffer: false
}).pipe(conventionalChangelog({
preset: 'angular'
}))
.pipe(gulp.dest(paths.doc));
});
gulp.task('bump-version', function(){

@@ -15,14 +24,2 @@ return gulp.src(['./package.json', './bower.json'])

gulp.task('changelog', function(callback) {
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
return changelog({
repository: pkg.repository.url,
version: pkg.version,
file: paths.doc + '/CHANGELOG.md'
}, function(err, log) {
fs.writeFileSync(paths.doc + '/CHANGELOG.md', log);
});
});
gulp.task('prepare-release', function(callback){

@@ -29,0 +26,0 @@ return runSequence(

@@ -16,9 +16,9 @@ System.config({

map: {
"aurelia-binding": "npm:aurelia-binding@1.0.0-beta.2.0.6",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.2.1.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.2.0.0",
"aurelia-pal-browser": "npm:aurelia-pal-browser@1.0.0-beta.3.0.0",
"aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-beta.2.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.2.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-beta.3.0.2",
"aurelia-binding": "npm:aurelia-binding@1.0.0-rc.1.0.0",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal-browser": "npm:aurelia-pal-browser@1.0.0-rc.1.0.0",
"aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0",
"babel": "npm:babel-core@5.8.38",

@@ -52,37 +52,37 @@ "babel-runtime": "npm:babel-runtime@5.8.38",

},
"npm:aurelia-binding@1.0.0-beta.2.0.6": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.2.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.2.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.2.0.0"
"npm:aurelia-binding@1.0.0-rc.1.0.0": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0"
},
"npm:aurelia-dependency-injection@1.0.0-beta.2.1.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.2.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0"
"npm:aurelia-dependency-injection@1.0.0-rc.1.0.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-loader@1.0.0-beta.2.0.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.2.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-beta.2.0.0"
"npm:aurelia-loader@1.0.0-rc.1.0.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0"
},
"npm:aurelia-metadata@1.0.0-beta.2.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0"
"npm:aurelia-metadata@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-pal-browser@1.0.0-beta.3.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0"
"npm:aurelia-pal-browser@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-polyfills@1.0.0-beta.2.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0"
"npm:aurelia-polyfills@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-task-queue@1.0.0-beta.2.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0"
"npm:aurelia-task-queue@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-templating@1.0.0-beta.3.0.2": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-beta.2.0.6",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-beta.2.1.0",
"aurelia-loader": "npm:aurelia-loader@1.0.0-beta.2.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-beta.2.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-beta.2.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-beta.1.3.0",
"aurelia-path": "npm:aurelia-path@1.0.0-beta.2.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-beta.2.0.0"
"npm:aurelia-templating@1.0.0-rc.1.0.0": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-rc.1.0.0",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-loader": "npm:aurelia-loader@1.0.0-rc.1.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0"
},

@@ -89,0 +89,0 @@ "npm:babel-runtime@5.8.38": {

@@ -32,3 +32,3 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-task-queue', './validation-controller', './validate-trigger'], function (exports, _aureliaDependencyInjection, _aureliaTaskQueue, _validationController, _validateTrigger) {

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
};

@@ -35,0 +35,0 @@

@@ -141,31 +141,10 @@ define(['exports', 'aurelia-dependency-injection', './validator', './validate-trigger', './property-info'], function (exports, _aureliaDependencyInjection, _validator, _validateTrigger, _propertyInfo) {

ValidationController.prototype._updateErrors = function _updateErrors(errors, newErrors, target) {
var _this = this;
var i = 0;
var _loop = function _loop() {
var error = errors[i];
var index = newErrors.findIndex(function (x) {
return x.rule === error.rule;
});
if (index === -1) {
errors.splice(i, 1);
_this._unrenderError(error, target);
return 'continue';
}
newErrors.splice(index, 1);
i++;
};
while (i < errors.length) {
var _ret = _loop();
if (_ret === 'continue') continue;
var error = void 0;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
var _error = newErrors[i];
errors.push(_error);
this._renderError(_error, target);
i++;
for (var i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
}

@@ -172,0 +151,0 @@ };

@@ -107,24 +107,12 @@ import {

reset(): any;
_renderError(error?: any, target?: any): any;
_unrenderError(error?: any, target?: any): any;
}
export declare class ValidateBindingBehavior {
constructor(taskQueue?: any);
/*
* Reconciles a binding's existing errors array with the new errors array.
* Renders errors related to newly broken rules. Unrenders errors related to
* rules that are no longer broken.
*/
_updateErrors(errors?: any, newErrors?: any, target?: any): any;
/**
* Validates and renders errors for a particular binding.
* Gets the DOM element associated with the data-binding. Most of the time it's
* the binding.target but sometimes binding.target is an aurelia custom element,
* which is a javascript "class" instance, so we need to use the controller to
* locate the actual DOM element.
*/
_validateBinding(binding?: any): any;
/**
* Resets and unrenders errors for a particular binding.
*/
_resetBinding(binding?: any): any;
}
export declare class ValidateBindingBehavior {
constructor(taskQueue?: any);
getTarget(binding?: any, view?: any): any;

@@ -131,0 +119,0 @@ bind(binding?: any, source?: any, rules?: any): any;

@@ -224,20 +224,10 @@ import {AccessMember,AccessScope,AccessKeyed,BindingBehavior,ValueConverter,bindingMode} from 'aurelia-binding';

_updateErrors(errors, newErrors, target) {
let i = 0;
while (i < errors.length) {
const error = errors[i];
const index = newErrors.findIndex(x => x.rule === error.rule);
if (index === -1) {
errors.splice(i, 1);
this._unrenderError(error, target);
continue;
}
newErrors.splice(index, 1);
i++;
let error;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
const error = newErrors[i];
for (let i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
i++;
}

@@ -272,2 +262,8 @@ }

/**
* Gets the DOM element associated with the data-binding. Most of the time it's
* the binding.target but sometimes binding.target is an aurelia custom element,
* which is a javascript "class" instance, so we need to use the controller to
* locate the actual DOM element.
*/
getTarget(binding, view) {

@@ -285,3 +281,3 @@ const target = binding.target;

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
}

@@ -288,0 +284,0 @@

@@ -39,3 +39,3 @@ 'use strict';

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
};

@@ -42,0 +42,0 @@

@@ -148,31 +148,10 @@ 'use strict';

ValidationController.prototype._updateErrors = function _updateErrors(errors, newErrors, target) {
var _this = this;
var i = 0;
var _loop = function _loop() {
var error = errors[i];
var index = newErrors.findIndex(function (x) {
return x.rule === error.rule;
});
if (index === -1) {
errors.splice(i, 1);
_this._unrenderError(error, target);
return 'continue';
}
newErrors.splice(index, 1);
i++;
};
while (i < errors.length) {
var _ret = _loop();
if (_ret === 'continue') continue;
var error = void 0;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
var _error = newErrors[i];
errors.push(_error);
this._renderError(_error, target);
i++;
for (var i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
}

@@ -179,0 +158,0 @@ };

@@ -25,3 +25,3 @@ var _dec, _class;

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
}

@@ -28,0 +28,0 @@

@@ -77,20 +77,10 @@ var _dec, _class;

_updateErrors(errors, newErrors, target) {
let i = 0;
while (i < errors.length) {
const error = errors[i];
const index = newErrors.findIndex(x => x.rule === error.rule);
if (index === -1) {
errors.splice(i, 1);
this._unrenderError(error, target);
continue;
}
newErrors.splice(index, 1);
i++;
let error;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
const error = newErrors[i];
for (let i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
i++;
}

@@ -97,0 +87,0 @@ }

@@ -29,3 +29,3 @@ var _dec, _class;

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
};

@@ -32,0 +32,0 @@

@@ -138,31 +138,10 @@ var _dec, _class;

ValidationController.prototype._updateErrors = function _updateErrors(errors, newErrors, target) {
var _this = this;
var i = 0;
var _loop = function _loop() {
var error = errors[i];
var index = newErrors.findIndex(function (x) {
return x.rule === error.rule;
});
if (index === -1) {
errors.splice(i, 1);
_this._unrenderError(error, target);
return 'continue';
}
newErrors.splice(index, 1);
i++;
};
while (i < errors.length) {
var _ret = _loop();
if (_ret === 'continue') continue;
var error = void 0;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
var _error = newErrors[i];
errors.push(_error);
this._renderError(_error, target);
i++;
for (var i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
}

@@ -169,0 +148,0 @@ };

@@ -41,3 +41,3 @@ 'use strict';

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
};

@@ -44,0 +44,0 @@

@@ -149,31 +149,10 @@ 'use strict';

ValidationController.prototype._updateErrors = function _updateErrors(errors, newErrors, target) {
var _this = this;
var i = 0;
var _loop = function _loop() {
var error = errors[i];
var index = newErrors.findIndex(function (x) {
return x.rule === error.rule;
});
if (index === -1) {
errors.splice(i, 1);
_this._unrenderError(error, target);
return 'continue';
}
newErrors.splice(index, 1);
i++;
};
while (i < errors.length) {
var _ret = _loop();
if (_ret === 'continue') continue;
var error = void 0;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
var _error = newErrors[i];
errors.push(_error);
this._renderError(_error, target);
i++;
for (var i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
}

@@ -180,0 +159,0 @@ };

@@ -242,31 +242,10 @@ 'use strict';

ValidationController.prototype._updateErrors = function _updateErrors(errors, newErrors, target) {
var _this = this;
var i = 0;
var _loop = function _loop() {
var error = errors[i];
var index = newErrors.findIndex(function (x) {
return x.rule === error.rule;
});
if (index === -1) {
errors.splice(i, 1);
_this._unrenderError(error, target);
return 'continue';
}
newErrors.splice(index, 1);
i++;
};
while (i < errors.length) {
var _ret = _loop();
if (_ret === 'continue') continue;
var error = void 0;
while (error = errors.pop()) {
this._unrenderError(error, target);
}
i = 0;
while (i < newErrors.length) {
var _error = newErrors[i];
errors.push(_error);
this._renderError(_error, target);
i++;
for (var i = 0, ii = newErrors.length; i < ii; i++) {
error = newErrors[i];
errors.push(error);
this._renderError(error, target);
}

@@ -322,7 +301,7 @@ };

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
};
ValidateBindingBehavior.prototype.bind = function bind(binding, source, rules) {
var _this2 = this;
var _this = this;

@@ -346,3 +325,3 @@ var target = this.getTarget(binding, source);

binding.validateBlurHandler = function () {
_this2.taskQueue.queueMicroTask(function () {
_this.taskQueue.queueMicroTask(function () {
return controller._validateBinding(binding);

@@ -349,0 +328,0 @@ });

@@ -0,1 +1,11 @@

<a name="0.10.0"></a>
# [0.10.0](https://github.com/aurelia/validation/compare/0.9.2...v0.10.0) (2016-06-22)
### Bug Fixes
* **validate-binding-behavior:** IE11 compat ([396e785](https://github.com/aurelia/validation/commit/396e785)), closes [#257](https://github.com/aurelia/validation/issues/257)
### 0.8.1 (2016-05-10)

@@ -2,0 +12,0 @@

{
"name": "aurelia-validation",
"version": "0.9.2",
"version": "0.10.0",
"description": "This is a validation interface for hooking in to Aurelia's binding and templating engines.",

@@ -31,18 +31,18 @@ "keywords": [

"peerDependencies": {
"aurelia-binding": "^1.0.0-beta.2.0.6",
"aurelia-dependency-injection": "^1.0.0-beta.2.1.0",
"aurelia-metadata": "^1.0.0-beta.2.0.0",
"aurelia-task-queue": "^1.0.0-beta.2.0.0",
"aurelia-templating": "^1.0.0-beta.3.0.2"
"aurelia-binding": "^1.0.0-rc.1.0.0",
"aurelia-dependency-injection": "^1.0.0-rc.1.0.0",
"aurelia-metadata": "^1.0.0-rc.1.0.0",
"aurelia-task-queue": "^1.0.0-rc.1.0.0",
"aurelia-templating": "^1.0.0-rc.1.0.0"
},
"dependencies": {
"aurelia-binding": "^1.0.0-beta.2.0.6",
"aurelia-dependency-injection": "^1.0.0-beta.2.1.0",
"aurelia-metadata": "^1.0.0-beta.2.0.0",
"aurelia-task-queue": "^1.0.0-beta.2.0.0",
"aurelia-templating": "^1.0.0-beta.3.0.2"
"aurelia-binding": "^1.0.0-rc.1.0.0",
"aurelia-dependency-injection": "^1.0.0-rc.1.0.0",
"aurelia-metadata": "^1.0.0-rc.1.0.0",
"aurelia-task-queue": "^1.0.0-rc.1.0.0",
"aurelia-templating": "^1.0.0-rc.1.0.0"
},
"devDependencies": {
"aurelia-pal-browser": "^1.0.0-beta.1.1.2",
"aurelia-polyfills": "^1.0.0-beta.2.0.0",
"aurelia-pal-browser": "^1.0.0-rc.1.0.0",
"aurelia-polyfills": "^1.0.0-rc.1.0.0",
"babel": "babel-core@^5.8.24",

@@ -54,16 +54,16 @@ "babel-runtime": "^5.8.24",

"dependencies": {
"aurelia-binding": "^1.0.0-beta.2.0.6",
"aurelia-dependency-injection": "^1.0.0-beta.2.1.0",
"aurelia-metadata": "^1.0.0-beta.2.0.0",
"aurelia-task-queue": "^1.0.0-beta.2.0.0",
"aurelia-templating": "^1.0.0-beta.3.0.2"
"aurelia-binding": "^1.0.0-rc.1.0.0",
"aurelia-dependency-injection": "^1.0.0-rc.1.0.0",
"aurelia-metadata": "^1.0.0-rc.1.0.0",
"aurelia-task-queue": "^1.0.0-rc.1.0.0",
"aurelia-templating": "^1.0.0-rc.1.0.0"
},
"devDependencies": {
"aurelia-tools": "^0.2.1",
"babel-dts-generator": "^0.5.1",
"babel-eslint": "^6.0.4",
"aurelia-tools": "^0.2.3",
"babel-dts-generator": "^0.6.0",
"babel-eslint": "^6.0.5",
"babel-plugin-syntax-flow": "^6.8.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-es2015-modules-amd": "^6.8.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.8.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.10.3",
"babel-plugin-transform-es2015-modules-systemjs": "^6.9.0",

@@ -76,4 +76,3 @@ "babel-plugin-transform-flow-strip-types": "^6.8.0",

"browser-sync": "^2.13.0",
"conventional-changelog": "1.1.0",
"del": "^2.2.0",
"del": "^2.2.1",
"gulp": "^3.9.1",

@@ -83,2 +82,3 @@ "gulp-babel": "^6.1.2",

"gulp-concat": "^2.6.0",
"gulp-conventional-changelog": "^1.1.0",
"gulp-eslint": "^2.0.0",

@@ -105,4 +105,4 @@ "gulp-ignore": "^2.0.1",

"through2": "^2.0.1",
"typedoc": "^0.4.3",
"typescript": "^1.9.0-dev.20160615-1.0",
"typedoc": "^0.4.4",
"typescript": "^1.9.0-dev.20160622-1.0",
"vinyl": "^1.1.1",

@@ -109,0 +109,0 @@ "vinyl-paths": "^2.1.0",

@@ -12,2 +12,8 @@ import {inject, Optional} from 'aurelia-dependency-injection';

/**
* Gets the DOM element associated with the data-binding. Most of the time it's
* the binding.target but sometimes binding.target is an aurelia custom element,
* which is a javascript "class" instance, so we need to use the controller to
* locate the actual DOM element.
*/
getTarget(binding, view) {

@@ -25,3 +31,3 @@ const target = binding.target;

}
return controller.view.firstChild.parentElement;
return controller.view.firstChild.parentNode;
}

@@ -28,0 +34,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc