Skip to content

Commit f8c9838

Browse files
committed
feat!: v4 action
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>
1 parent 65bf537 commit f8c9838

34 files changed

+1672
-4586
lines changed

.dev/test-env.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

.dev/test-env.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import path from 'node:path'
2+
import { fileURLToPath } from 'node:url'
3+
4+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
5+
6+
if (!process.env.RUNNER_TEMP) {
7+
process.env.RUNNER_TOOL_CACHE = path.resolve(__dirname, 'tool-cache')
8+
process.env.RUNNER_TEMP = path.resolve(__dirname, 'tmp')
9+
process.env.ELIDE_HOME = path.resolve(__dirname, 'target')
10+
}

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
coverage
4+
.git
5+
src/*.js
6+
src/*.js.map

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/linters/.eslintrc.yaml

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/check-dist.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,32 @@ jobs:
2323
id: checkout
2424
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525

26-
- name: "Setup: PNPM"
27-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
28-
with:
29-
version: 9.1.4
30-
3126
- name: "Setup: Node"
3227
id: setup-node
3328
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3429
with:
35-
node-version: 20
36-
cache: pnpm
30+
node-version: 24
31+
32+
- name: "Setup: Bun"
33+
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
34+
with:
35+
bun-version: latest
3736

3837
- name: "Setup: Install Dependencies"
3938
id: install
40-
run: pnpm install --frozen-lockfile && pnpm install -g turbo
41-
39+
run: bun install --frozen-lockfile
40+
4241
- name: Check Format
43-
id: npm-format-check
44-
run: pnpm run format:check
42+
id: format-check
43+
run: bun run format:check
4544

46-
- name: Test
47-
id: npm-ci-test
48-
run: pnpm run test
45+
- name: Lint
46+
id: lint
47+
run: bun run lint
4948

50-
- name: "Test: Sonar"
51-
uses: SonarSource/sonarcloud-github-action@13a24e453e2e6262f3bb0c5fa8241031e637a028 # master
52-
continue-on-error: true
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
55-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
56-
with:
57-
args: >
58-
-Dsonar.organization=elide-dev
59-
-Dsonar.projectKey=elide-dev_setup-elide
60-
-Dsonar.python.coverage.reportPaths=coverage.xml
61-
-Dsonar.sources=src/
62-
-Dsonar.tests=__tests__/
63-
-Dsonar.verbose=true
64-
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
65-
-Dsonar.testExecutionReportPaths=test-report.xml
49+
- name: Test
50+
id: test
51+
run: bun run test
6652

6753
- name: "Report: Coverage"
6854
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
@@ -98,11 +84,3 @@ jobs:
9884
elide --version
9985
echo "Path: ${{ steps.test-action.outputs.path }}"
10086
echo "Version: ${{ steps.test-action.outputs.version }}"
101-
102-
check-dist:
103-
name: "Test: Dist"
104-
uses: ./.github/workflows/check-dist.yml
105-
secrets: inherit
106-
permissions:
107-
contents: read
108-
statuses: write

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ Thumbs.db
9797
# Ignore built ts files
9898
__tests__/runner/*
9999

100+
# Bun build artifacts (output goes to dist/, not src/)
101+
src/*.js
102+
src/*.js.map
103+
100104
# IDE files
101105
.idea
102106
.vscode

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM node:24-slim AS base
2+
3+
# Install Bun from a pinned, checksum-verified release
4+
ARG BUN_VERSION=1.3.11
5+
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/* \
6+
&& ARCH=$(dpkg --print-architecture) \
7+
&& if [ "$ARCH" = "amd64" ]; then \
8+
BUN_ARCH="x64"; \
9+
BUN_SHA256="8611ba935af886f05a6f38740a15160326c15e5d5d07adef966130b4493607ed"; \
10+
elif [ "$ARCH" = "arm64" ]; then \
11+
BUN_ARCH="aarch64"; \
12+
BUN_SHA256="d13944da12a53ecc74bf6a720bd1d04c4555c038dfe422365356a7be47691fdf"; \
13+
else echo "Unsupported arch: $ARCH" && exit 1; fi \
14+
&& curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-${BUN_ARCH}.zip" \
15+
-o /tmp/bun.zip \
16+
&& echo "${BUN_SHA256} /tmp/bun.zip" | sha256sum -c - \
17+
&& unzip -q /tmp/bun.zip -d /tmp/bun-extract \
18+
&& mv /tmp/bun-extract/bun-linux-${BUN_ARCH}/bun /usr/local/bin/bun \
19+
&& chmod +x /usr/local/bin/bun \
20+
&& rm -rf /tmp/bun.zip /tmp/bun-extract
21+
22+
FROM base AS deps
23+
WORKDIR /app
24+
25+
# Copy package files first for layer caching
26+
COPY package.json bun.lock ./
27+
28+
# Install dependencies
29+
RUN bun install --frozen-lockfile
30+
31+
# Full build stage
32+
FROM base AS build
33+
WORKDIR /app
34+
COPY --from=deps /app/node_modules ./node_modules
35+
COPY . .
36+
37+
# Default: run the build
38+
CMD ["bun", "run", "build"]

0 commit comments

Comments
 (0)