Skip to main content

moon v0.25 - Deno tier 2 support, CI insights, custom project languages, and more

· 5 min read
Miles Johnson

With this release, we're landing Deno, our first supported language besides Node.js, and improving interoperability of languages as a whole.

Deno tier 2 support (experimental)

Three months ago we announced our new tiered support structure for languages, and as of today, we're happy to announce that our second language to reach tier 2 is Deno! With tier 2 support, we now analyze Deno specific configuration files (like deno.json) to infer dependencies and relationships, as well as utilize this information for inputs and hashing purposes. With that being said, we're marking this release as experimental until we fine tune the implementation, and iron out all the bugs.

To get started with using Deno, enable the new deno setting in .moon/toolchain.yml. At this time, we don't have many settings to configure, so simply defining an empty object is enough to enable the Deno platform! Learn more about this in our Deno handbook.

.moon/toolchain.yml
deno: {}

Once enabled, you can start using deno commands in your moon tasks. moon will automatically set the platform to "deno" when using a deno command.

moon.yml
tasks:
format:
command: 'deno fmt'
info

Because this is only tier 2 support, moon does not download and install Deno into its toolchain. moon expects the deno binary to exist in the current environment.

Furthermore, if you're working a project that is composed of multiple JavaScript runtimes, like Deno, Bun, or Node.js, you can set the default platform for all tasks at the project-level.

moon.yml
platform: 'deno'
language: 'typescript'
type: 'application'

We're very excited for this release as it paves the way for future language integrations, and enables additional JavaScript runtimes!

CI insights in moonbase

We've spent the last few weeks implementing a new moonbase feature called CI insights, where we track all CI runs (via moon ci), and all actions (tasks) that have ran based on affected files. In the future these insights will help catch regressions, alert on flakiness, provide granular metrics, and help monitor the health of your CI pipeline and repositories.

With this initial release, we track touched files, which targets are affected based on those files, an estimation on how much time was saved or lost, the actions that ran and their final status, outlined as a timeline.

Insights are enabled by default if you're using moonbase in your CI pipeline, and start using moon v0.25! You can disable insights gathering from your organization settings page.

Offline mode

moon assumes that an internet connection is always available, as we download and install tools into the toolchain, resolve versions against upstream manifests, and automatically install dependencies. While this is useful, having a constant internet connection isn't always viable.

In this release, we now check for an active internet connection and bypass certain workflows when applicable. Jump to the official guide on offline mode for more information!

Custom project language

Project's have always been able to define a language in moon.yml that denotes the primary programming language for the project. Historically this has been a strict enum of supported values, and could not be customized for other languages. With the introduction of language driven task inheritance, we felt like revisiting this setting, and as such, you're now able to define any language in this setting, which also feeds into the task inheritance system.

moon.yml
language: 'kotlin'

With this change, .moon/tasks/kotlin-application.yml, .moon/tasks/dotnet.yml, and other variations are now possible! However, besides task inheritance, other functionality like platform detection, and Dockerfile support are not enabled.

Project-level TypeScript settings (breaking)

Our TypeScript integration supports many automated workflows, like syncing project references, and routing outDir to our shared cache. This is wonderful for the majority, but for the handful of projects where these settings were not viable, there was no simple way to disable or opt out of the functionality.

Well no more, projects can now override the workspace-level TypeScript settings routeOutDirToCache, syncProjectReferences, and syncProjectReferencesToPaths through the toolchain.typescript setting in moon.yml.

moon.yml
toolchain:
typescript:
routeOutDirToCache: false

Because this setting was changed from a boolean to an object, the old pattern of disabling Typescript must now use the disabled setting.

moon.yml
# Old
toolchain:
typescript: false

# new
toolchain:
typescript:
disabled: true

New moonrepo/setup-moon-action GitHub action

If you're using GitHub Actions as your CI pipeline, we've introducing a new action called moonrepo/setup-moon-action, that will install the moon binary globally, and will cache (and restore) the moon toolchain.

With this new action, let moon handle all the heavy lifting, and avoid all the unnecessary steps around setting up Node.js, and install dependencies.

jobs:
ci:
name: 'CI'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: moonrepo/setup-moon-action@v1
- run: moon ci

Other changes

View the official release for a full list of changes.

  • Updated project, task, and target identifiers to support periods (.).
  • Refactored glob matching to use workspace relative paths instead of absolute. Please report an issue if hashing or affected detection is now inaccurate.
  • We now build against older operating systems in an attempt to solve GLIBC version errors.

What's next?

Expect the following in the v0.26 release!

  • Officially release proto!
  • Improved Deno interoperability.