build(docs-infra): update docs examples to Angular v10 (#38993)

This commit updates the docs examples to Angular v10.1.3. In addition to
updating the dependencies versions, it also updates the project's
structure and config to more closely match what a new v10 CLI app would
look like. See, also, the [diff][1] between a basic v9.1.4 CLI app and a
v10.1.3 one.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/9.1.4..10.1.3

PR Close #38993
This commit is contained in:
George Kalpakas 2020-09-21 20:52:26 +03:00 committed by Alex Rickabaugh
parent cb7164a236
commit c5e178997c
33 changed files with 2436 additions and 2186 deletions

View File

@ -17,6 +17,7 @@
**/e2e/tsconfig.e2e.json **/e2e/tsconfig.e2e.json
**/src/karma.conf.js **/src/karma.conf.js
**/.angular-cli.json **/.angular-cli.json
**/.browserslistrc
**/.editorconfig **/.editorconfig
**/.gitignore **/.gitignore
**/angular.json **/angular.json
@ -30,7 +31,6 @@
**/tslint.json **/tslint.json
**/karma-test-shim.js **/karma-test-shim.js
**/browser-test-shim.js **/browser-test-shim.js
**/browserslist
**/node_modules **/node_modules
# built files # built files

View File

@ -24,7 +24,7 @@ export class UploaderService {
// } // }
upload(file: File) { upload(file: File) {
if (!file) { return; } if (!file) { return of<string>(); }
// COULD HAVE WRITTEN: // COULD HAVE WRITTEN:
// return this.http.post('/upload/file', file, { // return this.http.post('/upload/file', file, {

View File

@ -1,5 +1,8 @@
{ {
"extends": "tslint:recommended", "extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": { "rules": {
"align": { "align": {
"options": [ "options": [
@ -13,22 +16,6 @@
"deprecation": { "deprecation": {
"severity": "warning" "severity": "warning"
}, },
"component-class-suffix": true,
"component-selector": [
true,
"element",
// TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense).
"",
"kebab-case"
],
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
["app", "toh"],
"camelCase"
],
"eofline": true, "eofline": true,
"import-blacklist": [ "import-blacklist": [
true, true,
@ -56,6 +43,8 @@
] ]
} }
], ],
// TODO(gkalpak): Fix the code and enable this.
// "no-any": true,
"no-console": [ "no-console": [
true, true,
"debug", "debug",
@ -95,6 +84,11 @@
"named": "never" "named": "never"
} }
}, },
// TODO(gkalpak): Fix the code and enable this.
// "typedef": [
// true,
// "call-signature"
// ],
"typedef-whitespace": { "typedef-whitespace": {
"options": [ "options": [
{ {
@ -130,6 +124,9 @@
"check-typecast" "check-typecast"
] ]
}, },
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true, "no-conflicting-lifecycle": true,
"no-host-metadata-property": true, "no-host-metadata-property": true,
"no-input-rename": true, "no-input-rename": true,
@ -141,9 +138,19 @@
"template-banana-in-box": true, "template-banana-in-box": true,
"template-no-negated-async": true, "template-no-negated-async": true,
"use-lifecycle-interface": true, "use-lifecycle-interface": true,
"use-pipe-transform-interface": true "use-pipe-transform-interface": true,
}, "directive-selector": [
"rulesDirectory": [ true,
"codelyzer" "attribute",
["app", "toh"],
"camelCase"
],
"component-selector": [
true,
"element",
// TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense).
"",
"kebab-case"
] ]
} }
}

View File

@ -1,9 +1,7 @@
import * as angular from 'angular'; import * as angular from 'angular';
import 'angular-route'; import 'angular-route';
const appName = 'myApp'; const appModule = angular.module('myApp', [
angular.module(appName, [
'ngRoute' 'ngRoute'
]) ])
.config(['$routeProvider', '$locationProvider', .config(['$routeProvider', '$locationProvider',
@ -25,5 +23,5 @@ angular.module(appName, [
); );
export function bootstrap(el: HTMLElement) { export function bootstrap(el: HTMLElement) {
return angular.bootstrap(el, [appName]); return angular.bootstrap(el, [appModule.name]);
} }

View File

@ -13,43 +13,42 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"angular": "1.7.9", "angular": "1.8.0",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"angular-route": "1.7.9", "angular-route": "1.8.0",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4", "@types/angular": "1.7.3",
"@types/angular": "^1.6.57", "@types/angular-route": "1.7.1",
"@types/angular-route": "^1.7.0",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@ -0,0 +1,18 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
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.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

View File

@ -5,7 +5,11 @@
"projects": { "projects": {
"angular.io-example": { "angular.io-example": {
"projectType": "application", "projectType": "application",
"schematics": {}, "schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"prefix": "app", "prefix": "app",
@ -47,13 +51,13 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "500kb",
"maximumError": "5mb" "maximumError": "1mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "6kb", "maximumWarning": "2kb",
"maximumError": "10kb" "maximumError": "4kb"
} }
] ]
} }

View File

@ -1,15 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
# Googlebot uses an older version of Chrome
# For additional information see: https://developers.google.com/search/docs/guides/rendering
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.

View File

@ -2,7 +2,7 @@
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts // https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter'); const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/** /**
* @type { import("protractor").Config } * @type { import("protractor").Config }
@ -27,6 +27,10 @@ exports.config = {
require('ts-node').register({ require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json') project: require('path').join(__dirname, './tsconfig.json')
}); });
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
} }
}; };

View File

@ -1,9 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/e2e", "outDir": "../out-tsc/e2e",
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es2018",
"types": [ "types": [
"jasmine", "jasmine",
"jasminewd2", "jasminewd2",

View File

@ -13,39 +13,38 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@ -0,0 +1,9 @@
{
"name": "angular.io-example",
"private": true,
"description_1": "This is a special package.json file that is not used by package managers.",
"description_2": "It is used to tell the tools and bundlers whether the code under this directory is free of code with non-local side-effect. Any code that does have non-local side-effects can't be well optimized (tree-shaken) and will result in unnecessary increased payload size.",
"description_3": "It should be safe to set this option to 'false' for new applications, but existing code bases could be broken when built with the production config if the application code does contain non-local side-effects that the application depends on.",
"description_4": "To learn more about this file see: https://angular.io/config/app-package-json.",
"sideEffects": false
}

View File

@ -1,3 +1,4 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {

View File

@ -1,26 +1,31 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
// TODO(gkalpak): Fix the code and enable this.
// "strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"downlevelIteration": true, "downlevelIteration": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"importHelpers": true, "importHelpers": true,
"target": "es2015", "target": "es2015",
"typeRoots": [ "module": "es2020",
"node_modules/@types"
],
"lib": [ "lib": [
"es2018", "es2018",
"dom" "dom"
] ]
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"fullTemplateTypeCheck": true, "strictInjectionParameters": true,
"strictInjectionParameters": true "strictInputAccessModifiers": true,
// TODO(gkalpak): Fix the code and enable this (i.e. switch from `fullTemplateTypeCheck` to `strictTemplates`).
"fullTemplateTypeCheck": true,// "strictTemplates": true
} }
} }

View File

@ -1,10 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out-tsc/spec", "outDir": "./out-tsc/spec",
"types": [ "types": [
"jasmine", "jasmine"
"node"
] ]
}, },
"files": [ "files": [

View File

@ -1,5 +1,8 @@
{ {
"extends": "tslint:recommended", "extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": { "rules": {
"align": { "align": {
"options": [ "options": [
@ -13,22 +16,6 @@
"deprecation": { "deprecation": {
"severity": "warning" "severity": "warning"
}, },
"component-class-suffix": true,
"component-selector": [
true,
"element",
// TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense).
"",
"kebab-case"
],
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
["app", "toh"],
"camelCase"
],
"eofline": true, "eofline": true,
"import-blacklist": [ "import-blacklist": [
true, true,
@ -56,6 +43,8 @@
] ]
} }
], ],
// TODO(gkalpak): Fix the code and enable this.
// "no-any": true,
"no-console": [ "no-console": [
true, true,
"debug", "debug",
@ -95,6 +84,11 @@
"named": "never" "named": "never"
} }
}, },
// TODO(gkalpak): Fix the code and enable this.
// "typedef": [
// true,
// "call-signature"
// ],
"typedef-whitespace": { "typedef-whitespace": {
"options": [ "options": [
{ {
@ -130,6 +124,9 @@
"check-typecast" "check-typecast"
] ]
}, },
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true, "no-conflicting-lifecycle": true,
"no-host-metadata-property": true, "no-host-metadata-property": true,
"no-input-rename": true, "no-input-rename": true,
@ -141,9 +138,19 @@
"template-banana-in-box": true, "template-banana-in-box": true,
"template-no-negated-async": true, "template-no-negated-async": true,
"use-lifecycle-interface": true, "use-lifecycle-interface": true,
"use-pipe-transform-interface": true "use-pipe-transform-interface": true,
}, "directive-selector": [
"rulesDirectory": [ true,
"codelyzer" "attribute",
["app", "toh"],
"camelCase"
],
"component-selector": [
true,
"element",
// TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense).
"",
"kebab-case"
] ]
} }
}

View File

@ -13,41 +13,40 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/elements": "~9.1.4", "@angular/elements": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"@webcomponents/custom-elements": "^1.4.1", "@webcomponents/custom-elements": "^1.4.2",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@ -5,7 +5,11 @@
"projects": { "projects": {
"angular.io-example": { "angular.io-example": {
"projectType": "application", "projectType": "application",
"schematics": {}, "schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"prefix": "app", "prefix": "app",
@ -55,13 +59,13 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "500kb",
"maximumError": "5mb" "maximumError": "1mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "6kb", "maximumWarning": "2kb",
"maximumError": "10kb" "maximumError": "4kb"
} }
] ]
}, },

View File

@ -16,40 +16,39 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/localize": "^9.1.4", "@angular/localize": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@ -5,7 +5,11 @@
"projects": { "projects": {
"angular.io-example": { "angular.io-example": {
"projectType": "application", "projectType": "application",
"schematics": {}, "schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"prefix": "app", "prefix": "app",
@ -47,13 +51,13 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "500kb",
"maximumError": "5mb" "maximumError": "1mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "6kb", "maximumWarning": "2kb",
"maximumError": "10kb" "maximumError": "4kb"
} }
] ]
} }

View File

@ -5,7 +5,11 @@
"projects": { "projects": {
"angular.io-example": { "angular.io-example": {
"projectType": "application", "projectType": "application",
"schematics": {}, "schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"prefix": "app", "prefix": "app",
@ -48,13 +52,13 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "500kb",
"maximumError": "5mb" "maximumError": "1mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "6kb", "maximumWarning": "2kb",
"maximumError": "10kb" "maximumError": "4kb"
} }
] ]
} }

View File

@ -13,40 +13,39 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"@angular/service-worker": "~9.1.4", "@angular/service-worker": "~10.1.3",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@ -27,45 +27,44 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"@angular/upgrade": "~9.1.4", "@angular/upgrade": "~10.1.3",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4", "@types/angular": "1.7.3",
"@types/angular": "1.6.47",
"@types/angular-animate": "1.5.10", "@types/angular-animate": "1.5.10",
"@types/angular-mocks": "1.6.0", "@types/angular-mocks": "1.7.0",
"@types/angular-resource": "1.5.14", "@types/angular-resource": "1.5.16",
"@types/angular-route": "1.3.5", "@types/angular-route": "1.7.1",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"concurrently": "^5.0.1", "concurrently": "^5.0.1",
"http-server": "^0.12.0", "http-server": "^0.12.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"karma": "~4.3.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-jasmine": "~2.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"lite-server": "^2.2.2", "lite-server": "^2.2.2",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"rollup": "^1.1.0", "rollup": "^1.1.0",
"rollup-plugin-commonjs": "^9.2.1", "rollup-plugin-commonjs": "^9.2.1",
"rollup-plugin-node-resolve": "^4.0.0", "rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-terser": "^5.3.0", "rollup-plugin-terser": "^5.3.0",
"tslint": "~5.18.0", "tslint": "~6.1.0",
"typescript": "~3.7.5" "typescript": "~4.0.3"
} }
} }

View File

@ -1,5 +1,8 @@
{ {
"extends": "tslint:recommended", "extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"rules": { "rules": {
"align": { "align": {
"options": [ "options": [
@ -13,22 +16,6 @@
"deprecation": { "deprecation": {
"severity": "warning" "severity": "warning"
}, },
"component-class-suffix": true,
"component-selector": [
true,
"element",
// TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense).
"",
"kebab-case"
],
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
["app", "toh"],
"camelCase"
],
"eofline": true, "eofline": true,
"import-blacklist": [ "import-blacklist": [
true, true,
@ -56,6 +43,8 @@
] ]
} }
], ],
// TODO(gkalpak): Fix the code and enable this.
// "no-any": true,
"no-console": [ "no-console": [
true, true,
"debug", "debug",
@ -95,6 +84,11 @@
"named": "never" "named": "never"
} }
}, },
// TODO(gkalpak): Fix the code and enable this.
// "typedef": [
// true,
// "call-signature"
// ],
"typedef-whitespace": { "typedef-whitespace": {
"options": [ "options": [
{ {
@ -130,6 +124,9 @@
"check-typecast" "check-typecast"
] ]
}, },
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true, "no-conflicting-lifecycle": true,
"no-host-metadata-property": true, "no-host-metadata-property": true,
"no-input-rename": true, "no-input-rename": true,
@ -141,9 +138,19 @@
"template-banana-in-box": true, "template-banana-in-box": true,
"template-no-negated-async": true, "template-no-negated-async": true,
"use-lifecycle-interface": true, "use-lifecycle-interface": true,
"use-pipe-transform-interface": true "use-pipe-transform-interface": true,
}, "directive-selector": [
"rulesDirectory": [ true,
"codelyzer" "attribute",
["app", "toh"],
"camelCase"
],
"component-selector": [
true,
"element",
// TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense).
"",
"kebab-case"
] ]
} }
}

View File

@ -5,7 +5,11 @@
"projects": { "projects": {
"angular.io-example": { "angular.io-example": {
"projectType": "application", "projectType": "application",
"schematics": {}, "schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"prefix": "app", "prefix": "app",
@ -48,13 +52,13 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "500kb",
"maximumError": "5mb" "maximumError": "1mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "6kb", "maximumWarning": "2kb",
"maximumError": "10kb" "maximumError": "4kb"
} }
] ]
} }

View File

@ -1,3 +1,4 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {

View File

@ -1,10 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out-tsc/spec", "outDir": "./out-tsc/spec",
"types": [ "types": [
"jasmine", "jasmine"
"node"
] ]
}, },
"files": [ "files": [

View File

@ -5,7 +5,11 @@
"projects": { "projects": {
"angular.io-example": { "angular.io-example": {
"projectType": "application", "projectType": "application",
"schematics": {}, "schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "", "root": "",
"sourceRoot": "src", "sourceRoot": "src",
"prefix": "app", "prefix": "app",
@ -47,13 +51,13 @@
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "500kb",
"maximumError": "5mb" "maximumError": "1mb"
}, },
{ {
"type": "anyComponentStyle", "type": "anyComponentStyle",
"maximumWarning": "6kb", "maximumWarning": "2kb",
"maximumError": "10kb" "maximumError": "4kb"
} }
] ]
} }

View File

@ -17,44 +17,43 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/platform-server": "~9.1.4", "@angular/platform-server": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"@nguniversal/express-engine": "~9.0.1", "@nguniversal/express-engine": "~10.1.0",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"express": "^4.15.2", "express": "^4.15.2",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4", "@nguniversal/builders": "~10.1.0",
"@nguniversal/builders": "^9.0.2", "@types/express": "^4.17.8",
"@types/express": "^4.17.0",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@ -1,19 +1,22 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
// TODO(gkalpak): Fix the code and enable this.
// "strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"downlevelIteration": true, "downlevelIteration": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"importHelpers": true, "importHelpers": true,
"target": "es2015", "target": "es2015",
"typeRoots": [ "module": "es2020",
"node_modules/@types"
],
"lib": [ "lib": [
"es2018", "es2018",
"dom" "dom"
@ -21,7 +24,9 @@
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"enableIvy": false, "enableIvy": false,
"fullTemplateTypeCheck": true, "strictInjectionParameters": true,
"strictInjectionParameters": true "strictInputAccessModifiers": true,
// TODO(gkalpak): Fix the code and enable this (i.e. switch from `fullTemplateTypeCheck` to `strictTemplates`).
"fullTemplateTypeCheck": true,// "strictTemplates": true
} }
} }

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "es2015", "module": "es2020",
"moduleResolution": "node", "moduleResolution": "node",
"sourceMap": true, "sourceMap": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,

View File

@ -20,62 +20,61 @@
"license": "MIT", "license": "MIT",
"repository": {}, "repository": {},
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.4", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.4", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.4", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.4", "@angular/core": "~10.1.3",
"@angular/elements": "~9.1.4", "@angular/elements": "~10.1.3",
"@angular/forms": "~9.1.4", "@angular/forms": "~10.1.3",
"@angular/localize": "~9.1.4", "@angular/localize": "~10.1.3",
"@angular/platform-browser": "~9.1.4", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.4", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/platform-server": "~9.1.4", "@angular/platform-server": "~10.1.3",
"@angular/router": "~9.1.4", "@angular/router": "~10.1.3",
"@angular/service-worker": "~9.1.4", "@angular/service-worker": "~10.1.3",
"@angular/upgrade": "~9.1.4", "@angular/upgrade": "~10.1.3",
"@nguniversal/express-engine": "~9.0.1", "@nguniversal/express-engine": "~10.1.0",
"@webcomponents/custom-elements": "^1.4.1", "@webcomponents/custom-elements": "^1.4.2",
"angular": "1.7.9", "angular": "1.8.0",
"angular-in-memory-web-api": "~0.11.0", "angular-in-memory-web-api": "~0.11.0",
"angular-route": "1.7.9", "angular-route": "1.8.0",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"express": "^4.15.2", "express": "^4.15.2",
"rxjs": "~6.5.4", "rxjs": "~6.6.0",
"systemjs": "0.19.39", "systemjs": "0.19.39",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-angular": "~0.1001.3",
"@angular/cli": "~9.1.4", "@angular/cli": "~10.1.3",
"@angular/compiler-cli": "~9.1.4", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~9.1.4", "@nguniversal/builders": "~10.1.0",
"@nguniversal/builders": "^9.0.2", "@types/angular": "1.7.3",
"@types/angular": "1.6.47",
"@types/angular-animate": "1.5.10", "@types/angular-animate": "1.5.10",
"@types/angular-mocks": "1.6.0", "@types/angular-mocks": "1.7.0",
"@types/angular-resource": "1.5.14", "@types/angular-resource": "1.5.16",
"@types/angular-route": "1.3.5", "@types/angular-route": "1.7.1",
"@types/express": "^4.17.0", "@types/express": "^4.17.8",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/jquery": "3.3.28", "@types/jquery": "3.5.1",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"canonical-path": "1.0.0", "canonical-path": "1.0.0",
"codelyzer": "^5.1.2", "codelyzer": "^6.0.0",
"concurrently": "^5.0.1", "concurrently": "^5.0.1",
"http-server": "^0.12.0", "http-server": "^0.12.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "~0.6.0", "jasmine-marbles": "~0.6.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.4.2", "karma-jasmine-html-reporter": "^1.5.0",
"lite-server": "^2.2.2", "lite-server": "^2.2.2",
"lodash": "^4.16.2", "lodash": "^4.16.2",
"protractor": "~5.4.3", "protractor": "~7.0.0",
"puppeteer": "3.3.0", "puppeteer": "3.3.0",
"rimraf": "^2.5.4", "rimraf": "^2.5.4",
"rollup": "^1.1.0", "rollup": "^1.1.0",
@ -85,6 +84,6 @@
"source-map-explorer": "^1.3.2", "source-map-explorer": "^1.3.2",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

File diff suppressed because it is too large Load Diff