Socket
Socket
Sign inDemoInstall

@lion/validate

Package Overview
Dependencies
2
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.1 to 0.9.2

8

CHANGELOG.md

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

## [0.9.2](https://github.com/ing-bank/lion/compare/@lion/validate@0.9.1...@lion/validate@0.9.2) (2020-04-29)
**Note:** Version bump only for package @lion/validate
## [0.9.1](https://github.com/ing-bank/lion/compare/@lion/validate@0.9.0...@lion/validate@0.9.1) (2020-04-02)

@@ -8,0 +16,0 @@

8

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

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

"dependencies": {
"@lion/core": "0.5.1",
"@lion/localize": "0.9.1"
"@lion/core": "0.5.2",
"@lion/localize": "0.9.2"
},
"gitHead": "b58aa65377d5e7a0cd4d87917980291c832e7120"
"gitHead": "2476211c21e3f785a909c71e8f94ff307fc6a4fc"
}
# Validate
> ## 🛠 Status: Pilot Phase
> Lion Web Components are still in an early alpha stage; they should not be considered production ready yet.
>
> The goal of our pilot phase is to gather feedback from a private group of users.
> Therefore, during this phase, we kindly ask you to:
> - not publicly promote or link us yet: (no tweets, blog posts or other forms of communication about Lion Web Components)
> - not publicly promote or link products derived from/based on Lion Web Components
>
> As soon as Pilot Phase ends we will let you know (feel free to subscribe to this issue https://github.com/ing-bank/lion/issues/1)
## Features

@@ -14,0 +4,0 @@

@@ -45,9 +45,9 @@ import { html, LitElement } from '@lion/core';

${this.feedbackData &&
this.feedbackData.map(
({ message, type, validator }) => html`
${this._messageTemplate({ message, type, validator })}
`,
)}
this.feedbackData.map(
({ message, type, validator }) => html`
${this._messageTemplate({ message, type, validator })}
`,
)}
`;
}
}

@@ -1,10 +0,9 @@

import { expect, fixture, html, unsafeStatic, defineCE } from '@open-wc/testing';
import sinon from 'sinon';
import { LitElement } from '@lion/core';
import { localize } from '@lion/localize';
import { localizeTearDown } from '@lion/localize/test-helpers.js';
import { defineCE, expect, fixture, html, unsafeStatic } from '@open-wc/testing';
import sinon from 'sinon';
import { DefaultSuccess, MinLength, Required, ValidateMixin, Validator } from '../index.js';
import { AlwaysInvalid } from '../test-helpers.js';
import { Validator, Required, MinLength, DefaultSuccess, ValidateMixin } from '../index.js';
export function runValidateMixinFeedbackPart() {

@@ -244,5 +243,3 @@ describe('Validity Feedback', () => {

render() {
return html`
Custom for ${this.feedbackData[0].validator.constructor.name}
`;
return html`Custom for ${this.feedbackData[0].validator.constructor.name}`;
}

@@ -249,0 +246,0 @@ },

/* eslint-disable no-unused-vars, no-param-reassign */
import { expect, fixture, html } from '@open-wc/testing';
import sinon from 'sinon';
import { fixture, html, expect } from '@open-wc/testing';
import '../lion-validation-feedback.js';

@@ -9,7 +9,3 @@ import { AlwaysInvalid, AlwaysValid } from '../test-helpers.js';

it('renders a validation message', async () => {
const el = await fixture(
html`
<lion-validation-feedback></lion-validation-feedback>
`,
);
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`);
expect(el).shadowDom.to.equal('');

@@ -22,7 +18,3 @@ el.feedbackData = [{ message: 'hello', type: 'error', validator: new AlwaysInvalid() }];

it('renders the validation type attribute', async () => {
const el = await fixture(
html`
<lion-validation-feedback></lion-validation-feedback>
`,
);
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`);
el.feedbackData = [{ message: 'hello', type: 'error', validator: new AlwaysInvalid() }];

@@ -38,7 +30,3 @@ await el.updateComplete;

it('success message clears after 3s', async () => {
const el = await fixture(
html`
<lion-validation-feedback></lion-validation-feedback>
`,
);
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`);

@@ -63,7 +51,3 @@ const clock = sinon.useFakeTimers();

it('does not clear error messages', async () => {
const el = await fixture(
html`
<lion-validation-feedback></lion-validation-feedback>
`,
);
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`);

@@ -70,0 +54,0 @@ const clock = sinon.useFakeTimers();

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc