Skip to content

feat: v4 action#233

Merged
Sam Gammon (sgammon) merged 8 commits intomainfrom
feat/v4
Mar 27, 2026
Merged

feat: v4 action#233
Sam Gammon (sgammon) merged 8 commits intomainfrom
feat/v4

Conversation

@sgammon
Copy link
Copy Markdown
Member

feat: v4 action
chore: safe dep updates
Upgrade every dependency to its latest major version and modernize the
entire build, test, and lint toolchain to match. All @actions/* packages
have moved to pure ESM in their v3+ releases, which required replacing
the bundler, test runner, and linter.

BREAKING CHANGE: action now runs on `node24` (was `node20`).

Dependencies (major version bumps):
- @actions/core 1.11.1 → 3.0.0
- @actions/exec 1.1.1 → 3.0.0
- @actions/github 6.0.1 → 9.0.0
- @actions/http-client 3.0.0 → 4.0.0
- @actions/io 2.0.0 → 3.0.2
- @actions/tool-cache 2.0.2 → 4.0.0
- @actions/cache 4.1.0 → 6.0.0
- octokit 3.1.1 → 5.0.5
- @commitlint/cli 19.8.1 → 20.5.0
- @types/node 24.10.0 → 25.5.0
- typescript 6.0.2 (unchanged, already latest)

Bundler: @vercel/ncc → Bun's built-in bundler
- ncc cannot resolve ESM-only exports fields (https://github.com/vercel/ncc/issues/1311)
- `bun build` bundles 216 modules in ~15 ms
- Output is ESM (`"type": "module"` added to package.json)

Test runner: Jest → Bun test
- Bun's runtime handles ESM natively; no custom resolver needed
- Tests use `mock.module()` from `bun:test` for @actions/* ESM mocks
- Removed jest, ts-jest, @jest/globals, @types/jest, jest-sonar-reporter,
  make-coverage-badge, and the custom `.dev/jest-resolver.js`
- Added `bunfig.toml` for test preload and coverage config

Formatter: Prettier → Biome
- `biome format` replaces `prettier --write`
- Config in `biome.json` matches previous style (no semis, single quotes,
  trailing-comma none, 80-col width)

Linter: ESLint → oxlint
- ESLint 10 removed `.eslintrc` support; `eslint-plugin-github` only
  supports ESLint ≤9 with no newer release available
- Removed eslint, eslint-plugin-github, eslint-plugin-jest,
  eslint-plugin-jsonc, eslint-plugin-prettier, prettier-eslint,
  @typescript-eslint/eslint-plugin, @typescript-eslint/parser

Package manager: pnpm → Bun
- All scripts now use `bun run`
- Removed pinned `bun` devDependency (use system bun)

GHA runtime: node20 → node24
- `action.yml` updated to `using: node24`
- Engine field set to `>=24`

CDN URL fixes:
- Download base changed from `dist.elide.zip` to `elide.zip` (apex)
- Platform tags now map `darwin→macos` and `aarch64→arm64` for the CDN
  (`cdnOs()` / `cdnArch()` helpers in releases.ts)
- Supports both Elide 1.0 (new R2 naming) and classic (legacy fallback)

Resilience:
- `postInstall()` now catches prewarm/info failures gracefully with a
  debug message instead of failing the workflow

Docker:
- Added `Dockerfile` (node24-slim + bun) and `.dockerignore`
- `bun run test:docker` builds the image and runs build + tests inside it

Removed unused dependency: `which` (never imported; code uses
`@actions/io`'s `which` instead).

Signed-off-by: Sam Gammon <sam@elide.ventures>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Modernizes the setup-elide GitHub Action to the latest major @actions/* ecosystem and a fully-ESM build output, while updating the download/CDN URL handling and migrating the project’s tooling (build/test/lint/format) to Bun + oxlint + Biome. This aligns the action with the newer ESM-only @actions/* packages and updates the runtime to Node 24.

Changes:

  • Upgrade major dependencies (notably @actions/* + octokit) and switch the action runtime/engine requirement to Node 24 with ESM output ("type": "module").
  • Replace the build/test/lint/format toolchain (Bun bundling + bun test, oxlint, Biome) and update unit tests accordingly.
  • Update Elide CDN URL base + add OS/arch mapping helpers (darwin→macos, aarch64→arm64) and make postInstall() resilient to prewarm/info failures.

Reviewed changes

Copilot reviewed 23 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Suppress TS 6.0 deprecation warnings.
src/releases.ts Switch download base to https://elide.zip; add CDN OS/arch mapping helpers and apply them in URL construction.
src/options.ts Simplify option merging while still normalizing OS/arch.
src/main.ts Make postInstall resilient (debug-log and proceed on failures); simplify resolveExistingBinary catch.
src/index.ts Removes ESLint-specific suppression comment while retaining entrypoint invocation.
package.json Mark package as ESM, require Node >=24, upgrade deps, and switch scripts/tooling to Bun/Biome/oxlint.
bunfig.toml Configure Bun test preload + coverage output.
bun.lock Add Bun lockfile for dependency resolution.
biome.json Add Biome formatter configuration.
action.yml Update action runtime to node24.
tests/releases.test.ts Migrate tests to bun:test; add coverage for CDN mapping and updated URLs.
tests/platform.test.ts Migrate to bun:test and Bun module mocking.
tests/options.test.ts Migrate to bun:test (remove Jest-only setup).
tests/main.test.ts Replace Jest module mocking with Bun’s mocking model; adapt assertions and helpers.
tests/install-script.test.ts Migrate to Bun mocking and dynamic imports.
tests/install-apt.test.ts Migrate to Bun mocking and dynamic imports.
tests/index.test.ts Switch to ESM import-based entrypoint test with Bun.
Dockerfile Add a Node 24 + Bun container build for running build/tests in Docker.
.dockerignore Add Docker build ignores for node_modules/dist/coverage/.git.
.dev/test-env.ts Add Bun preload env setup for tests.
dist/index.js.LEGAL.txt Replace prior license artifact approach with Bun’s bundled LEGAL output.
dist/sourcemap-register.js Remove old sourcemap support artifact (from prior bundler).
dist/licenses.txt Remove old bundled license dump artifact (from prior bundler).
.github/linters/.eslintrc.yaml Remove legacy ESLint configuration.
.eslintignore Remove legacy ESLint ignore file.
.dev/test-env.js Remove old Jest preload file in favor of TS preload for Bun.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment thread Dockerfile Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.40%. Comparing base (8f05fe7) to head (7792584).

Files with missing lines Patch % Lines
.dev/test-env.ts 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
+ Coverage   76.86%   86.40%   +9.53%     
==========================================
  Files          10        8       -2     
  Lines         268      625     +357     
  Branches       38        0      -38     
==========================================
+ Hits          206      540     +334     
- Misses         54       85      +31     
+ Partials        8        0       -8     
Files with missing lines Coverage Δ
src/main.ts 99.42% <100.00%> (+20.96%) ⬆️
src/options.ts 84.84% <100.00%> (-15.16%) ⬇️
src/releases.ts 74.46% <100.00%> (+23.82%) ⬆️
.dev/test-env.ts 57.14% <57.14%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sgammon Sam Gammon (sgammon) force-pushed the feat/v4 branch 4 times, most recently from 03cd040 to f8c9838 Compare March 27, 2026 22:04
Sam Gammon (sgammon) and others added 6 commits March 27, 2026 15:06
Upgrade every dependency to its latest major version and modernize the
entire build, test, and lint toolchain to match. All @actions/* packages
have moved to pure ESM in their v3+ releases, which required replacing
the bundler, test runner, and linter.

BREAKING CHANGE: action now runs on `node24` (was `node20`).

Dependencies (major version bumps):
- @actions/core 1.11.1 → 3.0.0
- @actions/exec 1.1.1 → 3.0.0
- @actions/github 6.0.1 → 9.0.0
- @actions/http-client 3.0.0 → 4.0.0
- @actions/io 2.0.0 → 3.0.2
- @actions/tool-cache 2.0.2 → 4.0.0
- @actions/cache 4.1.0 → 6.0.0
- octokit 3.1.1 → 5.0.5
- @commitlint/cli 19.8.1 → 20.5.0
- @types/node 24.10.0 → 25.5.0
- typescript 6.0.2 (unchanged, already latest)

Bundler: @vercel/ncc → Bun's built-in bundler
- ncc cannot resolve ESM-only exports fields (vercel/ncc#1311)
- `bun build` bundles 216 modules in ~15 ms
- Output is ESM (`"type": "module"` added to package.json)

Test runner: Jest → Bun test
- Bun's runtime handles ESM natively; no custom resolver needed
- Tests use `mock.module()` from `bun:test` for @actions/* ESM mocks
- Removed jest, ts-jest, @jest/globals, @types/jest, jest-sonar-reporter,
  make-coverage-badge, and the custom `.dev/jest-resolver.js`
- Added `bunfig.toml` for test preload and coverage config

Formatter: Prettier → Biome
- `biome format` replaces `prettier --write`
- Config in `biome.json` matches previous style (no semis, single quotes,
  trailing-comma none, 80-col width)

Linter: ESLint → oxlint
- ESLint 10 removed `.eslintrc` support; `eslint-plugin-github` only
  supports ESLint ≤9 with no newer release available
- Removed eslint, eslint-plugin-github, eslint-plugin-jest,
  eslint-plugin-jsonc, eslint-plugin-prettier, prettier-eslint,
  @typescript-eslint/eslint-plugin, @typescript-eslint/parser

Package manager: pnpm → Bun
- All scripts now use `bun run`
- Removed pinned `bun` devDependency (use system bun)

GHA runtime: node20 → node24
- `action.yml` updated to `using: node24`
- Engine field set to `>=24`

CDN URL fixes:
- Download base changed from `dist.elide.zip` to `elide.zip` (apex)
- Platform tags now map `darwin→macos` and `aarch64→arm64` for the CDN
  (`cdnOs()` / `cdnArch()` helpers in releases.ts)
- Supports both Elide 1.0 (new R2 naming) and classic (legacy fallback)

Resilience:
- `postInstall()` now catches prewarm/info failures gracefully with a
  debug message instead of failing the workflow

Docker:
- Added `Dockerfile` (node24-slim + bun) and `.dockerignore`
- `bun run test:docker` builds the image and runs build + tests inside it

Removed unused dependency: `which` (never imported; code uses
`@actions/io`'s `which` instead).

Signed-off-by: Sam Gammon <sam@elide.ventures>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@11bd719...08c6903)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.11.0 to 2.13.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@4d991eb...f4a75cf)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ossf/scorecard-action@dc50aa9...4eaacf0)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@4cec3d8...330a01c)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 4.31.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@ff0a06e...4e94bd1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sam Gammon <sam@elide.ventures>
Signed-off-by: Sam Gammon <sam@elide.ventures>
@sgammon Sam Gammon (sgammon) merged commit 73a4b99 into main Mar 27, 2026
13 of 16 checks passed
@sgammon Sam Gammon (sgammon) deleted the feat/v4 branch March 27, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✋ embargoed Waiting for further action enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants