Skip to content

Commit 0d7c015

Browse files
committed
chore(upgrade): upgeade ng to 8.1.0
1 parent 051a634 commit 0d7c015

File tree

8 files changed

+17168
-14921
lines changed

8 files changed

+17168
-14921
lines changed

.prettierrc

+15-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,19 @@
44
"tabWidth": 4,
55
"singleQuote": true,
66
"semi": true,
7-
"printWidth": 120
7+
"printWidth": 120,
8+
"overrides": [
9+
{
10+
"files": "*.json",
11+
"options": {
12+
"tabWidth": 2
13+
}
14+
},
15+
{
16+
"files": "*.html",
17+
"options": {
18+
"tabWidth": 2
19+
}
20+
}
21+
]
822
}

browserslist

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

package-lock.json

+17,010-14,713
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+81-82
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,84 @@
11
{
2-
"name": "ngx-validator",
3-
"version": "1.0.0",
4-
"description": "Angular7+ form validator, make error tips easy and automatic. don't need to manually write error tips templates.",
5-
"scripts": {
6-
"ng": "ng",
7-
"start": "ng serve",
8-
"build": "ng build core",
9-
"build:docs": "ng build integration --baseHref /ngx-validator/ --prod",
10-
"pub-only": "cd ./dist/core && npm publish --access=public",
11-
"pub": "npm run build && npm run pub-only && git push --follow-tags origin master",
12-
"pull-latest": "git checkout master && git pull origin master",
13-
"release": "standard-version",
14-
"release-major": "npm run pull-latest && standard-version --release-as major",
15-
"release-minor": "npm run pull-latest && standard-version --release-as minor",
16-
"release-patch": "npm run pull-latest && standard-version --release-as patch",
17-
"test": "ng test core",
18-
"test:demo": "ng test integration",
19-
"lint": "ng lint core",
20-
"lint:demo": "ng lint integration",
21-
"e2e": "ng e2e",
22-
"contributors:add": "all-contributors add",
23-
"contributors:generate": "all-contributors generate"
24-
},
25-
"private": false,
26-
"repository": "https://github.com/why520crazy/ngx-validator",
27-
"author": "why520crazy <mail@why520crazy@163.com>",
28-
"license": "MIT",
29-
"dependencies": {
30-
"@angular/animations": "~7.0.0",
31-
"@angular/common": "~7.0.0",
32-
"@angular/compiler": "~7.0.0",
33-
"@angular/core": "~7.0.0",
34-
"@angular/forms": "~7.0.0",
35-
"@angular/http": "~7.0.0",
36-
"@angular/platform-browser": "~7.0.0",
37-
"@angular/platform-browser-dynamic": "~7.0.0",
38-
"@angular/router": "~7.0.0",
39-
"bootstrap": "^4.2.1",
40-
"core-js": "^2.5.4",
41-
"lib": "^3.0.2",
42-
"rxjs": "~6.3.3",
43-
"zone.js": "~0.8.26"
44-
},
45-
"devDependencies": {
46-
"@angular-devkit/build-angular": "~0.10.0",
47-
"@angular-devkit/build-ng-packagr": "^0.10.5",
48-
"@angular/cli": "~7.0.3",
49-
"@angular/compiler-cli": "~7.0.0",
50-
"@angular/language-service": "~7.0.0",
51-
"@commitlint/cli": "^7.5.2",
52-
"@commitlint/config-conventional": "^7.5.0",
53-
"@types/jasmine": "~2.8.8",
54-
"@types/jasminewd2": "~2.0.3",
55-
"@types/node": "^8.10.48",
56-
"all-contributors-cli": "^6.6.0",
57-
"codelyzer": "~4.5.0",
58-
"highlight.js": "^9.13.1",
59-
"husky": "^2.3.0",
60-
"jasmine-core": "~2.99.1",
61-
"jasmine-spec-reporter": "~4.2.1",
62-
"karma": "~3.0.0",
63-
"karma-chrome-launcher": "~2.2.0",
64-
"karma-coverage-istanbul-reporter": "~2.0.1",
65-
"karma-jasmine": "~1.1.2",
66-
"karma-jasmine-html-reporter": "^0.2.2",
67-
"ng-packagr": "^4.2.0",
68-
"ngx-highlightjs": "^3.0.0",
69-
"prettier": "^1.17.1",
70-
"pretty-quick": "^1.10.0",
71-
"protractor": "~5.4.0",
72-
"standard-version": "^6.0.1",
73-
"ts-node": "~7.0.0",
74-
"tsickle": ">=0.29.0",
75-
"tslib": "^1.9.0",
76-
"tslint": "~5.11.0",
77-
"typescript": "~3.1.1"
78-
},
79-
"husky": {
80-
"hooks": {
81-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
82-
"pre-commit": "pretty-quick --staged"
83-
}
2+
"name": "ngx-validator",
3+
"version": "1.0.0",
4+
"description": "Angular7+ form validator, make error tips easy and automatic. don't need to manually write error tips templates.",
5+
"scripts": {
6+
"ng": "ng",
7+
"start": "ng serve",
8+
"build": "ng build core",
9+
"build:docs": "ng build integration --baseHref /ngx-validator/ --prod",
10+
"pub-only": "cd ./dist/core && npm publish --access=public",
11+
"pub": "npm run build && npm run pub-only && git push --follow-tags origin master",
12+
"pull-latest": "git checkout master && git pull origin master",
13+
"release": "standard-version",
14+
"release-major": "npm run pull-latest && standard-version --release-as major",
15+
"release-minor": "npm run pull-latest && standard-version --release-as minor",
16+
"release-patch": "npm run pull-latest && standard-version --release-as patch",
17+
"test": "ng test core",
18+
"test:demo": "ng test integration",
19+
"lint": "ng lint core",
20+
"lint:demo": "ng lint integration",
21+
"e2e": "ng e2e",
22+
"contributors:add": "all-contributors add",
23+
"contributors:generate": "all-contributors generate"
24+
},
25+
"private": false,
26+
"repository": "https://github.com/why520crazy/ngx-validator",
27+
"author": "why520crazy <mail@why520crazy@163.com>",
28+
"license": "MIT",
29+
"dependencies": {
30+
"@angular/animations": "~8.1.0",
31+
"@angular/common": "~8.1.0",
32+
"@angular/compiler": "~8.1.0",
33+
"@angular/core": "~8.1.0",
34+
"@angular/forms": "~8.1.0",
35+
"@angular/platform-browser": "~8.1.0",
36+
"@angular/platform-browser-dynamic": "~8.1.0",
37+
"@angular/router": "~8.1.0",
38+
"bootstrap": "^4.2.1",
39+
"core-js": "^2.5.4",
40+
"lib": "^3.0.2",
41+
"rxjs": "~6.5.2",
42+
"zone.js": "~0.9.1"
43+
},
44+
"devDependencies": {
45+
"@angular-devkit/build-angular": "~0.801.0",
46+
"@angular-devkit/build-ng-packagr": "~0.801.0",
47+
"@angular/cli": "~8.1.0",
48+
"@angular/compiler-cli": "~8.1.0",
49+
"@angular/language-service": "~8.1.0",
50+
"@commitlint/cli": "^7.5.2",
51+
"@commitlint/config-conventional": "^7.5.0",
52+
"@types/jasmine": "~2.8.8",
53+
"@types/jasminewd2": "~2.0.3",
54+
"@types/node": "^8.10.48",
55+
"all-contributors-cli": "^6.6.0",
56+
"codelyzer": "^5.0.1",
57+
"highlight.js": "^9.13.1",
58+
"husky": "^2.3.0",
59+
"jasmine-core": "~2.99.1",
60+
"jasmine-spec-reporter": "~4.2.1",
61+
"karma": "~3.0.0",
62+
"karma-chrome-launcher": "~2.2.0",
63+
"karma-coverage-istanbul-reporter": "~2.0.1",
64+
"karma-jasmine": "~1.1.2",
65+
"karma-jasmine-html-reporter": "^0.2.2",
66+
"ng-packagr": "^5.1.0",
67+
"ngx-highlightjs": "^3.0.0",
68+
"prettier": "^1.17.1",
69+
"pretty-quick": "^1.10.0",
70+
"protractor": "~5.4.0",
71+
"standard-version": "^6.0.1",
72+
"ts-node": "~7.0.0",
73+
"tsickle": "^0.35.0",
74+
"tslib": "^1.9.0",
75+
"tslint": "~5.11.0",
76+
"typescript": "~3.4.5"
77+
},
78+
"husky": {
79+
"hooks": {
80+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
81+
"pre-commit": "pretty-quick --staged"
8482
}
83+
}
8584
}

packages/core/src/directives/form-validator.directive.spec.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class SimpleTemplateDrivenDemoComponent {
388388
description: ''
389389
};
390390

391-
@ViewChild(NgxFormValidatorDirective) ngxFormValidator: NgxFormValidatorDirective;
391+
@ViewChild(NgxFormValidatorDirective, { static: true }) ngxFormValidator: NgxFormValidatorDirective;
392392

393393
constructor() {}
394394

@@ -442,7 +442,8 @@ class SimpleReactiveFormDemoComponent {
442442
description: ''
443443
};
444444

445-
@ViewChild(NgxFormValidatorDirective) ngxFormValidator: NgxFormValidatorDirective;
445+
@ViewChild(NgxFormValidatorDirective, { static: true })
446+
ngxFormValidator: NgxFormValidatorDirective;
446447

447448
constructor(private formBuilder: FormBuilder) {
448449
this.formGroup = this.formBuilder.group({

packages/integration/src/polyfills.ts

+21-39
Original file line numberDiff line numberDiff line change
@@ -18,62 +18,44 @@
1818
* BROWSER POLYFILLS
1919
*/
2020

21-
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22-
// import 'core-js/es6/symbol';
23-
// import 'core-js/es6/object';
24-
// import 'core-js/es6/function';
25-
// import 'core-js/es6/parse-int';
26-
// import 'core-js/es6/parse-float';
27-
// import 'core-js/es6/number';
28-
// import 'core-js/es6/math';
29-
// import 'core-js/es6/string';
30-
// import 'core-js/es6/date';
31-
// import 'core-js/es6/array';
32-
// import 'core-js/es6/regexp';
33-
// import 'core-js/es6/map';
34-
// import 'core-js/es6/weak-map';
35-
// import 'core-js/es6/set';
36-
37-
/**
38-
* If the application will be indexed by Google Search, the following is required.
39-
* Googlebot uses a renderer based on Chrome 41.
40-
* https://developers.google.com/search/docs/guides/rendering
41-
**/
42-
// import 'core-js/es6/array';
43-
4421
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
4522
// import 'classlist.js'; // Run `npm install --save classlist.js`.
4623

47-
/** IE10 and IE11 requires the following for the Reflect API. */
48-
// import 'core-js/es6/reflect';
49-
5024
/**
5125
* Web Animations `@angular/platform-browser/animations`
5226
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
5327
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
54-
**/
28+
*/
5529
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5630

5731
/**
5832
* By default, zone.js will patch all possible macroTask and DomEvents
5933
* user can disable parts of macroTask/DomEvents patch by setting following flags
34+
* because those flags need to be set before `zone.js` being loaded, and webpack
35+
* will put import in the top of bundle, so user need to create a separate file
36+
* in this directory (for example: zone-flags.ts), and put the following flags
37+
* into that file, and then add the following code before importing zone.js.
38+
* import './zone-flags.ts';
39+
*
40+
* The flags allowed in zone-flags.ts are listed here.
41+
*
42+
* The following flags will work for all browsers.
43+
*
44+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
47+
*
48+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
49+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
50+
*
51+
* (window as any).__Zone_enable_cross_context_check = true;
52+
*
6053
*/
6154

62-
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
63-
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
64-
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
65-
66-
/*
67-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
68-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
69-
*/
70-
// (window as any).__Zone_enable_cross_context_check = true;
71-
7255
/***************************************************************************************************
7356
* Zone JS is required by default for Angular itself.
7457
*/
75-
import 'zone.js/dist/zone'; // Included with Angular CLI.
76-
58+
import 'zone.js/dist/zone'; // Included with Angular CLI.
7759

7860
/***************************************************************************************************
7961
* APPLICATION IMPORTS

tsconfig.json

+9-16
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,21 @@
22
"compileOnSave": false,
33
"compilerOptions": {
44
"baseUrl": "./",
5+
"downlevelIteration": true,
6+
"importHelpers": true,
57
"outDir": "./dist/out-tsc",
68
"sourceMap": true,
79
"declaration": false,
8-
"module": "es2015",
10+
"module": "esnext",
911
"moduleResolution": "node",
1012
"emitDecoratorMetadata": true,
1113
"experimentalDecorators": true,
12-
"target": "es5",
13-
"typeRoots": [
14-
"node_modules/@types"
15-
],
16-
"lib": [
17-
"es2018",
18-
"dom"
19-
],
14+
"target": "es2015",
15+
"typeRoots": ["node_modules/@types"],
16+
"lib": ["es2018", "dom"],
2017
"paths": {
21-
"core": [
22-
"dist/core"
23-
],
24-
"core/*": [
25-
"dist/core/*"
26-
]
18+
"core": ["dist/core"],
19+
"core/*": ["dist/core/*"]
2720
}
2821
}
29-
}
22+
}

0 commit comments

Comments
 (0)