Skip to content

MAINT: Drop node-fetch and eslintrc, fix package metadata - #118

Merged
larsoner merged 1 commit into
scientific-python:masterfrom
larsoner:tier2-deps
Jul 28, 2026
Merged

larsoner merged 1 commit into
scientific-python:masterfrom
larsoner:tier2-deps

Conversation

@larsoner

Copy link
Copy Markdown
Collaborator

Tier 2 from the modernization list.

  • node-fetch -> native fetch. Stable since Node 18 and the action runs on node24. This was the last runtime dependency outside @actions/*.
  • @eslint/eslintrc/FlatCompat -> js.configs.recommended. The compat shim was the only remaining source of js-yaml — the package that kicked off this whole series of PRs. npm ls js-yaml is now empty.
  • Package metadata. It was still the upstream template: name javascript-action, description "JavaScript Action Template", and repository/author/homepage/bugs all pointing at actions/javascript-action. Also adds "private": true and "engines": {"node": ">=24"} to match runs.using: node24.
  • npm install -> npm ci in all three CI configs, so a stale lockfile fails instead of being silently repaired. Verified npm ci succeeds against the current lockfile.

Results

before after
top-level deps 8 6
dist/index.js 1535 kB 1236 kB
js-yaml in tree 1 0

Tests: 22, 100% coverage, unchanged. Since the tests inject fetchFn, they do not exercise native fetch — I verified that separately by running run() against the live CircleCI API with only getOctokit faked, and confirmed a real HTTP round-trip.

That live check also turned up a pre-existing bug unrelated to this PR: with no api-token configured the action sends Circle-Token: null, and CircleCI now answers 401 Invalid token provided, where omitting the header returns 200. Fixed separately in #119 — worth having in the release.

🤖 Generated with Claude Code

- Use the native global fetch (stable since Node 18; the action runs on
  node24), removing the last non-@actions runtime dependency
- Use js.configs.recommended directly instead of the FlatCompat shim,
  removing @eslint/eslintrc and with it the last js-yaml in the tree
- Replace the leftover 'javascript-action' template metadata and declare
  engines: node >=24
- Use npm ci rather than npm install in CI so a stale lockfile is an error

dist/ shrinks from 1535kB to 1236kB.

Co-Authored-By: Claude Opus 5 <[email protected]>
@larsoner
larsoner merged commit 4baff0b into scientific-python:master Jul 28, 2026
5 checks passed
@larsoner
larsoner deleted the tier2-deps branch July 28, 2026 16:35
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