Skip to content

Commit

Permalink
refactor(chore): nx migrate 16.2.2 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed Jun 1, 2023
2 parents 60797cb + 00b194d commit 6dd916e
Show file tree
Hide file tree
Showing 30 changed files with 23,892 additions and 29,516 deletions.
46 changes: 10 additions & 36 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,38 @@
{
"root": true,
"ignorePatterns": [
"**/*"
],
"plugins": [
"@nrwl/nx"
],
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": [
"*"
]
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@nrwl/nx/typescript"
],
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"extends": [
"plugin:@nrwl/nx/javascript"
],
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": [
"*.spec.ts",
"*.spec.tsx",
"*.spec.js",
"*.spec.jsx"
],
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
Expand Down
8 changes: 4 additions & 4 deletions apps/runner/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"rootDir": ".",
Expand All @@ -32,7 +32,7 @@
}
},
"serve": {
"executor": "@nrwl/js:node",
"executor": "@nx/js:node",
"options": {
"buildTarget": "runner:build"
},
Expand All @@ -43,14 +43,14 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/runner/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/runner/jest.config.ts",
Expand Down
12 changes: 6 additions & 6 deletions apps/runner/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {takeNextScheduledAudit} from './app/queue';
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
import {execSync} from 'node:child_process';
import { takeNextScheduledAudit } from './app/queue';
// eslint-disable-next-line @nx/enforce-module-boundaries
import { execSync } from 'node:child_process';
import { uploadResultsToBucket } from './app/store';
import { sendAuditResults } from './app/results';
import {UserFlowRunner} from 'user-flow-runner';
import { UserFlowRunner } from 'user-flow-runner';

(async function run(): Promise<void> {
const nextAuditRunParams = await takeNextScheduledAudit();
if (!nextAuditRunParams) {
execSync('shutdown -h -t 5 & exit 0', {shell: '/bin/bash'});
execSync('shutdown -h -t 5 & exit 0', { shell: '/bin/bash' });
return;
}

try {
const {targetUrl, requesterId, endpoint} = nextAuditRunParams;
const { targetUrl, requesterId, endpoint } = nextAuditRunParams;
const auditResults = await new UserFlowRunner().run({ targetUrl });
const resultsUrl = await uploadResultsToBucket(targetUrl, auditResults);
await sendAuditResults(requesterId, endpoint, resultsUrl);
Expand Down
12 changes: 6 additions & 6 deletions apps/user-flow-manager-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
/**
* TODO(@nrwl/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
* You should consider enabling this once you verify tests do not depend on each other
* More Info: https://docs.cypress.io/guides/references/migration-guide#Test-Isolation
**/
* TODO(@nx/cypress): In Cypress v12,the testIsolation option is turned on by default.
* This can cause tests to start breaking where not indended.
* You should consider enabling this once you verify tests do not depend on each other
* More Info: https://docs.cypress.io/guides/references/migration-guide#Test-Isolation
**/
testIsolation: false,
},
});
4 changes: 2 additions & 2 deletions apps/user-flow-manager-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/user-flow-manager-e2e/cypress.config.ts",
"devServerTarget": "user-flow-manager:serve:development",
Expand All @@ -18,7 +18,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/user-flow-manager-e2e/**/*.{js,ts}"]
Expand Down
4 changes: 2 additions & 2 deletions apps/user-flow-manager/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
Expand All @@ -26,7 +26,7 @@
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
4 changes: 2 additions & 2 deletions apps/user-flow-manager/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": ["apps/user-flow-manager/**/*.ts", "apps/user-flow-manager/**/*.html"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/user-flow-manager/jest.config.ts",
Expand Down
6 changes: 3 additions & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nrwl/jest';
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects()
};
projects: getJestProjects(),
};
2 changes: 1 addition & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
Expand Down
4 changes: 2 additions & 2 deletions libs/data-access/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
}
]
},
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
6 changes: 3 additions & 3 deletions libs/data-access/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"prefix": "app",
"targets": {
"build": {
"executor": "@nrwl/angular:ng-packagr-lite",
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "libs/data-access/ng-package.json"
Expand All @@ -22,15 +22,15 @@
"defaultConfiguration": "production"
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/data-access/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/data-access/**/*.ts", "libs/data-access/**/*.html"]
Expand Down
4 changes: 2 additions & 2 deletions libs/environments/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
}
]
},
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
4 changes: 2 additions & 2 deletions libs/environments/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"prefix": "app",
"targets": {
"build": {
"executor": "@nrwl/angular:ng-packagr-lite",
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "libs/environments/ng-package.json"
Expand All @@ -22,7 +22,7 @@
"defaultConfiguration": "production"
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/environments/**/*.ts", "libs/environments/**/*.html"]
Expand Down
4 changes: 2 additions & 2 deletions libs/features/result-viewer/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
}
]
},
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
6 changes: 3 additions & 3 deletions libs/features/result-viewer/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"prefix": "app",
"targets": {
"build": {
"executor": "@nrwl/angular:ng-packagr-lite",
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "libs/features/result-viewer/ng-package.json"
Expand All @@ -22,15 +22,15 @@
"defaultConfiguration": "production"
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/features/result-viewer/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/features/result-viewer/**/*.ts", "libs/features/result-viewer/**/*.html"]
Expand Down
4 changes: 2 additions & 2 deletions libs/features/simple-audit/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
}
]
},
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
6 changes: 3 additions & 3 deletions libs/features/simple-audit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"prefix": "app",
"targets": {
"build": {
"executor": "@nrwl/angular:ng-packagr-lite",
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "libs/features/simple-audit/ng-package.json"
Expand All @@ -22,15 +22,15 @@
"defaultConfiguration": "production"
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/features/simple-audit/jest.config.ts",
"passWithNoTests": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/features/simple-audit/**/*.ts", "libs/features/simple-audit/**/*.html"]
Expand Down
4 changes: 2 additions & 2 deletions libs/shared/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
}
]
},
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
Loading

0 comments on commit 6dd916e

Please sign in to comment.