moon v0.18 - Improved configuration and initialization flow
Happy Halloween ๐ ๐ป! With this spooky release, we've focused heavily on our internals and benchmarking performance metrics, so it's rather light on new features, but we still have some to show!
Improved projects configurationโ
When moon initially launched, it required defining all
projects
using a map. In v0.3, we added support for globs to
ease the burden of defining many projects. At this point, you had to choose between the 2 patterns,
which wasn't always ideal.
To improve upon this, you can now define a map and globs using a 3rd pattern, like so.
projects:
globs:
- 'apps/*'
- 'packages/*'
sources:
www: 'www'
Improved moon init
flowโ
The moon init
command hasn't changed much since our v0.1 release, and with many new features and
configurations over these last 18 releases, the initialization flow has fallen quite behind. We felt
it was the perfect time to modernize this command a bit.
On top of automatically detecting settings from the environment, the command will also now prompt you with additional questions while configuring Node.js or TypeScript. Here's an example of this flow:

Furthermore, the command also supports enabling a new tool (appending configuration to
.moon/workspace.yml
) into an existing moon repository, by running moon init --tool <name>
.
Customize node
execution argumentsโ
moon manages the Node.js binary in our toolchain, and runs all Node.js based tasks using this
binary, instead of relying on the binary found in the developer's environment. Because of this, how
node
is executed is abstracted away from end users.
What if you wanted to use an experimental loader and
execute TypeScript code at runtime? Or to preserve symlinks? Well, you couldn't... but no longer,
as we've added a new setting, node.binExecArgs
, that
allows additional node
CLI arguments to be defined,
that will be passed to all executions.
node:
binExecArgs:
- '--loader'
- '@boost/module/loader'
Learn more about the Boost module loader!
Other changesโ
View the official release for a full list of changes.
- Default Node.js version has been updated to v18.12 (the new LTS) from v16.17.
- Updated the
moon check
command to support an--all
flag. - Improvements to how we store stdout/stderr logs for ran targets.
- Work tree dirty checks when running migration commands.
What's next?โ
Expect the following in the v0.19 release!
- Laying the groundwork for remote caching!
- An in-repo secrets management layer.
- Performance and affected improvements.