Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d2bdc21
Make Bun workflows idiomatic for Mill and Scala.js
arcaputo3 Aug 7, 2026
18b0926
Pin Bun 1.4.0, compose the asset matrix, share the download cache
arcaputo3 Aug 26, 2026
dfe050c
Preserve symlinks when staging, and link node_modules into web builds
arcaputo3 Aug 26, 2026
7d551f1
Give TypeScript test modules their own lockfile identity
arcaputo3 Aug 26, 2026
6594441
Make the bun"..." interpolator use the one npm-spec parser
arcaputo3 Aug 26, 2026
9810949
Stop vendored runtimes leaking into a workspace's shared node_modules
arcaputo3 Aug 26, 2026
5967ae8
Harden the shared Bun download cache against eviction and torn publishes
arcaputo3 Aug 26, 2026
9282ea4
Make bare test modules actually reuse the outer install
arcaputo3 Aug 26, 2026
476f51f
Merge pull request #14 from TJC-LP/agent/bun-140-toolchain
arcaputo3 Aug 26, 2026
36666ff
Merge pull request #16 from TJC-LP/agent/bun-test-lockfile
arcaputo3 Aug 26, 2026
5f14695
Merge pull request #18 from TJC-LP/agent/bun-vendored-guard
arcaputo3 Aug 26, 2026
e2385fb
Merge pull request #20 from TJC-LP/agent/bun-test-reuse
arcaputo3 Aug 26, 2026
0cb7770
Merge pull request #15 from TJC-LP/agent/bun-symlink-staging
arcaputo3 Aug 26, 2026
11e15d8
Merge pull request #17 from TJC-LP/agent/bun-dep-interpolator
arcaputo3 Aug 26, 2026
5b96f1a
Merge pull request #19 from TJC-LP/agent/bun-cache-hardening
arcaputo3 Aug 26, 2026
1270081
Deliver unmanagedDeps through package.json, not positional install args
arcaputo3 Aug 26, 2026
141058a
Finish the 0.3.0 renames: bunInstall, testForked, bunBundleFormat, en…
arcaputo3 Aug 26, 2026
b992fdd
Run the integration suite on shipped defaults with committed lockfiles
arcaputo3 Aug 26, 2026
fcfa17b
Add Windows to the CI matrix and cache the managed Bun download
arcaputo3 Aug 26, 2026
21a6fc7
Route Windows CI through mill.bat
arcaputo3 Aug 26, 2026
d5f6b61
Share the integration harness and cover the last untested features
arcaputo3 Aug 27, 2026
3fb942d
Windows triage: POSIX permissions are not part of the publish contrac…
arcaputo3 Aug 27, 2026
e03a870
Merge Windows permissions-test fix
arcaputo3 Aug 27, 2026
6271d98
Make the examples runnable, wire them into CI, finish the scaffolding
arcaputo3 Aug 27, 2026
c12eef3
Windows triage: the typescript-env proxy needs a .cmd twin
arcaputo3 Aug 27, 2026
6d5fa08
Merge Windows env-proxy fix
arcaputo3 Aug 27, 2026
6d686be
Merge Windows env-proxy fix through the stack
arcaputo3 Aug 27, 2026
ddc64dd
Merge pull request #21 from TJC-LP/agent/bun-unmanaged-deps
arcaputo3 Aug 27, 2026
2cd092b
Merge pull request #22 from TJC-LP/agent/bun-renames
arcaputo3 Aug 27, 2026
65e9a9d
Merge pull request #23 from TJC-LP/agent/bun-honest-defaults
arcaputo3 Aug 27, 2026
1d9d000
Merge pull request #24 from TJC-LP/agent/bun-windows-ci
arcaputo3 Aug 27, 2026
2ec60a7
Merge pull request #25 from TJC-LP/agent/bun-test-harness
arcaputo3 Aug 27, 2026
a46b3b4
Merge pull request #26 from TJC-LP/agent/bun-docs-examples
arcaputo3 Aug 27, 2026
6cebce8
Final-review fixes: stale env toggles, zip-slip, Windows exe, test env
arcaputo3 Aug 27, 2026
6147ca7
Merge pull request #27 from TJC-LP/agent/bun-final-fixes
arcaputo3 Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 93 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
# One wrapper invocation everywhere: git-bash on the Windows runner runs ./mill too.
shell: bash
steps:
- uses: actions/checkout@v4

Expand All @@ -19,15 +23,98 @@ jobs:
distribution: temurin
java-version: '21'

- uses: actions/cache@v4
with:
path: ~/.cache/mill-bun
key: mill-bun-${{ runner.os }}-${{ hashFiles('millbun/src/mill/bun/BunToolchainModule.scala') }}

- name: Select Mill launcher
# The sh wrapper fetches Mill's native launcher, which has no Windows build
# ("This native mill launcher supports only Linux and macOS") — Windows goes
# through the committed mill.bat instead.
run: echo "MILL=./mill$([ "$RUNNER_OS" = "Windows" ] && echo .bat)" >> "$GITHUB_ENV"

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.4.0

- name: Compile
run: ./mill millbun.compile
run: $MILL --no-server millbun.compile

- name: Unit Tests
run: ./mill millbun.test
run: $MILL --no-server millbun.test

# The suite defaults to the managed toolchain; this job pins system Bun to the same
# version so `findOnPath` resolution and version verification keep CI coverage, while
# the managed-bun job covers the download/cache path.
- name: Integration Tests
run: ./mill millbun.integration
env:
MILL_BUN_USE_SYSTEM: 'true'
run: $MILL --no-server millbun.integration

managed-bun:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'

- uses: actions/cache@v4
with:
path: ~/.cache/mill-bun
key: mill-bun-${{ runner.os }}-${{ hashFiles('millbun/src/mill/bun/BunToolchainModule.scala') }}

- name: Select Mill launcher
# The sh wrapper fetches Mill's native launcher, which has no Windows build
# ("This native mill launcher supports only Linux and macOS") — Windows goes
# through the committed mill.bat instead.
run: echo "MILL=./mill$([ "$RUNNER_OS" = "Windows" ] && echo .bat)" >> "$GITHUB_ENV"

- name: Managed Bun smoke test
env:
MILL_BUN_USE_SYSTEM: 'false'
run: $MILL --no-server millbun.integration.testOnly mill.bun.BunManagedToolchainIntegrationTests

examples:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'

- uses: actions/cache@v4
with:
path: ~/.cache/mill-bun
key: mill-bun-${{ runner.os }}-${{ hashFiles('millbun/src/mill/bun/BunToolchainModule.scala') }}

# Publish at whatever version the examples pin, so a release-version sweep cannot
# silently desynchronize this leg.
- name: Publish the plugin locally
run: |
V=$(grep -o 'mill-bun_mill1:[0-9][-0-9A-Za-z.]*' example-typescript/build.mill | cut -d: -f2)
PUBLISH_VERSION=$V ./mill --no-server millbun.publishLocal

- name: example-typescript
run: cd example-typescript && ./mill --no-server app.run && ./mill --no-server app.test.testForked

- name: example-scalajs
run: cd example-scalajs && ./mill --no-server app.run && ./mill --no-server app.test.testForked

- name: examples project compiles
run: cd examples && ./mill --no-server __.compile
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.4.0

- name: Cache Coursier
uses: actions/cache@v4
Expand Down Expand Up @@ -91,6 +91,8 @@ jobs:
run: ./mill --no-server millbun.test

- name: Integration tests
env:
MILL_BUN_USE_SYSTEM: "true"
run: ./mill --no-server millbun.integration

- name: Reset cached publish metadata
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ out/
*.tasty
node_modules/
.DS_Store
.mill-jvm-version
.claude/plans/
37 changes: 35 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,46 @@ All notable changes to `mill-bun-plugin` will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.3.0] - Managed toolchain, strict lockfiles, canonical vocabulary (2026-08-27)

### Added

- Tag-driven release workflow for Maven Central publishing and GitHub releases.
- Release runbook covering secrets, version sweep, annotated tags, and verification.
- Checksum-verified managed Bun 1.4.0 for macOS, Linux, and Windows on x64 and arm64, including
musl (auto-detected) and `-baseline` (via `bunUseBaseline`) builds.
- `bunArchiveSha256` may be set on its own to run a Bun version with no bundled checksum; the
download URL is derived from `bunVersion` and the detected platform.
- Strict text-lockfile workflow with `bunLock`, frozen installs, and actionable missing-lock failures.
- Canonical `bundle`, `bundleFast`, `compileExecutable`, and `compileExecutables` task names.
- Paired `BunScalaJSWebModule` and `BunTypeScriptWebModule` HTML workflows.
- `npmOptionalDeps`, `npmPeerDeps`, `npmOverrides`, and deterministic dependency conflict detection.
- `BunWorkspaceModule` for one install and lockfile across mixed Scala.js/TypeScript packages.
- Published dependency manifest schema v2 with runtime, optional, and peer requirements.
- `bunDoctor` diagnostics and managed-toolchain CI smoke coverage.
- A committed lockfile written by a newer Bun fails frozen installs with regeneration guidance,
instead of surfacing bun's raw `UnknownLockfileVersion`.

### Changed

- Scala.js linking delegates to Mill's standard linker hooks; applications now choose `scalaJSVersion` explicitly.
- Development dependencies are local tooling inputs and are no longer published transitively.
- `bunPackageJsonExtras` rejects dependency fields now represented by typed settings.
- Missing dependency versions are represented as `latest` instead of an empty package.json value.
- TypeScript `bunBundleFormat` is `Option[String]`, matching Scala.js; `None` lets `bun build` infer.
- `unmanagedDeps` entries are staged into `vendor/` and declared as `file:./vendor/<name>`
dependencies, so local packages install under frozen lockfiles and locks stay portable.
- The TypeScript install task is canonically `bunInstall`; Mill's inherited `npmInstall` delegates to it.
- `bunToolEnv` is defined once on `BunToolchainModule` for all toolchain subprocesses, and the
TypeScript `bunRuntimeEnv` is public.

### Deprecated

- Scala.js `bunBundle*` and `bunCompile*` task names in favor of their canonical aliases.
- `bunOptionalDeps` in favor of `npmOptionalDeps`.
- `managedBunExecutable` in favor of `bunExecutableOverride`.
- The TypeScript `bunCompileExecutable: Boolean` switch in favor of the `compileExecutable` task.
- The TypeScript test command `test` and the Scala.js test command `bunTest`, both in favor of `testForked`.

## [0.2.1] - Overridable test-time JS env (2026-04-17)

Expand Down Expand Up @@ -40,4 +74,3 @@ object test extends BunScalaJSTests:
super.bunTestJsEnv() + ("NODE_ENV" -> "production")
}
```

Loading
Loading