:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(deps): move the agent and desktop workspaces to pnpm 11.28.5 (#120892)
Alessandro Pogliaghi99f69cb6e427
diff --git a/.github/workflows/desktop-react-doctor.yml b/.github/workflows/desktop-react-doctor.ymlindex 553833beef9a..6b33d86f2612 100644--- a/.github/workflows/desktop-react-doctor.yml+++ b/.github/workflows/desktop-react-doctor.yml@@ -70,7 +70,7 @@ jobs:fiREPORT="${RUNNER_TEMP}/react-doctor-report.json"status=0- # Pinned: products/desktop/.npmrc's minimum release age makes @latest+ # Pinned: products/desktop/pnpm-workspace.yaml's minimum release age makes @latest# intermittently unresolvable in CI. Bump deliberately, not via latest.npx --yes [email protected] . --blocking error --changed-files-from "$CHANGED" --json --json-compact --no-telemetry > "$REPORT" || status=$?echo "exit-code=$status" >> "$GITHUB_OUTPUT"diff --git a/packages/agent/.npmrc b/packages/agent/.npmrcdeleted file mode 100644index 81bbe90c961f..000000000000--- a/packages/agent/.npmrc+++ /dev/null@@ -1,3 +0,0 @@-node-linker=hoisted-shamefully-hoist=true-min-release-age=7diff --git a/packages/agent/package.json b/packages/agent/package.jsonindex f503fa7155e6..6e6ff10ca86f 100644--- a/packages/agent/package.json+++ b/packages/agent/package.json@@ -6,7 +6,7 @@"engines": {"node": ">=22.19.0"},- "packageManager": "[email protected]+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b",+ "packageManager": "[email protected]","scripts": {"build": "node scripts/turbo.mjs build","dev": "node scripts/turbo.mjs dev",diff --git a/packages/agent/pnpm-workspace.yaml b/packages/agent/pnpm-workspace.yamlindex e408678fc597..398ae9fc5114 100644--- a/packages/agent/pnpm-workspace.yaml+++ b/packages/agent/pnpm-workspace.yaml@@ -3,8 +3,15 @@packages:- packages/*+# A flat node_modules, which Electron and the native rebuilds require.+nodeLinker: hoisted+shamefullyHoist: trueblockExoticSubdeps: truetrustPolicy: no-downgrade+# Maintenance releases published without the provenance of an earlier release.+trustPolicyExclude:catalog:'@hono/node-server': ^1.13.7@@ -138,13 +145,23 @@ overrides:qs: 6.15.3smol-toml: 1.6.1-onlyBuiltDependencies:- - '@parcel/watcher'- - '@posthog/cli'- - better-sqlite3- - core-js- - electron- - electron-winstaller- - esbuild- - node-pty- - tree-sitter-cli+allowBuilds:+ '@parcel/watcher': true+ '@posthog/cli': true+ better-sqlite3: true+ core-js: true+ electron: true+ electron-winstaller: true+ esbuild: true+ node-pty: true+ tree-sitter-cli: true+ '@google/genai': false+ '@swc/core': false+ msw: false+ protobufjs: false++# Keep `pnpm run` from starting an install, as the root workspace does.+verifyDepsBeforeRun: false+# Installs without a terminal (flox activation, agent hooks, CI) abort when pnpm asks before+# it rebuilds node_modules after a store or layout change, so rebuild without asking.+confirmModulesPurge: falsediff --git a/products/desktop/.npmrc b/products/desktop/.npmrcdeleted file mode 100644index 81bbe90c961f..000000000000--- a/products/desktop/.npmrc+++ /dev/null@@ -1,3 +0,0 @@-node-linker=hoisted-shamefully-hoist=true-min-release-age=7diff --git a/products/desktop/docs/TROUBLESHOOTING.md b/products/desktop/docs/TROUBLESHOOTING.mdindex d378b8bdb518..293e6babe46f 100644--- a/products/desktop/docs/TROUBLESHOOTING.md+++ b/products/desktop/docs/TROUBLESHOOTING.md@@ -240,7 +240,7 @@ You might see something like this every time you run `pnpm install`:Packages: -198```-This is cosmetic noise — nothing is broken. It's caused by `node-linker=hoisted` in `.npmrc`, which gives us a flat `node_modules` layout (required for Electron). With hoisted mode, pnpm reorganizes the flat layout on each install and reports the churn as packages added/removed. The packages aren't actually disappearing. Safe to ignore.+This is cosmetic noise — nothing is broken. It's caused by `nodeLinker: hoisted` in `pnpm-workspace.yaml`, which gives us a flat `node_modules` layout (required for Electron). With hoisted mode, pnpm reorganizes the flat layout on each install and reports the churn as packages added/removed. The packages aren't actually disappearing. Safe to ignore.## Commit signing fails with Secretive ("private key not available")diff --git a/products/desktop/package.json b/products/desktop/package.jsonindex 740150e91b15..ee8cee54ccfa 100644--- a/products/desktop/package.json+++ b/products/desktop/package.json@@ -6,7 +6,7 @@"engines": {"node": ">=22.19.0"},- "packageManager": "[email protected]+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b",+ "packageManager": "[email protected]","scripts": {"preinstall": "node scripts/enforce-pnpm.mjs","postinstall": "bash scripts/ensure-phrocs.sh --update",diff --git a/products/desktop/pnpm-workspace.yaml b/products/desktop/pnpm-workspace.yamlindex aa519eab291b..106dcef4440a 100644--- a/products/desktop/pnpm-workspace.yaml+++ b/products/desktop/pnpm-workspace.yaml@@ -42,6 +42,10 @@ ignoredBuiltDependencies:- msw- protobufjs+# A flat node_modules, which Electron and the native rebuilds require.+nodeLinker: hoisted+shamefullyHoist: true+minimumReleaseAge: 10080minimumReleaseAgeExclude:@@ -65,6 +69,12 @@ minimumReleaseAgeExclude:- '@posthog/quill'- '@posthog/quill-charts'- '@posthog/quill-tokens'+ # PostHog packages are released by our own workflows, so dependency automation+ # should not delay these package updates.+ - '@posthog/*'+ - posthog-js+ - posthog-node+ - posthog-react-native- '@tanstack/devtools-core'- '@tanstack/history'- '@tanstack/react-router'@@ -135,16 +145,28 @@ overrides:qs: 6.15.3smol-toml: 1.6.1-onlyBuiltDependencies:- - '@parcel/watcher'- - '@posthog/cli'- - better-sqlite3- - core-js- - electron- - electron-winstaller- - esbuild- - node-pty- - tree-sitter-cli+allowBuilds:+ '@parcel/watcher': true+ '@posthog/cli': true+ better-sqlite3: true+ core-js: true+ electron: true+ electron-winstaller: true+ esbuild: true+ node-pty: true+ tree-sitter-cli: true+ '@google/genai': false+ '@swc/core': false+ koffi: false+ msw: false+ protobufjs: false+ unrs-resolver: false++# Keep `pnpm run` from starting an install, as the root workspace does.+verifyDepsBeforeRun: false+# Installs without a terminal (flox activation, agent hooks, CI) abort when pnpm asks before+# it rebuilds node_modules after a store or layout change, so rebuild without asking.+confirmModulesPurge: falsepatchedDependencies:[email protected]: patches/[email protected]diff --git a/products/tasks/backend/logic/services/docker_sandbox.py b/products/tasks/backend/logic/services/docker_sandbox.pyindex f016085d4535..62c95083dbfa 100644--- a/products/tasks/backend/logic/services/docker_sandbox.py+++ b/products/tasks/backend/logic/services/docker_sandbox.py@@ -263,7 +263,6 @@ class DockerSandbox(AgentServerLaunchMixin):monorepo_root = os.path.abspath(monorepo_root)required_paths = [- os.path.join(monorepo_root, ".npmrc"),os.path.join(monorepo_root, "package.json"),os.path.join(monorepo_root, "pnpm-workspace.yaml"),os.path.join(monorepo_root, "pnpm-lock.yaml"),@@ -348,7 +347,7 @@ class DockerSandbox(AgentServerLaunchMixin):os.makedirs(packages_path)os.makedirs(scripts_path)- for file_name in (".npmrc", "package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"):+ for file_name in ("package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"):shutil.copy2(os.path.join(monorepo_root, file_name), workspace_path)shutil.copy2(os.path.join(monorepo_root, "scripts", "rimraf.mjs"), scripts_path)diff --git a/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local b/products/tasks/backend/sandbox/images/Dockerfile.sandbox-localindex eabf291a6f31..69c96f044614 100644--- a/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local+++ b/products/tasks/backend/sandbox/images/Dockerfile.sandbox-local@@ -6,7 +6,7 @@FROM posthog-sandbox-base-COPY local-workspace/.npmrc local-workspace/package.json local-workspace/pnpm-lock.yaml local-workspace/pnpm-workspace.yaml /local-workspace/+COPY local-workspace/package.json local-workspace/pnpm-lock.yaml local-workspace/pnpm-workspace.yaml /local-workspace/COPY local-workspace/packages/agent/package.json /local-workspace/packages/agent/package.jsonCOPY local-workspace/packages/enricher/package.json /local-workspace/packages/enricher/package.jsonCOPY local-workspace/packages/git/package.json /local-workspace/packages/git/package.json