Skip to content

Commit

Permalink
Merge pull request #276 from geonetwork/upgrade-ng-14
Browse files Browse the repository at this point in the history
Migrate to nx 14 and angular 14
  • Loading branch information
jahow authored Jun 17, 2022
2 parents c0006ff + 55942c6 commit 239454f
Show file tree
Hide file tree
Showing 149 changed files with 22,264 additions and 34,862 deletions.
1,423 changes: 34 additions & 1,389 deletions angular.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions apps/datafeeder-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/datafeeder-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/datafeeder-e2e/cypress.json",
"tsConfig": "apps/datafeeder-e2e/tsconfig.e2e.json",
"devServerTarget": "datafeeder:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "datafeeder:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/datafeeder-e2e/**/*.{js,ts}"]
},
"outputs": ["{options.outputFile}"]
}
},
"tags": [],
"implicitDependencies": ["datafeeder"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'datafeeder',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand Down
104 changes: 104 additions & 0 deletions apps/datafeeder/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/datafeeder/src",
"prefix": "gn-ui",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/datafeeder",
"index": "apps/datafeeder/src/index.html",
"main": "apps/datafeeder/src/main.ts",
"polyfills": "apps/datafeeder/src/polyfills.ts",
"tsConfig": "apps/datafeeder/tsconfig.app.json",
"aot": true,
"assets": [
"apps/datafeeder/src/favicon.ico",
"apps/datafeeder/src/assets",
{
"glob": "*",
"input": "translations",
"output": "assets/i18n/"
}
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"apps/datafeeder/src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "1mb",
"maximumError": "8mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "apps/datafeeder/src/environments/environment.ts",
"with": "apps/datafeeder/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "datafeeder:build:production"
},
"development": {
"browserTarget": "datafeeder:build:development",
"proxyConfig": "proxy-config.js"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "datafeeder:build"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/datafeeder/src/**/*.ts",
"apps/datafeeder/src/**/*.html"
]
},
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/datafeeder"],
"options": {
"jestConfig": "apps/datafeeder/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": ["type:app"]
}
3 changes: 2 additions & 1 deletion apps/datafeeder/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"]
"include": ["src/**/*.d.ts"],
"exclude": ["jest.config.ts"]
}
3 changes: 2 additions & 1 deletion apps/datafeeder/tsconfig.editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"include": ["**/*.ts"],
"compilerOptions": {
"types": ["jest", "node"]
}
},
"exclude": ["jest.config.ts"]
}
3 changes: 2 additions & 1 deletion apps/datafeeder/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion apps/datafeeder/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]
}
29 changes: 29 additions & 0 deletions apps/datahub-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/datahub-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/datahub-e2e/cypress.json",
"tsConfig": "apps/datahub-e2e/tsconfig.e2e.json",
"devServerTarget": "datahub:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "datahub:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/datahub-e2e/**/*.{js,ts}"]
},
"outputs": ["{options.outputFile}"]
}
},
"tags": [],
"implicitDependencies": ["datahub"]
}
3 changes: 2 additions & 1 deletion apps/datahub/jest.config.js → apps/datahub/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'datahub',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand Down
122 changes: 122 additions & 0 deletions apps/datahub/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/datahub/src",
"prefix": "datahub",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/datahub",
"index": "apps/datahub/src/index.html",
"main": "apps/datahub/src/main.ts",
"polyfills": "apps/datahub/src/polyfills.ts",
"tsConfig": "apps/datahub/tsconfig.app.json",
"assets": [
"apps/datahub/src/favicon.ico",
"apps/datahub/src/assets",
{
"glob": "*",
"input": "translations",
"output": "assets/i18n/"
},
{
"glob": "*",
"input": "conf",
"output": "assets/configuration/"
}
],
"styles": [
"apps/datahub/src/styles.css",
"node_modules/ol/ol.css",
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "10kb",
"maximumError": "20kb"
}
],
"fileReplacements": [
{
"replace": "apps/datahub/src/environments/environment.ts",
"with": "apps/datahub/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "datahub:build:production"
},
"development": {
"browserTarget": "datahub:build:development",
"proxyConfig": "proxy-config.js"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "datahub:build"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/datahub/src/**/*.ts",
"apps/datahub/src/**/*.html"
]
},
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/datahub"],
"options": {
"jestConfig": "apps/datahub/jest.config.ts",
"passWithNoTests": true
}
},
"docker-build": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "nx build datahub --base-href='/datahub/'",
"forwardAllArgs": false
},
"docker build --build-arg APP_NAME=datahub -f ./tools/docker/Dockerfile.apps . -t {args.tag}"
],
"parallel": false
}
}
},
"tags": ["type:app"]
}
3 changes: 2 additions & 1 deletion apps/datahub/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"]
"include": ["src/**/*.d.ts"],
"exclude": ["jest.config.ts"]
}
3 changes: 2 additions & 1 deletion apps/datahub/tsconfig.editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"include": ["**/*.ts"],
"compilerOptions": {
"types": ["jest", "node"]
}
},
"exclude": ["jest.config.ts"]
}
3 changes: 2 additions & 1 deletion apps/datahub/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
Expand Down
2 changes: 1 addition & 1 deletion apps/datahub/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]
}
29 changes: 29 additions & 0 deletions apps/demo-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/demo-e2e/cypress.json",
"tsConfig": "apps/demo-e2e/tsconfig.e2e.json",
"devServerTarget": "demo:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "demo:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/demo-e2e/**/*.{js,ts}"]
},
"outputs": ["{options.outputFile}"]
}
},
"tags": [],
"implicitDependencies": ["demo"]
}
Loading

0 comments on commit 239454f

Please sign in to comment.