Project: docto-crypt · Branch: COREFRONT-1129_pnpm-phase1-migration · Mode: ` · **Model:**claude-haiku-4-5-20251001`
Stats: 1 user messages, 22 tool calls, tools used: Bash, Read.
Conversation
Turn 1 — User
Explore the doctolib/actions/setup-node action to understand: 1. What does it currently do? 2. Does it have any pnpm support or package manager selection? 3. What inputs does it accept? 4. How does it compare to the official actions/setup-node action? 5. Is there any precedent in the codebase for choosing between package managers?
Focus on the action.yml file and any relevant documentation. This will help determine if we should: - Extend setup-node to support pnpm - Keep setup-node and setup-pnpm separate - Use only setup-pnpm in the pnpm workflow
Turn 1 — Assistant
I'll explore the doctolib/actions repository to understand the setup-node action and how it relates to package manager selection.
Tools used:
Bash:find /Users/USER/workspace/doctolib/actions -type f -name "action.yml" -o -name "action.yaml" | head -20
Tools used:
Bash:ls -la /Users/USER/workspace/doctolib/actions/ | head -20
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/actions/setup-yak/action.yml /Users/USER/workspace/doctolib/actions/create-tag/action.yml /Users/USER/workspace/doctolib/actions/cancel-test-suites/action.yml /Users/USER/workspace/doctolib/actions/generate-trunkver/action.yml /Users/USER/workspace/doctolib/actions/terraform-lint/action.yml /Users/USER/workspace/doctolib/actions/load-secrets/action.yml /Users/USER/workspace/doctolib/actions/slack-message-with-level/action.yml /Users/USER/workspace/doctolib/actions/ …(truncated, 841 more chars)
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 3.8 KB Wed Jan 28 14:11:31 2026 . drwxr-xr-x clertonra staff 704 B Wed Jan 28 11:17:51 2026 .. drwxr-xr-x clertonra staff 96 B Mon Sep 1 15:17:42 2025 .claude .rw-r--r-- clertonra staff 147 B Mon Jan 19 17:13:28 2026 .editorconfig drwxr-xr-x clertonra staff 480 B Wed Jan 28 16:26:32 2026 .git .rw-r--r-- clertonra staff 65 B Mon Sep 1 15:17:42 2025 .gitattributes drwxr-xr-x clertonra staff 160 B Mon Sep 1 15:17:42 2025 .github .rw-r--r-- clertonra staff 97 B …(truncated, 926 more chars)
Now let me find the setup-node action specifically:
Tools used:
Bash:find /Users/USER/workspace/doctolib/actions -type d -name "setup-node"
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/actions/setup-node
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-node
Tool results:
→ result (ERROR): EISDIR: illegal operation on a directory, read
Tools used:
Bash:ls -la /Users/USER/workspace/doctolib/actions/setup-node/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 224 B Wed Jan 28 11:51:56 2026 . drwxr-xr-x clertonra staff 3.8 KB Wed Jan 28 14:11:31 2026 .. .rw-r--r-- clertonra staff 9.1 KB Wed Jan 28 11:51:56 2026 action.yml .rw-r--r-- clertonra staff 368 B Mon Sep 1 15:17:42 2025 catalog-info.yaml .rw-r--r-- clertonra staff 12 KB Mon Jan 19 17:13:28 2026 CHANGELOG.md drwxr-xr-x clertonra staff 192 B Mon Sep 1 15:17:42 2025 fixtures .rw-r--r-- clertonra staff 7.5 KB Mon Jan 19 17:13:28 2026 README.md
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-node/action.yml
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-node/README.md
Tool results:
→ result (ok): 1→name: "Setup Node.JS" 2→description: "Setup Node.JS environment and install dependencies, with cache (stored in S3)" 3→author: "Doctolib" 4→branding: 5→ icon: "package" 6→ color: "blue" 7→inputs: 8→ node-version: 9→ description: "Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0." 10→ node-version-file: 11→ description: "File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-v …(truncated, 10581 more chars)
Tool results:
→ result (ok): 1→# doctolib/actions/setup-node
2→
3→## Description
4→
5→
6→
7→Setup Node.JS environment and install dependencies, with cache (stored in S3)
8→
9→
10→
11→## Breaking Changes in v1.0.0
12→
13→If specified, all path-based inputs (node-version-file, lock-file, node-modules-paths, ...) must now be relative to working-directory.
…(truncated, 8339 more chars)
Now let me check if there are any other package manager setup actions (like setup-pnpm or setup-yarn):
Tools used:
Bash:find /Users/USER/workspace/doctolib/actions -type d -name "setup-*" | sort
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/actions/setup-cctl /Users/USER/workspace/doctolib/actions/setup-cel-validator /Users/USER/workspace/doctolib/actions/setup-datadog-test-visibility /Users/USER/workspace/doctolib/actions/setup-go /Users/USER/workspace/doctolib/actions/setup-java /Users/USER/workspace/doctolib/actions/setup-node /Users/USER/workspace/doctolib/actions/setup-nx /Users/USER/workspace/doctolib/actions/setup-pnpm /Users/USER/workspace/doctolib/actions/setup-python /Users/USER/workspace/do …(truncated, 188 more chars)
Perfect! There is a setup-pnpm action. Let me examine it:
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-pnpm/action.yml
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-pnpm/README.md
Tool results:
→ result (ok): 1→# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
2→name: "Setup pnpm"
3→description: "Setup pnpm with caching support for Doctolib projects"
4→author: "Doctolib"
5→branding:
6→ icon: "package"
7→ color: "blue"
8→inputs:
9→ pnpm-version:
10→ description: "pnpm version to install"
11→ required: false
12→ default: "9"
13→ run-install:
14→ description: "Whether to run pnpm install"
15→
…(truncated, 2309 more chars)
Tool results:
→ result (ok): 1→# Setup pnpm
2→
3→Composite action to setup pnpm with caching support for Doctolib projects.
4→
5→## Features
6→
7→- Installs pnpm using the official pnpm/action-setup action
8→- Caches pnpm store for improved performance
9→- Configurable pnpm version
10→- Optional automatic dependency installation
11→- Compatible with projects that have no dependencies
12→
13→## Usage
14→
15→### Basic Usage
16→
17→```yaml
18→- name:
…(truncated, 3001 more chars)
Now let me check the docto-crypt repository to see how workflows use these actions and if there's any precedent for choosing between package managers:
Tools used:
Bash:find /Users/USER/workspace/doctolib/docto-crypt -type f -name "*.yml" -o -name "*.yaml" | grep -E "(workflow|github)" | head -20
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish.yml /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish-pnpm.yml /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/org_ci_check_pr_compliance.yml /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/org_ci_actionlint.yml /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/java-test.yml
Tools used:
Read:/Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish.yml
Tools used:
Read:/Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish-pnpm.yml
Tool results:
→ result (ok): 1→on: 2→ push: 3→ branches: 4→ - main 5→ workflow_dispatch: 6→ 7→name: Publish Package 8→ 9→permissions: 10→ actions: read 11→ contents: write 12→ id-token: write 13→ packages: write 14→ pull-requests: write 15→ 16→jobs: 17→ publish: 18→ runs-on: prod-linux-s 19→ timeout-minutes: 15 20→ steps: 21→ - name: Checkout code 22→ uses: actions/checkout@08eba0b27e820071cde6df9 …(truncated, 1578 more chars)
Tool results:
→ result (ok): 1→on: 2→ workflow_dispatch: 3→ inputs: 4→ dry-run: 5→ description: 'Run in dry-run mode (no actual publish)' 6→ required: false 7→ default: true 8→ type: boolean 9→ 10→name: Publish Package (pnpm) 11→ 12→permissions: 13→ actions: read 14→ contents: write 15→ id-token: write 16→ packages: write 17→ pull-requests: write 18→ 19→jobs: 20→ publish-pnpm: 21→ runs-on: pr …(truncated, 7221 more chars)
Now let me check the CHANGELOG for setup-node to understand its history and design decisions:
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-node/CHANGELOG.md
Tool results:
→ result (ok): 1→# Changelog 2→ 3→## 1.0.0 (2026-01-12) 4→ 5→ 6→### ⚠ BREAKING CHANGES 7→ 8→ pes-2796: document breaking changes for v1.0.0 (#1780) 9→ 10→### Features 11→ 12→ pes-2796: document breaking changes for v1.0.0 (#1780) ([e9f4821](https://github.com/docto …(truncated, 14428 more chars)
Let me also check if there's a setup-yarn action and explore how the official actions/setup-node compares:
Tools used:
Bash:find /Users/USER/workspace/doctolib/actions -type d -name "*setup-yarn*" -o -name "*yarn*"
Tool results:
→ result (ok)
Now let me check the CHANGELOG for setup-pnpm to see when it was created:
Tools used:
Bash:ls -la /Users/USER/workspace/doctolib/actions/setup-pnpm/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 160 B Wed Jan 28 16:21:40 2026 . drwxr-xr-x clertonra staff 3.8 KB Wed Jan 28 14:11:31 2026 .. .rw-r--r-- clertonra staff 2.0 KB Wed Jan 28 16:21:20 2026 action.yml .rw-r--r-- clertonra staff 778 B Wed Jan 28 14:11:05 2026 CHANGELOG.md .rw-r--r-- clertonra staff 2.4 KB Wed Jan 28 16:21:40 2026 README.md
Tools used:
Read:/Users/USER/workspace/doctolib/actions/setup-pnpm/CHANGELOG.md
Tool results:
→ result (ok): 1→# Changelog 2→ 3→All notable changes to this action will be documented in this file. 4→ 5→The format is based on Keep a Changelog, 6→and this project adheres to Semantic Versioning. 7→ 8→## [Unreleased] 9→ 10→### Added 11→- Initial implementation of setup-pnpm action 12→- Support for pnpm version configuration 13→- pnpm store caching for improved performance
…(truncated, 762 more chars)
Let me search for any other workflows or GitHub Actions files in docto-crypt that might show precedent for package manager choices:
Tools used:
Bash:grep -r "setup-node\|setup-pnpm\|npm ci\|pnpm install" /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/ --include="*.yml" 2>/dev/null | head -30
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish.yml: uses: doctolib/actions/setup-node@01e54a0351a31496d12f68c2cd991d19399ad558 # setup-node-v0.0.24 /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish-pnpm.yml: uses: doctolib/actions/setup-node@01e54a0351a31496d12f68c2cd991d19399ad558 # setup-node-v0.0.24 /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish-pnpm.yml: uses: doctolib/actions/setup-pnpm@main /Users/USER/work …(truncated, 165 more chars)
Now let me look at other GitHub workflows in the actions repository to see if there are other examples of workflows choosing between package managers:
Tools used:
Bash:find /Users/USER/workspace/doctolib/actions -name "*.yml" -o -name "*.yaml" | grep -E "\.github/workflows" | head -10
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/actions/.github/workflows/cd_release_reusable_workflows.yml /Users/USER/workspace/doctolib/actions/.github/workflows/test_checkout.yml /Users/USER/workspace/doctolib/actions/.github/workflows/test_cache.yml /Users/USER/workspace/doctolib/actions/.github/workflows/test_telemetry.yml /Users/USER/workspace/doctolib/actions/.github/workflows/test_setup-java.yml /Users/USER/workspace/doctolib/actions/.github/workflows/test_setup-datadog-test-visibility.yml /Users/USER/w …(truncated, 329 more chars)
Tools used:
Bash:ls -la /Users/USER/workspace/doctolib/actions/.github/workflows/ | grep setup-node
Tool results:
→ result (ok): .rw-r--r-- clertonra staff 1.8 KB Mon Jan 19 17:13:28 2026 test_setup-node.yml
Tools used:
Read:/Users/USER/workspace/doctolib/actions/.github/workflows/test_setup-node.yml
Tool results:
→ result (ok): 1→name: "(Test) setup-node" 2→on: 3→ pull_request: 4→ branches: 5→ - main 6→ paths: 7→ - "setup-node/**" 8→ - ".github/workflows/test_setup-node.yml" 9→ 10→permissions: 11→ id-token: write 12→ contents: read 13→ 14→env: 15→ DD_GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.after || github.sha }} 16→ DD_GIT_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }} 1 …(truncated, 2145 more chars)
Now let me look at how other Doctolib projects use these actions and check if there's a pattern:
Tools used:
Bash:grep -r "setup-node\|setup-pnpm" /Users/USER/workspace/doctolib/docto-crypt/README.md 2>/dev/null | head -20
Tool results:
→ result (ok)
Perfect! Now I have enough information. Let me create a comprehensive analysis.
Summary: Analysis of doctolib/actions/setup-node
Based on my thorough exploration of the codebase, here's a comprehensive analysis of the setup-node action and how it compares to other package manager solutions:
1. What does setup-node currently do?
The doctolib/actions/setup-node action is a composite GitHub Action that:
- Sets up Node.js environment with automatic npm version detection from package.json's .engines.npm field
- Installs dependencies using npm with customizable commands
- Provides S3-based caching for both node_modules/ and npm cache (.npm/)
- Auto-detects multiple node_modules directories in monorepo projects
- Runs CodeArtifact login for internal Doctolib npm packages
- Validates lock files to prevent cache invalidation
- Supports customizable install and postinstall commands
Key features:
- Highly optimized for Doctolib's self-hosted runners
- Uses custom S3 caching (via doctolib/actions/cache) instead of GitHub Actions cache
- Architecture-aware caching (includes runner.arch in cache keys to prevent ARM64/AMD64 conflicts)
- Works with monorepos through working-directory and node-modules-paths inputs
2. Does it have pnpm support or package manager selection?
No pnpm support. The README explicitly states: "Works only with NPM for now"
Key npm-specific constraints in the action:
- All commands use npm (line 26: npm ci, line 41: npm config get cache, etc.)
- Install-check command hardcoded to npm: npm i --no-audit --no-fund --ignore-scripts
- Postinstall command defaults to: npm run postinstall --if-present
- No package manager detection or input parameter
3. What inputs does it accept?
| Input | Type | Default | Description |
|---|---|---|---|
node-version |
string | (none) | Version spec for Node.js (e.g., "20.x") |
node-version-file |
string | .nvmrc |
File containing version spec |
architecture |
string | (system default) | Target architecture (x86, x64) |
check-latest |
boolean | false |
Check for latest matching version |
disable-cache |
boolean | false |
Skip caching |
postinstall-command |
string | npm run postinstall --if-present |
Custom postinstall command |
install-command |
string | npm ci |
Custom install command |
install-check-command |
string | npm i --no-audit --no-fund --ignore-scripts |
Lock file validation command |
lock-file |
string | package-lock.json |
Path to lock file |
node-modules-paths |
string | (auto-detect) | Paths to cache |
working-directory |
string | . |
Working directory |
get-cache-location-command |
string | npm config get cache |
Get npm cache location |
npm-version |
string | (from .engines.npm) | Specific npm version to install |
enable-lock-check |
boolean | false |
Enable lock file change validation |
4. How does it compare to the official actions/setup-node?
Comparison with actions/setup-node@v4:
| Aspect | actions/setup-node (Official) | doctolib/actions/setup-node |
|---|---|---|
| Package Manager Support | npm, pnpm, yarn (via corepack) | npm only |
| Caching | GitHub Actions cache | S3-based custom cache |
| Runner Type | Works on GitHub-hosted & self-hosted | Self-hosted runners only |
| MultiPlatform | Yes (GHA runners) | Doctolib self-hosted only |
| Package Manager Selection | Automatic detection or setup via inputs | No selection capability |
| Monorepo Support | Limited | Advanced (auto-detect + explicit paths) |
| Customization | Limited | Highly customizable (all commands) |
| CodeArtifact Integration | None | Built-in Doctolib CodeArtifact setup |
Key difference: The official action is universal and supports multiple package managers, while Doctolib's version is deeply optimized for their specific infrastructure (self-hosted runners, S3 caching, CodeArtifact integration, npm-only).
5. Is there any precedent in the codebase for choosing between package managers?
Yes, clear precedent exists:
The docto-crypt repository contains separate workflows for npm vs pnpm:
-
publish.yml(npm): - Uses:doctolib/actions/setup-node@01e54a0351a31496d12f68c2cd991d19399ad558- Runs:npm publish -
publish-pnpm.yml(pnpm): - Uses BOTH:doctolib/actions/setup-node@...(still for Node.js setup)doctolib/actions/setup-pnpm@main(separate for pnpm)- Runs:
pnpm publish --no-git-checks - Includes performance metrics comparing both approaches
Pattern observed: The precedent is to keep setup-node and setup-pnpm separate rather than combining them into one action with package manager selection.
Additional Context: setup-pnpm Action
The doctolib/actions/setup-pnpm action (very recently added, still in "Unreleased" state in CHANGELOG):
- Minimal design: Only 4 inputs (
pnpm-version,run-install,cache,working-directory) - Lighter implementation: Uses official
pnpm/<REDACTED>and GitHub Actions cache (not S3) - Separate concern: Does NOT include CodeArtifact login or npm version management
- Philosophy: Simpler, single-purpose action vs setup-node's comprehensive npm experience
Recommendations for docto-crypt pnpm workflow
Based on this analysis, the current approach in publish-pnpm.yml (using both setup-node for Node.js and setup-pnpm for pnpm) follows the established precedent and is the recommended pattern. Advantages:
- Separation of concerns: Node.js setup vs package manager setup
- Non-breaking: Doesn't require modifying the mature setup-node action
- Consistency: Follows the pattern of separate setup actions for each package manager
- Future-proof: If setup-node ever needs to support multiple package managers, this separation makes it cleaner
- Minimal maintenance: Each action focuses on its responsibility
Not recommended: Extending setup-node to support pnpm would introduce complexity to an action specifically optimized for npm, and would diverge from the codebase's established pattern.
Absolute file paths for reference:
- /Users/USER/workspace/doctolib/actions/setup-node/action.yml
- /Users/USER/workspace/doctolib/actions/setup-pnpm/action.yml
- /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish.yml
- /Users/USER/workspace/doctolib/docto-crypt/.github/workflows/publish-pnpm.yml