From 7c8019ac5be2f4f3347e193e0b1429d61a4e2d12 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 2 Sep 2025 17:38:24 +0300 Subject: [PATCH] chore(dx/ci): get rid of nx-specific workflows --- .github/workflows/main-docker.yml | 2 +- .github/workflows/playwright.yml | 13 +------------ apps/client/package.json | 21 +++++---------------- apps/server-e2e/package.json | 15 ++------------- apps/server/package.json | 26 ++++++++++---------------- 5 files changed, 19 insertions(+), 58 deletions(-) diff --git a/.github/workflows/main-docker.yml b/.github/workflows/main-docker.yml index c4c6ed551..7b2ee4ecd 100644 --- a/.github/workflows/main-docker.yml +++ b/.github/workflows/main-docker.yml @@ -82,7 +82,7 @@ jobs: require-healthy: true - name: Run Playwright tests - run: TRILIUM_DOCKER=1 TRILIUM_PORT=8082 pnpm exec nx run server-e2e:e2e + run: TRILIUM_DOCKER=1 TRILIUM_PORT=8082 pnpm --filter=server-e2e e2e - name: Upload Playwright trace if: failure() diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 25086af64..b4f047aea 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -19,12 +19,6 @@ jobs: filter: tree:0 fetch-depth: 0 - # This enables task distribution via Nx Cloud - # Run this command as early as possible, before dependencies are installed - # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - # Connect your workspace by running "nx connect" and uncomment this line to enable task distribution - # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: @@ -34,10 +28,5 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - run: pnpm exec playwright install --with-deps - - uses: nrwl/nx-set-shas@v4 - # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud - # - run: npx nx-cloud record -- echo Hello World - # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected - # When you enable task distribution, run the e2e-ci task instead of e2e - - run: pnpm exec nx affected -t e2e --exclude desktop-e2e + - run: pnpm -r e2e diff --git a/apps/client/package.json b/apps/client/package.json index 381b091bc..9a979ccdb 100644 --- a/apps/client/package.json +++ b/apps/client/package.json @@ -9,6 +9,11 @@ "email": "contact@eliandoran.me", "url": "https://github.com/TriliumNext/Notes" }, + "scripts": { + "build": "vite build", + "test": "vitest", + "circular-deps": "dpdm -T src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular" + }, "dependencies": { "@eslint/js": "9.34.0", "@excalidraw/excalidraw": "0.18.0", @@ -71,21 +76,5 @@ "happy-dom": "18.0.1", "script-loader": "0.7.2", "vite-plugin-static-copy": "3.1.2" - }, - "scripts": { - "build": "vite build" - }, - "nx": { - "name": "client", - "targets": { - "serve": { - "dependsOn": [ - "^build" - ] - }, - "circular-deps": { - "command": "pnpx dpdm -T {projectRoot}/src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular" - } - } } } \ No newline at end of file diff --git a/apps/server-e2e/package.json b/apps/server-e2e/package.json index a9970fd0a..0844eb347 100644 --- a/apps/server-e2e/package.json +++ b/apps/server-e2e/package.json @@ -2,19 +2,8 @@ "name": "@triliumnext/server-e2e", "version": "0.0.1", "private": true, - "nx": { - "name": "server-e2e", - "implicitDependencies": [ - "client", - "server" - ], - "targets": { - "e2e": { - "dependsOn": [ - "server:build" - ] - } - } + "scripts": { + "e2e": "playwright test" }, "devDependencies": { "dotenv": "17.2.1" diff --git a/apps/server/package.json b/apps/server/package.json index 6ade52f89..6ad5f1a60 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -3,6 +3,15 @@ "version": "0.98.1", "description": "The server-side component of TriliumNext, which exposes the client via the web, allows for sync and provides a REST API for both internal and external use.", "private": true, + "main": "./src/main.ts", + "scripts": { + "dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", + "build": "tsx scripts/build.ts", + "package": "pnpm build && bash scripts/build-server.sh", + "test": "vitest", + "test-build": "vitest --config vitest.build.config.mts", + "circular-deps": "dpdm -T src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular" + }, "dependencies": { "better-sqlite3": "12.2.0" }, @@ -300,22 +309,7 @@ } ] } - }, - "test-build": { - "dependsOn": [ - "build" - ], - "command": "vitest --config {projectRoot}/vitest.build.config.mts" - }, - "circular-deps": { - "command": "pnpx dpdm -T {projectRoot}/src/**/*.ts --tree=false --warning=false --skip-dynamic-imports=circular" } } - }, - "scripts": { - "dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", - "build": "tsx scripts/build.ts", - "package": "pnpm build && bash scripts/build-server.sh" - }, - "main": "./src/main.ts" + } } \ No newline at end of file