Skip to content

Commit 7780521

Browse files
mishushakovclaude
andauthored
chore: upgrade to pnpm 10, add 3-day minimum dependency age (#323)
Bump pnpm 9.15.9 -> 10.34.5 across packageManager fields, engines and all seven pnpm/action-setup steps. pnpm 10 blocks dependency lifecycle scripts by default, so esbuild is added to onlyBuiltDependencies to keep the JS build working. The lockfile is unchanged (v9.0 format is shared by pnpm 9 and 10). Set minimumReleaseAge to 4320 minutes (3 days) so newly published versions have time to be caught and unpublished before we install them, with `e2b` excluded since we control its releases. Renovate gets a matching minimumReleaseAge and exemption, otherwise it proposes versions pnpm then refuses to install. Move pnpm, Node and Bun versions into .tool-versions, alongside the Python and Poetry entries already wired up there. Node was hardcoded in seven places at three different versions; the release job keeps its explicit Node 24 pin, which is deliberate for npm 11 OIDC trusted publishing (#259). Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent caead06 commit 7780521

10 files changed

Lines changed: 74 additions & 23 deletions

File tree

.github/workflows/js_tests.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,23 @@ jobs:
2727
- name: Checkout repository
2828
uses: actions/checkout@v4
2929

30+
- name: Parse .tool-versions
31+
uses: wistia/parse-tool-versions@v2.1.1
32+
with:
33+
filename: '.tool-versions'
34+
uppercase: 'true'
35+
prefix: 'tool_version_'
36+
3037
- name: Install pnpm
31-
uses: pnpm/action-setup@v3
38+
uses: pnpm/action-setup@v4
3239
id: pnpm-install
3340
with:
34-
version: 9.5
41+
version: ${{ env.TOOL_VERSION_PNPM }}
3542

3643
- name: Setup Node
3744
uses: actions/setup-node@v3
3845
with:
39-
node-version: "20.x"
46+
node-version: '${{ env.TOOL_VERSION_NODE }}'
4047
registry-url: "https://registry.npmjs.org"
4148
cache: pnpm
4249
cache-dependency-path: pnpm-lock.yaml
@@ -62,7 +69,7 @@ jobs:
6269
- name: Install Bun
6370
uses: oven-sh/setup-bun@v2
6471
with:
65-
bun-version: 1.3.14
72+
bun-version: ${{ env.TOOL_VERSION_BUN }}
6673

6774
- name: Run Bun tests
6875
run: pnpm test:bun

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424

2525
- uses: pnpm/action-setup@v4
2626
with:
27-
version: 9.15.9
27+
version: ${{ env.TOOL_VERSION_PNPM }}
2828

2929
- name: Setup Node.js 20
3030
uses: actions/setup-node@v4
3131
with:
32-
node-version: '20.x'
32+
node-version: '${{ env.TOOL_VERSION_NODE }}'
3333
cache: pnpm
3434

3535
- name: Configure pnpm

.github/workflows/release.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ jobs:
2121
- name: Checkout Repo
2222
uses: actions/checkout@v4
2323

24+
- name: Parse .tool-versions
25+
uses: wistia/parse-tool-versions@v2.1.1
26+
with:
27+
filename: '.tool-versions'
28+
uppercase: 'true'
29+
prefix: 'tool_version_'
30+
2431
- name: Install pnpm
25-
uses: pnpm/action-setup@v3
32+
uses: pnpm/action-setup@v4
2633
id: pnpm-install
2734
with:
28-
version: 9.5
35+
version: ${{ env.TOOL_VERSION_PNPM }}
2936

3037
- name: Setup Node
3138
uses: actions/setup-node@v6
3239
with:
33-
node-version: "22.x"
40+
node-version: '${{ env.TOOL_VERSION_NODE }}'
3441
registry-url: "https://registry.npmjs.org"
3542
cache: pnpm
3643
cache-dependency-path: pnpm-lock.yaml
@@ -63,16 +70,23 @@ jobs:
6370
- name: Checkout Repo
6471
uses: actions/checkout@v4
6572

73+
- name: Parse .tool-versions
74+
uses: wistia/parse-tool-versions@v2.1.1
75+
with:
76+
filename: '.tool-versions'
77+
uppercase: 'true'
78+
prefix: 'tool_version_'
79+
6680
- name: Install pnpm
67-
uses: pnpm/action-setup@v3
81+
uses: pnpm/action-setup@v4
6882
id: pnpm-install
6983
with:
70-
version: 9.5
84+
version: ${{ env.TOOL_VERSION_PNPM }}
7185

7286
- name: Setup Node
7387
uses: actions/setup-node@v6
7488
with:
75-
node-version: "22.x"
89+
node-version: '${{ env.TOOL_VERSION_NODE }}'
7690
registry-url: "https://registry.npmjs.org"
7791
cache: pnpm
7892
cache-dependency-path: pnpm-lock.yaml
@@ -128,10 +142,10 @@ jobs:
128142
prefix: 'tool_version_'
129143

130144
- name: Install pnpm
131-
uses: pnpm/action-setup@v3
145+
uses: pnpm/action-setup@v4
132146
id: pnpm-install
133147
with:
134-
version: 9.5
148+
version: ${{ env.TOOL_VERSION_PNPM }}
135149

136150
- name: Set up Python
137151
uses: actions/setup-python@v6
@@ -327,9 +341,9 @@ jobs:
327341
virtualenvs-in-project: true
328342
installer-parallel: true
329343

330-
- uses: pnpm/action-setup@v3
344+
- uses: pnpm/action-setup@v4
331345
with:
332-
version: 9.5
346+
version: ${{ env.TOOL_VERSION_PNPM }}
333347

334348
- name: Setup Node.js 24
335349
uses: actions/setup-node@v6

.github/workflows/release_candidates.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
uppercase: 'true'
2525
prefix: 'tool_version_'
2626

27-
- uses: pnpm/action-setup@v3
27+
- uses: pnpm/action-setup@v4
2828
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
2929
with:
30-
version: 9.5
30+
version: ${{ env.TOOL_VERSION_PNPM }}
3131

3232
- name: Setup Node.js 20
3333
uses: actions/setup-node@v4
3434
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
3535
with:
36-
node-version: "20.x"
36+
node-version: '${{ env.TOOL_VERSION_NODE }}'
3737
registry-url: https://registry.npmjs.org
3838
cache: pnpm
3939

.tool-versions

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
python 3.10
22
poetry 2.1.1
3+
# Keep in sync with `packageManager` in package.json, js/package.json and
4+
# python/package.json — pnpm self-switches to that version at runtime.
5+
pnpm 10.34.5
6+
# Baseline Node for build/test/lint. Matches the `engines.node` floor in
7+
# js/package.json, so CI exercises the oldest version the SDK claims to support.
8+
# The release job in release.yml deliberately overrides this with Node 24 to get
9+
# npm 11 for OIDC trusted publishing (see #259).
10+
node 20
11+
bun 1.3.14

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@e2b/code-interpreter",
33
"version": "2.7.0",
4-
"packageManager": "pnpm@9.15.9",
4+
"packageManager": "pnpm@10.34.5",
55
"description": "E2B Code Interpreter - Stateful code execution",
66
"homepage": "https://e2b.dev",
77
"license": "MIT",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"format": "pnpm --if-present --recursive run format",
1010
"changeset": "pnpx @changesets/cli"
1111
},
12-
"packageManager": "pnpm@9.15.9",
12+
"packageManager": "pnpm@10.34.5",
1313
"devDependencies": {
1414
"@changesets/read": "^0.6.2",
1515
"changeset": "^0.2.6",
@@ -21,7 +21,7 @@
2121
"prettier": "^3.6.2"
2222
},
2323
"engines": {
24-
"pnpm": ">=9.0.0 <10"
24+
"pnpm": ">=10.16.0 <11"
2525
},
2626
"pnpm": {
2727
"overrides": {

pnpm-workspace.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,15 @@ packages:
33
- python
44
- chart_data_extractor
55
- template
6+
7+
# Only install package versions that have been on the registry for at least
8+
# 3 days, so malicious releases have time to be caught and unpublished.
9+
minimumReleaseAge: 4320
10+
11+
# `e2b` is our own SDK — we control its releases, so it doesn't need the delay.
12+
minimumReleaseAgeExclude:
13+
- e2b
14+
15+
# pnpm 10 blocks dependency lifecycle scripts unless listed here.
16+
onlyBuiltDependencies:
17+
- esbuild

python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@e2b/code-interpreter-python",
33
"private": true,
44
"version": "2.9.0",
5-
"packageManager": "pnpm@9.15.9",
5+
"packageManager": "pnpm@10.34.5",
66
"scripts": {
77
"test": "poetry run pytest -n 4 --verbose -x",
88
"example": "poetry run python3 example.py",

renovate.json5

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@
99
// "0 * * * *"
1010
// ],
1111
timezone: 'UTC',
12+
// Keep in sync with `minimumReleaseAge` in pnpm-workspace.yaml (4320 minutes),
13+
// otherwise Renovate proposes versions pnpm then refuses to install.
14+
minimumReleaseAge: '3 days',
1215
// Always squash PRs when automerging
1316
automergeType: 'pr',
1417
automergeStrategy: 'squash',
1518
packageRules: [
19+
{
20+
// Keep in sync with `minimumReleaseAgeExclude` in pnpm-workspace.yaml.
21+
description: 'e2b is our own SDK, so it skips the minimum release age',
22+
matchPackageNames: ['e2b'],
23+
minimumReleaseAge: null,
24+
},
1625
{
1726
description: 'Group and automerge patch updates after CI passes',
1827
matchUpdateTypes: ['patch'],

0 commit comments

Comments
 (0)