Skip to content

Commit cfd04c0

Browse files
committed
chore(deps): update to angular v21 final
1 parent 61e38e4 commit cfd04c0

17 files changed

+571
-933
lines changed

demo/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
"start": "ng serve"
77
},
88
"dependencies": {
9-
"@angular/cdk": "21.0.0-rc.1",
10-
"@angular/common": "21.0.0-rc.2",
11-
"@angular/compiler": "21.0.0-rc.2",
12-
"@angular/core": "21.0.0-rc.2",
13-
"@angular/forms": "21.0.0-rc.2",
14-
"@angular/material": "21.0.0-rc.1",
15-
"@angular/platform-browser": "21.0.0-rc.2",
16-
"@angular/router": "21.0.0-rc.2",
9+
"@angular/cdk": "^21.0.1",
10+
"@angular/common": "^21.0.1",
11+
"@angular/compiler": "^21.0.1",
12+
"@angular/core": "^21.0.1",
13+
"@angular/forms": "^21.0.1",
14+
"@angular/material": "^21.0.0",
15+
"@angular/platform-browser": "^21.0.1",
16+
"@angular/router": "^21.0.1",
1717
"angular-ecmascript-intl": "../dist/angular-ecmascript-intl",
1818
"marked": "^17.0.0",
1919
"ngx-markdown": "^20.0.0",
2020
"prismjs": "^1.30.0",
2121
"tslib": "^2.8.1"
2222
},
2323
"devDependencies": {
24-
"@angular/build": "21.0.0-rc.2",
25-
"@angular/cli": "21.0.0-rc.2",
26-
"@angular/compiler-cli": "21.0.0-rc.2",
24+
"@angular/build": "^21.0.1",
25+
"@angular/cli": "^21.0.1",
26+
"@angular/compiler-cli": "^21.0.1",
2727
"typescript": "~5.9.0"
2828
}
2929
}

demo/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"importHelpers": true,
1919
"target": "ES2022",
2020
"module": "ES2022",
21-
"useDefineForClassFields": false,
22-
"lib": ["ES2022", "dom"]
21+
"useDefineForClassFields": false
2322
},
2423
"angularCompilerOptions": {
2524
"enableI18nLegacyMessageIdFormat": false,

libs/angular-ecmascript-intl/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
"test": "ng test"
2929
},
3030
"devDependencies": {
31-
"@angular/build": "21.0.0-rc.3",
32-
"@angular/cli": "21.0.0-rc.3",
33-
"@angular/common": "21.0.0-rc.2",
34-
"@angular/core": "21.0.0-rc.2",
35-
"@angular/platform-browser": "21.0.0-rc.2",
31+
"@angular/build": "^21.0.1",
32+
"@angular/cli": "^21.0.1",
33+
"@angular/common": "^21.0.1",
34+
"@angular/core": "^21.0.1",
35+
"@angular/platform-browser": "^21.0.1",
3636
"@vitest/browser-playwright": "^4.0.0",
3737
"@vitest/coverage-v8": "^4.0.0",
3838
"cpy-cli": "^6.0.0",
3939
"dayjs": "^1.11.13",
40-
"ng-packagr": "21.0.0-rc.1",
40+
"ng-packagr": "^21.0.0",
4141
"playwright": "^1.56.1",
4242
"vitest": "^4.0.0"
4343
},

libs/angular-ecmascript-intl/src/lib/country/intl-country.pipe.spec.ts

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { IntlCountryPipe } from './intl-country.pipe';
77
describe('IntlCountryPipe', () => {
88
let testUnit: IntlCountryPipe;
99

10+
beforeEach(() => TestBed.resetTestingModule());
11+
1012
describe('parsing', () => {
1113
beforeEach(() => {
1214
TestBed.runInInjectionContext(() => {
@@ -54,14 +56,7 @@ describe('IntlCountryPipe', () => {
5456

5557
describe('internationalization', () => {
5658
it('should respect the set locale', () => {
57-
TestBed.configureTestingModule({
58-
providers: [
59-
{
60-
provide: INTL_LOCALES,
61-
useValue: 'de-DE',
62-
},
63-
],
64-
});
59+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'de-DE' });
6560
TestBed.runInInjectionContext(() => (testUnit = new IntlCountryPipe()));
6661

6762
expect(testUnit.transform('AT')).toEqual('Österreich');
@@ -70,19 +65,9 @@ describe('IntlCountryPipe', () => {
7065

7166
describe('options', () => {
7267
it('should not override the type option', () => {
73-
TestBed.configureTestingModule({
74-
providers: [
75-
{
76-
provide: INTL_LOCALES,
77-
useValue: 'de-DE',
78-
},
79-
{
80-
provide: INTL_COUNTRY_PIPE_DEFAULT_OPTIONS,
81-
useValue: {
82-
type: 'language',
83-
},
84-
},
85-
],
68+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'de-DE' });
69+
TestBed.overrideProvider(INTL_COUNTRY_PIPE_DEFAULT_OPTIONS, {
70+
useValue: { type: 'language' },
8671
});
8772
TestBed.runInInjectionContext(() => (testUnit = new IntlCountryPipe()));
8873

@@ -93,14 +78,7 @@ describe('IntlCountryPipe', () => {
9378
});
9479

9580
it('should respect locale option', () => {
96-
TestBed.configureTestingModule({
97-
providers: [
98-
{
99-
provide: INTL_LOCALES,
100-
useValue: 'en-US',
101-
},
102-
],
103-
});
81+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
10482
TestBed.runInInjectionContext(() => (testUnit = new IntlCountryPipe()));
10583

10684
expect(testUnit.transform('US', { locale: 'de-DE' })).toEqual(

libs/angular-ecmascript-intl/src/lib/currency/intl-currency.pipe.spec.ts

Lines changed: 19 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { IntlCurrencyPipe } from './intl-currency.pipe';
77
describe('IntlCurrencyPipe', () => {
88
let testUnit: IntlCurrencyPipe;
99

10+
beforeEach(() => TestBed.resetTestingModule());
11+
1012
describe('parsing', () => {
1113
beforeEach(() => {
1214
TestBed.runInInjectionContext(() => {
@@ -58,14 +60,7 @@ describe('IntlCurrencyPipe', () => {
5860

5961
describe('internationalization', () => {
6062
it('should respect the set locale', () => {
61-
TestBed.configureTestingModule({
62-
providers: [
63-
{
64-
provide: INTL_LOCALES,
65-
useValue: 'de-DE',
66-
},
67-
],
68-
});
63+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'de-DE' });
6964
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
7065

7166
expect(testUnit.transform(1024.2249, 'EUR')).toEqual('1.024,22\xa0€');
@@ -74,39 +69,23 @@ describe('IntlCurrencyPipe', () => {
7469

7570
describe('options', () => {
7671
it('should respect the setting from default config', () => {
77-
TestBed.configureTestingModule({
78-
providers: [
79-
{
80-
provide: INTL_LOCALES,
81-
useValue: 'en-US',
82-
},
83-
{
84-
provide: INTL_CURRENCY_PIPE_DEFAULT_OPTIONS,
85-
useValue: {
86-
signDisplay: 'always',
87-
},
88-
},
89-
],
72+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
73+
TestBed.overrideProvider(INTL_CURRENCY_PIPE_DEFAULT_OPTIONS, {
74+
useValue: {
75+
signDisplay: 'always',
76+
},
9077
});
9178
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
9279

9380
expect(testUnit.transform(1, 'USD')).toEqual('+$1.00');
9481
});
9582

9683
it('should give the user options a higher priority', () => {
97-
TestBed.configureTestingModule({
98-
providers: [
99-
{
100-
provide: INTL_LOCALES,
101-
useValue: 'en-US',
102-
},
103-
{
104-
provide: INTL_CURRENCY_PIPE_DEFAULT_OPTIONS,
105-
useValue: {
106-
signDisplay: 'exceptZero',
107-
},
108-
},
109-
],
84+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
85+
TestBed.overrideProvider(INTL_CURRENCY_PIPE_DEFAULT_OPTIONS, {
86+
useValue: {
87+
signDisplay: 'exceptZero',
88+
},
11089
});
11190
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
11291

@@ -117,14 +96,7 @@ describe('IntlCurrencyPipe', () => {
11796
});
11897

11998
it('should respect locale option', () => {
120-
TestBed.configureTestingModule({
121-
providers: [
122-
{
123-
provide: INTL_LOCALES,
124-
useValue: 'en-US',
125-
},
126-
],
127-
});
99+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
128100
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
129101

130102
expect(testUnit.transform(1024, 'USD', { locale: 'de-DE' })).toEqual(
@@ -133,19 +105,11 @@ describe('IntlCurrencyPipe', () => {
133105
});
134106

135107
it('should not override the style option', () => {
136-
TestBed.configureTestingModule({
137-
providers: [
138-
{
139-
provide: INTL_LOCALES,
140-
useValue: 'en-US',
141-
},
142-
{
143-
provide: INTL_CURRENCY_PIPE_DEFAULT_OPTIONS,
144-
useValue: {
145-
style: 'percent',
146-
},
147-
},
148-
],
108+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
109+
TestBed.overrideProvider(INTL_CURRENCY_PIPE_DEFAULT_OPTIONS, {
110+
useValue: {
111+
style: 'percent',
112+
},
149113
});
150114
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
151115

libs/angular-ecmascript-intl/src/lib/date/intl-date.pipe.spec.ts

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { IntlDatePipe } from './intl-date.pipe';
77
describe('DatePipe', () => {
88
let testUnit: IntlDatePipe;
99

10+
beforeEach(() => TestBed.resetTestingModule());
11+
1012
describe('date parsing', () => {
1113
beforeEach(() => {
1214
TestBed.runInInjectionContext(() => {
@@ -74,14 +76,7 @@ describe('DatePipe', () => {
7476

7577
describe('internationalization', () => {
7678
it('should respect the set locale', () => {
77-
TestBed.configureTestingModule({
78-
providers: [
79-
{
80-
provide: INTL_LOCALES,
81-
useValue: 'de-DE',
82-
},
83-
],
84-
});
79+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'de-DE' });
8580
TestBed.runInInjectionContext(() => (testUnit = new IntlDatePipe()));
8681

8782
expect(testUnit.transform('2023-02-19')).toEqual('19.2.2023');
@@ -90,39 +85,23 @@ describe('DatePipe', () => {
9085

9186
describe('options', () => {
9287
it('should respect the setting from default config', () => {
93-
TestBed.configureTestingModule({
94-
providers: [
95-
{
96-
provide: INTL_LOCALES,
97-
useValue: 'en-US',
98-
},
99-
{
100-
provide: INTL_DATE_PIPE_DEFAULT_OPTIONS,
101-
useValue: {
102-
dateStyle: 'medium',
103-
},
104-
},
105-
],
88+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
89+
TestBed.overrideProvider(INTL_DATE_PIPE_DEFAULT_OPTIONS, {
90+
useValue: {
91+
dateStyle: 'medium',
92+
},
10693
});
10794
TestBed.runInInjectionContext(() => (testUnit = new IntlDatePipe()));
10895

10996
expect(testUnit.transform('2023-02-19')).toEqual('Feb 19, 2023');
11097
});
11198

11299
it('should give the user options a higher priority', () => {
113-
TestBed.configureTestingModule({
114-
providers: [
115-
{
116-
provide: INTL_LOCALES,
117-
useValue: 'en-US',
118-
},
119-
{
120-
provide: INTL_DATE_PIPE_DEFAULT_OPTIONS,
121-
useValue: {
122-
dateStyle: 'full',
123-
},
124-
},
125-
],
100+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
101+
TestBed.overrideProvider(INTL_DATE_PIPE_DEFAULT_OPTIONS, {
102+
useValue: {
103+
dateStyle: 'full',
104+
},
126105
});
127106
TestBed.runInInjectionContext(() => (testUnit = new IntlDatePipe()));
128107

@@ -133,14 +112,8 @@ describe('DatePipe', () => {
133112
});
134113

135114
it('should respect locale option', () => {
136-
TestBed.configureTestingModule({
137-
providers: [
138-
{
139-
provide: INTL_LOCALES,
140-
useValue: 'en-US',
141-
},
142-
],
143-
});
115+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
116+
144117
TestBed.runInInjectionContext(() => (testUnit = new IntlDatePipe()));
145118

146119
expect(testUnit.transform('2023-02-19', { locale: 'de-DE' })).toEqual(

0 commit comments

Comments
 (0)