Skip to content

Commit 2f3b4f9

Browse files
author
igor.nepipenko
committed
fix(ref:no-ref): clean up deps
1 parent 683006a commit 2f3b4f9

File tree

9 files changed

+164
-1140
lines changed

9 files changed

+164
-1140
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 21.0.1(2026-01-29)
2+
3+
### fix
4+
5+
- Fix ([#1590](https://github.com/JsDaddy/ngx-mask/issues/1590))
6+
- Fix ([#1591](https://github.com/JsDaddy/ngx-mask/issues/1591))
7+
18
# 21.0.0(2026-01-28)
29

310
### fix

bun.lock

Lines changed: 94 additions & 1074 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-mask",
3-
"version": "21.0.0",
3+
"version": "21.0.1",
44
"description": "Awesome ngx mask",
55
"license": "MIT",
66
"engines": {
@@ -60,25 +60,15 @@
6060
"url": "https://github.com/JsDaddy/ngx-mask.git"
6161
},
6262
"dependencies": {
63-
"@angular/animations": "21.1.1",
64-
"@angular/common": "21.1.1",
65-
"@angular/compiler": "21.1.1",
66-
"@angular/core": "21.1.1",
67-
"@angular/forms": "21.1.1",
68-
"@angular/platform-browser": "21.1.1",
69-
"@angular/platform-browser-dynamic": "21.1.1",
70-
"@angular/router": "21.1.1",
71-
"@types/jest": "30.0.0",
72-
"@types/mocha": "10.0.10",
73-
"cypress": "15.9.0",
63+
"@angular/animations": "21.1.2",
64+
"@angular/common": "21.1.2",
65+
"@angular/compiler": "21.1.2",
66+
"@angular/core": "21.1.2",
67+
"@angular/forms": "21.1.2",
68+
"@angular/platform-browser": "21.1.2",
69+
"@angular/router": "21.1.2",
7470
"highlight.js": "11.11.1",
75-
"ngx-highlightjs": "14.0.1",
76-
"ngxtension": "7.0.2",
77-
"rxjs": "7.8.2",
78-
"semantic-release": "25.0.2",
79-
"semantic-release-export-data": "1.2.0",
80-
"snyk": "1.1302.1",
81-
"@tailwindcss/postcss": "4.1.18"
71+
"ngx-highlightjs": "14.0.1"
8272
},
8373
"devDependencies": {
8474
"@angular-devkit/build-angular": "21.1.2",
@@ -88,33 +78,38 @@
8878
"@angular-eslint/schematics": "21.1.0",
8979
"@angular-eslint/template-parser": "21.1.0",
9080
"@angular/cli": "21.1.2",
91-
"@angular/compiler-cli": "21.1.1",
92-
"@angular/language-service": "21.1.1",
81+
"@angular/compiler-cli": "21.1.2",
82+
"@angular/language-service": "21.1.2",
83+
"@angular/platform-browser-dynamic": "21.1.2",
9384
"@commitlint/cli": "20.3.1",
9485
"@commitlint/config-conventional": "20.3.1",
95-
"@jscutlery/cypress-angular": "0.9.22",
86+
"@tailwindcss/postcss": "4.1.18",
9687
"@types/highlight.js": "10.1.0",
97-
"@types/node": "25.0.10",
88+
"@types/jest": "30.0.0",
89+
"@types/node": "25.1.0",
9890
"@typescript-eslint/eslint-plugin": "8.54.0",
9991
"@typescript-eslint/parser": "8.54.0",
100-
"@vitest/browser-playwright": "^4.0.18",
92+
"@vitest/browser-playwright": "4.0.18",
10193
"@web/test-runner": "0.20.2",
10294
"angular-cli-ghpages": "3.0.2",
10395
"angular-eslint": "21.1.0",
10496
"angular-http-server": "1.12.0",
10597
"bun-types": "1.3.7",
98+
"cypress": "15.9.0",
10699
"eslint": "9.39.2",
107100
"eslint-config-prettier": "10.1.8",
108101
"eslint-plugin-json": "4.0.1",
109102
"eslint-plugin-prettier": "5.5.5",
110-
"jsdom": "^27.4.0",
103+
"jsdom": "27.4.0",
111104
"lint-staged": "16.2.7",
112105
"markdownlint-cli": "0.47.0",
113106
"ng-packagr": "21.1.0",
114107
"npm-check-updates": "19.3.2",
115108
"postcss": "8.5.6",
116109
"prettier": "3.8.1",
117-
"puppeteer": "24.36.1",
110+
"semantic-release": "25.0.2",
111+
"semantic-release-export-data": "1.2.0",
112+
"snyk": "1.1302.1",
118113
"stylelint": "17.0.0",
119114
"stylelint-config-prettier": "9.0.5",
120115
"stylelint-config-recommended-scss": "17.0.0",
@@ -123,7 +118,7 @@
123118
"type-coverage": "2.29.7",
124119
"typescript": "5.9.3",
125120
"typescript-eslint": "8.54.0",
126-
"vitest": "^4.0.18"
121+
"vitest": "4.0.18"
127122
},
128123
"typeCoverage": {
129124
"atLeast": 91,

projects/ngx-mask-lib/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-mask",
3-
"version": "21.0.0",
3+
"version": "21.0.1",
44
"description": "awesome ngx mask",
55
"keywords": [
66
"ng2-mask",
@@ -28,9 +28,9 @@
2828
"url": "https://github.com/JsDaddy/ngx-mask/issues"
2929
},
3030
"peerDependencies": {
31-
"@angular/common": ">=14.0.0",
32-
"@angular/core": ">=14.0.0",
33-
"@angular/forms": ">=14.0.0"
31+
"@angular/common": "^21.0.0",
32+
"@angular/core": "^21.0.0",
33+
"@angular/forms": "^21.0.0"
3434
},
3535
"dependencies": {}
3636
}

projects/ngx-mask-lib/src/test/emit-events.cy-spec.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ describe('Directive: Mask (emit-events)', () => {
1010
});
1111

1212
cy.get('#masked').type('1dd').type('dd');
13-
cy.get('#pre').should('have.text', '2');
13+
cy.get('#pre').should('have.text', '1');
1414

1515
cy.get('#masked').type('121212').type('dd');
16-
cy.get('#pre').should('have.text', '7');
16+
cy.get('#pre').should('have.text', '6');
1717
});
1818

1919
it('should emit event only when mask is correct with hiddenINput', () => {
@@ -25,10 +25,10 @@ describe('Directive: Mask (emit-events)', () => {
2525
});
2626

2727
cy.get('#masked').type('1dd').type('dd');
28-
cy.get('#pre').should('have.text', '2');
28+
cy.get('#pre').should('have.text', '1');
2929

3030
cy.get('#masked').type('121212').type('dd');
31-
cy.get('#pre').should('have.text', '7');
31+
cy.get('#pre').should('have.text', '6');
3232
});
3333

3434
it('should add trailing zero when mask="separator.1" and leadZero="true"', () => {
@@ -63,7 +63,7 @@ describe('Directive: Mask (emit-events)', () => {
6363
});
6464

6565
cy.get('#masked').type('10').blur().should('have.value', '10.00 $');
66-
cy.get('#pre').should('have.text', '3');
66+
cy.get('#pre').should('have.text', '2');
6767
});
6868

6969
it('should emit event only when mask is correct with suffix separator.3', () => {
@@ -76,7 +76,7 @@ describe('Directive: Mask (emit-events)', () => {
7676
});
7777

7878
cy.get('#masked').type('10.0').blur().should('have.value', '10.000 $');
79-
cy.get('#pre').should('have.text', '5');
79+
cy.get('#pre').should('have.text', '4');
8080
});
8181

8282
it('should emit event only when mask is correct with separator2', () => {
@@ -88,7 +88,7 @@ describe('Directive: Mask (emit-events)', () => {
8888
});
8989

9090
cy.get('#masked').type('10').blur().should('have.value', '10.00');
91-
cy.get('#pre').should('have.text', '3');
91+
cy.get('#pre').should('have.text', '2');
9292
});
9393

9494
it('should emit event only when mask is correct with separator.3', () => {
@@ -100,7 +100,7 @@ describe('Directive: Mask (emit-events)', () => {
100100
});
101101

102102
cy.get('#masked').type('10').blur().should('have.value', '10.000');
103-
cy.get('#pre').should('have.text', '3');
103+
cy.get('#pre').should('have.text', '2');
104104
});
105105

106106
it('should emit event only when mask is correct with SS000', () => {
@@ -111,7 +111,7 @@ describe('Directive: Mask (emit-events)', () => {
111111
});
112112

113113
cy.get('#masked').type('SS11111DDDD11').blur().should('have.value', 'SS111');
114-
cy.get('#pre').should('have.text', '6');
114+
cy.get('#pre').should('have.text', '5');
115115
});
116116

117117
it("inputTransformFn should not break if it's null", () => {
@@ -123,7 +123,7 @@ describe('Directive: Mask (emit-events)', () => {
123123
});
124124

125125
cy.get('#masked').type('123456789').blur().should('have.value', '12345-6789');
126-
cy.get('#pre').should('have.text', '10');
126+
cy.get('#pre').should('have.text', '9');
127127
});
128128

129129
it('inputTransformFn should not change input form status', () => {
@@ -163,6 +163,6 @@ describe('Directive: Mask (emit-events)', () => {
163163
});
164164

165165
cy.get('#pristine').should('have.text', 'true');
166-
cy.get('#pre').should('have.text', '2');
166+
cy.get('#pre').should('have.text', '1');
167167
});
168168
});

projects/ngx-mask-lib/src/test/utils/cypress-test-component.component.ts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { Component, inject, input } from '@angular/core';
1+
import type { OnDestroy, OnInit } from '@angular/core';
2+
import { Component, inject, input, signal } from '@angular/core';
23
import { FormControl, ReactiveFormsModule } from '@angular/forms';
3-
import { scan, startWith } from 'rxjs';
44
import type { NgxMaskConfig } from 'ngx-mask';
55
import { provideNgxMask } from 'ngx-mask';
66
import { NgxMaskDirective } from 'ngx-mask';
77
import { NGX_MASK_CONFIG } from 'ngx-mask';
8-
import { toSignal } from '@angular/core/rxjs-interop';
98

109
@Component({
1110
selector: 'jsdaddy-open-source-test',
@@ -36,15 +35,15 @@ import { toSignal } from '@angular/core/rxjs-interop';
3635
[inputTransformFn]="inputTransformFn()"
3736
[outputTransformFn]="outputTransformFn()" />
3837
39-
<pre id="pre">{{ counter$() }}</pre>
38+
<pre id="pre">{{ counter() }}</pre>
4039
<pre id="pre1">{{ form.value }}</pre>
4140
<pre id="pristine">{{ form.pristine }}</pre>
4241
<div>
4342
{{ leadZeroDateTime() }}
4443
</div>
4544
`,
4645
})
47-
export class CypressTestMaskComponent {
46+
export class CypressTestMaskComponent implements OnInit, OnDestroy {
4847
protected _config = inject<NgxMaskConfig>(NGX_MASK_CONFIG);
4948
public mask = input('');
5049

@@ -103,11 +102,17 @@ export class CypressTestMaskComponent {
103102

104103
public form: FormControl = new FormControl('');
105104

106-
public readonly counter$ = toSignal(
107-
this.form.valueChanges.pipe(
108-
startWith(0),
105+
public readonly counter = signal(0);
109106

110-
scan((acc) => acc + 1, 0)
111-
)
112-
);
107+
private subscription: { unsubscribe: () => void } | null = null;
108+
109+
public ngOnInit(): void {
110+
this.subscription = this.form.valueChanges.subscribe(() => {
111+
this.counter.update((c) => c + 1);
112+
});
113+
}
114+
115+
public ngOnDestroy(): void {
116+
this.subscription?.unsubscribe();
117+
}
113118
}

projects/ngx-mask-lib/src/test/utils/cypress-test-trigger-on-mask-change.component.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { OnDestroy, OnInit } from '@angular/core';
2-
import { Component } from '@angular/core';
2+
import { Component, signal } from '@angular/core';
33
import { FormControl, ReactiveFormsModule } from '@angular/forms';
4-
import { Subject, takeUntil } from 'rxjs';
54
import { NgxMaskDirective } from 'ngx-mask';
65

76
@Component({
@@ -22,35 +21,34 @@ import { NgxMaskDirective } from 'ngx-mask';
2221
<input
2322
id="masked"
2423
[formControl]="form"
25-
[mask]="mask"
24+
[mask]="mask()"
2625
[hiddenInput]="false"
2726
[triggerOnMaskChange]="true"
2827
prefix="" />
2928
</div>
3029
<div>
31-
<span>Mask:&nbsp;</span><code class="mask">{{ mask }}</code>
30+
<span>Mask:&nbsp;</span><code class="mask">{{ mask() }}</code>
3231
<br />
3332
<span>Form Value:&nbsp;</span><code class="formvalue">{{ form.value }}</code>
3433
</div>
3534
`,
3635
})
3736
export class CypressTestTriggerOnMaskChangeComponent implements OnInit, OnDestroy {
38-
public mask = '';
37+
public mask = signal('');
3938

4039
public form: FormControl = new FormControl('');
4140

4241
public radio: FormControl = new FormControl('de');
4342

44-
private destroyed = new Subject<void>();
43+
private subscription: { unsubscribe: () => void } | null = null;
4544

4645
public ngOnInit(): void {
47-
this.radio.valueChanges.pipe(takeUntil(this.destroyed)).subscribe((value) => {
48-
this.mask = value === 'de' ? '' : '00 000 00 00';
46+
this.subscription = this.radio.valueChanges.subscribe((value) => {
47+
this.mask.set(value === 'de' ? '' : '00 000 00 00');
4948
});
5049
}
5150

5251
public ngOnDestroy(): void {
53-
this.destroyed.next();
54-
this.destroyed.complete();
52+
this.subscription?.unsubscribe();
5553
}
5654
}

src/app/options/options.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { CardContentComponent } from '../shared/card-content/card-content.compon
2121
import { ScrollService } from '@open-source/scroll/scroll.service';
2222
import { AccordionService } from '@open-source/accordion/accordion.service';
2323
import { OpenSourcePath } from '@open-source/path/open-source.path';
24-
import { toSignal } from '@angular/core/rxjs-interop';
2524
import type {
2625
ComDoc,
2726
MaskOptions,
@@ -71,7 +70,7 @@ export class OptionsComponent {
7170
private readonly accordionService = inject(AccordionService);
7271
private readonly injector = inject(Injector);
7372

74-
public readonly activeCardId = toSignal(this.scrollService.activeCard$);
73+
public readonly activeCardId = this.scrollService.activeCard;
7574

7675
public constructor() {
7776
effect(() => {

0 commit comments

Comments
 (0)