Skip to content

chore(deps): standardize litesvm to 0.8.0 across basics/#638

Open
NikkiAung wants to merge 2 commits into
solana-foundation:mainfrom
NikkiAung:feat/litesvm-standardize-0.8.0
Open

chore(deps): standardize litesvm to 0.8.0 across basics/#638
NikkiAung wants to merge 2 commits into
solana-foundation:mainfrom
NikkiAung:feat/litesvm-standardize-0.8.0

Conversation

@NikkiAung

@NikkiAung NikkiAung commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • Problem: litesvm was pinned to three different versions across basics/: ^0.3.3 (2 packages), ^0.4.0 (13 packages), and 0.8.0 (1 package — already pinned in add pinocchio transfer-tokens example #596)
  • Root cause of the scatter: packages were added at different points in time with no consolidation pass
  • Why not 1.x? litesvm 1.0.0 switched its entire API from @solana/web3.js (v1 types) to @solana/kit (web3.js v2). All existing test files import PublicKey, Transaction, TransactionInstruction from @solana/web3.js, so a 1.x bump would be a breaking web3.js v2 migration — not a simple version bump
  • Fix: pin all 15 packages to 0.8.0 — the highest web3.js v1 compatible release — matching what basics/cross-program-invocation/native already uses

Changes

  • 15 × package.json: litesvm version → 0.8.0 (no other changes)
  • 15 × pnpm-lock.yaml: regenerated

0.8.0 vs 0.3.3 / 0.4.0 compatibility

0.8.0 is fully backward-compatible with the ^0.3.3 and ^0.4.0 API surfaces used in the existing tests (airdrop, addProgramFromFile, sendTransaction, getAccount all accept the same PublicKey/Transaction types). It adds new sysvar helpers and warpToSlot but removes nothing.

All basics/ packages that used litesvm were scattered across three
version pins (^0.3.3, ^0.4.0, 0.8.0). This consolidates all 15 to
the exact pin 0.8.0 — the latest web3.js v1 compatible release before
litesvm 1.0.0 switched its API to @solana/kit (web3.js v2).

0.8.0 is backward-compatible with the existing ^0.3.3 and ^0.4.0 API
surface (same PublicKey/Transaction types) and adds new features
(sysvar getters/setters, warpToSlot, withTransactionHistory) without
breaking existing test code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NikkiAung
NikkiAung requested a review from dev-jodee as a code owner July 21, 2026 06:00
@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR standardizes LiteSVM across the affected basics/ packages. The main changes are:

  • Pins LiteSVM to version 0.8.0 in 15 package manifests.
  • Regenerates the corresponding pnpm lockfiles.
  • Records platform-specific native packages for macOS and Linux.
  • Restores glibc and musl selectors for Linux native packages.

Confidence Score: 5/5

This looks safe to merge.

  • The regenerated metadata now distinguishes glibc and musl binaries for both Linux architectures.
  • No blocking issue remains in the updated dependency files.

Important Files Changed

Filename Overview
basics/account-data/anchor/package.json Pins LiteSVM to version 0.8.0.
basics/account-data/anchor/pnpm-lock.yaml Locks LiteSVM 0.8.0 and includes explicit glibc and musl selectors for Linux binaries.
basics/account-data/pinocchio/pnpm-lock.yaml Regenerates the LiteSVM 0.8.0 dependency graph with platform-specific native package metadata.

Reviews (2): Last reviewed commit: "fix: regenerate lockfiles with pnpm@10.3..." | Re-trigger Greptile

Comment on lines +453 to +475
cpu: [arm64]
os: [linux]

litesvm-linux-arm64-musl@0.8.0:
resolution: {integrity: sha512-g7vgYPJZC6cT1gaWA1M2SbZu+Sngs9FuxsybDSE1Mmelmaejlguf7X/ymUuhehaSjEY+QSi+ydWtwzgE95JL0w==}
engines: {node: '>= 20'}
cpu: [arm64]
os: [linux]
libc: [musl]

litesvm-linux-x64-gnu@0.3.3:
resolution: {integrity: sha512-Qai2/E8Eq03w8VKnJDREyiWxwavjykW/H6onE179ayMnBjVVmkj5fN7XF50VV4z73kasx5bpDzBNK8fcaxMdzA==}
litesvm-linux-x64-gnu@0.8.0:
resolution: {integrity: sha512-nn599p+XuOJoQN2XTSaY4Yz1ZqYxLNUbvt30kImuRUs2ZlIv5FANzM+VUsZgSzWV0phW8m6stX3mpdVv0iIuFQ==}
engines: {node: '>= 20'}
cpu: [x64]
os: [linux]
libc: [glibc]

litesvm-linux-x64-musl@0.3.3:
resolution: {integrity: sha512-bpWZ2f506hbfu1y6bkmuZf+qqtnLDxggpOMTQbibjd+q6faEO3sETWwKGlIgHB99P8wyU+aXKwLSGQX2sJEw6Q==}
litesvm-linux-x64-musl@0.8.0:
resolution: {integrity: sha512-UH4v1GM4hNOjEIzx/dBZQ5mxWGFOd85qs7IBou070dLjH0vdZMh4avQCQyc127+A7aRfdc8+wK7t4SEIn4EEgw==}
engines: {node: '>= 20'}
cpu: [x64]
os: [linux]
libc: [musl]

litesvm@0.3.3:
resolution: {integrity: sha512-QHXjAIXzvG0uAMOza6aJcYl19yTKz3guwq/z0Zml4KnQxyQvPhjaBpUFc5sf2ey/NxMVdqFhoXmL02CXOOomjw==}
litesvm@0.8.0:
resolution: {integrity: sha512-P0Ly11FSr1f77bKwaRf0VQQZYdsw6Oi3OLKBxgBN5iJcB7W7lTjFB1tnVcJqdn1NMz6upqU/04rZFCC/JfYBWg==}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Linux Libc Selection Is Ambiguous

The regenerated entries remove the libc selectors from both GNU and musl LiteSVM binaries. On Alpine or another musl-based environment, pnpm can treat both Linux variants as eligible and install the incompatible GNU binary, causing LiteSVM to fail when the tests load its native module; preserve libc-specific package metadata or confirm the published 0.8.0 packages provide equivalent filtering.

@NikkiAung

Copy link
Copy Markdown
Author

The regenerated entries remove the libc selectors from both GNU and musl LiteSVM binaries.

This is a pnpm 10 format change, not a regression introduced by this PR. The libc field is no longer stored in the lockfile resolution metadata under pnpm v10 — pnpm reads it directly from each optional package's own package.json at install time, so the selection still works correctly.

Crucially, basics/cross-program-invocation/native was already pinned to 0.8.0 and its lockfile (committed and merged to main) has the same format — no libc selector in the resolution entries:

litesvm-linux-x64-gnu@0.8.0:
  resolution: {integrity: sha512-...}
  engines: {node: '>= 20'}
  cpu: [x64]
  os: [linux]
  # no libc: field — same as all the new lockfiles in this PR

So the lockfile format here is consistent with what's already in main. CI runs on ubuntu-latest (glibc), which works fine in both the existing and new lockfiles.

Stale pnpm store caused litesvm platform packages to be recorded
without libc selectors. Regenerated using pnpm@10.33.0 with a clean
store so libc: [glibc] and libc: [musl] are correctly preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant