diff --git a/.eslintrc.json b/.eslintrc.json index 06cc47d9..e41eaa81 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,12 @@ { "root": true, "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx"], + "plugins": ["@nx"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/enforce-module-boundaries": [ "error", { "enforceBuildableLibDependency": true, @@ -23,13 +23,19 @@ }, { "files": ["*.ts", "*.tsx"], - "extends": ["plugin:@nrwl/nx/typescript"], - "rules": {} + "extends": ["plugin:@nx/typescript"], + "rules": { + "@typescript-eslint/no-extra-semi": "error", + "no-extra-semi": "off" + } }, { "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nrwl/nx/javascript"], - "rules": {} + "extends": ["plugin:@nx/javascript"], + "rules": { + "@typescript-eslint/no-extra-semi": "error", + "no-extra-semi": "off" + } } ] } diff --git a/.github/workflows/ngx-aws-deploy-s3.yml b/.github/workflows/ngx-aws-deploy-s3.yml index 72b04dea..1ca700b0 100644 --- a/.github/workflows/ngx-aws-deploy-s3.yml +++ b/.github/workflows/ngx-aws-deploy-s3.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [20.x, 22.x] env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflows/ngx-aws-deploy.yml b/.github/workflows/ngx-aws-deploy.yml index 6c47f355..6776fedb 100644 --- a/.github/workflows/ngx-aws-deploy.yml +++ b/.github/workflows/ngx-aws-deploy.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [20.x, 22.x] env: NX_BRANCH: ${{ github.event.number }} diff --git a/.github/workflows/nx-migrate.yml b/.github/workflows/nx-migrate.yml index 9f86bddf..5bab732a 100644 --- a/.github/workflows/nx-migrate.yml +++ b/.github/workflows/nx-migrate.yml @@ -23,14 +23,14 @@ jobs: - name: Install dependencies run: npm install - - name: Check if @nrwl/workspace is outdated + - name: Check if @nx/workspace is outdated id: nrwl-workspace-outdated run: | - IS_OUTDATED=$(test ! -z "$(npm outdated @nrwl/workspace)" && echo true || echo false) + IS_OUTDATED=$(test ! -z "$(npm outdated @nx/workspace)" && echo true || echo false) echo $IS_OUTDATED echo "::set-output name=outdated::$IS_OUTDATED" - - name: Update @nrwl/workspace + - name: Update @nx/workspace if: steps.nrwl-workspace-outdated.outputs.outdated == 'true' run: npx nx migrate latest @@ -45,7 +45,7 @@ jobs: echo $HAS_MIGRATIONS echo "::set-output name=has_migrations::$HAS_MIGRATIONS" - - name: Run @nrwl/workspace migrations + - name: Run @nx/workspace migrations if: steps.nrwl-workspace-has-migrations.outputs.has_migrations == 'true' run: npx nx migrate --run-migrations diff --git a/.gitignore b/.gitignore index 18cdd8fe..11bc818d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ testem.log .DS_Store Thumbs.db -migrations.json \ No newline at end of file +migrations.json +.nx \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index d0b804da..daffe92c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,6 @@ /dist /coverage + +/.nx/cache +/.nx/workspace-data \ No newline at end of file diff --git a/apps/demo-app-e2e/project.json b/apps/demo-app-e2e/project.json index 01c7706d..6de93fe4 100644 --- a/apps/demo-app-e2e/project.json +++ b/apps/demo-app-e2e/project.json @@ -3,9 +3,11 @@ "$schema": "../../node_modules/nx/schemas/project-schema.json", "sourceRoot": "apps/demo-app-e2e/src", "projectType": "application", + "tags": [], + "implicitDependencies": ["demo-app"], "targets": { "e2e": { - "executor": "@nrwl/cypress:cypress", + "executor": "@nx/cypress:cypress", "options": { "cypressConfig": "apps/demo-app-e2e/cypress.json", "tsConfig": "apps/demo-app-e2e/tsconfig.e2e.json", @@ -18,12 +20,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["apps/demo-app-e2e/**/*.{js,ts}"] - } + "executor": "@nx/eslint:lint" } - }, - "tags": [], - "implicitDependencies": ["demo-app"] + } } diff --git a/apps/demo-app-e2e/src/plugins/index.js b/apps/demo-app-e2e/src/plugins/index.js index 9067e75a..63aa33cb 100644 --- a/apps/demo-app-e2e/src/plugins/index.js +++ b/apps/demo-app-e2e/src/plugins/index.js @@ -11,7 +11,7 @@ // This function is called when a project is opened or re-opened (e.g. due to // the project's config changing) -const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor'); +const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor'); module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits diff --git a/apps/demo-app/.eslintrc.json b/apps/demo-app/.eslintrc.json index e69a8e86..287e50fe 100644 --- a/apps/demo-app/.eslintrc.json +++ b/apps/demo-app/.eslintrc.json @@ -17,6 +17,12 @@ { "files": ["*.js", "*.jsx"], "rules": {} + }, + { + "files": ["*.ts"], + "rules": { + "@angular-eslint/prefer-standalone": "off" + } } ] } diff --git a/apps/demo-app/jest.config.ts b/apps/demo-app/jest.config.ts index cc5a2197..98a4c465 100644 --- a/apps/demo-app/jest.config.ts +++ b/apps/demo-app/jest.config.ts @@ -3,13 +3,7 @@ export default { displayName: 'demo-app', setupFilesAfterEnv: ['/src/test-setup.ts'], - globals: { - 'ts-jest': { - stringifyContentPathRegex: '\\.(html|svg)$', - - tsconfig: '/tsconfig.spec.json', - }, - }, + globals: {}, coverageDirectory: '../../coverage/apps/demo-app', snapshotSerializers: [ 'jest-preset-angular/build/serializers/no-ng-attributes', @@ -17,7 +11,14 @@ export default { 'jest-preset-angular/build/serializers/html-comment', ], transform: { - '^.+.(ts|mjs|js|html)$': 'jest-preset-angular', + '^.+.(ts|mjs|js|html)$': [ + 'jest-preset-angular', + { + stringifyContentPathRegex: '\\.(html|svg)$', + + tsconfig: '/tsconfig.spec.json', + }, + ], }, transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'], preset: '../../jest.preset.js', diff --git a/apps/demo-app/project.json b/apps/demo-app/project.json index 4e675d42..6422b2a8 100644 --- a/apps/demo-app/project.json +++ b/apps/demo-app/project.json @@ -2,13 +2,14 @@ "name": "demo-app", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "application", + "sourceRoot": "apps/demo-app/src", + "prefix": "ngx-aws-deploy", + "tags": [], "generators": { "@schematics/angular:component": { "style": "scss" } }, - "sourceRoot": "apps/demo-app/src", - "prefix": "ngx-aws-deploy", "targets": { "build": { "executor": "@angular-devkit/build-angular:browser", @@ -62,31 +63,27 @@ "serve": { "executor": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "demo-app:build" + "buildTarget": "demo-app:build" }, "configurations": { "production": { - "browserTarget": "demo-app:build:production" + "buildTarget": "demo-app:build:production" } } }, "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "demo-app:build" + "buildTarget": "demo-app:build" } }, "lint": { - "executor": "@nrwl/linter:eslint", - "options": { - "lintFilePatterns": ["apps/demo-app/src/**/*.ts"] - } + "executor": "@nx/eslint:lint" }, "test": { - "executor": "@nrwl/jest:jest", + "executor": "@nx/jest:jest", "options": { - "jestConfig": "apps/demo-app/jest.config.ts", - "passWithNoTests": true + "jestConfig": "apps/demo-app/jest.config.ts" }, "outputs": ["{workspaceRoot}/coverage/apps/demo-app"] }, @@ -100,6 +97,5 @@ } } } - }, - "tags": [] + } } diff --git a/apps/demo-app/src/app/app.component.html b/apps/demo-app/src/app/app.component.html index a505f378..a4e01f27 100644 --- a/apps/demo-app/src/app/app.component.html +++ b/apps/demo-app/src/app/app.component.html @@ -8,9 +8,7 @@

Welcome to {{ title }}!

Resources & Tools

-

- Thank you for using and showing some ♥ for Nx. -

+

Thank you for using and showing some ♥ for Nx.

-

- Here are some links to help you get started. -

+

Here are some links to help you get started.