website/blog/2022-10-21_v0.17.mdx
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
With this release, we're landing the first iteration of our notifier service, starting with webhooks! We've also spent some time working on quality of life improvements.
<!--truncate-->To start, we have a few breaking changes this release to be aware of!
An ID refers to many things — project names, task names, target segments, so on and so forth. When parsing these values, we format them to remove unwanted characters, as these IDs are used in many contexts, many of which need to be strict.
Previously, we would remove unwanted characters entirely. Instead, we now replace them with dashes
(-) for better readability. Take the following for example:
| ID | Old | New |
|---|---|---|
| domain.com | domaincom | domain-com |
| build:esm | buildesm | build-esm |
type has been renamed to platformThis setting was renamed for a few reasons. To start, tasks actually have a type internally that is not configured, but is inferred based on what's configured. This was a bit confusing.
And secondly, our toolchain refers to language integrations as platforms, and since this setting determines which tool to run with, we wanted to align on the platform terminology.
<Tabs groupId="task-type" defaultValue="before" values={[ { label: 'Before', value: 'before' }, { label: 'After', value: 'after' }, ]}
<TabItem value="before">
tasks:
clean:
command: 'rm -rf ./dist'
type: 'system'
tasks:
clean:
command: 'rm -rf ./dist'
platform: 'system'
Because of this change, the
$taskTypetoken was also renamed to$taskPlatform!
Looking to gather metrics for your pipelines? Gain insight into run durations and failures? Maybe you want to send Slack or Discord notifications? With our new notifier system, this is now possible through webhooks!
Simply enable the notifier.webhookUrl setting to start
receiving events from your CI environments.
notifier:
webhookUrl: 'https://api.company.com/some/endpoint'
View the official guide on webhooks for a full list of events and an example payload structure!
We've updated our YAML configuration files to support extended syntax,
anchors (&) and aliases (*).
With this new syntax, you're now able to reduce the amount of duplication required in your config
files, especially when declaring tasks, as demonstrated below!
<Tabs groupId="yaml" defaultValue="before" values={[ { label: 'Before', value: 'before' }, { label: 'After', value: 'after' }, ]}
<TabItem value="before">
tasks:
astro:
command: 'astro'
local: true
dev:
command: 'astro dev'
inputs:
- '@group(astro)'
local: true
build:
command: 'astro build'
inputs:
- '@group(astro)'
outputs:
- 'dist'
check:
command: 'astro check'
inputs:
- '@group(astro)'
deps:
- '~:typecheck'
preview:
command: 'astro preview'
inputs:
- '@group(astro)'
deps:
- '~:build'
local: true
_astro: &astro
command: 'astro'
inputs:
- '@group(astro)'
tasks:
dev:
<<: *astro
args: 'dev'
local: true
build:
<<: *astro
args: 'build'
outputs:
- 'dist'
check:
<<: *astro
args: 'check'
preview:
<<: *astro
args: 'preview'
deps:
- '~:build'
local: true
If you missed the announcement earlier this week, we released the initial version of our new VS Code extension! Give it a try and refer to the documentation for more information.
View the official release for a full list of changes.
values.deps can now omit the ~: prefix for tasks within the current project.moon check command can now use the --report option.Expect the following in the v0.18 release!
moon init.