diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index edbb9e92f..8497efc3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ jobs: self_mutation_happened: ${{ steps.self_mutation.outputs.self_mutation_happened }} env: CI: "true" + NX_SKIP_NX_CACHE: "true" steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.projen/tasks.json b/.projen/tasks.json index 50040601b..856150eee 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -7,7 +7,7 @@ "spawn": "default" }, { - "exec": "yarn workspaces run build" + "exec": "nx run-many -t build" }, { "spawn": "eslint" @@ -129,7 +129,8 @@ "name": "release", "description": "Prepare a release from all monorepo packages", "env": { - "RELEASE": "true" + "RELEASE": "true", + "NX_SKIP_NX_CACHE": "true" }, "steps": [ { @@ -139,7 +140,7 @@ "exec": "yarn workspaces run bump" }, { - "exec": "yarn workspaces run build" + "exec": "nx run-many -t build" }, { "exec": "yarn workspaces run unbump" diff --git a/.projenrc.ts b/.projenrc.ts index 45e1ee1fa..1ca218b4c 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -199,6 +199,7 @@ const repoProject = new yarn.Monorepo({ includeRootWorkspace: true, }, nx: true, + buildWithNx: true, eslintOptions: { dirs: ['lib'], diff --git a/nx.json b/nx.json index 3417dfcf2..d90f1af01 100644 --- a/nx.json +++ b/nx.json @@ -1,18 +1,7 @@ { - "tasksRunnerOptions": { - "default": { - "runner": "nx/tasks-runners/default", - "options": { - "cacheableOperations": [ - "build", - "compile", - "test" - ] - } - } - }, "targetDefaults": { "build": { + "cache": true, "dependsOn": [ "^build" ], @@ -28,6 +17,7 @@ ] }, "compile": { + "cache": true, "dependsOn": [ "^compile" ], @@ -37,6 +27,7 @@ ] }, "test": { + "cache": true, "dependsOn": [ "^test" ], diff --git a/package.json b/package.json index e9f56673e..63ec61a47 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@types/node": "ts5.6", "@typescript-eslint/eslint-plugin": "^8", "@typescript-eslint/parser": "^8", - "cdklabs-projen-project-types": "^0.2.8", + "cdklabs-projen-project-types": "^0.2.9", "constructs": "^10.0.0", "eslint": "^9", "eslint-import-resolver-typescript": "^3.8.3", diff --git a/yarn.lock b/yarn.lock index e33275884..e46fdb094 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4657,10 +4657,10 @@ cdk-from-cfn@^0.193.0: resolved "https://registry.yarnpkg.com/cdk-from-cfn/-/cdk-from-cfn-0.193.0.tgz#048daca73be6dfd3ab3c104f67f2828587b1c761" integrity sha512-LBKqAnsg12RRhyz+zyByI3H6REiDVNm1vofhdnEXSAIGIBuO0H/cw4mbCpz0Qr9huZYssF9ozGsbwa1K3RF2Tg== -cdklabs-projen-project-types@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/cdklabs-projen-project-types/-/cdklabs-projen-project-types-0.2.8.tgz#67fc9094b490baf30392b180bdeac20160978f89" - integrity sha512-pEc2vcLvdhcnCY7iIWB4/YpDVprxpI8jjcAZaHtZr0eUTkQvP18CeVVgSzcQkPx5/21uTdK4BZQIicmwaXFrKw== +cdklabs-projen-project-types@^0.2.9: + version "0.2.9" + resolved "https://registry.yarnpkg.com/cdklabs-projen-project-types/-/cdklabs-projen-project-types-0.2.9.tgz#6215a688f5f7a76f814cbf305b1c41b34a0d80d6" + integrity sha512-ymSO80YVDuB1j/YVir2ArD1nSYFfxgZxxYEuN2saNxok/Tox6ssEg+IpdqFyBgytwBjTDmJK6ECn3tsaq4Qy3A== dependencies: yaml "^2.7.0"