From 1b3837ddf509e343bfe23393c18b7e3d775bc3f4 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 16:24:19 +0100 Subject: [PATCH 1/9] chore: use tsx when execution nx to have local plugins working --- .env.example | 8 +++++- .env.local.example | 12 +++++++++ .github/workflows/ci.yml | 12 ++++----- .github/workflows/coverage.yml | 4 +-- .github/workflows/publish.yml | 2 +- .github/workflows/release.yml | 2 +- .gitignore | 1 + package.json | 5 +++- tools/scripts/ci-tsx.js | 48 ++++++++++++++++++++++++++++++++++ 9 files changed, 82 insertions(+), 12 deletions(-) create mode 100644 .env.local.example create mode 100644 tools/scripts/ci-tsx.js diff --git a/.env.example b/.env.example index 64dd9ba97..464d2983f 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,8 @@ -# for uploading to portal +# Example environment variables +# These are for reference only - use .env.local for local development + +# For uploading to Code PushUp portal CP_API_KEY= + +# Note: For local development with tsx/TypeScript execution, +# copy .env.local.example to .env.local and configure NODE_OPTIONS there diff --git a/.env.local.example b/.env.local.example new file mode 100644 index 000000000..fe63e05ee --- /dev/null +++ b/.env.local.example @@ -0,0 +1,12 @@ +# Local development environment variables +# Copy this to .env.local (gitignored) and customize for your setup + +# Enable tsx for TypeScript execution in Nx +# This allows running local generator/executor directly as .ts files without pre-compilation +# This allowes the local plugins to import files with .js extensions (same as the packages in the repository) +NODE_OPTIONS=--import tsx +# This is used to resolve the paths in the local generator/executor so local packages can be imported as path aliases +TSX_TSCONFIG_PATH=tsconfig.base.json + +# Local API keys (optional - only if testing upload features) +# CP_API_KEY=your_api_key_here diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c71f05f4e..375866437 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: npm ci - name: Check formatting of affected files - run: npx nx format:check + run: npm run ci:nx -- format:check lint: runs-on: ubuntu-latest @@ -49,7 +49,7 @@ jobs: - name: Install dependencies run: npm ci - name: Lint affected projects - run: npx nx affected -t lint --parallel=3 + run: npm run ci:nx -- affected -t lint --parallel=3 unit-test: strategy: @@ -73,7 +73,7 @@ jobs: - name: Install dependencies run: npm ci - name: Unit test affected projects - run: npx nx affected -t unit-test --parallel=3 + run: npm run ci:nx -- affected -t unit-test --parallel=3 integration-test: strategy: @@ -97,7 +97,7 @@ jobs: - name: Install dependencies run: npm ci - name: Integration test affected projects - run: npx nx affected -t int-test --parallel=3 + run: npm run ci:nx -- affected -t int-test --parallel=3 e2e: strategy: @@ -121,7 +121,7 @@ jobs: - name: Install dependencies run: npm ci - name: E2E test affected projects - run: npx nx affected -t e2e-test --parallel=1 + run: npm run ci:nx -- affected -t e2e-test --parallel=1 build: runs-on: ubuntu-latest @@ -141,6 +141,6 @@ jobs: - name: Install dependencies run: npm ci - name: Build all projects # affected is not used to be able to test-releae packages - run: npx nx run-many --target=build --parallel=3 + run: npm run ci:nx -- run-many --target=build --parallel=3 - name: Test-release packages run: npx pkg-pr-new publish "packages/**/dist" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 640a76e5d..fc512c4c7 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -25,7 +25,7 @@ jobs: - name: List packages using Nx CLI id: list-packages run: | - matrix=$(node tools/scripts/create-codecov-matrix.js) + matrix=$(npm run ci:node -- tools/scripts/create-codecov-matrix.js) echo "matrix=$matrix" >> $GITHUB_OUTPUT outputs: matrix: ${{ steps.list-packages.outputs.matrix }} @@ -48,7 +48,7 @@ jobs: - name: Install dependencies run: npm ci - name: Execute tests with coverage - run: npx nx run ${{ matrix.project }}:${{ matrix.target }} + run: npm run ci:nx -- run ${{ matrix.project }}:${{ matrix.target }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e3896afee..ac1b27fbd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,4 +42,4 @@ jobs: - name: Install dependencies run: npm ci - name: Publish packages to npm - run: npx nx release publish + run: npm run ci:nx -- release publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d60e37bea..6dc413d8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,6 +46,6 @@ jobs: - name: Install dependencies run: npm ci - name: Version, release and generate changelog - run: npx nx release --skip-publish env: GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: npm run ci:nx -- release --skip-publish diff --git a/.gitignore b/.gitignore index 31d7e1678..1e6ef3822 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. .env +.env.local .npmrc # compiled output diff --git a/package.json b/package.json index 52a48a7d4..3c5bb4446 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,9 @@ "scripts": { "prepare": "husky install", "commit": "git-cz", - "knip": "knip" + "knip": "knip", + "ci:nx": "node tools/scripts/ci-tsx.js nx", + "ci:node": "node tools/scripts/ci-tsx.js node" }, "private": true, "dependencies": { @@ -86,6 +88,7 @@ "chromium": "^3.0.3", "commitizen": "^4.3.1", "commitlint-plugin-tense": "^1.0.3", + "cross-env": "^10.1.0", "dotenv": "^16.4.5", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-functional": "^7.1.0", diff --git a/tools/scripts/ci-tsx.js b/tools/scripts/ci-tsx.js new file mode 100644 index 000000000..22fad1a94 --- /dev/null +++ b/tools/scripts/ci-tsx.js @@ -0,0 +1,48 @@ +// @ts-check +import { spawn } from 'node:child_process'; +import { resolve } from 'node:path'; + +// Determine the workspace root (GITHUB_WORKSPACE or current working directory) +const workspaceRoot = process.env.GITHUB_WORKSPACE || process.cwd(); +const tsconfigPath = resolve(workspaceRoot, 'tsconfig.base.json'); + +// Set up environment variables +const env = { + ...process.env, + NODE_OPTIONS: '--import tsx', + TSX_TSCONFIG_PATH: tsconfigPath, +}; + +// Get the command and its arguments from the command line +const [command, ...args] = process.argv.slice(2); + +if (!command) { + console.error('Usage: node ci-tsx.js [args...]'); + console.error('Example: node ci-tsx.js nx affected -t test'); + process.exit(1); +} + +// Log the command being executed +console.log(`> ${command} ${args.join(' ')}`); + +// Spawn the command with the configured environment +const child = spawn(command, args, { + env, + stdio: 'inherit', + shell: true, +}); + +// Forward exit code +child.on('exit', (code, signal) => { + if (signal) { + process.kill(process.pid, signal); + } else { + process.exit(code ?? 0); + } +}); + +// Handle errors +child.on('error', error => { + console.error('Failed to start child process:', error); + process.exit(1); +}); From 7608828c5ba856fa3e619b1e2f39d734d3e1856c Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 16:26:30 +0100 Subject: [PATCH 2/9] refactor: npm i --- package-lock.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/package-lock.json b/package-lock.json index de389cb9b..17728d183 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,6 +76,7 @@ "chromium": "^3.0.3", "commitizen": "^4.3.1", "commitlint-plugin-tense": "^1.0.3", + "cross-env": "^10.1.0", "dotenv": "^16.4.5", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-functional": "^7.1.0", @@ -2792,6 +2793,13 @@ "tslib": "^2.4.0" } }, + "node_modules/@epic-web/invariant": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", + "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", + "dev": true, + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", @@ -14349,6 +14357,24 @@ "node": ">=12.0.0" } }, + "node_modules/cross-env": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz", + "integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@epic-web/invariant": "^1.0.0", + "cross-spawn": "^7.0.6" + }, + "bin": { + "cross-env": "dist/bin/cross-env.js", + "cross-env-shell": "dist/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/cross-fetch": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", From db3f0a84524d4af4f4822ee495dcdfe54f7ee30e Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 16:43:28 +0100 Subject: [PATCH 3/9] refactor: wip --- tools/scripts/ci-tsx.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/scripts/ci-tsx.js b/tools/scripts/ci-tsx.js index 22fad1a94..f490c67d4 100644 --- a/tools/scripts/ci-tsx.js +++ b/tools/scripts/ci-tsx.js @@ -25,11 +25,19 @@ if (!command) { // Log the command being executed console.log(`> ${command} ${args.join(' ')}`); -// Spawn the command with the configured environment -const child = spawn(command, args, { +// Handle Windows-specific command execution +// On Windows, npm bin scripts need .cmd extension (e.g., nx.cmd) +const isWindows = process.platform === 'win32'; +const commandToRun = + isWindows && !command.endsWith('.exe') && !command.endsWith('.cmd') + ? `${command}.cmd` + : command; + +// Spawn the command with the configured environment without shell +// This avoids the DEP0190 deprecation warning +const child = spawn(commandToRun, args, { env, stdio: 'inherit', - shell: true, }); // Forward exit code From fabb4070d8b8231928e8689069beab55851c47ec Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 16:47:42 +0100 Subject: [PATCH 4/9] refactor: wip --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 375866437..5c43a3d7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,7 @@ jobs: - name: Install dependencies run: npm ci - name: E2E test affected projects - run: npm run ci:nx -- affected -t e2e-test --parallel=1 + run: npm run ci:nx -- affected -t e2e-test --parallel=1 --verbose build: runs-on: ubuntu-latest From 700589e8261d75fd6f4e68f45dc5d982b8159ba5 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 16:50:57 +0100 Subject: [PATCH 5/9] refactor: wip --- .github/workflows/ci.yml | 30 ++++++++++++++---- .github/workflows/coverage.yml | 10 ++++-- .github/workflows/publish.yml | 5 ++- .github/workflows/release.yml | 4 ++- tools/scripts/ci-tsx.js | 56 ---------------------------------- 5 files changed, 39 insertions(+), 66 deletions(-) delete mode 100644 tools/scripts/ci-tsx.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c43a3d7b..c9a718b88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,10 @@ jobs: - name: Install dependencies run: npm ci - name: Check formatting of affected files - run: npm run ci:nx -- format:check + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx format:check lint: runs-on: ubuntu-latest @@ -49,7 +52,10 @@ jobs: - name: Install dependencies run: npm ci - name: Lint affected projects - run: npm run ci:nx -- affected -t lint --parallel=3 + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx affected -t lint --parallel=3 unit-test: strategy: @@ -73,7 +79,10 @@ jobs: - name: Install dependencies run: npm ci - name: Unit test affected projects - run: npm run ci:nx -- affected -t unit-test --parallel=3 + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx affected -t unit-test --parallel=3 integration-test: strategy: @@ -97,7 +106,10 @@ jobs: - name: Install dependencies run: npm ci - name: Integration test affected projects - run: npm run ci:nx -- affected -t int-test --parallel=3 + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx affected -t int-test --parallel=3 e2e: strategy: @@ -121,7 +133,10 @@ jobs: - name: Install dependencies run: npm ci - name: E2E test affected projects - run: npm run ci:nx -- affected -t e2e-test --parallel=1 --verbose + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx affected -t e2e-test --parallel=1 --verbose build: runs-on: ubuntu-latest @@ -141,6 +156,9 @@ jobs: - name: Install dependencies run: npm ci - name: Build all projects # affected is not used to be able to test-releae packages - run: npm run ci:nx -- run-many --target=build --parallel=3 + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx run-many --target=build --parallel=3 - name: Test-release packages run: npx pkg-pr-new publish "packages/**/dist" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index fc512c4c7..c69691adb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,8 +24,11 @@ jobs: run: npm ci - name: List packages using Nx CLI id: list-packages + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: | - matrix=$(npm run ci:node -- tools/scripts/create-codecov-matrix.js) + matrix=$(node tools/scripts/create-codecov-matrix.js) echo "matrix=$matrix" >> $GITHUB_OUTPUT outputs: matrix: ${{ steps.list-packages.outputs.matrix }} @@ -48,7 +51,10 @@ jobs: - name: Install dependencies run: npm ci - name: Execute tests with coverage - run: npm run ci:nx -- run ${{ matrix.project }}:${{ matrix.target }} + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx run ${{ matrix.project }}:${{ matrix.target }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ac1b27fbd..bc03e1ecf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,4 +42,7 @@ jobs: - name: Install dependencies run: npm ci - name: Publish packages to npm - run: npm run ci:nx -- release publish + env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json + run: npx nx release publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6dc413d8d..2947ef670 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,5 +47,7 @@ jobs: run: npm ci - name: Version, release and generate changelog env: + NODE_OPTIONS: --import tsx + TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: npm run ci:nx -- release --skip-publish + run: npx nx release --skip-publish diff --git a/tools/scripts/ci-tsx.js b/tools/scripts/ci-tsx.js deleted file mode 100644 index f490c67d4..000000000 --- a/tools/scripts/ci-tsx.js +++ /dev/null @@ -1,56 +0,0 @@ -// @ts-check -import { spawn } from 'node:child_process'; -import { resolve } from 'node:path'; - -// Determine the workspace root (GITHUB_WORKSPACE or current working directory) -const workspaceRoot = process.env.GITHUB_WORKSPACE || process.cwd(); -const tsconfigPath = resolve(workspaceRoot, 'tsconfig.base.json'); - -// Set up environment variables -const env = { - ...process.env, - NODE_OPTIONS: '--import tsx', - TSX_TSCONFIG_PATH: tsconfigPath, -}; - -// Get the command and its arguments from the command line -const [command, ...args] = process.argv.slice(2); - -if (!command) { - console.error('Usage: node ci-tsx.js [args...]'); - console.error('Example: node ci-tsx.js nx affected -t test'); - process.exit(1); -} - -// Log the command being executed -console.log(`> ${command} ${args.join(' ')}`); - -// Handle Windows-specific command execution -// On Windows, npm bin scripts need .cmd extension (e.g., nx.cmd) -const isWindows = process.platform === 'win32'; -const commandToRun = - isWindows && !command.endsWith('.exe') && !command.endsWith('.cmd') - ? `${command}.cmd` - : command; - -// Spawn the command with the configured environment without shell -// This avoids the DEP0190 deprecation warning -const child = spawn(commandToRun, args, { - env, - stdio: 'inherit', -}); - -// Forward exit code -child.on('exit', (code, signal) => { - if (signal) { - process.kill(process.pid, signal); - } else { - process.exit(code ?? 0); - } -}); - -// Handle errors -child.on('error', error => { - console.error('Failed to start child process:', error); - process.exit(1); -}); From 7acb65b26c3e722862ed71a9fdc4a8b8accd3863 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 22:34:28 +0100 Subject: [PATCH 6/9] refactor: wip --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1e6ef3822..6ba3d0b23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. .env -.env.local .npmrc # compiled output @@ -58,4 +57,4 @@ vitest.config.*.timestamp* .cursor/rules/nx-rules.mdc .github/instructions/nx.instructions.md -code-pushup.config.bundled_*.mjs \ No newline at end of file +code-pushup.config.bundled_*.mjs From 88ad548ff73c840194a53e6085170ad50c7f2bef Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 22:35:19 +0100 Subject: [PATCH 7/9] refactor: wip --- .env.local | 9 +++++++++ .github/workflows/ci.yml | 20 +------------------- .github/workflows/coverage.yml | 6 ------ .github/workflows/publish.yml | 3 --- .github/workflows/release.yml | 4 +--- 5 files changed, 11 insertions(+), 31 deletions(-) create mode 100644 .env.local diff --git a/.env.local b/.env.local new file mode 100644 index 000000000..67d48d392 --- /dev/null +++ b/.env.local @@ -0,0 +1,9 @@ +# Local development environment variables +# Copy this to .env.local (gitignored) and customize for your setup + +# Enable tsx for TypeScript execution in Nx +# This allows running local generator/executor directly as .ts files without pre-compilation +# This allowes the local plugins to import files with .js extensions (same as the packages in the repository) +NODE_OPTIONS=--import tsx +# This is used to resolve the paths in the local generator/executor so local packages can be imported as path aliases +TSX_TSCONFIG_PATH=tsconfig.base.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9a718b88..c71f05f4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,9 +29,6 @@ jobs: - name: Install dependencies run: npm ci - name: Check formatting of affected files - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx format:check lint: @@ -52,9 +49,6 @@ jobs: - name: Install dependencies run: npm ci - name: Lint affected projects - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx affected -t lint --parallel=3 unit-test: @@ -79,9 +73,6 @@ jobs: - name: Install dependencies run: npm ci - name: Unit test affected projects - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx affected -t unit-test --parallel=3 integration-test: @@ -106,9 +97,6 @@ jobs: - name: Install dependencies run: npm ci - name: Integration test affected projects - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx affected -t int-test --parallel=3 e2e: @@ -133,10 +121,7 @@ jobs: - name: Install dependencies run: npm ci - name: E2E test affected projects - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json - run: npx nx affected -t e2e-test --parallel=1 --verbose + run: npx nx affected -t e2e-test --parallel=1 build: runs-on: ubuntu-latest @@ -156,9 +141,6 @@ jobs: - name: Install dependencies run: npm ci - name: Build all projects # affected is not used to be able to test-releae packages - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx run-many --target=build --parallel=3 - name: Test-release packages run: npx pkg-pr-new publish "packages/**/dist" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c69691adb..640a76e5d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,9 +24,6 @@ jobs: run: npm ci - name: List packages using Nx CLI id: list-packages - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: | matrix=$(node tools/scripts/create-codecov-matrix.js) echo "matrix=$matrix" >> $GITHUB_OUTPUT @@ -51,9 +48,6 @@ jobs: - name: Install dependencies run: npm ci - name: Execute tests with coverage - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx run ${{ matrix.project }}:${{ matrix.target }} - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bc03e1ecf..e3896afee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,4 @@ jobs: - name: Install dependencies run: npm ci - name: Publish packages to npm - env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json run: npx nx release publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2947ef670..d60e37bea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,8 +46,6 @@ jobs: - name: Install dependencies run: npm ci - name: Version, release and generate changelog + run: npx nx release --skip-publish env: - NODE_OPTIONS: --import tsx - TSX_TSCONFIG_PATH: ${{ github.workspace }}/tsconfig.base.json GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: npx nx release --skip-publish From f5c0309c8931eb123402dce22564dde57100371d Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 22:35:46 +0100 Subject: [PATCH 8/9] refactor: wip --- package-lock.json | 26 -------------------------- package.json | 5 +---- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 17728d183..de389cb9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,7 +76,6 @@ "chromium": "^3.0.3", "commitizen": "^4.3.1", "commitlint-plugin-tense": "^1.0.3", - "cross-env": "^10.1.0", "dotenv": "^16.4.5", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-functional": "^7.1.0", @@ -2793,13 +2792,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@epic-web/invariant": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", - "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", - "dev": true, - "license": "MIT" - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.23.1", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", @@ -14357,24 +14349,6 @@ "node": ">=12.0.0" } }, - "node_modules/cross-env": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz", - "integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@epic-web/invariant": "^1.0.0", - "cross-spawn": "^7.0.6" - }, - "bin": { - "cross-env": "dist/bin/cross-env.js", - "cross-env-shell": "dist/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=20" - } - }, "node_modules/cross-fetch": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", diff --git a/package.json b/package.json index 3c5bb4446..52a48a7d4 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,7 @@ "scripts": { "prepare": "husky install", "commit": "git-cz", - "knip": "knip", - "ci:nx": "node tools/scripts/ci-tsx.js nx", - "ci:node": "node tools/scripts/ci-tsx.js node" + "knip": "knip" }, "private": true, "dependencies": { @@ -88,7 +86,6 @@ "chromium": "^3.0.3", "commitizen": "^4.3.1", "commitlint-plugin-tense": "^1.0.3", - "cross-env": "^10.1.0", "dotenv": "^16.4.5", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-functional": "^7.1.0", From 101663389c96488367b8a91a3b83421e6c40b762 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 8 Feb 2026 22:37:46 +0100 Subject: [PATCH 9/9] refactor: wip --- tools/zod2md-jsdocs/src/lib/constants.ts | 2 ++ tools/zod2md-jsdocs/src/nx-plugin.ts | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 tools/zod2md-jsdocs/src/lib/constants.ts diff --git a/tools/zod2md-jsdocs/src/lib/constants.ts b/tools/zod2md-jsdocs/src/lib/constants.ts new file mode 100644 index 000000000..28992a132 --- /dev/null +++ b/tools/zod2md-jsdocs/src/lib/constants.ts @@ -0,0 +1,2 @@ +export const ZOD2MD_CONFIG_FILE = 'zod2md.config.ts'; +export const GENERATE_DOCS_TARGET_NAME = 'generate-docs'; diff --git a/tools/zod2md-jsdocs/src/nx-plugin.ts b/tools/zod2md-jsdocs/src/nx-plugin.ts index 36cefc983..ae8ff14cc 100644 --- a/tools/zod2md-jsdocs/src/nx-plugin.ts +++ b/tools/zod2md-jsdocs/src/nx-plugin.ts @@ -1,8 +1,9 @@ import type { CreateNodesV2, NxPlugin, TargetConfiguration } from '@nx/devkit'; import * as path from 'node:path'; - -const ZOD2MD_CONFIG_FILE = 'zod2md.config.ts'; -const GENERATE_DOCS_TARGET_NAME = 'generate-docs'; +import { + GENERATE_DOCS_TARGET_NAME, + ZOD2MD_CONFIG_FILE, +} from './lib/constants.js'; type DocsTargetConfigParams = { config: string;