Socket
Socket
Sign inDemoInstall

@lion/validate

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/validate - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.9.1](https://github.com/ing-bank/lion/compare/@lion/validate@0.9.0...@lion/validate@0.9.1) (2020-04-02)
### Bug Fixes
* convert unnecessary backticks to single quotes for unpkg ([5103289](https://github.com/ing-bank/lion/commit/5103289f994c26f63e805be56515f150628acd91))
# [0.9.0](https://github.com/ing-bank/lion/compare/@lion/validate@0.8.0...@lion/validate@0.9.0) (2020-03-25)

@@ -8,0 +19,0 @@

13

package.json
{
"name": "@lion/validate",
"version": "0.9.0",
"version": "0.9.1",
"description": "Validate your form elements",

@@ -39,11 +39,6 @@ "author": "ing-bank",

"dependencies": {
"@lion/core": "0.5.0",
"@lion/localize": "0.9.0"
"@lion/core": "0.5.1",
"@lion/localize": "0.9.1"
},
"devDependencies": {
"@open-wc/demoing-storybook": "^1.10.4",
"@open-wc/testing": "^2.5.0",
"sinon": "^7.2.2"
},
"gitHead": "29e1252560d3fda898f98c271a7b685d1e929035"
"gitHead": "b58aa65377d5e7a0cd4d87917980291c832e7120"
}

@@ -103,3 +103,3 @@ import { localize } from '@lion/localize';

default:
return import(`../translations/en.js`);
return import('../translations/en.js');
}

@@ -106,0 +106,0 @@ },

@@ -487,6 +487,2 @@ /* eslint-disable class-methods-use-this, camelcase, no-param-reassign, max-classes-per-file */

}
// // TODO: move to compat layer. Be sure to keep this, because people use this a lot
// if (typeof this.__isRequired === 'function') {
// return !this.__isRequired(v);
// }
return (

@@ -493,0 +489,0 @@ this.modelValue === null ||

@@ -778,24 +778,2 @@ import { LitElement } from '@lion/core';

describe('State storage and reflection', () => {
class ContainsLowercaseA extends Validator {
constructor(...args) {
super(...args);
this.execute = modelValue => !modelValue.includes('a');
}
static get validatorName() {
return 'ContainsLowercaseA';
}
}
class ContainsLowercaseB extends Validator {
constructor(...args) {
super(...args);
this.execute = modelValue => !modelValue.includes('b');
}
static get validatorName() {
return 'containsLowercaseB';
}
}
it('stores validity of individual Validators in ".validationStates.error[validator.validatorName]"', async () => {

@@ -894,31 +872,2 @@ const el = await fixture(html`

});
// TODO: what is it used for?
it.skip('fires "error-states-changed" event when "internal" state changes', async () => {
const el = await fixture(html`
<${tag}
.validators=${[new MinLength(3), new ContainsLowercaseA(), new ContainsLowercaseB()]}
>${lightDom}
</${tag}>
`);
const cbError = sinon.spy();
el.addEventListener('error-states-changed', cbError);
el.modelValue = 'a';
await el.updateComplete;
expect(cbError.callCount).to.equal(1);
el.modelValue = 'aa';
await el.updateComplete;
expect(cbError.callCount).to.equal(1);
el.modelValue = 'aaa';
await el.updateComplete;
expect(cbError.callCount).to.equal(2);
el.modelValue = 'aba';
await el.updateComplete;
expect(cbError.callCount).to.equal(3);
});
});

@@ -925,0 +874,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