website/blog/2023-04-24_moon-v1.3.mdx
After many months of design and development, we're finally introducing MQL, our own unique query language!
<!--truncate-->Our moon run command is pretty powerful. It allows you to run targets in
one, many, or all projects. It also supports running multiple targets in parallel. However, it
wasn't powerful enough, as it couldn't run the following types of scenarios:
Supporting all of these scenarios through CLI arguments just feels like bad design, and would result in a poor developer experience. There had to be a better way to support this! So we set out to solve this problem, and after much thought, we're stoked to introduce MQL, a query language unique to moon.
With MQL, you can now run scenarios like "I want to build all Node.js libraries", or "I want to lint
and test all Rust projects". Simply pass an unscoped target and a query to the run command:
$ moon run :build --query "taskPlatform=node && projectType=library"
$ moon run :lint :test --query "language=rust"
This is only the first iteration of MQL and it's already quite powerful. Expect additional fields, features, and functionality in the future!
Earlier this week we announced plugin support for proto, starting with a TOML based plugin. This is great as it allows any kind of versioned tool to be managed in proto's toolchain, so why not moon? Starting with this release, you can now install and manage moon from proto, using our officially maintained TOML plugin.
In your .prototools or ~/.proto/config.toml file, add the following snippet:
[plugins]
moon = "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
And as easy as that, you can now use moon as a tool within any proto command. For example:
$ proto install moon 1.3.0
$ proto list-remote moon
$ proto bin moon
Furthermore, with proto, we can now pin the version of moon on a per-project basis. Perfect for enforcing the same version for all developers on your team!
moon = "1.3.0"
When using this approach, be sure
~/proto/.binis in yourPATH, and takes precedence over~/.moon/bin.
View the official release for a full list of changes.