Skip to content

Commit 92ce540

Browse files
authored
refactor: move version getter to ElementMixin (#2369)
1 parent bec5f43 commit 92ce540

93 files changed

Lines changed: 212 additions & 390 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Prepare a new version for the `updateVersion` script by running the following co
302302
export npm_config_bump=23.0.0-alpha0
303303
```
304304

305-
Run the script to bump static version getters in every component:
305+
Run the script to bump static version getters in `ElementMixin`, `Lumo` and `Material`:
306306

307307
```sh
308308
node scripts/updateVersion.js

‎packages/button/src/vaadin-button.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ class Button extends ControlStateMixin(ActiveMixin(ElementMixin(ThemableMixin(Po
1414
return 'vaadin-button';
1515
}
1616

17-
static get version() {
18-
return '22.0.0-alpha1';
19-
}
20-
2117
static get template() {
2218
return html`
2319
<style>

‎packages/button/test/button.test.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ describe('vaadin-button', () => {
3636
it('should have a valid static "is" getter', () => {
3737
expect(customElements.get(tagName).is).to.equal(tagName);
3838
});
39-
40-
it('should have a valid version number', () => {
41-
expect(customElements.get(tagName).version).to.match(/^(\d+\.)?(\d+\.)?(\d+)(-(alpha|beta|rc)\d+)?$/);
42-
});
4339
});
4440

4541
describe('default', () => {

‎packages/custom-field/src/vaadin-custom-field.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ class CustomField extends FieldAriaMixin(LabelMixin(FocusMixin(ThemableMixin(Ele
1616
return 'vaadin-custom-field';
1717
}
1818

19-
static get version() {
20-
return '22.0.0-alpha1';
21-
}
22-
2319
static get template() {
2420
return html`
2521
<style>

‎packages/email-field/src/vaadin-email-field.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ export class EmailField extends TextField {
4747
return 'vaadin-email-field';
4848
}
4949

50-
static get version() {
51-
return '22.0.0-alpha1';
52-
}
53-
5450
constructor() {
5551
super();
5652
this._setType('email');

‎packages/integer-field/src/vaadin-integer-field.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ export class IntegerField extends NumberField {
5151
return 'vaadin-integer-field';
5252
}
5353

54-
static get version() {
55-
return '22.0.0-alpha1';
56-
}
57-
5854
static get properties() {
5955
return {
6056
/**

‎packages/number-field/src/vaadin-number-field.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ export class NumberField extends InputFieldMixin(InputSlotMixin(ThemableMixin(El
6161
return 'vaadin-number-field';
6262
}
6363

64-
static get version() {
65-
return '22.0.0-alpha1';
66-
}
67-
6864
static get template() {
6965
return html`
7066
<style include="vaadin-input-field-shared-styles">

‎packages/password-field/src/vaadin-password-field.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ export class PasswordField extends TextField {
5151
return 'vaadin-password-field';
5252
}
5353

54-
static get version() {
55-
return '22.0.0-alpha1';
56-
}
57-
5854
static get template() {
5955
if (!memoizedTemplate) {
6056
// Clone the superclass template

‎packages/text-area/src/vaadin-text-area.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ export class TextArea extends CharLengthMixin(
7979
return 'vaadin-text-area';
8080
}
8181

82-
static get version() {
83-
return '22.0.0-alpha1';
84-
}
85-
8682
static get template() {
8783
return html`
8884
<style include="vaadin-input-field-shared-styles">

‎packages/text-field/src/vaadin-text-field.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ export class TextField extends TextFieldMixin(InputSlotMixin(ThemableMixin(Eleme
1616
return 'vaadin-text-field';
1717
}
1818

19-
static get version() {
20-
return '22.0.0-alpha1';
21-
}
22-
2319
static get template() {
2420
return html`
2521
<style include="vaadin-input-field-shared-styles">

0 commit comments

Comments
 (0)