@ng-zen/cli 20.5.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [21.0.0](https://github.com/kstepien3/ng-zen/compare/v20.5.0...v21.0.0) (2025-12-18)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * upgrade Angular v21 + Storybook v10, add vitest (#363)
6
+
7
+ ### chore
8
+
9
+ * upgrade Angular v21 + Storybook v10, add vitest ([#363](https://github.com/kstepien3/ng-zen/issues/363)) ([13bd57e](https://github.com/kstepien3/ng-zen/commit/13bd57ebd5b5fd26721947645dace5da97defa45))
10
+
11
+ ### 📚 Documentation
12
+
13
+ * **readme:** update info about testing framework ([#371](https://github.com/kstepien3/ng-zen/issues/371)) ([9fe8e7f](https://github.com/kstepien3/ng-zen/commit/9fe8e7f28911731c5c6482d7b69463e72a4c4232))
14
+
15
+ ## [21.0.0-next.1](https://github.com/kstepien3/ng-zen/compare/v20.5.0...v21.0.0-next.1) (2025-12-16)
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+
19
+ * upgrade Angular v21 + Storybook v10, add vitest (#363)
20
+
21
+ ### chore
22
+
23
+ * upgrade Angular v21 + Storybook v10, add vitest ([#363](https://github.com/kstepien3/ng-zen/issues/363)) ([13bd57e](https://github.com/kstepien3/ng-zen/commit/13bd57ebd5b5fd26721947645dace5da97defa45))
24
+
25
+ ### 📚 Documentation
26
+
27
+ * **readme:** update info about testing framework ([#371](https://github.com/kstepien3/ng-zen/issues/371)) ([9fe8e7f](https://github.com/kstepien3/ng-zen/commit/9fe8e7f28911731c5c6482d7b69463e72a4c4232))
28
+
1
29
  ## [20.5.0](https://github.com/kstepien3/ng-zen/compare/v20.4.0...v20.5.0) (2025-11-30)
2
30
 
3
31
  ### 🚀 New Features
package/README.md CHANGED
@@ -238,7 +238,7 @@ export class LoginComponent {}
238
238
 
239
239
  ### **Testing Integration**
240
240
 
241
- - **Jest Ready:** All tests use Jest framework
241
+ - **Vitest Ready:** All tests use Vitest framework for fast, modern unit testing
242
242
  - **Component Testing:** Isolated unit tests for each component
243
243
  - **Storybook Testing:** Visual testing and documentation
244
244
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-zen/cli",
3
- "version": "20.5.0",
3
+ "version": "21.0.0",
4
4
  "description": "Angular UI components generator – Zen UI Kit CLI for schematics-based creation of customizable components like avatar, button, checkbox, divider, form-control, icon, input, skeleton, switch, textarea with Storybook demos.",
5
5
  "license": "BSD-2-Clause",
6
6
  "private": false,
@@ -60,14 +60,15 @@
60
60
  "save": "devDependencies"
61
61
  },
62
62
  "schematics": "./schematics/collection.json",
63
- "packageManager": "pnpm@10.0.0",
63
+ "packageManager": "pnpm@10.24.0",
64
64
  "peerDependencies": {
65
65
  "@angular/common": ">=20.0.0",
66
66
  "@angular/core": ">=20.0.0"
67
67
  },
68
68
  "dependencies": {
69
- "@angular-devkit/core": "^20.3.2",
70
- "@angular-devkit/schematics": "^20.3.2",
69
+ "@angular-devkit/core": "^21.0.1",
70
+ "@angular-devkit/schematics": "^21.0.1",
71
+ "@angular/build": "21.0.1",
71
72
  "tslib": "^2.8.1"
72
73
  }
73
74
  }
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenAlert } from './alert';
4
6
 
5
7
  describe('ZenAlert', () => {
6
- let component: ZenAlert;
7
- let fixture: ComponentFixture<ZenAlert>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenAlert],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenAlert);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenAlert);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenAvatar } from './avatar';
4
6
 
5
7
  describe('ZenAvatar', () => {
6
- let component: ZenAvatar;
7
- let fixture: ComponentFixture<ZenAvatar>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenAvatar],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenAvatar);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenAvatar);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenButton } from './button';
4
6
 
5
7
  describe('ZenButton', () => {
6
- let component: ZenButton;
7
- let fixture: ComponentFixture<ZenButton>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenButton],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenButton);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenButton);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenCheckbox } from './checkbox';
4
6
 
5
7
  describe('ZenCheckbox', () => {
6
- let component: ZenCheckbox;
7
- let fixture: ComponentFixture<ZenCheckbox>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenCheckbox],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenCheckbox);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenCheckbox);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenDivider } from './divider';
4
6
 
5
7
  describe('ZenDivider', () => {
6
- let component: ZenDivider;
7
- let fixture: ComponentFixture<ZenDivider>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenDivider],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenDivider);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenDivider);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,5 +1,6 @@
1
- import { Component, model } from '@angular/core';
2
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { Component, model, provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
3
4
 
4
5
  import { ZenFormControl, ZenFormControlProvider } from './form-control';
5
6
 
@@ -12,20 +13,16 @@ class FormControl extends ZenFormControl<string> {
12
13
  }
13
14
 
14
15
  describe('FormControl', () => {
15
- let component: FormControl;
16
- let fixture: ComponentFixture<FormControl>;
17
-
18
16
  beforeEach(async () => {
19
17
  await TestBed.configureTestingModule({
20
18
  imports: [FormControl],
19
+ providers: [provideZonelessChangeDetection()],
21
20
  }).compileComponents();
22
-
23
- fixture = TestBed.createComponent(FormControl);
24
- component = fixture.componentInstance;
25
- fixture.detectChanges();
26
21
  });
27
22
 
28
23
  it('should create', () => {
24
+ const fixture = TestBed.createComponent(FormControl);
25
+ const component = fixture.componentInstance;
29
26
  expect(component).toBeTruthy();
30
27
  });
31
28
  });
@@ -1,23 +1,21 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenIcon } from './icon';
4
6
 
5
7
  describe('ZenIcon', () => {
6
- let component: ZenIcon;
7
- let fixture: ComponentFixture<ZenIcon>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenIcon],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenIcon);
15
- component = fixture.componentInstance;
16
- fixture.componentRef.setInput('icon', 'Tree02Icon');
17
- fixture.detectChanges();
18
13
  });
19
14
 
20
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenIcon);
17
+ const component = fixture.componentInstance;
18
+ fixture.componentRef.setInput('icon', 'Tree02Icon');
21
19
  expect(component).toBeTruthy();
22
20
  });
23
21
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenInput } from './input';
4
6
 
5
7
  describe('ZenInput', () => {
6
- let component: ZenInput;
7
- let fixture: ComponentFixture<ZenInput>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenInput],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenInput);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenInput);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,6 +1,8 @@
1
+ import { provideZonelessChangeDetection } from '@angular/core';
1
2
  import { ComponentFixture, TestBed } from '@angular/core/testing';
2
3
  import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
3
4
  import { By } from '@angular/platform-browser';
5
+ import { beforeEach, describe, expect, it, vi } from 'vitest';
4
6
 
5
7
  import { ZenRadio } from './radio';
6
8
  import { ZenRadioRegistry } from './radio.registry';
@@ -13,7 +15,7 @@ describe('ZenRadio', () => {
13
15
  beforeEach(async () => {
14
16
  await TestBed.configureTestingModule({
15
17
  imports: [ZenRadio, FormsModule, ReactiveFormsModule],
16
- providers: [ZenRadioRegistry],
18
+ providers: [ZenRadioRegistry, provideZonelessChangeDetection()],
17
19
  }).compileComponents();
18
20
 
19
21
  registry = TestBed.inject(ZenRadioRegistry);
@@ -61,7 +63,7 @@ describe('ZenRadio', () => {
61
63
  });
62
64
 
63
65
  it('should call onInput when radio is selected', () => {
64
- const spy = jest.spyOn(component, 'onInput');
66
+ const spy = vi.spyOn(component, 'onInput');
65
67
  const inputElement = fixture.debugElement.query(By.css('input')).nativeElement;
66
68
 
67
69
  inputElement.checked = true;
@@ -74,7 +76,7 @@ describe('ZenRadio', () => {
74
76
  component.disabled.set(true);
75
77
  fixture.detectChanges();
76
78
 
77
- const spy = jest.spyOn(component, 'onInput');
79
+ const spy = vi.spyOn(component, 'onInput');
78
80
  const inputElement = fixture.debugElement.query(By.css('input')).nativeElement;
79
81
 
80
82
  inputElement.checked = true;
@@ -158,7 +160,7 @@ describe('ZenRadio', () => {
158
160
  });
159
161
 
160
162
  it('should call onTouched when host element loses focus', () => {
161
- const onTouchedSpy = jest.fn();
163
+ const onTouchedSpy = vi.fn();
162
164
  component.registerOnTouched(onTouchedSpy);
163
165
 
164
166
  const hostElement = fixture.debugElement.nativeElement;
@@ -204,7 +206,7 @@ describe('ZenRadioRegistry', () => {
204
206
  beforeEach(() => {
205
207
  TestBed.configureTestingModule({
206
208
  imports: [ZenRadio],
207
- providers: [ZenRadioRegistry],
209
+ providers: [ZenRadioRegistry, provideZonelessChangeDetection()],
208
210
  });
209
211
 
210
212
  registry = TestBed.inject(ZenRadioRegistry);
@@ -225,8 +227,8 @@ describe('ZenRadioRegistry', () => {
225
227
  registry.add('test-group', radio2);
226
228
 
227
229
  // Test that radios are added by checking if select works
228
- const spy1 = jest.spyOn(radio1, 'onInput');
229
- const spy2 = jest.spyOn(radio2, 'onInput');
230
+ const spy1 = vi.spyOn(radio1, 'onInput');
231
+ const spy2 = vi.spyOn(radio2, 'onInput');
230
232
 
231
233
  registry.select('test-group', 'option1');
232
234
 
@@ -241,8 +243,8 @@ describe('ZenRadioRegistry', () => {
241
243
  registry.remove('test-group', radio1);
242
244
 
243
245
  // Test that radio1 is removed by checking if select only affects radio2
244
- const spy1 = jest.spyOn(radio1, 'onInput');
245
- const spy2 = jest.spyOn(radio2, 'onInput');
246
+ const spy1 = vi.spyOn(radio1, 'onInput');
247
+ const spy2 = vi.spyOn(radio2, 'onInput');
246
248
 
247
249
  registry.select('test-group', 'option1');
248
250
 
@@ -251,8 +253,8 @@ describe('ZenRadioRegistry', () => {
251
253
  });
252
254
 
253
255
  it('should select value in group', () => {
254
- const spy1 = jest.spyOn(radio1, 'onInput');
255
- const spy2 = jest.spyOn(radio2, 'onInput');
256
+ const spy1 = vi.spyOn(radio1, 'onInput');
257
+ const spy2 = vi.spyOn(radio2, 'onInput');
256
258
 
257
259
  registry.add('test-group', radio1);
258
260
  registry.add('test-group', radio2);
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenSkeleton } from './skeleton';
4
6
 
5
7
  describe('ZenSkeleton', () => {
6
- let component: ZenSkeleton;
7
- let fixture: ComponentFixture<ZenSkeleton>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenSkeleton],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenSkeleton);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenSkeleton);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenSwitch } from './switch';
4
6
 
5
7
  describe('ZenSwitch', () => {
6
- let component: ZenSwitch;
7
- let fixture: ComponentFixture<ZenSwitch>;
8
-
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenSwitch],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenSwitch);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenSwitch);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });
@@ -1,22 +1,20 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
1
+ import { provideZonelessChangeDetection } from '@angular/core';
2
+ import { TestBed } from '@angular/core/testing';
3
+ import { beforeEach, describe, expect, it } from 'vitest';
2
4
 
3
5
  import { ZenTextarea } from './textarea';
4
6
 
5
- describe('ZenTextareaComponent', () => {
6
- let component: ZenTextarea;
7
- let fixture: ComponentFixture<ZenTextarea>;
8
-
7
+ describe('ZenTextarea', () => {
9
8
  beforeEach(async () => {
10
9
  await TestBed.configureTestingModule({
11
10
  imports: [ZenTextarea],
11
+ providers: [provideZonelessChangeDetection()],
12
12
  }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ZenTextarea);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
13
  });
18
14
 
19
15
  it('should create', () => {
16
+ const fixture = TestBed.createComponent(ZenTextarea);
17
+ const component = fixture.componentInstance;
20
18
  expect(component).toBeTruthy();
21
19
  });
22
20
  });