Skip to content

Commit 59ed7e3

Browse files
committed
feat: upgrade to angular 11
1 parent 47e726c commit 59ed7e3

19 files changed

+1505
-1555
lines changed

.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Editor configuration, see http://editorconfig.org
1+
# Editor configuration, see https://editorconfig.org
22
root = true
33

44
[*]
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

angular.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
"schematics": {
4949
"@schematics/angular:component": {
5050
"style": "scss"
51+
},
52+
"@schematics/angular:application": {
53+
"strict": true
5154
}
5255
},
5356
"root": "demo",
@@ -83,21 +86,20 @@
8386
"optimization": true,
8487
"outputHashing": "all",
8588
"sourceMap": false,
86-
"extractCss": true,
8789
"namedChunks": false,
8890
"extractLicenses": true,
8991
"vendorChunk": false,
9092
"buildOptimizer": true,
9193
"budgets": [
9294
{
9395
"type": "initial",
94-
"maximumWarning": "2mb",
95-
"maximumError": "5mb"
96+
"maximumWarning": "500kb",
97+
"maximumError": "1mb"
9698
},
9799
{
98100
"type": "anyComponentStyle",
99-
"maximumWarning": "6kb",
100-
"maximumError": "10kb"
101+
"maximumWarning": "2kb",
102+
"maximumError": "4kb"
101103
}
102104
]
103105
}

demo/browserslist

-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ last 2 Edge major versions
1414
last 2 Safari major versions
1515
last 2 iOS major versions
1616
Firefox ESR
17-
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
1817
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

demo/e2e/protractor.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exports.config = {
1616
browserName: 'chrome'
1717
},
1818
directConnect: true,
19+
SELENIUM_PROMISE_MANAGER: false,
1920
baseUrl: 'http://localhost:4200/',
2021
framework: 'jasmine',
2122
jasmineNodeOpts: {

demo/e2e/src/app.e2e-spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ describe('ngx-editor App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('A Simple WYSIWYG Editor for Angular Applications.');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
expect(await page.getTitleText()).toEqual('A Simple WYSIWYG Editor for Angular Applications.');
1414
});
1515

1616
afterEach(async () => {

demo/e2e/src/app.po.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { browser, by, element } from 'protractor';
22

33
export class AppPage {
4-
navigateTo(): Promise<unknown> {
5-
return browser.get(browser.baseUrl) as Promise<unknown>;
4+
async navigateTo(): Promise<unknown> {
5+
return browser.get(browser.baseUrl);
66
}
77

8-
getTitleText(): Promise<string> {
9-
return element(by.css('app-root .subtitle')).getText() as Promise<string>;
8+
async getTitleText(): Promise<string> {
9+
return element(by.css('app-root .subtitle')).getText();
1010
}
1111
}

demo/e2e/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"target": "es2018",
88
"types": [
99
"jasmine",
10-
"jasminewd2",
1110
"node"
1211
]
1312
}

demo/karma.conf.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
18-
coverageIstanbulReporter: {
18+
jasmineHtmlReporter: {
19+
suppressAll: true // removes the duplicated traces
20+
},
21+
coverageReporter: {
1922
dir: require('path').join(__dirname, '../coverage/demo'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
23+
subdir: '.',
24+
reporters: [
25+
{ type: 'html' },
26+
{ type: 'text-summary' }
27+
]
2228
},
2329
reporters: ['progress', 'kjhtml'],
2430
port: 9876,

0 commit comments

Comments
 (0)