Skip to content

Commit 0cef19d

Browse files
Merge pull request #518 from ckeditor/i/514
Angular v19 migration
2 parents d153a00 + b514a79 commit 0cef19d

22 files changed

Lines changed: 3569 additions & 3688 deletions

.changelog/20251120181522_i_514.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
# Required: Type of change.
3+
# Allowed values:
4+
# - Feature
5+
# - Fix
6+
# - Other
7+
# - Major breaking change
8+
# - Minor breaking change
9+
#
10+
# For guidance on breaking changes, see:
11+
# https://ckeditor.com/docs/ckeditor5/latest/updating/versioning-policy.html#major-and-minor-breaking-changes
12+
type: Breaking change
13+
14+
# Optional: Affected package(s), using short names.
15+
# Leave empty when used in a single-package repository.
16+
# Example: ckeditor5-core
17+
scope:
18+
-
19+
20+
# Optional: Issues this change closes.
21+
# Format:
22+
# - {issue-number}
23+
# - {repo-owner}/{repo-name}#{issue-number}
24+
# - Full GitHub URL
25+
closes:
26+
- 514
27+
28+
# Optional: Related issues.
29+
# Format:
30+
# - {issue-number}
31+
# - {repo-owner}/{repo-name}#{issue-number}
32+
# - Full GitHub URL
33+
see:
34+
-
35+
36+
# Optional: Community contributors.
37+
# Format:
38+
# - {github-username}
39+
communityCredits:
40+
-
41+
42+
# Before committing, consider removing all comments to reduce file size and enhance readability.
43+
---
44+
45+
Changed minimum supported version of Angular to `>=19.x`.

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Because of the breaking changes in the Angular library output format, the `@cked
2525
<table>
2626
<thead>
2727
<tr>
28-
<th>Package&nbsp;version</th>
28+
<th>CKEditor&nbsp;5&nbsp; Angular component version</th>
2929
<th>Angular&nbsp;version</th>
3030
<th>Details</th>
3131
</tr>
@@ -34,48 +34,55 @@ Because of the breaking changes in the Angular library output format, the `@cked
3434
<tr>
3535
<td colspan="3">Actively supported versions</td>
3636
</tr>
37+
<tr>
38+
<td><code>^11</code></td>
39+
<td><code>19+</code></td>
40+
<td>Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v47.0.0">47</a> or higher.</td>
41+
</tr>
42+
<tr>
43+
<tr>
44+
<td colspan="3">Past releases (no longer maintained)</td>
45+
</tr>
46+
</tr>
3747
<tr>
3848
<td><code>^10</code></td>
3949
<td><code>16+</code></td>
4050
<td>Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v46.0.0">46</a> or higher.</td>
4151
</tr>
4252
<tr>
43-
<td colspan="3">Past releases (no longer maintained)</td>
44-
</tr>
45-
<tr>
4653
<td><code>^9</code></td>
4754
<td><code>16+</code></td>
4855
<td>Migration to TypeScript&nbsp;5. Declaration files are not backward compatible. Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v43.0.0">43</a> or higher.</td>
4956
</tr>
5057
<tr>
5158
<td><code>^8</code></td>
5259
<td><code>13+</code></td>
53-
<td>Requires CKEditor&nbsp;5 at least in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v42.0.0">42</a>.</td>
60+
<td>Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v42.0.0">42</a> or higher.</td>
5461
</tr>
5562
<tr>
5663
<td><code>^7</code></td>
5764
<td><code>13+</code></td>
58-
<td>Changes in peer dependencies. (<a href="https://github.com/ckeditor/ckeditor5-angular/issues/376">issue</a>)</td>
65+
<td>Changes in peer dependencies (<a href="https://github.com/ckeditor/ckeditor5-angular/issues/376">issue</a>). Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v37.0.0">37</a> or higher.</td>
5966
</tr>
6067
<tr>
6168
<td><code>^6</code></td>
6269
<td><code>13+</code></td>
63-
<td>Requires CKEditor&nbsp;5 at least in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v37.0.0">37</a>.</td>
70+
<td>Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v37.0.0">37</a> or higher.</td>
6471
</tr>
6572
<tr>
6673
<td><code>^5</code></td>
6774
<td><code>13+</code></td>
68-
<td>Requires Angular at least in version 13+. Lower versions are no longer maintained.</td>
75+
<td>Requires Angular in version 13+ or higher.</td>
6976
</tr>
7077
<tr>
7178
<td><code>^4</code></td>
7279
<td><code>9.1+</code></td>
73-
<td>Requires CKEditor&nbsp;5 at least in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v34.0.0">34</a>.</td>
80+
<td>Requires CKEditor&nbsp;5 in version <a href="https://github.com/ckeditor/ckeditor5/releases/tag/v34.0.0">34</a> or higher.</td>
7481
</tr>
7582
<tr>
7683
<td><code>^3</code></td>
7784
<td><code>9.1+</code></td>
78-
<td>Requires Node.js at least in version 14.</td>
85+
<td>Requires Node.js in version 14 or higher.</td>
7986
</tr>
8087
<tr>
8188
<td><code>^2</code></td>
@@ -85,7 +92,7 @@ Because of the breaking changes in the Angular library output format, the `@cked
8592
<tr>
8693
<td><code>^1</code></td>
8794
<td><code>5.x&nbsp;-&nbsp;8.x</code></td>
88-
<td>Angular versions are no longer maintained.</td>
95+
<td>Angular versions no longer maintained.</td>
8996
</tr>
9097
</tbody>
9198
</table>

angular.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@
1414
"schematics": {},
1515
"architect": {
1616
"build": {
17-
"builder": "@angular-devkit/build-angular:browser",
17+
"builder": "@angular-devkit/build-angular:application",
1818
"options": {
1919
"aot": true,
20-
"outputPath": "dist/ckeditor5-angular",
20+
"outputPath": {
21+
"base": "dist/ckeditor5-angular"
22+
},
2123
"index": "src/index.html",
22-
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
24+
"polyfills": [
25+
"src/polyfills.ts"
26+
],
2427
"tsConfig": "tsconfig.app.json",
2528
"assets": [
2629
"src/favicon.ico",
@@ -31,7 +34,8 @@
3134
"src/styles.css"
3235
],
3336
"scripts": [],
34-
"preserveSymlinks": true
37+
"preserveSymlinks": true,
38+
"browser": "src/main.ts"
3539
},
3640
"configurations": {
3741
"production": {
@@ -52,27 +56,25 @@
5256
"sourceMap": false,
5357
"namedChunks": false,
5458
"aot": true,
55-
"extractLicenses": true,
56-
"vendorChunk": false,
57-
"buildOptimizer": true
59+
"extractLicenses": true
5860
}
5961
}
6062
},
6163
"serve": {
6264
"builder": "@angular-devkit/build-angular:dev-server",
6365
"options": {
64-
"browserTarget": "ckeditor5-angular:build"
66+
"buildTarget": "ckeditor5-angular:build"
6567
},
6668
"configurations": {
6769
"production": {
68-
"browserTarget": "ckeditor5-angular:build:production"
70+
"buildTarget": "ckeditor5-angular:build:production"
6971
}
7072
}
7173
},
7274
"extract-i18n": {
7375
"builder": "@angular-devkit/build-angular:extract-i18n",
7476
"options": {
75-
"browserTarget": "ckeditor5-angular:build"
77+
"buildTarget": "ckeditor5-angular:build"
7678
}
7779
},
7880
"test": {
@@ -96,6 +98,5 @@
9698
}
9799
}
98100
}
99-
},
100-
"defaultProject": "ckeditor5-angular"
101+
}
101102
}

eslint.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ export default defineConfig( [
3535
'@typescript-eslint': tsPlugin.plugin
3636
},
3737

38-
files: [ '**/*.ts' ],
38+
files: [
39+
'**/*.ts',
40+
'**/*.mjs',
41+
'**/*.js'
42+
],
3943

4044
rules: {
4145
'new-cap': 'off',

karma.conf.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ module.exports = function( config ) {
6666
CHROME_LOCAL: {
6767
base: 'Chrome',
6868
flags: [ '--disable-background-timer-throttling' ]
69+
},
70+
CHROME_HEADLESS_WSL: {
71+
base: 'ChromeHeadless',
72+
flags: [
73+
'--no-sandbox',
74+
'--disable-gpu',
75+
'--disable-dev-shm-usage',
76+
'--disable-software-rasterizer',
77+
'--disable-features=TranslateUI',
78+
'--remote-debugging-port=9223'
79+
]
6980
}
7081
},
7182
singleRun: false
@@ -82,5 +93,25 @@ function getBrowsers() {
8293
];
8394
}
8495

96+
if ( isWsl() ) {
97+
return [ 'CHROME_HEADLESS_WSL' ];
98+
}
99+
85100
return [ 'CHROME_LOCAL' ];
86101
}
102+
103+
function isWsl() {
104+
if ( process.platform !== 'linux' ) {
105+
return false;
106+
}
107+
108+
if ( process.env.WSL_DISTRO_NAME ) {
109+
return true;
110+
}
111+
112+
if ( process.env.WSL_INTEROP ) {
113+
return true;
114+
}
115+
116+
return false;
117+
}

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,34 @@
2020
"release:publish-packages": "node scripts/publishpackages.mjs"
2121
},
2222
"dependencies": {
23-
"@angular/animations": "^16",
24-
"@angular/common": "^16",
25-
"@angular/compiler": "^16",
26-
"@angular/core": "^16",
27-
"@angular/forms": "^16",
28-
"@angular/platform-browser": "^16",
29-
"@angular/platform-browser-dynamic": "^16",
30-
"@angular/router": "^16",
23+
"@angular/animations": "^19.2.15",
24+
"@angular/common": "^19.2.15",
25+
"@angular/compiler": "^19.2.15",
26+
"@angular/core": "^19.2.15",
27+
"@angular/forms": "^19.2.15",
28+
"@angular/platform-browser": "^19.2.15",
29+
"@angular/platform-browser-dynamic": "^19.2.15",
30+
"@angular/router": "^19.2.15",
3131
"@ckeditor/ckeditor5-integrations-common": "^2.2.2",
3232
"core-js": "^3.21.1",
3333
"rxjs": "^6.5.5",
3434
"tslib": "^2.0.3",
35-
"zone.js": "~0.13.0"
35+
"zone.js": "~0.15.1"
3636
},
3737
"devDependencies": {
38-
"@angular-devkit/build-angular": "^16",
39-
"@angular/cli": "^16",
40-
"@angular/compiler-cli": "^16",
41-
"@angular/language-service": "^16",
38+
"@angular-devkit/build-angular": "^19.2.19",
39+
"@angular/cli": "^19.2.19",
40+
"@angular/compiler-cli": "^19.2.15",
41+
"@angular/language-service": "^19.2.15",
4242
"@ckeditor/ckeditor5-dev-bump-year": "^54.0.0",
4343
"@ckeditor/ckeditor5-dev-changelog": "^54.0.0",
4444
"@ckeditor/ckeditor5-dev-ci": "^54.0.0",
4545
"@ckeditor/ckeditor5-dev-release-tools": "^54.0.0",
4646
"@ckeditor/ckeditor5-dev-utils": "^54.0.0",
4747
"@types/jasminewd2": "^2.0.10",
4848
"@types/node": "^14.11.8",
49-
"ckeditor5": "^46.0.0",
50-
"ckeditor5-premium-features": "^46.0.0",
49+
"ckeditor5": "^47.0.0",
50+
"ckeditor5-premium-features": "^47.0.0",
5151
"css-loader": "^5.2.7",
5252
"cypress": "^13.17.0",
5353
"eslint": "^9.38.0",
@@ -66,15 +66,15 @@
6666
"karma-jasmine-html-reporter": "^1.7.0",
6767
"lint-staged": "^10.4.0",
6868
"minimist": "^1.2.8",
69-
"ng-packagr": "^16",
69+
"ng-packagr": "^19.2.2",
7070
"postcss-loader": "^4.3.0",
7171
"raw-loader": "^4.0.1",
7272
"semver": "^7",
7373
"start-server-and-test": "^2.0.3",
7474
"style-loader": "^2.0.0",
7575
"ts-loader": "^9.4.3",
7676
"ts-node": "^9.0.0",
77-
"typescript": "~5.0.0",
77+
"typescript": "~5.5.0",
7878
"typescript-eslint": "^8.32.0",
7979
"upath": "^2.0.1",
8080
"webpack": "^5.94.0",

0 commit comments

Comments
 (0)