Skip to content

Finish the 0.3.0 renames: bunInstall, testForked, bunBundleFormat, env hooks - #22

Merged
arcaputo3 merged 1 commit into
agent/idiomatic-scalajs-mill-workflowsfrom
agent/bun-renames
Aug 27, 2026
Merged

Finish the 0.3.0 renames: bunInstall, testForked, bunBundleFormat, env hooks#22
arcaputo3 merged 1 commit into
agent/idiomatic-scalajs-mill-workflowsfrom
agent/bun-renames

Conversation

@arcaputo3

Copy link
Copy Markdown
Contributor

Stacked on #21 (agent/bun-unmanaged-deps). Completes the 0.3.0 rename decision: one migration, not two.

What changes

bunInstall is the canonical TypeScript install task. Mill's inherited npmInstall delegates
to it and keeps working (upstream internals resolve it, and so can users). All internal call
sites use the canonical name, so install artifacts move to out/<module>/bunInstall.dest.

Both module kinds share one test entrypoint: testForked.

  • TypeScript's test command is a deprecated alias of the new testForked.
  • Scala.js' bunTest is deprecated in favor of the inherited testForked — review showed it
    duplicated it exactly: the overridden jsEnvConfig and testLinkTask already put every test
    run on Bun, so bunTest added nothing but a second name.

bunBundleFormat is T[Option[String]] on TypeScript, matching Scala.js. This is the one
rename with no alias path — a type change can't be deprecated gracefully — so it lands as the
documented hard break. Default preserves behavior (Some("esm"/"cjs") from enableEsm); None
lets bun build infer. workerBundleFormat follows it directly.

Environment hooks share one vocabulary. bunToolEnv (install / lock / build subprocesses)
is defined once on BunToolchainModule and used by every runBun call site — previously the
Scala.js, workspace, publish, and workers modules called bunEnv() directly while TypeScript
used a protected bunToolEnv, so overriding the toolchain environment behaved differently per
module kind. TypeScript's bunRuntimeEnv is now public. Scala.js keeps bunJsEnv /
bunJsEnvArgs / bunTestJsEnv unchanged — that's released API for the Scala.js test JS env.

Compatibility story

Old New Path
npmInstall (TS) bunInstall inherited name delegates, stays usable
test (TS tests) testForked @deprecated alias
bunTest (Scala.js tests) testForked (inherited) @deprecated alias
bunBundleFormat: T[String] (TS) T[Option[String]] hard break, documented with example

MIGRATING-0.3.md gains the new table rows, the bunBundleFormat before/after example, and the
env-vocabulary note. CHANGELOG updated under [Unreleased].

Tests

Integration tests exercise canonical names throughout, plus explicit alias regression coverage:
app.npmInstall must resolve to bunInstall.dest, and the deprecated test / bunTest
commands must keep evaluating until their removal at 1.0. The typescript-bundle fixture's
bunBundleFormat override was migrated exactly as the doc shows. Full suites green.

…v hooks

The TypeScript install task is canonically bunInstall; Mill's inherited
npmInstall delegates to it and stays usable. All internal call sites use
the canonical name, so install artifacts live in bunInstall.dest.

Both module kinds share one test entrypoint name: testForked. The
TypeScript test command `test` is a deprecated alias, and the Scala.js
bunTest — which duplicated the inherited testForked exactly, since the
overridden jsEnvConfig and testLinkTask already put every test run on
Bun — is deprecated in its favor.

TypeScript bunBundleFormat is Option[String], matching Scala.js. The
type disagreement was the one rename no alias could bridge; 0.3.0 takes
the one-time break, and None now lets `bun build` infer the format.
BunWorkersModule.workerBundleFormat follows it directly.

Environment hooks share one vocabulary: bunToolEnv (install, lock,
build subprocesses) is defined once on BunToolchainModule and used by
every runBun call site — Scala.js, TypeScript, workspace, publish, and
workers modules previously mixed bunEnv() and bunToolEnv() — and the
TypeScript bunRuntimeEnv is public instead of protected.

Integration tests exercise the canonical names throughout, with
explicit alias regression coverage: npmInstall must resolve to
bunInstall.dest, and the deprecated test / bunTest commands must keep
working until their removal at 1.0. MIGRATING-0.3.md documents the new
rows and the bunBundleFormat break with a before/after example.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arcaputo3
arcaputo3 deleted the branch agent/idiomatic-scalajs-mill-workflows August 27, 2026 00:56
@arcaputo3 arcaputo3 closed this Aug 27, 2026
@arcaputo3 arcaputo3 reopened this Aug 27, 2026
@arcaputo3
arcaputo3 changed the base branch from agent/bun-unmanaged-deps to agent/idiomatic-scalajs-mill-workflows August 27, 2026 00:57
@arcaputo3
arcaputo3 merged commit 2cd092b into agent/idiomatic-scalajs-mill-workflows Aug 27, 2026
8 checks passed
@arcaputo3
arcaputo3 deleted the agent/bun-renames branch August 27, 2026 00:58
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