Skip to content

Commit

Permalink
refactor: upgrade nx
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik committed Apr 23, 2022
1 parent 6a9ba3e commit 6a15f46
Show file tree
Hide file tree
Showing 79 changed files with 2,226 additions and 3,623 deletions.
3 changes: 2 additions & 1 deletion apps/api/jest.config.js → apps/api/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api',
preset: '../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/api',
preset: '../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/api"],
"options": {
"jestConfig": "apps/api/jest.config.js",
"jestConfig": "apps/api/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"emitDecoratorMetadata": true,
"target": "es2015"
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
2 changes: 1 addition & 1 deletion apps/api/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]
}
4 changes: 2 additions & 2 deletions apps/voclearn/jest.config.js → apps/voclearn/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'voclearn',
preset: '../../jest.preset.js',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
Expand All @@ -13,10 +13,10 @@ module.exports = {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
preset: '../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion apps/voclearn/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/voclearn"],
"options": {
"jestConfig": "apps/voclearn/jest.config.js",
"jestConfig": "apps/voclearn/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
3 changes: 2 additions & 1 deletion apps/voclearn/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/voclearn/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"]
}
2 changes: 1 addition & 1 deletion apps/voclearn/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"]
}
2 changes: 1 addition & 1 deletion decorate-angular-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function symlinkNgCLItoNxCLI() {

try {
symlinkNgCLItoNxCLI();
require('nx/src/cli/decorate-cli').decorateCli();
require('nx/src/adapter/decorate-cli').decorateCli();
output.log({
title: 'Angular CLI has been decorated to enable computation caching.',
});
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-auth',
preset: '../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../coverage/libs/api/auth',
preset: '../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/auth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/auth"],
"options": {
"jestConfig": "libs/api/auth/jest.config.js",
"jestConfig": "libs/api/auth/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/auth/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"types": ["node"],
"target": "es6"
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
3 changes: 2 additions & 1 deletion libs/api/auth/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"**/*.d.ts"
"**/*.d.ts",
"jest.config.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-quiz',
preset: '../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../coverage/libs/api/quiz',
preset: '../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/quiz/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/quiz"],
"options": {
"jestConfig": "libs/api/quiz/jest.config.js",
"jestConfig": "libs/api/quiz/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/quiz/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"types": ["node"],
"target": "es6"
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
3 changes: 2 additions & 1 deletion libs/api/quiz/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"**/*.d.ts"
"**/*.d.ts",
"jest.config.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-repetition-application',
preset: '../../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../../coverage/libs/api/repetition/application',
preset: '../../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/repetition/application/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/repetition/application"],
"options": {
"jestConfig": "libs/api/repetition/application/jest.config.js",
"jestConfig": "libs/api/repetition/application/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/repetition/application/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"target": "es6"
},
"include": ["**/*.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"]
}
2 changes: 1 addition & 1 deletion libs/api/repetition/application/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-repetition-domain',
preset: '../../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../../coverage/libs/api/repetition/domain',
preset: '../../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/repetition/domain/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/repetition/domain"],
"options": {
"jestConfig": "libs/api/repetition/domain/jest.config.js",
"jestConfig": "libs/api/repetition/domain/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/repetition/domain/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"types": ["node"],
"target": "es6"
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
3 changes: 2 additions & 1 deletion libs/api/repetition/domain/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"**/*.d.ts"
"**/*.d.ts",
"jest.config.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-repetition-infrastructure',
preset: '../../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../../coverage/libs/api/repetition/infrastructure',
preset: '../../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/repetition/infrastructure/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/repetition/infrastructure"],
"options": {
"jestConfig": "libs/api/repetition/infrastructure/jest.config.js",
"jestConfig": "libs/api/repetition/infrastructure/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/repetition/infrastructure/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"target": "es6"
},
"include": ["**/*.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"]
}
2 changes: 1 addition & 1 deletion libs/api/repetition/infrastructure/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-repetition-shell',
preset: '../../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../../coverage/libs/api/repetition/shell',
preset: '../../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/repetition/shell/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/repetition/shell"],
"options": {
"jestConfig": "libs/api/repetition/shell/jest.config.js",
"jestConfig": "libs/api/repetition/shell/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/repetition/shell/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"target": "es6"
},
"include": ["**/*.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"]
}
2 changes: 1 addition & 1 deletion libs/api/repetition/shell/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-shared-application',
preset: '../../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../../coverage/libs/api/shared/application',
preset: '../../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/shared/application/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/shared/application"],
"options": {
"jestConfig": "libs/api/shared/application/jest.config.js",
"jestConfig": "libs/api/shared/application/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/shared/application/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"target": "es6"
},
"include": ["**/*.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts"]
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"]
}
2 changes: 1 addition & 1 deletion libs/api/shared/application/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
displayName: 'api-shared-domain',
preset: '../../../../jest.preset.js',

globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
Expand All @@ -12,4 +12,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../../../coverage/libs/api/shared/domain',
preset: '../../../../jest.preset.ts',
};
2 changes: 1 addition & 1 deletion libs/api/shared/domain/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/api/shared/domain"],
"options": {
"jestConfig": "libs/api/shared/domain/jest.config.js",
"jestConfig": "libs/api/shared/domain/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/api/shared/domain/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"types": ["node"],
"target": "es6"
},
"exclude": ["**/*.spec.ts", "**/*.test.ts"],
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
Loading

0 comments on commit 6a15f46

Please sign in to comment.