Skip to content

Commit 3266e0f

Browse files
committed
chore: Update deps - Angular 11
1 parent e8f5f52 commit 3266e0f

Some content is hidden

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

66 files changed

+21976
-16172
lines changed

.browserslistrc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
# For additional information regarding the format and rule options, please see:
33
# https://github.com/browserslist/browserslist#queries
44

5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
58
# You can see what browsers were selected by your queries by running:
69
# npx browserslist
710

8-
> 0.5%
9-
last 2 versions
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
1016
Firefox ESR
11-
not dead
12-
not IE 9-11 # For IE 9-11 support, remove 'not'.
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.editorconfig

Lines changed: 4 additions & 1 deletion
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

.eslintrc.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": [
4+
"projects/**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"tsconfig.json",
14+
"e2e/tsconfig.json"
15+
],
16+
"createDefaultProgram": true
17+
},
18+
"extends": [
19+
"plugin:@angular-eslint/ng-cli-compat",
20+
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
21+
"plugin:@angular-eslint/template/process-inline-templates"
22+
],
23+
"rules": {
24+
"@angular-eslint/component-selector": [
25+
"error",
26+
{
27+
"type": "element",
28+
"prefix": "app",
29+
"style": "kebab-case"
30+
}
31+
],
32+
"@angular-eslint/directive-selector": [
33+
"error",
34+
{
35+
"type": "attribute",
36+
"prefix": "app",
37+
"style": "camelCase"
38+
}
39+
]
40+
}
41+
},
42+
{
43+
"files": [
44+
"*.html"
45+
],
46+
"extends": [
47+
"plugin:@angular-eslint/template/recommended"
48+
],
49+
"rules": {}
50+
}
51+
]
52+
}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
/dist
55
/tmp
66
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
79

810
# dependencies
911
/node_modules
1012

13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
1117
# IDEs and editors
1218
/.idea
1319
.project
@@ -23,6 +29,7 @@
2329
!.vscode/tasks.json
2430
!.vscode/launch.json
2531
!.vscode/extensions.json
32+
.history/*
2633

2734
# misc
2835
/.sass-cache
@@ -33,6 +40,7 @@ npm-debug.log
3340
yarn-error.log
3441
testem.log
3542
/typings
43+
.eslintcache
3644

3745
# System Files
3846
.DS_Store

angular.json

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@
1717
"build": {
1818
"builder": "@angular-devkit/build-angular:browser",
1919
"options": {
20-
"aot": true,
2120
"outputPath": "dist/ngx-ui-loader-app",
2221
"index": "src/index.html",
2322
"main": "src/main.ts",
2423
"polyfills": "src/polyfills.ts",
2524
"tsConfig": "tsconfig.app.json",
25+
"aot": true,
2626
"assets": [
2727
"src/favicon.ico",
2828
"src/assets"
2929
],
3030
"styles": [
31+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
3132
"src/styles.scss"
3233
],
3334
"scripts": []
@@ -43,9 +44,7 @@
4344
"optimization": true,
4445
"outputHashing": "all",
4546
"sourceMap": false,
46-
"extractCss": true,
4747
"namedChunks": false,
48-
"aot": true,
4948
"extractLicenses": true,
5049
"vendorChunk": false,
5150
"buildOptimizer": true,
@@ -57,7 +56,8 @@
5756
},
5857
{
5958
"type": "anyComponentStyle",
60-
"maximumWarning": "35kb"
59+
"maximumWarning": "6kb",
60+
"maximumError": "10kb"
6161
}
6262
]
6363
}
@@ -92,21 +92,18 @@
9292
"src/assets"
9393
],
9494
"styles": [
95+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
9596
"src/styles.scss"
9697
],
9798
"scripts": []
9899
}
99100
},
100101
"lint": {
101-
"builder": "@angular-devkit/build-angular:tslint",
102+
"builder": "@angular-eslint/builder:lint",
102103
"options": {
103-
"tsConfig": [
104-
"tsconfig.app.json",
105-
"tsconfig.spec.json",
106-
"e2e/tsconfig.json"
107-
],
108-
"exclude": [
109-
"**/node_modules/**"
104+
"lintFilePatterns": [
105+
"src/**/*.ts",
106+
"src/**/*.html"
110107
]
111108
}
112109
},
@@ -128,10 +125,10 @@
128125
"projectType": "library",
129126
"root": "projects/ngx-ui-loader",
130127
"sourceRoot": "projects/ngx-ui-loader/src",
131-
"prefix": "ngx",
128+
"prefix": "lib",
132129
"architect": {
133130
"build": {
134-
"builder": "@angular-devkit/build-ng-packagr:build",
131+
"builder": "@angular-devkit/build-angular:ng-packagr",
135132
"options": {
136133
"tsConfig": "projects/ngx-ui-loader/tsconfig.lib.json",
137134
"project": "projects/ngx-ui-loader/ng-package.json"
@@ -151,19 +148,19 @@
151148
}
152149
},
153150
"lint": {
154-
"builder": "@angular-devkit/build-angular:tslint",
151+
"builder": "@angular-eslint/builder:lint",
155152
"options": {
156-
"tsConfig": [
157-
"projects/ngx-ui-loader/tsconfig.lib.json",
158-
"projects/ngx-ui-loader/tsconfig.spec.json"
159-
],
160-
"exclude": [
161-
"**/node_modules/**"
153+
"lintFilePatterns": [
154+
"projects/ngx-ui-loader/**/*.ts",
155+
"projects/ngx-ui-loader/**/*.html"
162156
]
163157
}
164158
}
165159
}
166160
}
167161
},
168-
"defaultProject": "ngx-ui-loader-app"
169-
}
162+
"defaultProject": "ngx-ui-loader-app",
163+
"cli": {
164+
"defaultCollection": "@angular-eslint/schematics"
165+
}
166+
}

e2e/protractor.conf.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Protractor configuration file, see link for more information
33
// https://github.com/angular/protractor/blob/master/lib/config.ts
44

5-
const { SpecReporter } = require('jasmine-spec-reporter');
5+
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
66

77
/**
88
* @type { import("protractor").Config }
@@ -13,9 +13,10 @@ exports.config = {
1313
'./src/**/*.e2e-spec.ts'
1414
],
1515
capabilities: {
16-
'browserName': 'chrome'
16+
browserName: 'chrome'
1717
},
1818
directConnect: true,
19+
SELENIUM_PROMISE_MANAGER: false,
1920
baseUrl: 'http://localhost:4200/',
2021
framework: 'jasmine',
2122
jasmineNodeOpts: {
@@ -27,6 +28,10 @@ exports.config = {
2728
require('ts-node').register({
2829
project: require('path').join(__dirname, './tsconfig.json')
2930
});
30-
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31+
jasmine.getEnv().addReporter(new SpecReporter({
32+
spec: {
33+
displayStacktrace: StacktraceOption.PRETTY
34+
}
35+
}));
3136
}
3237
};

e2e/src/app.e2e-spec.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { AppPage } from './app.po';
21
import { browser, logging } from 'protractor';
2+
import { AppPage } from './app.po';
33

44
describe('workspace-project App', () => {
55
let page: AppPage;
@@ -8,20 +8,19 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('Welcome to ngx-ui-loader-app!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
expect(await page.getTitleText()).toEqual(
14+
'ngx-ui-loader-app app is running!'
15+
);
1416
});
1517

1618
afterEach(async () => {
1719
// Assert that there are no errors emitted from the browser
18-
const logs = await browser
19-
.manage()
20-
.logs()
21-
.get(logging.Type.BROWSER);
20+
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
2221
expect(logs).not.toContain(
2322
jasmine.objectContaining({
24-
level: logging.Level.SEVERE
23+
level: logging.Level.SEVERE,
2524
} as logging.Entry)
2625
);
2726
});

e2e/src/app.po.ts

Lines changed: 4 additions & 4 deletions
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() {
5-
return browser.get(browser.baseUrl) as Promise<any>;
4+
async navigateTo(): Promise<unknown> {
5+
return browser.get(browser.baseUrl);
66
}
77

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

e2e/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
12
{
23
"extends": "../tsconfig.json",
34
"compilerOptions": {
@@ -6,7 +7,6 @@
67
"target": "es2018",
78
"types": [
89
"jasmine",
9-
"jasminewd2",
1010
"node"
1111
]
1212
}

karma.conf.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,36 @@ 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: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
1928
dir: require('path').join(__dirname, './coverage/ngx-ui-loader-app'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2234
},
2335
reporters: ['progress', 'kjhtml'],
2436
port: 9876,
2537
colors: true,
2638
logLevel: config.LOG_INFO,
2739
autoWatch: true,
2840
browsers: ['Chrome'],
29-
singleRun: true,
41+
singleRun: false,
3042
restartOnFileChange: true
3143
});
3244
};

0 commit comments

Comments
 (0)