## Summary The new `CI Website` workflow added in #20281 fails on the `test` matrix job because tests cannot resolve `twenty-shared/translations` — a subpath that requires `twenty-shared` to be built first. Root cause: `packages/twenty-website-new/project.json` fully overrides the `test` target, duplicating the executor/options/configurations from `nx.json` `targetDefaults` but **losing `dependsOn: ["^build"]`** (and `inputs` / `cache`). As a result, `nx affected -t test` for `twenty-website-new` does not build `twenty-shared` first. `twenty-front` works because its `project.json` declares `"test": {}` and inherits the full default. This PR does the same for `twenty-website-new`. Verified the diagnosis from the failing run — `front-task (test)` logs show `nx run twenty-shared:build` is invoked transitively, while `website-task (test)` logs do not, leading to the missing-module error.
117 lines
2.9 KiB
JSON
117 lines
2.9 KiB
JSON
{
|
|
"name": "twenty-website-new",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "packages/twenty-website-new/src",
|
|
"projectType": "application",
|
|
"tags": ["scope:website"],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": ["production", "^production"],
|
|
"outputs": ["{projectRoot}/.next"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx next build"
|
|
},
|
|
"dependsOn": ["^build"]
|
|
},
|
|
"dev": {
|
|
"executor": "nx:run-commands",
|
|
"cache": false,
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx next dev"
|
|
}
|
|
},
|
|
"start": {
|
|
"executor": "nx:run-commands",
|
|
"cache": false,
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx next start"
|
|
}
|
|
},
|
|
"check-boundaries": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/src/**/*",
|
|
"{projectRoot}/scripts/check-boundaries.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "node scripts/check-boundaries.mjs"
|
|
}
|
|
},
|
|
"check-section-shape": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/src/sections/**/*",
|
|
"{projectRoot}/scripts/check-section-shape.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "node scripts/check-section-shape.mjs"
|
|
}
|
|
},
|
|
"check-lottie-frames": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/public/lottie/stepper/stepper.lottie",
|
|
"{projectRoot}/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.ts",
|
|
"{projectRoot}/scripts/check-lottie-frames.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "node scripts/check-lottie-frames.mjs"
|
|
}
|
|
},
|
|
"lint": {
|
|
"dependsOn": [
|
|
"check-boundaries",
|
|
"check-section-shape",
|
|
"check-lottie-frames",
|
|
"^build",
|
|
"twenty-oxlint-rules:build"
|
|
]
|
|
},
|
|
"lint:diff-with-main": {
|
|
"dependsOn": [
|
|
"check-boundaries",
|
|
"check-section-shape",
|
|
"check-lottie-frames"
|
|
]
|
|
},
|
|
"typecheck": {},
|
|
"test": {},
|
|
"fmt": {
|
|
"options": {
|
|
"files": "."
|
|
},
|
|
"configurations": {
|
|
"fix": {}
|
|
}
|
|
},
|
|
"lingui:extract": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "lingui extract --overwrite --clean"
|
|
}
|
|
},
|
|
"lingui:compile": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "lingui compile --typescript"
|
|
}
|
|
}
|
|
}
|
|
}
|