Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(dx): enable pnpm dedupe and task-aware turbo watch (#17852)

Nimarf75c661dbe8c
diff --git a/.agents/README.md b/.agents/README.md
index 402e451d79..01dcc9fc39 100644
--- a/.agents/README.md
+++ b/.agents/README.md
@@ -37,11 +37,16 @@ Current shape:
"devTerminalDescription": "Main development terminal running the development server"
},
"mcpServers": {
+ "next-devtools": {
+ "transport": "stdio",
+ "command": "pnpm",
+ "args": ["dlx", "[email protected]"]
+ },
"playwright": {
"transport": "stdio",
- "command": "npx",
+ "command": "pnpm",
"args": [
- "-y",
+ "dlx",
"@playwright/mcp@latest",
"--isolated",
"--save-session",
@@ -103,6 +108,12 @@ Current shape:
}
```
+## Next.js Runtime Diagnostics
+
+With `pnpm run dev:web` running, use `next-devtools`: `nextjs_index` finds the
+server; `nextjs_call` reads errors, routes, and logs. Use `compile_route` for
+compilation checks and Playwright for browser interaction.
+
## How Shims Are Generated
`scripts/agents/sync-agent-shims.mjs` reads `.agents/config.json` and writes the
@@ -188,8 +199,8 @@ For `stdio` servers:
"mcpServers": {
"example": {
"transport": "stdio",
- "command": "npx",
- "args": ["-y", "some-package"]
+ "command": "pnpm",
+ "args": ["dlx", "some-package"]
}
}
}
diff --git a/.agents/config.json b/.agents/config.json
index 18bb193c96..9151fe70e7 100644
--- a/.agents/config.json
+++ b/.agents/config.json
@@ -5,11 +5,16 @@
"devTerminalDescription": "Main development terminal running the development server"
},
"mcpServers": {
+ "next-devtools": {
+ "transport": "stdio",
+ "command": "pnpm",
+ "args": ["dlx", "[email protected]"]
+ },
"playwright": {
"transport": "stdio",
- "command": "npx",
+ "command": "pnpm",
"args": [
- "-y",
+ "dlx",
"@playwright/mcp@latest",
"--isolated",
"--save-session",
diff --git a/.agents/skills/pnpm-upgrade-package/SKILL.md b/.agents/skills/pnpm-upgrade-package/SKILL.md
index 452a506909..5a36df442f 100644
--- a/.agents/skills/pnpm-upgrade-package/SKILL.md
+++ b/.agents/skills/pnpm-upgrade-package/SKILL.md
@@ -32,7 +32,7 @@ Use this skill for interactive dependency bumps in Langfuse.
upgrade that parent dependency instead of adding the target package directly
unless the user explicitly wants that.
- Probe the parent once at `@latest`:
- `npm view <parent>@latest dependencies peerDependencies optionalDependencies --json`.
+ `pnpm view <parent>@latest dependencies peerDependencies optionalDependencies --json`.
If that range resolves to any non-vulnerable version of the target, even one
newer than the lowest fix, upgrade the parent instead of pinning the exact
lowest fix. If the latest parent still pins a vulnerable range, do not walk
@@ -80,7 +80,7 @@ Use this skill for interactive dependency bumps in Langfuse.
- Transitive provenance / final graph verification:
`pnpm why -r <package>`
- Inspect a current parent manifest on the registry:
- `npm view <parent>@<installedVersion> dependencies peerDependencies optionalDependencies --json`
+ `pnpm view <parent>@<installedVersion> dependencies peerDependencies optionalDependencies --json`
- Preflight resolver/policy check:
`pnpm install --dry-run --ignore-scripts`
- Optional lockfile cleanup:
diff --git a/.agents/skills/turborepo/SKILL.md b/.agents/skills/turborepo/SKILL.md
index 315a0843b8..3ded13e090 100644
--- a/.agents/skills/turborepo/SKILL.md
+++ b/.agents/skills/turborepo/SKILL.md
@@ -12,6 +12,11 @@ metadata:
Build system for JavaScript/TypeScript monorepos. Turborepo caches task outputs and runs tasks in parallel based on dependency graph.
+Before changing Turbo configuration or commands, read
+`node_modules/turbo/docs/README.md` from the repository root and follow the relevant
+page. These installed docs match the running version; prefer them over this skill's
+bundled references for supported options and defaults.
+
## IMPORTANT: Package Tasks, Not Root Tasks
**DO NOT create Root Tasks. ALWAYS create package tasks.**
diff --git a/.cursor/Dockerfile b/.cursor/Dockerfile
index bd6224ac5f..6fda2c4c78 100644
--- a/.cursor/Dockerfile
+++ b/.cursor/Dockerfile
@@ -44,7 +44,7 @@ RUN install -m 0755 -d /etc/apt/keyrings \
&& apt-get install -y --no-install-recommends nodejs \
&& npm install --global [email protected] \
&& corepack enable \
- && corepack prepare [email protected] --activate \
+ && corepack prepare [email protected] --activate \
&& rm -rf /var/lib/apt/lists/*
# Cursor Cloud runs Docker inside its own container layer. fuse-overlayfs and
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 99d33ea720..3e06d973c7 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -20,7 +20,7 @@ COPY --from=migrate-builder /out/migrate /usr/local/bin/migrate
ARG NODE_USE_ENV_PROXY
RUN npm install --global [email protected] \
&& corepack enable \
- && corepack prepare [email protected] --activate
+ && corepack prepare [email protected] --activate
# Install Clickhouse
RUN curl https://clickhouse.com/ | sh && \
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 785747d94d..5174772be2 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -33,6 +33,6 @@ Fixes # (issue)
- My code doesn't follow the style guidelines of this project (`pnpm run format`)
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my PR needs changes to the documentation
-- I haven't checked if my changes generate no new warnings (`npm run lint`)
+- I haven't checked if my changes generate no new warnings (`pnpm run lint`)
- I haven't added tests that prove my fix is effective or that my feature works
- I haven't checked if new and existing unit tests pass locally with my changes
diff --git a/.github/workflows/ci-runtime-analyst.lock.yml b/.github/workflows/ci-runtime-analyst.lock.yml
index d4893a9a63..d6c67c69a7 100644
--- a/.github/workflows/ci-runtime-analyst.lock.yml
+++ b/.github/workflows/ci-runtime-analyst.lock.yml
@@ -1,4 +1,4 @@
-# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"43b54f1482a75b574f9930a7bdcc3398d164ce4b9649dd8282d9163c4ccd3a8b","body_hash":"7de39e31204fa1e77b060a0547eb5316de35287442ec90e7ff45c58b87f515c9","compiler_version":"v0.86.2","agent_id":"claude","agent_model":"claude-opus-5","engine_versions":{"claude":"2.1.277"}}
+# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"43b54f1482a75b574f9930a7bdcc3398d164ce4b9649dd8282d9163c4ccd3a8b","body_hash":"ab51dd8e1cd3aed3e810fb70e94e99ecbd1f6a39c6279c388615a80bd7ed294e","compiler_version":"v0.86.2","agent_id":"claude","agent_model":"claude-opus-5","engine_versions":{"claude":"2.1.277"}}
# gh-aw-manifest: {"version":1,"secrets":["CLAUDE_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_CI_ANALYST_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]}
# This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
#
diff --git a/.github/workflows/ci-runtime-analyst.md b/.github/workflows/ci-runtime-analyst.md
index 6bb947c257..4555a64398 100644
--- a/.github/workflows/ci-runtime-analyst.md
+++ b/.github/workflows/ci-runtime-analyst.md
@@ -430,7 +430,7 @@ Run the narrowest check that actually exercises your change, e.g.:
- shared-package or eslint-plugin adjacent changes:
`pnpm --filter @langfuse/shared run test` /
`pnpm --filter @repo/eslint-plugin run test`.
-- `turbo.json` changes: `npx turbo run build --dry-run` (or the affected
+- `turbo.json` changes: `pnpm exec turbo run build --dry-run` (or the affected
task) to prove the pipeline graph still resolves as intended.
- targeted slow/flaky-test fixes and other DB-backed checks: run exactly
that test file, with the same invocation CI uses, e.g.
diff --git a/.github/workflows/licencecheck.yml b/.github/workflows/licencecheck.yml
index 9ebacd71a9..9b9eb3f4d6 100644
--- a/.github/workflows/licencecheck.yml
+++ b/.github/workflows/licencecheck.yml
@@ -22,26 +22,38 @@ jobs:
with:
persist-credentials: false
+ - name: Install pnpm
+ uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
+ with:
+ install: false
+
- name: Setup node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- - name: Install license-checker
- # Deliberate ad-hoc install: the license-check tooling is not part of the workspace lockfile.
- run: npm install -g license-checker # zizmor: ignore[adhoc-packages]
-
- - name: Install yui-lint
- run: npm install yui-lint # zizmor: ignore[adhoc-packages]
+ - name: Install production dependencies
+ run: pnpm install --frozen-lockfile --prod --ignore-scripts
- - name: Generate license-checker CSV file
- run: license-checker --production --csv > npm-license-checker.csv
+ - name: Generate production dependency license report
+ run: |
+ pnpm -r licenses list --prod --json > pnpm-licenses.json
+ # Exempt only these package versions; upgrades receive a fresh license check.
+ jq -er '
+ if length == 0 then error("No production dependency licenses found")
+ else ["package_name", "license_name"],
+ (to_entries[] | .key as $license | .value[] | .name as $name |
+ .versions[] | "\($name)@\(.)" as $package |
+ select($exceptions | index($package) | not) | [$package, $license])
+ end | @csv
+ ' pnpm-licenses.json > pnpm-licenses.csv
- - name: Check license-checker CSV file without headers
+ - name: Check production dependency licenses
id: license_check_report
uses: pilosus/action-pip-license-checker@e909b0226ff49d3235c99c4585bc617f49fff16a # v3.1.0
with:
- external: "npm-license-checker.csv"
+ external: "pnpm-licenses.csv"
external-format: "csv"
external-options: "{:skip-header true}"
fail: "WeakCopyleft,StrongCopyleft,NetworkCopyleft"
@@ -54,5 +66,3 @@ jobs:
run: echo "::error::${STEPS_LICENSE_CHECK_REPORT_OUTPUTS_REPORT}"
env:
STEPS_LICENSE_CHECK_REPORT_OUTPUTS_REPORT: ${{ steps.license_check_report.outputs.report }}
- - name: Delete license-checker CSV file
- run: rm npm-license-checker.csv
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 993dc050f3..f1147ad6b8 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -262,6 +262,8 @@ jobs:
# by every AGENTS.md are resolved.
- name: agent guidance paths resolve
run: pnpm run agents:check
+ - name: product package versions agree
+ run: pnpm change check
- name: agent setup tests
run: node --test scripts/agents/sync-agent-shims.test.mjs
- name: cursor PR label tests
diff --git a/.github/workflows/sdk-api-spec.yml b/.github/workflows/sdk-api-spec.yml
index de981474fb..0269fc6681 100644
--- a/.github/workflows/sdk-api-spec.yml
+++ b/.github/workflows/sdk-api-spec.yml
@@ -52,7 +52,7 @@ jobs:
- name: Generate SDK specs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
- run: npx fern-api generate --api server --force
+ run: pnpm dlx [email protected] generate --api server --force
- name: Add Python SDK deprecation warnings
working-directory: web
diff --git a/.github/workflows/warm-caches.yml b/.github/workflows/warm-caches.yml
index d7f130e0d6..a4c2dab168 100644
--- a/.github/workflows/warm-caches.yml
+++ b/.github/workflows/warm-caches.yml
@@ -46,10 +46,8 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- # No pinned version on purpose: the action reads "packageManager" from
- # package.json, so pnpm bumps that update pipeline.yml cannot strand
- # this satellite workflow on a mismatched pin (which hard-fails the
- # action, as a previous partially pinned pnpm bump did).
+ # Read devEngines.packageManager from package.json so workflows use
+ # the same pinned pnpm version.
- uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
with:
install: false
diff --git a/.vscode/launch.json b/.vscode/launch.json
index be20cab391..c62b1e3e1d 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -17,7 +17,7 @@
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
- "command": "npm run dev",
+ "command": "pnpm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 28f2564507..7cea2d6290 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -61,7 +61,7 @@ We recommend checking out DeepWiki to familiarize yourself with the project:
### Technologies we use
- Application (this repository)
- - Next.js 16, Pages Router
+ - Next.js 16, Pages Router
- NextAuth.js / Auth.js
- tRPC: Frontend APIs
- Prisma ORM
@@ -131,6 +131,7 @@ We built a monorepo using [pnpm](https://pnpm.io/motivation) and [turbo](https:/
Requirements
- Node.js 24 as specified in the [.nvmrc](.nvmrc)
+- The pnpm version pinned in `package.json` under `devEngines.packageManager`. The Docker setup uses Corepack 0.36.0; CI reads the same pin through `pnpm/setup`.
- [Rust via rustup](https://rust-lang.org/tools/install/) and a native compiler/linker, for the AI gateway (which starts with `pnpm dev`, see [gateway setup](ai-gateway/README.md#run-locally)) and for the worker's native addon (compiled during the worker build, see [packages/native/README.md](packages/native/README.md)). Each crate pins its own toolchain in `rust-toolchain.toml`; rustup installs it on first use.
- Docker to run the database locally
- Clickhouse client
@@ -217,6 +218,11 @@ Europe/Berlin and are not woken with Cursor credentials.
This repository keeps the shared agent setup in source control so developers
using different tools can work against the same instructions, bootstrap, and
MCP server catalog.
+
+The catalog includes Next DevTools for routes, compilation errors, and logs from
+a running `pnpm run dev:web` server. Run `pnpm run agents:sync`, reload your
+agent's MCP configuration, and select this checkout's server with `nextjs_index`.
+Use Playwright for browser interaction; see the [diagnostics guide](.agents/README.md#nextjs-runtime-diagnostics).
- Canonical shared docs:
- `.agents/AGENTS.md`
@@ -338,6 +344,26 @@ pnpm run db:seed:examples
> [!NOTE]
> If you find yourself stuck and want to clean the repo, execute `pnpm run nuke`. It will remove all node_modules and build files.
+
+### Toolchain diagnostics and dependency maintenance
+
+- Writable installs automatically deduplicate compatible dependency versions; review
+ the lockfile diff as usual. Frozen installs preserve the lockfile.
+- Use `pnpm add <package> --save-types` to add available companion types. For older
+ runtime majors, explicitly select matching `@types` versions: automatic selection
+ uses the catalog or latest eligible typings, not the runtime's major.
+- `pnpm change check` checks that the root, web, and worker package versions
+ agree. CI runs it too; release-it still owns releases and source version constants.
+- Rust build, lint, typecheck, and test scripts share one machine-wide slot across
+ worktrees using the same pnpm state directory. `pnpm tasks status` shows holders
+ and waiters. Persistent dev servers stay outside this group; direct Cargo commands
+ bypass it. This limits concurrent jobs, not compiler threads.
+- Turbo watch respects task inputs: Prisma regenerates on schema changes, not
+ ordinary shared TypeScript edits. Production caches exclude Next development output.
+- Turbo keeps successful task/cache hashes visible with `errors-only` logs. Its
+ shared worktree cache has a 7.5 GB cleanup target; eviction runs in the background.
+- `pnpm --filter web run analyze` opens Next's experimental bundle analyzer;
+ `pnpm --filter web run build-trace` opens a Turbopack trace when one is available.
## System behavior
@@ -583,7 +609,7 @@ This command also syncs standard OpenAPI `deprecated` flags and `**Deprecated:**
To generate the server SDKs, run:
```sh
-npx fern-api generate --api server
+pnpm dlx [email protected] generate --api server
```
**Note:** You need a signed in fern account to generate SDKs.
diff --git a/ai-gateway/package.json b/ai-gateway/package.json
index 4ec6b25fc1..b1a3f99802 100644
--- a/ai-gateway/package.json
+++ b/ai-gateway/package.json
@@ -3,11 +3,16 @@
"private": true,
"scripts": {
"dev": "dotenv -e ../.env -v LANGFUSE_AI_GATEWAY_AUTO_INCREMENT_LISTEN_PORT=true -- bash scripts/run-dev.sh",
- "build": "cargo build --release --locked",
- "build:dev": "cargo build --locked",
- "typecheck": "cargo check --locked --all-targets",
- "lint": "cargo fmt --all -- --check && cargo clippy --locked --all-targets -- -D warnings",
- "test": "cargo test --locked",
+ "build": "pnpm run rust:build",
+ "rust:build": "cargo build --release --locked",
+ "build:dev": "pnpm run rust:build:dev",
+ "rust:build:dev": "cargo build --locked",
+ "typecheck": "pnpm run rust:typecheck",
+ "rust:typecheck": "cargo check --locked --all-targets",
+ "lint": "pnpm run rust:lint",
+ "rust:lint": "cargo fmt --all -- --check && cargo clippy --locked --all-targets -- -D warnings",
+ "test": "pnpm run rust:test",
+ "rust:test": "cargo test --locked",
"format": "cargo fmt --all"
},
"devDependencies": {
diff --git a/knip.jsonc b/knip.jsonc
index 8868fadc51..66b4ebb599 100644
--- a/knip.jsonc
+++ b/knip.jsonc
@@ -12,6 +12,10 @@
"catalog": "off",
},
"workspaces": {
+ ".": {
+ // `pnpm change check` is a pnpm built-in, not an installed binary.
+ "ignoreBinaries": ["change"],
+ },
"packages/shared": {
"ignoreFiles": [
// Standalone helper invoked manually as documented in the adjacent framework-traces README.
diff --git a/package.json b/package.json
index f77db84ff8..0df037e379 100644
--- a/package.json
+++ b/package.json
@@ -6,13 +6,19 @@
"private": true,
"engines": {
"node": "24",
- "pnpm": "12.6.0"
+ "pnpm": "12.8.2"
+ },
+ "devEngines": {
+ "packageManager": {
+ "name": "pnpm",
+ "version": "12.8.2"
+ }
},
"scripts": {
"agents:check": "node scripts/agents/sync-agent-shims.mjs --check --check-paths",
"agents:sync": "node scripts/agents/sync-agent-shims.mjs",
"postinstall": "node -e \"const fs = require('node:fs'); const cp = require('node:child_process'); if (!fs.existsSync('scripts/postinstall.sh')) { console.log('Skipping repo postinstall helper: scripts/postinstall.sh is not present in this install context.'); process.exit(0); } cp.execSync('bash scripts/postinstall.sh', { stdio: 'inherit' });\"",
- "preinstall": "npx only-allow pnpm",
+ "preinstall": "node -e \"if (!process.env.npm_config_user_agent?.startsWith('pnpm/')) { console.error('This repository uses pnpm. Run pnpm install.'); process.exit(1); }\"",
"infra:dev:up": "docker compose -f ./docker-compose.dev.yml up -d --wait",
"infra:dev:down": "docker compose -f ./docker-compose.dev.yml down",
"infra:dev:prune": "docker compose -f ./docker-compose.dev.yml down -v",
@@ -41,7 +47,7 @@
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\" --experimental-cli",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,css}\" --experimental-cli",
"playwright:install": "pnpm --filter web exec playwright install chromium",
- "openapi:export": "npx [email protected] export --api server web/public/generated/api/openapi.yml && pnpm --filter web exec tsx scripts/openapi/postprocess-openapi.ts && npx [email protected] export --api client web/public/generated/api-client/openapi.yml && npx [email protected] export --api organizations web/public/generated/organizations-api/openapi.yml",
+ "openapi:export": "pnpm dlx [email protected] export --api server web/public/generated/api/openapi.yml && pnpm --filter web exec tsx scripts/openapi/postprocess-openapi.ts && pnpm dlx [email protected] export --api client web/public/generated/api-client/openapi.yml && pnpm dlx [email protected] export --api organizations web/public/generated/organizations-api/openapi.yml",
"openapi:check": "pnpm run openapi:export && bash scripts/openapi/assert-generated-current.sh",
"storybook": "pnpm --filter web run storybook",
"test": "turbo run test",
@@ -60,7 +66,7 @@
"prettier": "^3.8.3",
"release-it": "^20.2.0",
"ts7": "npm:typescript@^7.0.2",
- "turbo": "2.11.3"
+ "turbo": "2.11.6"
},
"release-it": {
"git": {
@@ -108,6 +114,5 @@
"pr": ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._"
}
}
- },
- "packageManager": "[email protected]"
+ }
}
diff --git a/packages/config-eslint/package.json b/packages/config-eslint/package.json
index 9383b5698f..7b1c66ce84 100644
--- a/packages/config-eslint/package.json
+++ b/packages/config-eslint/package.json
@@ -26,7 +26,7 @@
"@next/eslint-plugin-next": "16.3.8",
"@repo/eslint-plugin": "workspace:*",
"eslint-config-prettier": "^10.1.8",
- "eslint-config-turbo": "2.11.3",
+ "eslint-config-turbo": "2.11.6",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.32.0",
diff --git a/packages/native/AGENTS.md b/packages/native/AGENTS.md
index 71b8878994..e52bd4f225 100644
--- a/packages/native/AGENTS.md
+++ b/packages/native/AGENTS.md
@@ -23,6 +23,8 @@
mirrors dd-trace and the winston logger (`DD_*`, `LANGFUSE_LOG_*`).
- The worker calls `initTelemetry()` once in `worker/src/initialize.ts` and
imports functions from `@langfuse/native` directly; keep call sites few.
+- Keep finite Rust commands behind the package's `rust:*` scripts so pnpm's
+ shared `langfuse-rust` concurrency group also covers builds launched by Turbo.
- `PreparedEvent` snapshots finalized JS rows into owned Rust fields;
`encodeClickhouseEvents()` asynchronously encodes batches of those handles.
Keep column definitions in `src/native_schema.rs` and JS handles off worker threads.
diff --git a/packages/native/README.md b/packages/native/README.md
index fa3d092575..d30968dac9 100644
--- a/packages/native/README.md
+++ b/packages/native/README.md
@@ -49,6 +49,12 @@ pnpm --filter @langfuse/native run lint # cargo fmt --check && cargo cli
pnpm --filter @langfuse/native run test # Rust tests; uses ClickHouse when available
```
+These commands delegate to `rust:*` scripts in the `langfuse-rust` pnpm
+concurrency group, shared with the gateway across worktrees using the same
+pnpm `stateDir`. This limits concurrent Rust tasks, including tasks launched
+by Turbo; each compiler still controls its own threads. Run `pnpm tasks status`
+to inspect running and waiting tasks. Direct Cargo commands bypass the group.
+
`pnpm run dev`, `pnpm run build`, `pnpm run test`, and the worker's
`typecheck`/`lint` tasks build this package first through turbo, so the addon
is always present when the worker starts or its tests run. A direct
diff --git a/packages/native/package.json b/packages/native/package.json
index 7a18e6a8c4..7d747bde85 100644
--- a/packages/native/package.json
+++ b/packages/native/package.json
@@ -16,11 +16,16 @@
},
"scripts": {
"prepare-clickhouse-rs": "sh scripts/prepare-clickhouse-rs.sh",
- "build": "pnpm run prepare-clickhouse-rs && napi build --platform --release",
- "build:debug": "pnpm run prepare-clickhouse-rs && napi build --platform",
- "lint": "pnpm run prepare-clickhouse-rs && cargo fmt --check && cargo clippy --all-targets -- -D warnings",
- "lint:fix": "pnpm run prepare-clickhouse-rs && cargo fmt && cargo clippy --all-targets --fix --allow-dirty -- -D warnings",
- "test": "pnpm run prepare-clickhouse-rs && cargo test --locked"
+ "build": "pnpm run rust:build",
+ "rust:build": "pnpm run prepare-clickhouse-rs && napi build --platform --release",
+ "build:debug": "pnpm run rust:build:debug",
+ "rust:build:debug": "pnpm run prepare-clickhouse-rs && napi build --platform",
+ "lint": "pnpm run rust:lint",
+ "rust:lint": "pnpm run prepare-clickhouse-rs && cargo fmt --check && cargo clippy --all-targets -- -D warnings",
+ "lint:fix": "pnpm run rust:lint:fix",
+ "rust:lint:fix": "pnpm run prepare-clickhouse-rs && cargo fmt && cargo clippy --all-targets --fix --allow-dirty -- -D warnings",
+ "test": "pnpm run rust:test",
+ "rust:test": "pnpm run prepare-clickhouse-rs && cargo test --locked"
},
"napi": {
"binaryName": "langfuse-native",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 774e6e8876..09e2ae0251 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -118,8 +118,8 @@ importers:
specifier: npm:typescript@^7.0.2
turbo:
- specifier: 2.11.3
- version: 2.11.3
+ specifier: 2.11.6
+ version: 2.11.6
ai-gateway:
devDependencies:
@@ -173,8 +173,8 @@ importers:
specifier: ^10.1.8
eslint-config-turbo:
- specifier: 2.11.3
+ specifier: 2.11.6
eslint-import-resolver-node:
specifier: ^0.3.6
version: 0.3.10([email protected])
@@ -1029,7 +1029,7 @@ importers:
eslint-plugin-boundaries:
specifier: 7.2.0
eslint-plugin-check-file:
specifier: 3.3.2
@@ -6376,33 +6376,33 @@ packages:
peerDependencies:
typescript: '>=5.7.2'
- '@turbo/[email protected]':
- resolution: {integrity: sha512-D4EIKTgPpxFQL5aZNbNqy57XOiRldM+mwP1ME9ZLM4DJoV3oNK7GKyQWVusz1umjiFNmLvunNGw7Jq4RUyYL3A==}
+ '@turbo/[email protected]':
+ resolution: {integrity: sha512-nAvJwDBgz/cKoSPhB7YOGPFmDEwCRavFjy0jUsrGqR97cLyJqXU2rZC/zTnw+9J3DkB2gfjpolX7mKsBatMcCQ==}
cpu: [x64]
os: [darwin]
- '@turbo/[email protected]':
- resolution: {integrity: sha512-WOvgWIO86LzBQmL9aRFekROing1CZMVDjmdD7Dk6R65qFAFdrlKkufojenjW1AbUAqytpG6xsXzq8UEScdSdDQ==}
+ '@turbo/[email protected]':
+ resolution: {integrity: sha512-odk6UHW9hympllPlezz7oJhPmO40+oU8BUh4zvNuSIqQ1QQll4zo1DN4IrD/3jUzkLefvMJ8UHEHlGq9WdR7tw==}
cpu: [arm64]
os: [darwin]
- '@turbo/[email protected]':
- resolution: {integrity: sha512-zIgNl9KkMnsdU54JrnazELatpMJDSktKjD3kjKVliUNMl/5uhFRrqQ+Z1qaACKw/2ybL7xzlsHir9s5q7sYlQg==}
+ '@turbo/[email protected]':
+ resolution: {integrity: sha512-PvXbwMqZPEWdWnJSIJ5D/tugnSOrRvLYKkH7iC8TLGVI+4J5znSLn3Tx1YkH5OUzFEFhxJQyHjtiRqBPbCoVlg==}
cpu: [x64]
os: [android, linux]
- '@turbo/[email protected]':
- resolution: {integrity: sha512-aJToWHx5JYvpPwIrAt1DuYrHWcpQGjGf0XVPRMKQBHou//JUYR6oowHeUZp9Oq7e3XDWA75E37C2GnNaBqCVnA==}
+ '@turbo/[email protected]':
+ resolution: {integrity: sha512-8FKA3SqJk6fTv7Hqrmv2JnJfqiXslTRJYBwiI6eU3QXokVMYFLh1wUywF+w3MPtDfx1O/1otbps5AnijbzY1Kg==}
cpu: [arm64]
os: [android, linux]
- '@turbo/[email protected]':
- resolution: {integrity: sha512-hu5biiwVGdMvHB/vvaoPjtudNBn3TqcsKK2A06ap3O0wnSZwAtTXe92tKTckpecDeVs+IC+4r8s2wXpbdSPWoA==}
+ '@turbo/[email protected]':
+ resolution: {integrity: sha512-XPSgTg494cV31u0Uch8zRq/Jnpe8h4muwNpg9IRPrJqADrjjzxzFMtJCtBZTKVaSEDUU/ol8Gr4SYxtiHt2Tzg==}
cpu: [x64]
os: [win32]
- '@turbo/[email protected]':
- resolution: {integrity: sha512-naDEb/31UmOOJOChi+LebLMKWKa1kId0yig1yTRZzDViDg1lBw1Ptu5iQYCvOfOOrx6swUUucf3zPWuPGWz7Jw==}
+ '@turbo/[email protected]':
+ resolution: {integrity: sha512-dZ0/ZFH2AU/l1KdqISVkWUSnm0ufWZyiYRLDYCL+rJAhkUDMFhTZkSnYEL2O/m0tOu/Jy/EKAnZfocuyMX3LMQ==}
cpu: [arm64]
os: [win32]
@@ -8484,8 +8484,8 @@ packages:
peerDependencies:
eslint: '>=7.0.0'
- resolution: {integrity: sha512-YlYHxCZsngDjp04OHkN+hoM7B/LiHKw8dFi8OVbZtyVhngINsf8bMA2mdBbTyZyw+XQC/jJo3G6LC1/E3c9FOg==}
+ resolution: {integrity: sha512-lvp2cSQ5GrvZ4lTk+boP6AqQLHG6EJTqEgWe5/Zat3oY9jwWBHPe3yQlvkkT0n/rRp1t6ZTLDVY19RXP/LGQ8Q==}
peerDependencies:
eslint: '>6.6.0'
turbo: '>2.0.0'
@@ -8595,8 +8595,8 @@ packages:
typescript:
optional: true
- resolution: {integrity: sha512-moidquRNi1eEcWdc//TilHc1EPOWm0ADNnEaIOuUyqOa6vxLy0DTf9ByRKYgnNE0dt+UB3V/gtJfilxCVaeZag==}
+ resolution: {integrity: sha512-i9ZguxBGMrgiTMzFx2qWufS6imHLyI1UG9A+T2CzsCPtUdU+Mvs+8bCoSNMKum6WXmITL9vDvIrUmO4dVx6rOA==}
peerDependencies:
eslint: '>6.6.0'
turbo: '>2.0.0'
@@ -8732,7 +8732,6 @@ packages:
resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==}
- engines: {'0': node >=0.6.0}
resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==}
@@ -12050,8 +12049,8 @@ packages:
engines: {node: '>=18.0.0'}
hasBin: true
- resolution: {integrity: sha512-Pfg2dWNOUPwJYbR+eYAcjoBbo4Kmoc8uQb80hzKrBgNEQtxvwf2ucXG7C28MyLVhV/zJSKvChrR+2CP/BONpoA==}
+ resolution: {integrity: sha512-UppAr5XEHLfVdVp75nd+tzPp/wVEwS7Ken9aYjMlBnHqXynKn9IcQHd6GDOXBxDViSjpS+SzJcOF86v9Hf8GfQ==}
hasBin: true
@@ -12307,7 +12306,6 @@ packages:
resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==}
- engines: {'0': node >=0.6.0}
resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==}
@@ -13631,10 +13629,10 @@ snapshots:
'@blazediff/[email protected]': {}
dependencies:
eslint-import-resolver-node: 0.3.9([email protected])
handlebars: 4.7.9
is-core-module: 2.16.1
micromatch: 4.0.8
@@ -14145,7 +14143,7 @@ snapshots:
dependencies:
'@floating-ui/dom': 1.8.0
- '@floating-ui/utils': 0.2.12
+ '@floating-ui/utils': 0.2.10
transitivePeerDependencies:
- '@vue/composition-api'
@@ -18058,22 +18056,22 @@ snapshots:
dependencies:
typescript: 7.0.2
- '@turbo/[email protected]':
+ '@turbo/[email protected]':
optional: true
- '@turbo/[email protected]':
+ '@turbo/[email protected]':
optional: true
- '@turbo/[email protected]':
+ '@turbo/[email protected]':
optional: true
- '@turbo/[email protected]':
+ '@turbo/[email protected]':
optional: true
- '@turbo/[email protected]':
+ '@turbo/[email protected]':
optional: true
- '@turbo/[email protected]':
+ '@turbo/[email protected]':
optional: true
@@ -18449,19 +18447,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- dependencies:
- '@typescript-eslint/scope-manager': 8.67.0
- '@typescript-eslint/types': 8.67.0
- '@typescript-eslint/typescript-estree': 8.67.0([email protected])([email protected])
- '@typescript-eslint/visitor-keys': 8.67.0
- debug: 4.4.3([email protected])
- typescript: 7.0.2
- transitivePeerDependencies:
- - supports-color
- optional: true
-
'@typescript-eslint/[email protected](@typescript/[email protected])([email protected])':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.67.0(@typescript/[email protected])
@@ -19159,11 +19144,11 @@ snapshots:
dependencies:
- acorn: 8.18.0
+ acorn: 8.17.0
dependencies:
- acorn: 8.18.0
+ acorn: 8.17.0
@@ -20481,11 +20466,11 @@ snapshots:
dependencies:
dependencies:
- turbo: 2.11.3
+ turbo: 2.11.6
dependencies:
@@ -20529,35 +20514,23 @@ snapshots:
transitivePeerDependencies:
- supports-color
- dependencies:
- debug: 3.2.7([email protected])
- optionalDependencies:
- eslint-import-resolver-node: 0.3.10([email protected])
- transitivePeerDependencies:
- - supports-color
-
dependencies:
debug: 3.2.7([email protected])
optionalDependencies:
eslint-import-resolver-node: 0.3.9([email protected])
transitivePeerDependencies:
- supports-color
dependencies:
chalk: 4.1.2
eslint-import-resolver-node: 0.3.9([email protected])
handlebars: 4.7.9
micromatch: 4.0.8
transitivePeerDependencies:
@@ -20601,35 +20574,6 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
- dependencies:
- '@rtsao/scc': 1.1.0
- array-includes: 3.1.9
- array.prototype.findlastindex: 1.2.6
- array.prototype.flat: 1.3.3
- array.prototype.flatmap: 1.3.3
- debug: 3.2.7([email protected])
- doctrine: 2.1.0
- eslint-import-resolver-node: 0.3.10([email protected])
- hasown: 2.0.4
- is-core-module: 2.16.2
- is-glob: 4.0.3
- minimatch: 3.1.5
- object.fromentries: 2.0.8
- object.groupby: 1.0.3
- object.values: 1.2.1
- semver: 6.3.1
- string.prototype.trimend: 1.0.9
- tsconfig-paths: 3.15.0
- optionalDependencies:
- transitivePeerDependencies:
- - eslint-import-resolver-typescript
- - eslint-import-resolver-webpack
- - supports-color
-
dependencies:
aria-query: 5.3.2
@@ -20712,11 +20656,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
dotenv: 16.0.3
- turbo: 2.11.3
+ turbo: 2.11.6
dependencies:
@@ -24863,14 +24807,14 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
optionalDependencies:
- '@turbo/darwin-64': 2.11.3
- '@turbo/darwin-arm64': 2.11.3
- '@turbo/linux-64': 2.11.3
- '@turbo/linux-arm64': 2.11.3
- '@turbo/windows-64': 2.11.3
- '@turbo/windows-arm64': 2.11.3
+ '@turbo/darwin-64': 2.11.6
+ '@turbo/darwin-arm64': 2.11.6
+ '@turbo/linux-64': 2.11.6
+ '@turbo/linux-arm64': 2.11.6
+ '@turbo/windows-64': 2.11.6
+ '@turbo/windows-arm64': 2.11.6
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index c1f23fe1aa..f1aec88a81 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -5,6 +5,31 @@ packages:
- "ai-gateway"
- "packages/**"
- "ee"
+# Consolidate compatible versions during writable installs; frozen installs keep the lockfile.
+autoDedupe: true
+# These private product packages are versioned together by release-it.
+versioning:
+ fixed:
+ - [langfuse, web, worker]
+# Bound competing Rust jobs across worktrees sharing pnpm's state directory.
+# Keep persistent dev servers and the outer Turbo commands outside this group.
+concurrencyGroups:
+ langfuse-rust: 1
+tasks:
+ "rust:build":
+ concurrencyGroup: langfuse-rust
+ "rust:build:dev":
+ concurrencyGroup: langfuse-rust
+ "rust:build:debug":
+ concurrencyGroup: langfuse-rust
+ "rust:typecheck":
+ concurrencyGroup: langfuse-rust
+ "rust:lint":
+ concurrencyGroup: langfuse-rust
+ "rust:lint:fix":
+ concurrencyGroup: langfuse-rust
+ "rust:test":
+ concurrencyGroup: langfuse-rust
catalog:
"@aws-sdk/client-cloudwatch": 3.1074.0
"@aws-sdk/client-eventbridge": 3.1074.0
@@ -23,15 +48,14 @@ catalog:
typescript: npm:@typescript/typescript6@^6.0.2
# 5 day delay for new dep upgrades to reduce supply chain attack risk
minimumReleaseAge: 7200
+# Drop exceptions for versions no longer in the lockfile during writable installs.
+minimumReleaseAgeExcludePrune: true
# Reject recent releases whose publishing trust is weaker than earlier versions.
# Older releases have already passed the five-day quarantine above.
trustPolicy: no-downgrade
trustPolicyIgnoreAfter: 7200
# Keep pnpm itself out of the workspace lockfile's dependency graph.
pmOnFail: ignore
-# the exclusions are temporary so that we can set the 5 day limit without downgrading packages.
-# this list is version-specific
-# minimumReleaseAgeExclude:
packageExtensions:
# TypeScript 7 has no JavaScript compiler API yet. Keep Storybook's toolchain
# on the TypeScript 6 compatibility package while Next builds with 7.
@@ -148,12 +172,12 @@ patchedDependencies:
# focusFirst crashes on null item refs (items unmounting while entry focus
# runs), e.g. opening a row-actions dropdown while a table re-renders.
# Still unfixed upstream as of 1.1.19; remove once Radix guards focusFirst.
- '@radix-ui/[email protected]': patches/@[email protected]
+ "@radix-ui/[email protected]": patches/@[email protected]
# Select typeahead schedules nextItem.ref.current.focus() in a setTimeout.
# If the item unmounts before the timeout (dynamic option lists, closing the
# menu, a sibling field remounting items), the ref is null and throws.
# Fixed upstream in 2.3.7; remove this patch when we bump.
- '@radix-ui/[email protected]': patches/@[email protected]
+ "@radix-ui/[email protected]": patches/@[email protected]
# The document-level drag handlers crash when a panel group unmounts
# mid-drag: setPointerCapture on the detached separator throws
@@ -165,7 +189,7 @@ publicHoistPattern:
- "*prisma*"
- "@aws-sdk/client-s3"
minimumReleaseAgeExclude:
- # These Next.js releases pass the five-day window after 2026-10-05.
+ # Next.js security fixes; eligible without exceptions after 2026-10-05 16:08 UTC.
@@ -177,3 +201,13 @@ minimumReleaseAgeExclude:
+ # Turbo and lint companions; eligible after 2026-10-06 04:01 UTC.
+ - "@turbo/[email protected]"
+ - "@turbo/[email protected]"
+ - "@turbo/[email protected]"
+ - "@turbo/[email protected]"
+ - "@turbo/[email protected]"
+ - "@turbo/[email protected]"
diff --git a/turbo.json b/turbo.json
index 8cc2adef3e..26c1fe6a1e 100644
--- a/turbo.json
+++ b/turbo.json
@@ -1,5 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
+ "futureFlags": {
+ "errorsOnlyShowHash": true,
+ "watchUsingTaskInputs": true
+ },
+ // Agent guidance is maintained in .agents/AGENTS.md; keep its root symlink.
+ "agentGuidance": false,
"noUpdateNotifier": true,
"cacheMaxSize": "7.5GB",
"globalDependencies": [".env"],
@@ -17,14 +23,14 @@
// with and without it must not share a cache entry — a cached
// unchecked build would otherwise replay as a "type-checked" one.
"env": ["NEXT_IGNORE_BUILD_ERRORS"],
- "outputs": ["dist/**", ".next/**", "!.next/cache/**"],
+ "outputs": ["dist/**", ".next/**", "!.next/cache/**", "!.next/dev/**"],
"cache": true,
"outputLogs": "errors-only"
},
"build:test": {
"dependsOn": ["db:generate", "^build"],
"env": ["NEXT_IGNORE_BUILD_ERRORS", "NEXT_DISABLE_BUILD_CACHE"],
- "outputs": ["dist/**", ".next/**", "!.next/cache/**"],
+ "outputs": ["dist/**", ".next/**", "!.next/cache/**", "!.next/dev/**"],
"cache": true,
"outputLogs": "errors-only"
},
@@ -67,12 +73,11 @@
// Prisma generate writes client types into node_modules. Turbo cache hits
// only replay logs and do not restore those side effects on fresh CI runners.
"db:generate": {
- "inputs": ["packages/shared/prisma/schema.prisma"],
"cache": false,
"dependsOn": ["^db:generate"]
},
"@langfuse/shared#db:generate": {
- "inputs": ["packages/shared/prisma/schema.prisma"],
+ "inputs": ["prisma/schema.prisma"],
"cache": false,
"dependsOn": ["^db:generate"],
"outputLogs": "errors-only"
@@ -100,7 +105,11 @@
"build:check": {
"dependsOn": ["db:generate", "^build"],
"env": ["NEXT_IGNORE_BUILD_ERRORS"],
- "outputs": [".next-check/**", "!.next-check/cache/**"],
+ "outputs": [
+ ".next-check/**",
+ "!.next-check/cache/**",
+ "!.next-check/dev/**"
+ ],
"cache": true,
"outputLogs": "errors-only"
},
diff --git a/web/Dockerfile b/web/Dockerfile
index 406164b8b4..19e246d35c 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -7,14 +7,14 @@ RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libc6-compat busybox
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine AS build-base
# Pin turbo to avoid nondeterministic prune output from future patch releases.
-RUN npm install [email protected] --global
+RUN npm install [email protected] --global
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
# Pass --build-arg NODE_USE_ENV_PROXY=1 when building behind a proxy.
ARG NODE_USE_ENV_PROXY
RUN npm install --global [email protected] \
&& corepack enable \
- && corepack prepare [email protected] --activate
+ && corepack prepare [email protected] --activate
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine AS runtime-base
# Remove build-only package managers. npm stays here because the runner stage
@@ -42,7 +42,7 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} build-base AS pruner
WORKDIR /app
COPY . .
-RUN turbo prune --scope=web --docker
+RUN turbo prune web --docker
FROM --platform=${TARGETPLATFORM:-linux/amd64} build-base AS builder
diff --git a/worker/Dockerfile b/worker/Dockerfile
index ab4e14c58a..56c523d1ab 100644
--- a/worker/Dockerfile
+++ b/worker/Dockerfile
@@ -7,14 +7,14 @@ RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libc6-compat busybox
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine AS build-base
# Pin turbo to avoid nondeterministic prune output from future patch releases.
-RUN npm install [email protected] --global
+RUN npm install [email protected] --global
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
# Pass --build-arg NODE_USE_ENV_PROXY=1 when building behind a proxy.
ARG NODE_USE_ENV_PROXY
RUN npm install --global [email protected] \
&& corepack enable \
- && corepack prepare [email protected] --activate
+ && corepack prepare [email protected] --activate
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine AS runtime-base
# package managers and build-only CLIs only increase exposure to CVEs -> remove them
@@ -27,7 +27,7 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} build-base AS pruner
WORKDIR /app
COPY . .
-RUN turbo prune --scope=worker --docker
+RUN turbo prune worker --docker
FROM --platform=${TARGETPLATFORM:-linux/amd64} build-base AS builder