diff --git a/integration/_payload-limits.json b/integration/_payload-limits.json index a0e1ab4d79..6c1ecb0d8e 100644 --- a/integration/_payload-limits.json +++ b/integration/_payload-limits.json @@ -14,9 +14,12 @@ "cli-hello-world-ivy-minimal": { "master": { "uncompressed": { - "runtime": 1485, - "main": 14213, - "polyfills": 45482 + "runtime-es2015": 1485, + "runtime-es5": 1485, + "main-es2015": 14440, + "main-es5": 14582, + "polyfills-es2015": 36808, + "polyfills-es5": 127675 } } }, diff --git a/integration/cli-hello-world-ivy-minimal/.gitignore b/integration/cli-hello-world-ivy-minimal/.gitignore new file mode 100644 index 0000000000..86d943a9b2 --- /dev/null +++ b/integration/cli-hello-world-ivy-minimal/.gitignore @@ -0,0 +1,46 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc +# Only exists if Bazel was run +/bazel-out + +# dependencies +/node_modules + +# profiling files +chrome-profiler-events*.json +speed-measure-plugin*.json + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db diff --git a/integration/cli-hello-world-ivy-minimal/README.md b/integration/cli-hello-world-ivy-minimal/README.md index b89f9e7dae..c3c6b2eb8c 100644 --- a/integration/cli-hello-world-ivy-minimal/README.md +++ b/integration/cli-hello-world-ivy-minimal/README.md @@ -1,6 +1,6 @@ # CliHelloWorldIvyMinimal -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0-rc.0. +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.0-next.9. ## Development server diff --git a/integration/cli-hello-world-ivy-minimal/angular.json b/integration/cli-hello-world-ivy-minimal/angular.json index a79920daea..48c66509d0 100644 --- a/integration/cli-hello-world-ivy-minimal/angular.json +++ b/integration/cli-hello-world-ivy-minimal/angular.json @@ -1,17 +1,14 @@ { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, - "cli": { - "packageManager": "yarn" - }, "newProjectRoot": "projects", "projects": { "cli-hello-world-ivy-minimal": { + "projectType": "application", + "schematics": {}, "root": "", "sourceRoot": "src", - "projectType": "application", "prefix": "app", - "schematics": {}, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", @@ -20,7 +17,8 @@ "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.app.json", + "tsConfig": "tsconfig.app.json", + "aot": true, "assets": [ "src/favicon.ico", "src/assets" @@ -44,7 +42,6 @@ "sourceMap": false, "extractCss": true, "namedChunks": false, - "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, @@ -53,6 +50,11 @@ "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" } ] } @@ -87,16 +89,16 @@ "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.spec.json", - "karmaConfig": "src/karma.conf.js", - "styles": [ - "src/styles.css" - ], - "scripts": [], + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", "assets": [ "src/favicon.ico", "src/assets" ], + "styles": [ + "src/styles.css" + ], + "scripts": [], "progress": false, "watch": false } @@ -105,21 +107,15 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" ], "exclude": [ "**/node_modules/**" ] } - } - } - }, - "cli-hello-world-ivy-minimal-e2e": { - "root": "e2e/", - "projectType": "application", - "prefix": "", - "architect": { + }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { @@ -138,18 +134,8 @@ "devServerTarget": "cli-hello-world-ivy-minimal:serve:ci-production" } } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] - } } } - } - }, + }}, "defaultProject": "cli-hello-world-ivy-minimal" } diff --git a/integration/cli-hello-world-ivy-minimal/browserslist b/integration/cli-hello-world-ivy-minimal/browserslist new file mode 100644 index 0000000000..80848532e4 --- /dev/null +++ b/integration/cli-hello-world-ivy-minimal/browserslist @@ -0,0 +1,12 @@ +# 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 + +> 0.5% +last 2 versions +Firefox ESR +not dead +not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file diff --git a/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js b/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js index 71baa5048b..b5fe2936d2 100644 --- a/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js +++ b/integration/cli-hello-world-ivy-minimal/e2e/protractor.conf.js @@ -1,8 +1,12 @@ +// @ts-check // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts const { SpecReporter } = require('jasmine-spec-reporter'); +/** + * @type { import("protractor").Config } + */ exports.config = { allScriptsTimeout: 11000, specs: [ @@ -25,7 +29,7 @@ exports.config = { }, onPrepare() { require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.e2e.json') + project: require('path').join(__dirname, './tsconfig.json') }); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } diff --git a/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts b/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts index 933df0f309..49440ef055 100644 --- a/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts +++ b/integration/cli-hello-world-ivy-minimal/e2e/src/app.e2e-spec.ts @@ -1,10 +1,9 @@ -import { browser } from 'protractor'; import { AppPage } from './app.po'; +import { browser, logging } from 'protractor'; describe('cli-hello-world-ivy-minimal App', () => { // Ivy renderComponent apps fail on protractor when waiting for Angular. browser.waitForAngularEnabled(false); - let page: AppPage; beforeEach(() => { @@ -15,4 +14,12 @@ describe('cli-hello-world-ivy-minimal App', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to cli-hello-world-ivy-minimal!'); }); + + afterEach(async () => { + // Assert that there are no errors emitted from the browser + const logs = await browser.manage().logs().get(logging.Type.BROWSER); + expect(logs).not.toContain(jasmine.objectContaining({ + level: logging.Level.SEVERE, + } as logging.Entry)); + }); }); diff --git a/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.e2e.json b/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.json similarity index 84% rename from integration/cli-hello-world-ivy-minimal/e2e/tsconfig.e2e.json rename to integration/cli-hello-world-ivy-minimal/e2e/tsconfig.json index a6dd622028..39b800f789 100644 --- a/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.e2e.json +++ b/integration/cli-hello-world-ivy-minimal/e2e/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "../out-tsc/app", + "outDir": "../out-tsc/e2e", "module": "commonjs", "target": "es5", "types": [ @@ -10,4 +10,4 @@ "node" ] } -} \ No newline at end of file +} diff --git a/integration/cli-hello-world-ivy-minimal/src/karma.conf.js b/integration/cli-hello-world-ivy-minimal/karma.conf.js similarity index 81% rename from integration/cli-hello-world-ivy-minimal/src/karma.conf.js rename to integration/cli-hello-world-ivy-minimal/karma.conf.js index 375eb671d0..d8d068fb67 100644 --- a/integration/cli-hello-world-ivy-minimal/src/karma.conf.js +++ b/integration/cli-hello-world-ivy-minimal/karma.conf.js @@ -16,7 +16,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, 'coverage'), + dir: require('path').join(__dirname, './coverage/latest-app'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, @@ -25,13 +25,8 @@ module.exports = function (config) { colors: true, logLevel: config.LOG_INFO, autoWatch: true, - browsers: ['CustomChrome'], + browsers: ['Chrome'], singleRun: false, - customLaunchers: { - CustomChrome: { - base: 'Chrome', - flags: ['--no-sandbox'] - } - } + restartOnFileChange: true }); }; diff --git a/integration/cli-hello-world-ivy-minimal/package.json b/integration/cli-hello-world-ivy-minimal/package.json index 7f8eb6cbb6..46eb82487c 100644 --- a/integration/cli-hello-world-ivy-minimal/package.json +++ b/integration/cli-hello-world-ivy-minimal/package.json @@ -23,7 +23,6 @@ "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", "@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic", "@angular/router": "file:../../dist/packages-dist/router", - "core-js": "file:../../node_modules/core-js", "rxjs": "file:../../node_modules/rxjs", "tslib": "file:../../node_modules/tslib", "zone.js": "file:../../node_modules/zone.js" @@ -33,19 +32,19 @@ "@angular/cli": "file:../../node_modules/@angular/cli", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/language-service": "file:../../dist/packages-dist/language-service", - "@types/jasmine": "~2.8.8", + "@types/jasmine": "~3.4.0", "@types/jasminewd2": "~2.0.3", "@types/node": "file:../../node_modules/@types/node", - "codelyzer": "~4.5.0", - "jasmine-core": "~2.99.1", + "codelyzer": "^5.1.2", + "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~4.2.1", - "karma": "~3.1.1", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.1", - "karma-jasmine": "~1.1.2", - "karma-jasmine-html-reporter": "^0.2.2", + "karma": "~4.3.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~2.1.0", + "karma-jasmine": "~2.0.1", + "karma-jasmine-html-reporter": "^1.4.2", "protractor": "file:../../node_modules/protractor", - "ts-node": "~7.0.0", + "ts-node": "~8.3.0", "tslint": "~5.18.0", "typescript": "file:../../node_modules/typescript" } diff --git a/integration/cli-hello-world-ivy-minimal/src/browserslist b/integration/cli-hello-world-ivy-minimal/src/browserslist deleted file mode 100644 index 37371cb04b..0000000000 --- a/integration/cli-hello-world-ivy-minimal/src/browserslist +++ /dev/null @@ -1,11 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# -# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed - -> 0.5% -last 2 versions -Firefox ESR -not dead -not IE 9-11 \ No newline at end of file diff --git a/integration/cli-hello-world-ivy-minimal/src/favicon.ico b/integration/cli-hello-world-ivy-minimal/src/favicon.ico index 8081c7ceaf..997406ad22 100644 Binary files a/integration/cli-hello-world-ivy-minimal/src/favicon.ico and b/integration/cli-hello-world-ivy-minimal/src/favicon.ico differ diff --git a/integration/cli-hello-world-ivy-minimal/src/polyfills.ts b/integration/cli-hello-world-ivy-minimal/src/polyfills.ts index 615eeed0ca..aa665d6b87 100644 --- a/integration/cli-hello-world-ivy-minimal/src/polyfills.ts +++ b/integration/cli-hello-world-ivy-minimal/src/polyfills.ts @@ -18,31 +18,9 @@ * BROWSER POLYFILLS */ -/** IE9, IE10, IE11, and Chrome <55 requires all of the following polyfills. - * This also includes Android Emulators with older versions of Chrome and Google Search/Googlebot - */ - -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; - /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. -/** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - /** * Web Animations `@angular/platform-browser/animations` * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. diff --git a/integration/cli-hello-world-ivy-minimal/src/tsconfig.app.json b/integration/cli-hello-world-ivy-minimal/src/tsconfig.app.json deleted file mode 100644 index a5831fdc4a..0000000000 --- a/integration/cli-hello-world-ivy-minimal/src/tsconfig.app.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "types": [] - }, - "exclude": [ - "test.ts", - "**/*.spec.ts" - ], - "angularCompilerOptions": { - "enableIvy": "ngtsc" - } -} diff --git a/integration/cli-hello-world-ivy-minimal/src/tsconfig.spec.json b/integration/cli-hello-world-ivy-minimal/src/tsconfig.spec.json deleted file mode 100644 index de7733630e..0000000000 --- a/integration/cli-hello-world-ivy-minimal/src/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/integration/cli-hello-world-ivy-minimal/src/tslint.json b/integration/cli-hello-world-ivy-minimal/src/tslint.json deleted file mode 100644 index 52e2c1a5a7..0000000000 --- a/integration/cli-hello-world-ivy-minimal/src/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] - } -} diff --git a/integration/cli-hello-world-ivy-minimal/tsconfig.app.json b/integration/cli-hello-world-ivy-minimal/tsconfig.app.json new file mode 100644 index 0000000000..f758d9820d --- /dev/null +++ b/integration/cli-hello-world-ivy-minimal/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/integration/cli-hello-world-ivy-minimal/tsconfig.json b/integration/cli-hello-world-ivy-minimal/tsconfig.json index b271fd9f3d..30956ae7ea 100644 --- a/integration/cli-hello-world-ivy-minimal/tsconfig.json +++ b/integration/cli-hello-world-ivy-minimal/tsconfig.json @@ -5,12 +5,12 @@ "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, - "module": "es2015", - "moduleResolution": "node", - "emitDecoratorMetadata": true, + "downlevelIteration": true, "experimentalDecorators": true, + "module": "esnext", + "moduleResolution": "node", "importHelpers": true, - "target": "es5", + "target": "es2015", "typeRoots": [ "node_modules/@types" ], @@ -18,5 +18,9 @@ "es2018", "dom" ] + }, + "angularCompilerOptions": { + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true } } diff --git a/integration/cli-hello-world-ivy-minimal/tsconfig.spec.json b/integration/cli-hello-world-ivy-minimal/tsconfig.spec.json new file mode 100644 index 0000000000..6400fde7d5 --- /dev/null +++ b/integration/cli-hello-world-ivy-minimal/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/integration/cli-hello-world-ivy-minimal/tslint.json b/integration/cli-hello-world-ivy-minimal/tslint.json index 4370015671..c8d70f1520 100644 --- a/integration/cli-hello-world-ivy-minimal/tslint.json +++ b/integration/cli-hello-world-ivy-minimal/tslint.json @@ -1,32 +1,32 @@ { - "rulesDirectory": [ - "codelyzer" - ], + "extends": "tslint:recommended", "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, + "array-type": false, + "arrow-parens": false, "deprecation": { - "severity": "warn" + "severity": "warning" }, - "eofline": true, - "forin": true, + "component-class-suffix": true, + "contextual-lifecycle": true, + "directive-class-suffix": true, + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], "import-blacklist": [ true, "rxjs/Rx" ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, + "interface-name": false, + "max-classes-per-file": false, "max-line-length": [ true, 140 @@ -43,8 +43,7 @@ ] } ], - "no-arg": true, - "no-bitwise": true, + "no-consecutive-blank-lines": false, "no-console": [ true, "debug", @@ -53,78 +52,40 @@ "timeEnd", "trace" ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, "no-empty": false, - "no-empty-interface": true, - "no-eval": true, "no-inferrable-types": [ true, "ignore-params" ], - "no-misused-new": true, "no-non-null-assertion": true, "no-redundant-jsdoc": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ + "no-var-requires": false, + "object-literal-key-quotes": [ true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" + "as-needed" ], - "prefer-const": true, + "object-literal-sort-keys": false, + "ordered-imports": false, "quotemark": [ true, "single" ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "no-output-on-prefix": true, - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, + "trailing-comma": false, + "no-conflicting-lifecycle": true, + "no-host-metadata-property": true, "no-input-rename": true, + "no-inputs-metadata-property": true, + "no-output-native": true, + "no-output-on-prefix": true, "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} + "no-outputs-metadata-property": true, + "template-banana-in-box": true, + "template-no-negated-async": true, + "use-lifecycle-interface": true, + "use-pipe-transform-interface": true + }, + "rulesDirectory": [ + "codelyzer" + ] +} \ No newline at end of file