Skip to content

Commit f1b15f4

Browse files
committed
feat(deps): angular 19 upgrade
BREAKING CHANGE: Requires `@angular/core@>=19.0.0`.
1 parent bd951a6 commit f1b15f4

Some content is hidden

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

51 files changed

+3688
-3283
lines changed

.editorconfig

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/setup-node@v4
1111
with:
1212
cache: 'npm'
13-
node-version: '20'
13+
node-version: '22'
1414
- run: npm ci
1515
- run: npm run prettier:check
1616
lint:
@@ -21,6 +21,6 @@ jobs:
2121
- uses: actions/setup-node@v4
2222
with:
2323
cache: 'npm'
24-
node-version: '20'
24+
node-version: '22'
2525
- run: npm ci
2626
- run: npm run lint

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/setup-node@v4
1212
with:
1313
cache: 'npm'
14-
node-version: '20'
14+
node-version: '22'
1515
registry-url: 'https://registry.npmjs.org'
1616
- run: npm ci
1717
- run: npm run build:lib

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/setup-node@v4
1616
with:
1717
cache: 'npm'
18-
node-version: '20'
18+
node-version: '22'
1919
- run: npm ci
2020
- run: npm run build:lib
2121
- env:

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
node-version: ['18', '20', '22']
14+
node-version: ['18', '20', '22', '23']
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no-install commitlint --edit .git/COMMIT_EDITMSG
1+
commitlint --edit .git/COMMIT_EDITMSG

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no-install lint-staged
1+
lint-staged

.lintstagedrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"{,e2e/**/,projects/**/,src/**/}*.{js,ts,tsx,css}": [
3-
"eslint --fix",
4-
"prettier --write -u"
5-
],
2+
"{,e2e/**/,projects/**/,src/**/}*.{js,ts,tsx,css}": ["prettier --write -u"],
63
"{,e2e/**/,projects/**/,src/**/}*.{md,json,html,css,scss}": [
74
"prettier --write -u"
85
]

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,24 @@ imports: [
5858
<form [formGroup]="group">
5959
<mat-form-field>
6060
<mat-placeholder>Start DateTime</mat-placeholder>
61-
<mat-datetimepicker-toggle [for]="datetimePicker" matSuffix></mat-datetimepicker-toggle>
62-
<mat-datetimepicker #datetimePicker type="datetime" openOnFocus="true" timeInterval="5"> </mat-datetimepicker>
63-
<input matInput formControlName="start" [matDatetimepicker]="datetimePicker" required autocomplete="false" />
61+
<mat-datetimepicker-toggle
62+
[for]="datetimePicker"
63+
matSuffix
64+
></mat-datetimepicker-toggle>
65+
<mat-datetimepicker
66+
#datetimePicker
67+
type="datetime"
68+
openOnFocus="true"
69+
timeInterval="5"
70+
>
71+
</mat-datetimepicker>
72+
<input
73+
matInput
74+
formControlName="start"
75+
[matDatetimepicker]="datetimePicker"
76+
required
77+
autocomplete="false"
78+
/>
6479
</mat-form-field>
6580
</form>
6681
```
@@ -178,10 +193,10 @@ providers: [
178193
## Theming
179194

180195
```scss
181-
@import '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';
196+
@use '@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';
182197

183198
// Using the $theme variable from the pre-built theme you can call the theming function
184-
@include mat-datetimepicker-theme($theme);
199+
@include datetimepicker-theme.mat-datetimepicker-theme($theme);
185200
```
186201

187202
@see [src/styles.scss](src/styles.scss)

angular.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"root": "projects/core",
104104
"sourceRoot": "projects/core/src",
105105
"projectType": "library",
106-
"prefix": "lib",
106+
"prefix": "mat-datetimepicker",
107107
"architect": {
108108
"build": {
109109
"builder": "@angular-devkit/build-angular:ng-packagr",
@@ -131,7 +131,8 @@
131131
"lintFilePatterns": [
132132
"projects/core/**/*.ts",
133133
"projects/core/**/*.html"
134-
]
134+
],
135+
"eslintConfig": "projects/core/eslint.config.js"
135136
}
136137
}
137138
}
@@ -140,7 +141,7 @@
140141
"root": "projects/moment",
141142
"sourceRoot": "projects/moment/src",
142143
"projectType": "library",
143-
"prefix": "lib",
144+
"prefix": "mat-datetimepicker-moment",
144145
"architect": {
145146
"build": {
146147
"builder": "@angular-devkit/build-angular:ng-packagr",
@@ -168,7 +169,8 @@
168169
"lintFilePatterns": [
169170
"projects/moment/**/*.ts",
170171
"projects/moment/**/*.html"
171-
]
172+
],
173+
"eslintConfig": "projects/moment/eslint.config.js"
172174
}
173175
}
174176
}

eslint.config.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// @ts-check
2+
const eslint = require('@eslint/js');
3+
const tseslint = require('typescript-eslint');
4+
const angular = require('angular-eslint');
5+
const simpleImportSort = require('eslint-plugin-simple-import-sort');
6+
7+
module.exports = tseslint.config(
8+
{
9+
files: ['**/*.ts'],
10+
extends: [
11+
eslint.configs.recommended,
12+
...tseslint.configs.recommended,
13+
...tseslint.configs.stylistic,
14+
...angular.configs.tsRecommended,
15+
],
16+
plugins: {
17+
'simple-import-sort': simpleImportSort,
18+
},
19+
processor: angular.processInlineTemplates,
20+
rules: {
21+
'@angular-eslint/directive-selector': [
22+
'error',
23+
{
24+
type: 'attribute',
25+
prefix: 'app',
26+
style: 'camelCase',
27+
},
28+
],
29+
'@angular-eslint/component-selector': [
30+
'error',
31+
{
32+
type: 'element',
33+
prefix: 'app',
34+
style: 'kebab-case',
35+
},
36+
],
37+
'@typescript-eslint/no-explicit-any': ['off'],
38+
'simple-import-sort/imports': ['error'],
39+
'simple-import-sort/exports': ['error'],
40+
},
41+
},
42+
{
43+
files: ['**/*.html'],
44+
extends: [
45+
...angular.configs.templateRecommended,
46+
...angular.configs.templateAccessibility,
47+
],
48+
rules: {
49+
'@angular-eslint/template/interactive-supports-focus': ['warn'],
50+
},
51+
}
52+
);

0 commit comments

Comments
 (0)