Skip to content

Commit e8c1fea

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

17 files changed

+551
-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: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,7 @@ describe('IntlCountryPipe', () => {
5454

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

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

7164
describe('options', () => {
7265
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-
],
66+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'de-DE' });
67+
TestBed.overrideProvider(INTL_COUNTRY_PIPE_DEFAULT_OPTIONS, {
68+
useValue: { type: 'language' },
8669
});
8770
TestBed.runInInjectionContext(() => (testUnit = new IntlCountryPipe()));
8871

@@ -93,14 +76,7 @@ describe('IntlCountryPipe', () => {
9376
});
9477

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

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

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

Lines changed: 17 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,7 @@ describe('IntlCurrencyPipe', () => {
5858

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

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

7568
describe('options', () => {
7669
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-
],
70+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
71+
TestBed.overrideProvider(INTL_CURRENCY_PIPE_DEFAULT_OPTIONS, {
72+
useValue: {
73+
signDisplay: 'always',
74+
},
9075
});
9176
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
9277

9378
expect(testUnit.transform(1, 'USD')).toEqual('+$1.00');
9479
});
9580

9681
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-
],
82+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
83+
TestBed.overrideProvider(INTL_CURRENCY_PIPE_DEFAULT_OPTIONS, {
84+
useValue: {
85+
signDisplay: 'exceptZero',
86+
},
11087
});
11188
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
11289

@@ -117,14 +94,7 @@ describe('IntlCurrencyPipe', () => {
11794
});
11895

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

130100
expect(testUnit.transform(1024, 'USD', { locale: 'de-DE' })).toEqual(
@@ -133,19 +103,11 @@ describe('IntlCurrencyPipe', () => {
133103
});
134104

135105
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-
],
106+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
107+
TestBed.overrideProvider(INTL_CURRENCY_PIPE_DEFAULT_OPTIONS, {
108+
useValue: {
109+
style: 'percent',
110+
},
149111
});
150112
TestBed.runInInjectionContext(() => (testUnit = new IntlCurrencyPipe()));
151113

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

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,7 @@ describe('DatePipe', () => {
7474

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

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

9184
describe('options', () => {
9285
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-
],
86+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
87+
TestBed.overrideProvider(INTL_DATE_PIPE_DEFAULT_OPTIONS, {
88+
useValue: {
89+
dateStyle: 'medium',
90+
},
10691
});
10792
TestBed.runInInjectionContext(() => (testUnit = new IntlDatePipe()));
10893

10994
expect(testUnit.transform('2023-02-19')).toEqual('Feb 19, 2023');
11095
});
11196

11297
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-
],
98+
TestBed.overrideProvider(INTL_LOCALES, { useValue: 'en-US' });
99+
TestBed.overrideProvider(INTL_DATE_PIPE_DEFAULT_OPTIONS, {
100+
useValue: {
101+
dateStyle: 'full',
102+
},
126103
});
127104
TestBed.runInInjectionContext(() => (testUnit = new IntlDatePipe()));
128105

@@ -133,14 +110,8 @@ describe('DatePipe', () => {
133110
});
134111

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

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

0 commit comments

Comments
 (0)