Skip to content

Replace npm with pinned lint tools (v2) - #230

Merged
ryanio merged 1 commit into
v2from
ryan/drop-npm-v2
Nov 10, 2026
Merged

ryanio merged 1 commit into
v2from
ryan/drop-npm-v2

Conversation

@ryanio

@ryanio ryanio commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

SeaDrop's only npm dependencies were two dev tools, Biome and lefthook. This replaces them with the same pinned tooling seaport now uses (seaport#1429), so the repo has no Node or npm dependencies at all.

  • scripts/install-tools.sh downloads Biome, taplo, lefthook, shellcheck, shfmt and actionlint from their GitHub releases into .tools/bin, and checks each file against a pinned SHA-256. It's the same script as seaport's.
  • scripts/lint.sh check runs what CI runs: forge fmt --check, the Seaport pragma patch, forge lint --deny warnings, Biome, taplo, shellcheck, shfmt and actionlint. scripts/lint.sh fix applies the formatters.
  • CI's lint job installs the tools (cached by the install script's hash) instead of setting up Node and running npm ci.
  • package.json, package-lock.json and .nvmrc are gone. .gitignore ignores .tools/ instead of node_modules.
  • Biome is pinned at 2.6.3, the version seaport uses. 2.6.6, which package.json had, was released on November 6, which is under the two weeks we wait before pinning a release. Its output on this repo is unchanged.
  • lefthook.yml runs the binaries from .tools/bin and also formats TOML and shell scripts.
  • The shell scripts are reindented to four spaces for shfmt, and seven unquoted variables that shellcheck flagged in check_deployments.sh, find_optimizer_runs.sh and forge_script_multichain.sh are now quoted.
  • AGENTS.md and the docs replace the npm run commands with the scripts and the plain build command.

No Solidity changes. The same change for main is seadrop#229.

🤖 Generated with Claude Code

Same change as on main: scripts/install-tools.sh pins Biome, taplo,
lefthook, shellcheck, shfmt and actionlint by version and SHA-256, and
scripts/lint.sh runs what CI runs, including the Seaport pragma patch
before forge lint. Biome is pinned at 2.6.3.

Removes package.json, package-lock.json and .nvmrc, and the Node steps
from CI. The shell scripts are reindented for shfmt, and seven
unquoted variables shellcheck flagged are quoted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the migration to pinned, checksum-verified development tools.

No open issues 🎉

What changed in this PR

Replaces SeaDrop v2’s npm-based development tooling with pinned, checksum-verified binaries, aligning with Seaport’s approach. No Solidity code changes are included.

Changes:

  • Removes Node/npm dependencies and adds standalone tool installation and lint scripts.
  • Updates CI and pre-commit hooks to use pinned tools, adding TOML, shell, and workflow checks.
  • Updates contributor documentation, standardizes shell formatting, and quotes shell variables.
File Description
scripts/​patch_seaport_pragmas.sh Adjusts indentation for shfmt.
scripts/​lint.sh Adds local check and formatting commands matching CI.
scripts/​install-tools.sh Installs six pinned tools with SHA-256 verification.
scripts/​forge_script_multichain.sh Quotes command arguments and standardizes formatting.
scripts/​find_optimizer_runs.sh Quotes variables and standardizes formatting.
scripts/​check_sizes.sh Adjusts indentation for shfmt.
scripts/​check_deployments.sh Quotes variables and standardizes formatting.
package.json Removes npm dependencies and command wrappers.
package-lock.json Removes the npm dependency lockfile.
lefthook.yml Uses local binaries and expands staged-file formatting.
docs/​Development.md Documents standalone tooling and replacement commands.
biome.json Aligns the schema with pinned Biome 2.6.3.
AGENTS.md Updates build, lint, and tool installation guidance.
.taplo.toml Configures TOML formatting.
.nvmrc Removes the Node version pin.
.gitignore Replaces the npm directory exclusion with .tools/.
.github/​workflows/​test.yml Caches pinned tools and adds lint checks without npm.
.editorconfig Defines shared whitespace and indentation settings.

Review effort: Balanced

@ryanio
ryanio merged commit d60eee6 into v2 Nov 10, 2026
6 checks passed
@ryanio
ryanio deleted the ryan/drop-npm-v2 branch November 10, 2026 21:35
ryanio added a commit that referenced this pull request Nov 10, 2026
Fixes the issue Copilot found on
[seadrop#229](#229 (comment))
for v2, since #230 already merged.

`scripts/install-tools.sh` extracted archives with `tar ... && mv ...`.
Under `set -e`, bash ignores a failure on the left of `&&`, so if `tar`
failed while updating an installed tool, the script kept the old binary,
recorded the new checksum and reported success. Later runs then skipped
the stale binary. The extraction and the move are now separate commands,
so a failed extraction stops the install.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ryanio added a commit that referenced this pull request Nov 10, 2026
The README version badge read `version` from `package.json`, which
[#230](#230) removed. It
now shows the version v2's `package.json` had, 2.0.0, as a static badge
linking to the v2 branch. The old link also pointed at main's
`package.json`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <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.

2 participants