website/blog/2023-10-30_moon-v1.16.mdx
With this release, we've focused on requests from the community, instead of internal migration work or new features.
<!--truncate-->Now that Bun v1 has officially released and our bun-plugin for proto has stabilized, we can start slowly integrating Bun support into moon. The first step in this series is adding Bun as a supported package manager for Node.js. Seems odd as they are conflicting runtimes... right? While true, a lot of users are interested in using Bun purely as a package manager, as it can install dependencies incredibly fast. So why not support it?
In this release, you can now install dependencies with Bun by configuring
node.packageManager and
node.bun in your toolchain.
node:
packageManager: 'bun'
bun:
version: '1.0.0'
Additionally, you can now execute Bun commands within tasks! However, ensure the task's platform is
still set to node though, as this is using Bun as a package manager within Node.js, not as a
separate runtime.
tasks:
test:
command: 'bun test'
platform: 'node'
When using Bun, the following integrations are applied:
bun install (deduping currently not supported).bun.lockb for dependency resolution and task hashing.bunx instead of npx for one-off package executions.bun commands within tasks.This change only adds support for Bun as a package manager for Node.js. It does not add Bun as a supported language/platform in the toolchain, but it does pave the way for this to happen! Also note that Bun is not supported on Windows!
We've had Rust tier 2 and 3 support for quite a while now, but there was a big missing piece: the ability to configure and install additional components and targets for the current toolchain. In this release, we've added support for both!
Simply configure the rust.components or
rust.targets settings in
.moon/toolchain.yml, and moon will automatically install them when the
pipeline is ran. This functionality uses the same hashing implementation as
rust.bins, so will only install the first time, and again if the
configuration changes (or the cache is removed).
rust:
version: '1.73.0'
components:
- 'clippy'
- 'rust-analyzer'
targets:
- 'wasm32-wasi'
Our toolchain is great for local development, as it ensures all developers and machines are running the exact versions of tools required for the workspace. However, it becomes overkill for other environments like CI and Docker where the environment has been pre-configured.
To avoid the unnecessary overhead of download and installing tools in the toolchain, we're
introducing the MOON_TOOLCHAIN_FORCE_GLOBALS environment variable. When provided, this will:
PATH.MOON_TOOLCHAIN_FORCE_GLOBALS=true moon ci
We're looking into ways to automate this process, but for now, this is the best solution.
View the official release for a full list of changes.
experiments.interweavedTaskInheritance: false in .moon/workspace.yml.automation, for projects like E2E and
integration testing.yarn dlx, pnpm dlx,
bunx.