[ADF-5146] Upgrade to Angular 10 (#5834)

* remove useless module

* upgrade to angular 8

* upgrade material to v8

* upgrade adf libs

* migrate demo shell to v8

* upgrade to angular 9

* upgrade material to v9

* remove hammer

* upgrade nx

* upgrade datetime picker

* upgrade flex layout

* update core api

* remove entry components

* code fixes

* upgrade testbed usage

* code fixes

* remove unnecessary core-js from tests

* upgrade CLI

* ts config fixes

* fix builds

* fix testing config

* compile fixes

* fix demo shell dev setup

* fix core tests

* fix card view import

* upgrade nx

* disable smart builds for now

* remove fdescribe

* restore smart builds

* fix issues

* unify tsconfigs and fix newly found issues

* fix configuration and cleanup package scripts

* improved production build from the same config

* use ADF libs directly instead of node_modules

* disable smart build

* single app configuration (angular)

* fix core build

* fix build scripts

* lint fixes

* fix linting setup

* fix linting rules

* various fixes

* disable affected libs for unit tests

* cleanup insights package.json

* simplify smart-build

* fix content tests

* fix tests

* test fixes

* fix tests

* fix test

* fix tests

* disable AppExtensionsModule (monaco example)

* remove monaco extension module

* upgrade bundle check rules

* fix insights tests and karma config

* fix protractor config

* e2e workaround

* upgrade puppeteer and split linting and build

* reusable resources config

* update protractor config

* fix after rebase

* fix protractor config

* fix e2e tsconfig

* update e2e setup

* Save demoshell artifact on S3 and remove travis cache

* Push the libs on S3 and fetch before releasing it

* Add deps

* Add dependencies among libs and run only affected unit test and build

* fix the travis stage name

* fix after renaming dev to demoshell

* force the order of the projects

* remove unused dependencies

* fix content e2e script

* exit codes fix

* add extra exit codes to core e2e

* postinstall hook and package cleanup

* cleanup packages

* remove deprecated code and dependency on router

* improve bundle analyzer script

* minor code fixes

* update spec

* fix code after rebase

* upgrade protractor after rebase

* fix e2e mapping lib

* Update tsconfig.e2e.json

* update e2e tsconfig

* fix angular config

* fix protractor runs

* cache dist folder for libs

* update material selectors for dropdowns

* selector fixes

* remove duplicated e2e that have unit tests already

* fix login selector

* fix e2e

* fix test

* fix import issues

* fix selector

* cleanup old monaco extension files

* cleanup demo shell login

* add protractor max retries

* disable customisations of protractor

* fix login validation

* fix after rebase

* fix after rebase, disable latest versions of libs

* Hide the report tab and rollback the localstorage

* rename protractor config back to js

* restore lint as part of build

* cleanup code

* do not copy anything to node_modules on dist test

* fix unit tests

* config fixes

* fix code

* fix code after rebase

* fix tests

* remove existing words from spellcheck

* remove useless directive decorators

* update package.json after rebase

* add js-api back

* code fixes

* add missing export

* update configs

* fix code

* try fix the sso login test

* fix

* remove puppeteer unit

* fix e2e script

* fix

* make provider easy

* fix routes module before upgrade

* fix unit tests

* upgrade angular cli

* upgrade to angular 10

Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
Denys Vuika
2020-07-03 13:01:05 +01:00
committed by GitHub
co-authored by maurizio vitale Eugenio Romano Eugenio Romano
parent 2f0a585273
commit cd2b489100
579 changed files with 15689 additions and 10745 deletions
+51 -77
View File
@@ -6,6 +6,7 @@
"author": "Alfresco Software, Ltd.",
"main": "./index.js",
"scripts": {
"postinstall": "ngcc",
"ng": "ng",
"concurrently": "concurrently",
"ng-packagr": "node ./node_modules/ng-packagr/cli/main.js",
@@ -23,40 +24,34 @@
"prepublishOnly": "npm run build-lib",
"build-lib": "./scripts/build/build-all-lib.sh",
"bundlesize-check": "bundlesize",
"affected:libs": "./node_modules/.bin/nx affected:libs",
"webpack-bundle-analyzer": "webpack-bundle-analyzer demo-shell/dist/stats.json",
"affected:libs": "nx affected:libs",
"inspect.bundle": "ng build demoshell --prod --stats-json && npx webpack-bundle-analyzer dist/demo-shell/stats-es2015.json",
"coverage": "./lib/config/create-coverage-index.sh && lite-server -c ./lib/config/proxy-coverage.json",
"03": "echo -------------------------------------------- Lint -----------------------------------------------",
"03s": "",
"lint-demo": "./node_modules/.bin/tslint -p ./demo-shell/tsconfig.json -c ./demo-shell/tslint.json",
"lint-lib": "./node_modules/.bin/tslint -p ./lib/tsconfig.json -c ./lib/tslint.json",
"lint-e2e": "tsc -p ./e2e/tsconfig.e2e.json && ./node_modules/.bin/tslint -p ./e2e/tsconfig.e2e.json -c ./e2e/tslint.json",
"lint-demo": "tslint -p tsconfig.json -c tslint.json",
"lint-lib": "tslint -p ./lib/tsconfig.json -c ./lib/tslint.json",
"lint-e2e": "tsc -p tsconfig.e2e.json && tslint -p tsconfig.e2e.json -c tslint.json",
"validate-config": "ajv validate -s ./lib/core/app-config/schema.json -d ./demo-shell/src/app.config.json --errors=text --verbose",
"spellcheck": "cspell 'demo-shell/{src,e2e}/**/*.ts' 'e2e/**/*.ts' 'lib/{content-services,core,extensions,insights,process-services,process-services-cloud}/**/*.ts'",
"stylelint": "stylelint ./**/*.scss --config stylelint-config.json",
"04": "echo -------------------------------------------- Demo Shell -----------------------------------------------",
"04s": "",
"start": "ng lint dist && npm run validate-config && ng serve dist --open",
"start:dev": "ng lint dev && npm run validate-config && concurrently \"ng serve dev --open\" \"npm run style:dev --watch\" ",
"start:dist": "ng lint dist && npm run validate-config && ng serve dist --prod --open",
"build": "npm run validate-config && ng build dist",
"build:dev": "npm run validate-config && npm run style:dev && ng build dev",
"build:dist": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod",
"build:dist:stats": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --stats-json",
"build:dist:e2e": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --configuration=e2e --stats-json ",
"start": "ng lint demoshell && npm run validate-config && concurrently \"ng serve demoshell --open\" \"npm run style:dev --watch\" ",
"start:prod": "ng lint demoshell && npm run validate-config && ng serve demoshell --prod --open",
"build": "npm run validate-config && npm run style:dev && ng build demoshell",
"build:prod": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build demoshell --prod",
"style:dev": "npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail",
"test": "npm run validate-config && ng test dev --watch=false",
"test": "npm run validate-config && ng test demoshell --watch=false",
"05": "echo -------------------------------------------- E2e -----------------------------------------------",
"05s": "",
"e2e": "./scripts/test-e2e-lib.sh -host 'localhost:4200' -dev --folder demo-shell",
"e2e-lib": "ng e2e lib-e2e-test --port=4200",
"lite-server-e2e": "lite-server --baseDir='demo-shell/dist/' -c ./e2e/lite-server-proxy.js",
"lite-server-e2e": "lite-server --baseDir='dist/demo-shell/' -c ./e2e/lite-server-proxy.js",
"postbuild:ci": "node ./scripts/app-config-replace.js",
"06": "echo -------------------------------------------- Clean ----------------------------------------------",
"06s": "",
"clean": "rimraf dist ./node_modules typings lib/dist",
"clean-lock": "rimraf package-lock.json",
"lint:staged": "lint-staged",
"clean": "rimraf dist node_modules lib/dist",
"snyk-protect": "snyk protect",
"prepare": "npm run snyk-protect"
},
@@ -78,81 +73,68 @@
"process services-cloud"
],
"dependencies": {
"@alfresco/adf-content-services": "3.9.0",
"@alfresco/adf-core": "3.9.0",
"@alfresco/adf-extensions": "3.9.0",
"@alfresco/adf-insights": "3.9.0",
"@alfresco/adf-process-services": "3.9.0",
"@alfresco/adf-process-services-cloud": "3.9.0",
"@alfresco/js-api": "3.9.0",
"@angular/animations": "^7.2.15",
"@angular/cdk": "7.3.7",
"@angular/common": "^7.2.15",
"@angular/compiler": "^7.2.15",
"@angular/core": "^7.2.15",
"@angular/flex-layout": "^7.0.0-beta.24",
"@angular/forms": "^7.2.15",
"@angular/material": "^7.3.7",
"@angular/material-moment-adapter": "^7.3.7",
"@angular/platform-browser": "^7.2.15",
"@angular/platform-browser-dynamic": "^7.2.15",
"@angular/router": "^7.2.15",
"@mat-datetimepicker/core": "^2.0.1",
"@mat-datetimepicker/moment": "^2.0.1",
"@ngx-translate/core": "^11.0.0",
"@angular/animations": "^10.0.2",
"@angular/cdk": "10.0.1",
"@angular/common": "^10.0.2",
"@angular/compiler": "^10.0.2",
"@angular/core": "^10.0.2",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "^10.0.2",
"@angular/material": "^10.0.1",
"@angular/material-moment-adapter": "^10.0.1",
"@angular/platform-browser": "^10.0.2",
"@angular/platform-browser-dynamic": "^10.0.2",
"@angular/router": "^10.0.2",
"@mat-datetimepicker/core": "^4.1.0",
"@mat-datetimepicker/moment": "^4.1.0",
"@ngx-translate/core": "^13.0.0",
"@types/request": "^2.48.3",
"adf-monaco-extension": "0.0.8",
"adf-tslint-rules": "0.0.6",
"chart.js": "2.5.0",
"chart.js": "2.9.3",
"classlist.js": "1.1.20150312",
"core-js": "^2.5.4",
"custom-event-polyfill": "0.3.0",
"hammerjs": "2.0.8",
"minimatch": "^3.0.4",
"minimatch-browser": "1.0.0",
"moment": "2.22.2",
"moment-es6": "^1.0.0",
"ng2-charts": "1.6.0",
"ng2-charts": "2.3.2",
"ngx-monaco-editor": "7.0.0",
"pdfjs-dist": "2.3.200",
"raphael": "2.2.7",
"reflect-metadata": "0.1.13",
"remark-validate-links": "^8.0.0",
"rxjs": "^6.2.2",
"rxjs": "^6.5.5",
"snyk": "^1.316.1",
"systemjs": "0.19.27",
"web-animations-js": "2.3.1",
"zone.js": "~0.8.26"
"tslib": "^2.0.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@alfresco/adf-cli": "3.9.0",
"@alfresco/adf-testing": "3.9.0",
"@angular-devkit/build-angular": "^0.13.4",
"@angular-devkit/build-ng-packagr": "~0.10.0",
"@angular/cli": "^7.3.9",
"@angular/compiler-cli": "^7.2.15",
"@nrwl/nx": "7.1.1",
"@nrwl/schematics": "7.1.1",
"@angular-devkit/build-angular": "~0.1000.1",
"@angular-devkit/build-ng-packagr": "~0.1000.1",
"@angular/cli": "^10.0.1",
"@angular/compiler-cli": "^10.0.2",
"@nrwl/schematics": "8.12.11",
"@nrwl/workspace": "9.3.0",
"@paperist/types-remark": "^0.1.3",
"@types/hammerjs": "2.0.35",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/minimatch": "^3.0.3",
"@types/node": "^12.7.7",
"@types/node": "^12.11.1",
"@types/pdfjs-dist": "^2.1.3",
"@types/selenium-webdriver": "^3.0.8",
"ajv-cli": "^3.0.0",
"bundlesize": "0.18.0",
"chalk": "^2.3.2",
"chrome-remote-interface": "^0.26.1",
"codelyzer": "5.0.0",
"codelyzer": "^5.1.2",
"commander": "4.0.0",
"concurrently": "^3.5.1",
"cspell": "^3.1.3",
"css-loader": "^3.4.2",
"dotenv": "6.2.0",
"ejs": "^2.6.1",
"fs-extra": "^4.0.2",
"graphql": "^14.1.1",
"graphql-request": "^1.8.2",
"husky": "^1.2.0",
@@ -174,7 +156,6 @@
"license-checker": "^25.0.1",
"lint-staged": "^8.1.7",
"lite-server": "^2.4.0",
"lodash.wrap": "^4.1.1",
"markdownlint-cli": "^0.16.0",
"mdast": "^3.0.0",
"mdast-util-compact": "^1.0.1",
@@ -183,15 +164,12 @@
"mdast-zone": "^3.0.1",
"mini-css-extract-plugin": "^0.9.0",
"nconf": "^0.10.0",
"ng-packagr": "4.7.1",
"ng-packagr": "^10.0.0",
"node-sass": "4.13.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"protractor": "^5.4.2",
"protractor-browser-logs": "1.0.456",
"protractor-retry": "^1.2.9",
"protractor-smartrunner": "^0.1.1",
"puppeteer": "1.17.0",
"raw-loader": "0.5.1",
"remark": "^9.0.0",
"remark-frontmatter": "^1.2.0",
"rimraf": "^2.6.2",
@@ -199,30 +177,26 @@
"sass-loader": "7.1.0",
"scss-bundle": "2.3.2",
"selenium-webdriver": "4.0.0-alpha.5",
"spdx-license-list": "^5.0.0",
"stylelint": "^9.7.1",
"ts-node": "~4.1.0",
"tsconfig-paths": "^3.8.0",
"tsickle": "^0.34.0",
"tslib": "^1.9.0",
"ts-node": "^8.10.2",
"tsconfig-paths": "^3.9.0",
"tslint": "5.20.0",
"tslint-consistent-codestyle": "^1.15.1",
"typedoc": "^0.15.0",
"typescript": "3.1.6",
"typescript": "3.9.6",
"unist-util-select": "^2.0.0",
"url-join": "^4.0.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.1.0"
},
"license": "Apache-2.0",
"bundlesize": [
{
"path": "./lib/dist/content-services/bundles/adf-content-services.umd.min.js",
"maxSize": "70 kb"
"maxSize": "85 kb"
},
{
"path": "./lib/dist/process-services/bundles/adf-process-services.umd.min.js",
"maxSize": "50 kb"
"maxSize": "62 kb"
},
{
"path": "./lib/dist/insights/bundles/adf-insights.umd.min.js",
@@ -230,11 +204,11 @@
},
{
"path": "./lib/dist/core/bundles/adf-core.umd.min.js",
"maxSize": "131 kb"
"maxSize": "165 kb"
},
{
"path": "./lib/dist/process-services-cloud/bundles/adf-process-services-cloud.umd.min.js",
"maxSize": "50 kb"
"maxSize": "60 kb"
},
{
"path": "./lib/dist/extensions/bundles/adf-extensions.umd.min.js",
@@ -260,7 +234,7 @@
},
"husky": {
"hooks": {
"pre-commit": "npm run lint:staged"
"pre-commit": "lint-staged"
}
},
"snyk": true