Skip to content

Commit 5017ab5

Browse files
authored
Merge pull request #92 from t-ho/dev
Update deps - Angular 11
2 parents a9fc823 + df13e8e commit 5017ab5

File tree

71 files changed

+31075
-7258
lines changed

Some content is hidden

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

71 files changed

+31075
-7258
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+
}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [12.x]
19+
node-version: [12.x, 14.x]
2020

2121
steps:
2222
- uses: actions/checkout@v2

.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

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

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": "30kb",
60+
"maximumError": "35kb"
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
});

0 commit comments

Comments
 (0)