# Changelog

## 2.4.6

#### 🚀 Updates

- Updated `MOON_BASE` and `MOON_HEAD` to no longer require also passing `--affected`.

#### 🐞 Fixes

- Fixed an issue in GitLab CI where the wrong `HEAD` would be used for merge request pipelines.

## 2.4.5

#### 🐞 Fixes

- Fixed an issue where HTTP remote cache would deserialize manifests into the wrong shape, resulting
  in failed caching.
- Fixed an issue where dependency deduping would run on fresh/initial installs.

## 2.4.4

#### 🐞 Fixes

- Fixed remote caching against backends that validate the Bazel RE contract (like Depot), where
  every upload was rejected with "client should not populate stdout_raw during upload" or "action
  digest not found in CAS", leaving the cache permanently empty.
- Fixed cache hits replaying no task output when a remote server returns a stdout/stderr digest
  without also inlining the raw bytes.
- Fixed an issue where gRPC remote cache uploads would fail with "Failed to store blob" when the
  server returned a `RESOURCE_EXHAUSTED` error, because a blob was too large. We now set the max
  size to 4MB (the gRPC limit).
- Fixed an issue where HTTP remote cache was not respecting the
  `unstable_remote.cache.localReadOnly` setting.

## 2.4.3

#### 🚀 Updates

- Added [Renovate](https://www.mend.io/renovate/) support. View the official guide for more
  information.
- Updated BitBucket codeowners to use the
  [new syntax & file location](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-code-owners/).
  If you are using the old syntax, you can use `bitbucket-legacy` instead.

#### 🐞 Fixes

- Fixed an issue where `runDepsInParallel: false` would only serialize direct dependencies, allowing
  a dependency's own dependencies (grandchildren) to run in parallel with earlier serial
  dependencies. The entire dependency subtree is now ordered.
- Fixed `moon ci` failing in certain CI provider pull request builds, where the base branch is
  provided as a fully-qualified `refs/heads/<branch>` ref that couldn't be resolved in a detached
  `HEAD` checkout.
- Fixed task binaries failing with "command not found" in CI providers like CircleCI, where an
  `export PATH=...` in the `$BASH_ENV` file would overwrite the `PATH` that moon injects for tasks.
  `BASH_ENV` is no longer passed to `bash` wrapped child processes, unless explicitly set with the
  task `env` option.
- Fixed an issue where task `outputStyle` was being applied to the primary target. It will only
  apply to transitive targets.
- Fixed an issue where captured task output containing non-UTF-8 bytes (for example, Windows
  codepage output from Python) was discarded entirely, resulting in empty `stdout.log`/`stderr.log`
  state files, cache hits replaying no output, and missing output in run reports. Invalid bytes are
  now replaced with `�` instead.
- Fixed an issue where a task's dependents would not run when requested with a downstream scope
  (`moon ci`, `--dependents`, `--downstream`), if the task was first added to the action graph as a
  dependency of another target. For example, `moon run app:build lib:build --dependents` would skip
  the dependents of `lib:build` when `app:build` depends on it.
- Fixed tasks that emit read-only outputs (e.g. `0444` files) failing on every cache hit with a
  "Permission denied" error when the `casOutputsCache` experiment is enabled. Caches that already
  contain read-only objects are healed automatically.
- Fixed an issue where `moon query changed-files` would include uncommitted changes from the local
  index (`git status`) even when an explicit `--head` revision was provided, causing false positives
  when comparing 2 revisions. This also applies to affected detection with an explicit head, e.g.
  the `MOON_HEAD` environment variable or `--affected base:head`. Additionally, `MOON_BASE` and
  `MOON_HEAD` environment variables that are set but empty are now ignored.
- Fixed an issue where synced VCS hooks were always written to `.moon/hooks`, even when the
  workspace configuration lived in `.config/moon`. Hooks are now placed alongside the config, in
  `.config/moon/hooks`.

## 2.4.2

#### 🚀 Updates

- Reworked the workspace graph caching to avoid plugin calls on cache hits, which can improve
  performance in large workspaces.

#### 🧰 Toolchains

- **Go**
  - Fixed `go list -deps` running on non-Go projects.

## 2.4.1

#### 🐞 Fixes

- Fixed an issue where the daemon wouldn't start if the cache directory did not exist.
- Fixed some error messages being swallowed in the logs.

## 2.4.0

#### 🚀 Updates

- **CLI**
  - Added a `--update-constraint` option to `moon upgrade` that will update the workspace config
    version constraint to the latest version.
  - Updated `--log` level handling. `debug` should be used for the most part, as it includes most
    debug information. `trace` now includes a ton of information, which may be too spammy for normal
    debugging (is meant for agents and deep diagnostics).
- **CAS**
  - Further improvements to the content-addressable storage (CAS) cache, including better error
    handling and performance improvements.
  - Added a new storage API for local/remote cache interoperability. This will unlock many
    improvements in the future, including better cache hit rates and more efficient storage.
  - When copying files to/from the CAS, we now use OS reflink's when available, which can improve
    performance and reduce disk space usage.
  - When the local/remote cache is missing a blob, we'll attempt to retrieve it from the other
    cache, which can improve cache hit rates in some scenarios.
  - When a remote cache hit, we'll now warm the local cache with the hydrated manifest and its
    blobs, so the next run resolves locally instead of round-tripping to the remote.
- **Daemon**
  - Server log files will now rotate up to 7 times. Older log files will be automatically deleted.
  - Webhook delivery and task output archiving are now acknowledged immediately and run in the
    background on the daemon, so a client exiting or hitting a deadline no longer cancels the work
    mid-flight.
  - The daemon now takes exclusive ownership of its workspace through an advisory file lock held for
    its entire lifetime, replacing PID-liveness checks that could be fooled by zombie processes,
    reused PIDs, or processes owned by another user. A crashed daemon releases the lock
    automatically, so a stale socket or state file can no longer block or misdirect the next start.
  - Whether the daemon is running is now determined by connecting to it rather than probing a PID,
    and its metadata is recorded in a `daemon.json` state file (replacing `moond.pid`).
  - Connecting to the daemon and starting it are now a single operation, so a command that needs the
    daemon will start one itself if the background pre-warm hasn't yet, instead of silently running
    without it. Concurrent starts still coordinate so only one daemon is spawned.
  - When connecting, the client now checks the running daemon's moon and protocol version against
    its own and, on a mismatch, restarts it — so a daemon left over from before a `moon upgrade` is
    replaced instead of serving the old binary indefinitely.
  - The daemon now retires itself after a long idle period (no requests), and exits immediately if
    its workspace is deleted, so an abandoned workspace no longer leaves a daemon running forever.
- **Processes**
  - Improved our "stream and capture output" child process handling to operate on bytes instead of
    lines, which should resolve some edge cases with output not being written to the console, or
    being written out of order.
- **Remote cache**
  - Added compression support for streamed read/writes of blobs (large files).
  - Added extensive testing to account for edge cases.
  - When the server doesn't support the configured compression, it will now default to "identity"
    (uncompressed) instead of disabling the cache entirely.
- **Tasks**
  - Added a `checks` setting to tasks that allows you to define shell scripts that execute before
    the task runs, and depending on their type, different outcomes can be achieved. The following
    types are supported:
    - `fingerprint` - if the check fails, the task will fail and not run, otherwise the process
      output will be included in the task hash.
    - `requirement` — if the check fails, the task will fail and not run.
    - `condition` - if all conditions pass, the task will be skipped, otherwise it will run as
      normal.
  - Added a `mergeChecks` option to tasks to control the merge behavior of checks when extending
    tasks.
  - Added a top-level `taskOptions` setting to `moon.*` that allows you to configure default task
    options for all tasks within the current project, which can be overridden per task.
- **Toolchains**
  - Added caching around executable location lookups to improve performance. Previously, these were
    running over and over again for each task.
- **VCS**
  - Hardened all executed Git commands: revisions are validated against argument injection,
    credential prompts now fail immediately instead of hanging, and the fsmonitor daemon is now
    disabled to avoid it blocking process pipes.
  - Reworked merge base resolution to be more accurate and performant. The most recent divergence
    point is now preferred when local and remote branches are out of sync, and a warning is now
    logged when a merge base could not be resolved, as diffs may be inaccurate without one.
  - Reworked how renames are handled. When diffing between revisions, the old path is now reported
    as "deleted" and the new path as "added", instead of both being "modified". For statuses, the
    old path is now reported as "deleted", instead of being omitted entirely. Additionally, type
    changes and unmerged files are now reported, instead of being omitted.

#### 🧰 Toolchains

- **Python**
  - Added Poetry package manager support.
    - Can be enabled with `unstable_python.packageManager: 'poetry'` in `.moon/toolchains.*`.
    - Can be configured with `unstable_poetry.*` settings in `.moon/toolchains.*`.
    - Supports tiers 1-3.
- **Ruby**
  - Added unstable Ruby toolchain support!
    - Can be configured with `unstable_ruby.*` settings in `.moon/toolchains.*`.
    - Supports tiers 1-3. Tier 3 requires building from source (which may not be desirable).
    - Will use Bundler as the package manager.

#### 🐞 Fixes

- **CLI**
  - Fixed an issue where moon would silently exit with code 141 (SIGPIPE) when a child process
    exited before consuming its stdin. Broken pipes are now handled explicitly instead of resetting
    the SIGPIPE disposition, while piping moon's output to a consumer that closes early still exits
    quietly with the conventional code.
- **Daemon**
  - Fixed an issue where every daemon RPC was capped by a 1 second client-side timeout, causing slow
    procedures (webhook delivery, cache cleaning) to be cancelled even though the daemon was
    healthy. Connection establishment is now bounded separately, and each procedure has an
    appropriate deadline that is also enforced by the server.
  - Fixed an issue where connecting to the daemon while it was still starting up — or being started
    by another process — would fail immediately with "connection refused", and the run would
    continue without the daemon. Connection attempts are now retried with a bounded backoff.
  - Fixed an issue on Windows where the daemon briefly had no listening pipe instance between client
    connections, causing sporadic connection failures, and where busy pipe instances were not
    retried.
- **VCS**
  - Fixed an issue where an explicit head revision was ignored when diffing between revisions, and
    the current working tree was compared against instead.
  - Fixed an issue where diffing against the previous revision would fail in repositories with a
    single commit.
  - Fixed an issue where file names with spaces or special characters were excluded from file tree
    results.
  - Fixed an issue where Git submodules added between 2 revisions were not included when diffing.
  - Fixed an issue where Git hooks could not be set up from the primary working tree when other
    worktrees exist.
  - Fixed an issue where moon would take over a hooks directory managed by another tool (husky,
    lefthook, etc) when `core.hooksPath` was already configured, overwriting its hook files, and
    deleting the entire directory when hooks were disabled.
  - Fixed an issue where Windows hook wrappers would not forward arguments containing spaces
    correctly, and would arbitrarily cap forwarding at 5 arguments.
  - Fixed an issue where PowerShell hooks would mangle user variables that start with `$ARG`, like
    `$ARGS`.

#### ⚙️ Internal

- Updated proto to [v0.58.2](https://github.com/moonrepo/proto/releases/tag/v0.58.0) from 0.57.4.
- Updated dependencies.

## 2.3.5

#### 🐞 Fixes

- Fixed an issue where Git hooks would not work correctly in submodules.
- Fixed an issue where `moon docker` commands may generate non-deterministic output, resulting in
  invalid Docker layer caching.

#### 🧰 Toolchains

- **Go**
  - Fixed `go list -deps` relationship inference not detecting sibling workspace modules imported
    via subpackages (e.g. `example.com/org/a/pkg`).
- **JavaScript**
  - Added Deno v2.9 support.

## 2.3.4

#### 🐞 Fixes

- Fixed an issue where projects with the same name/ID as their underlying toolchain package would
  cause issues when pruning within Docker.
- Fixed an issue where remote caching wasn't being updated unless the `casOutputsCache` experiment
  was enabled.

#### 🧰 Toolchains

- **Python**
  - Updated `uv sync` to use `--no-dev` when installing production only dependencies.
- **Rust**
  - Updated `cargo-binstall` installation to use `--locked`.

## 2.3.3

#### 🛡️ Security

- Fixed a security issue where task outputs being hydrated from the remote cache can overwrite files
  outside the output list, if the manifest in the remote cache has been compromised.

#### 🧰 Toolchains

- **Go**
  - Fixed a `go.mod` parsing regression that failed to parse `tool ()`.

## 2.3.2

#### 🚀 Updates

- Added panic handling to the daemon server, to capture and log unexpected panics.
- Updated the pipeline to continue if the daemon client cannot connect, instead of failing the whole
  pipeline.

#### 🐞 Fixes

- Potential fix for the daemon client connection refused error. If this problem persists,
  temporarily disable the daemon and report an issue.
- Fixed an issue with `project:^` inputs where resolved files would be excluded when project sources
  overlap.

#### 🧰 Toolchains

- **Go**
  - Added an `inferRelationshipsPackages` setting to customize the package patterns passed to
    `go list --deps`.
  - Updated `go list --deps` relationship inference to scan all packages (`./...`) by default, so
    dependencies imported only from subdirectories (`internal/`, `pkg/`, ...) are now inferred.

## 2.3.1

#### 🚀 Updates

- Added in-memory caching to certain toolchain operations, primarily around locating executables.
- Improved daemon startup performance by loading the workspace graph in the background after the
  server is ready.
- Updated plugin distribution to use ghcr.io instead of raw URLs, which should improve reliability
  and performance of plugin downloads.

#### 🐞 Fixes

- Reworked the daemon connect/ready logic to possibly fix some Windows connection issues.
- Fixed an issue where the task dependency `cacheStrategy` inferrence was not working correctly
  based on what experiments are enabled.
- Fixed an issue where locks created at `.moon/cache/locks` would not be cleaned up.

#### ⚙️ Internal

- Updated proto to [v0.57.4](https://github.com/moonrepo/proto/releases/tag/v0.57.4) from 0.57.3.

## 2.3.0

#### 🚀 Updates

- **Cache**
  - Added a new experiment that stores task outputs in a local content-addressable storage (CAS)
    cache, sharing the same format used by the remote cache. Enables deduplicated storage across
    tasks and a unified cache shape locally and remotely.
    - Enable with the `experiments.casOutputsCache` setting in `.moon/workspace.*`.
  - Added a new top-level `cache` setting in `.moon/workspace.*` for tuning the content-addressable
    storage (CAS) cache.
- **Daemon**
  - When `pipeline.autoCleanCache` is enabled (by default), the auto-clean will now run in the
    daemon, instead of at the tail-end of the main process.
  - When utilizing webhooks, the requests will now be made from the daemon, instead of the main
    process.
- **Git**
  - Added SHA256 support for commit hashes. This is in preparation for Git's transition to SHA256 as
    the default hash algorithm.
- **Hash**
  - Added a new experiment that replaces the VCS/Git based file hashing mechanism with a custom
    native implementation that runs within our task pool. This can improve performance by 10-50%.
    - Enable with the `experiments.nativeFileHashing` setting in `.moon/workspace.*`.
- **MCP**
  - Added `get_template` and `get_templates` tools so AI coding assistants can discover templates
    and inspect their variable schemas before calling `generate`.
- **Tasks**
  - Added tags support to tasks through new `tags` and `options.mergeTags` settings.
    - Added `taskTag` field support to MQL.
    - Added `--tags` option support to `moon query tasks`.
    - Updated targets to support the `#` tag syntax in the task scope, allowing you to reference
      tasks by their tags. For example: `app:#quality`.
  - Added a `cacheStrategy` field to task dependencies that controls how a dependency's changes
    invalidate the current task's cache. Supports `hash`, `ignored`, and `outputs` — the latter
    mixes in the dependency's output files instead of its hash, so build tasks are only invalidated
    when upstream outputs change, not when upstream inputs change.
    - **Behavior change:** when `cacheStrategy` is omitted, the default is now `hash` if the
      dependency declares outputs and `ignored` if it doesn't, instead of always `hash`. Tasks that
      depend on output-less tasks (e.g. lint, test) will see fewer cache invalidations. Set
      `cacheStrategy: 'hash'` explicitly to restore the previous behavior for a given dependency.
- **Performance**
  - Reduced task target memory footprint by 50-100%.

#### 🧰 Toolchains

- **JavaScript**
  - Added support for [Deno v2.8](https://deno.com/blog/v2.8).
    - Will use `deno ci` for installs in CI when `deno.lock` exists and the configured Deno version
      is >= v2.8.
    - Will pass `--prod` to `deno install` for production installs when the configured Deno version
      is >= v2.8.
    - Will resolve `catalog:` references in `package.json` files using catalogs declared in a root
      `deno.json`.
- **Python**
  - Added unstable support for `uv pip`.
    - Can be configured using `unstable_python.packageManager: 'uv-pip'` in `.moon/toolchains.*`.
    - Will inherit install arguments from `unstable_pip.installArgs`.
    - Will inherit sync arguments from `unstable_uv.syncArgs`.
    - Will inherit venv arguments from `unstable_uv.venvArgs`.

#### 🐞 Fixes

- Fixed a glob regression where unbounded walks could be up to 10x slower.

#### ⚙️ Internal

- Updated proto to [v0.57.3](https://github.com/moonrepo/proto/releases/tag/v0.57.0) from 0.56.4.
- Updated Rust to v1.96.0.
- Updated dependencies.

## 2.2.6

#### 🐞 Fixes

- Fixed an issue where the `InstallDependencies` action would scan manifests within the vendor
  directory, which could cause issues with some package managers.

#### 🧰 Toolchains

- **Go**
  - Added support for Go v1.24 `ignore` in `go.mod` and `go.work`.

## 2.2.5

#### 🐞 Fixes

- Fixed an issue where dot folders would be ignored during globs. The `.git` folder is still always
  ignored.
- Fixed an issue where nested `node_modules` folders would be ignored during globs. The
  `node_modules` folder at the glob target root is still always ignored.
- Fixed an issue where toolchain specific fields, like `versionFromPrototools`, were missing from
  the generated JSON schemas.
- Fixed an issue where commands executed during toolchain actions (like setup environment) may
  trigger a file system deadlock.

#### 🧰 Toolchains

- **Python**
  - Updated venv commands to be skipped during environment setup if the directory already exists.
    Configure `--clear` to force re-initializing.

## 2.2.4

#### 🐞 Fixes

- Fixed an issue where proto's `auto-clean` would remove tools installed by moon as they weren't
  marked as used.
- Fixed a regression where moon would fail with `Failed to execute git and capture output` when
  `.gitmodules` referenced a submodule that hadn't been checked out (e.g. `update = none`).
  Uninitialized submodules are now skipped, matching the v1 behavior.
- Fixed an issue where toolchain dependency installation would be skipped even when the vendor
  directory does not exist.
- Fixed an issue where failing actions would not re-run again because their hash would be persisted,
  even on failure.
- Fixed an issue where `WouldBlock` errors would trigger when attempting to flush buffered output to
  the console.
- Fixed an issue where `--upstream=none` would error for missing dependencies.

#### 🧰 Toolchains

- **Python**
  - Fixed an issue where the wrong arguments were passed to `uv sync` depending on whether proto is
    managing the Python version.
  - Fixed an issue where venv paths were not available to commands run through the toolchain, like
    `uv sync`.

#### ⚙️ Internal

- Updated dependencies.

## 2.2.3

#### 🐞 Fixes

- Fixed a potential deadlock in the action pipeline when running many sync heavy operations.

## 2.2.2

#### 🚀 Updates

- Updated the VS Code extension to point to the v2 JSON schemas. If you are still using moon v1,
  you'll need to pin to an older VS Code extension version until you upgrade to moon v2.

#### 🐞 Fixes

- Fixed a regression in plugin loading that reduced performance of graph operations.
- Fixed an issue where the `unpack` extension would trigger a missing plugin locator error.

#### 🧰 Toolchains

- **Python**
  - Fixed the Python toolchain depending on pip/uv, when it should be reversed.

#### ⚙️ Internal

- Updated proto to [v0.56.4](https://github.com/moonrepo/proto/releases/tag/v0.56.4) from 0.56.3.
- Updated dependencies.

## 2.2.1

#### 🚀 Updates

- Added request retry support (via proto), that will retry up to 3 times with exponential backoff
  for transient errors (network issues, rate limits, etc).
- Improved async affected tracking by another 5-10%.
- Updated PowerShell commands to use `-EncodedCommand` instead of `-Command` to avoid
  quoting/escaping issues. Let us know if you run into any issues with this change.

#### 🐞 Fixes

- Fixed `--summary` not being respected in `moon ci`.
- Fixed issues with graph visualizer commands failing with a JavaScript error after the v2.2 graph
  changes.
- Fixed an issue where checking the remote cache for an entry _before the task execution_ could
  cause the task to fail if the remote cache check errored. We now treat remote cache errors as
  cache misses, and allow the task to execute.
- Fixed an issue where filtered graphs would point to the wrong data because indexes changed.

#### 🧰 Toolchains

- **JavaScript**
  - Fixed `pnpm-lock.yaml` parsing for pnpm v10's multi-document lockfiles, which are written when
    `managePackageManagerVersions` is enabled (the default).
- **TypeScript**
  - Updated project references to start with `./` in preparation for the removal of `baseUrl` in
    TypeScript v7.

#### ⚙️ Internal

- Updated proto to [v0.56.3](https://github.com/moonrepo/proto/releases/tag/v0.56.3) from 0.56.1.
- Updated Rust to v1.95.0.
- Updated dependencies.

## 2.2.0

#### 💥 Breaking

- The `--json` output for `moon action-graph`, `moon project-graph`, and `moon task-graph` commands
  has changed. The `graph` nodes are now integers instead of objects, and the node data is instead
  stored in a separate `data` object.

#### 🚀 Updates

- Temporarily brought back `x86_64-apple-darwin` (Apple Intel) as a supported operating system.
- **Affected**
  - Added an experimental asynchronous version of the affected tracker, that is 100-150% faster.
    - Enable with the `experiments.asyncAffectedTracking` setting in `.moon/workspace.*`.
- **Config**
  - Added `MOON_PIPELINE_AUTO_CLEAN_CACHE` environment variable support for the
    `pipeline.autoCleanCache` setting.
  - Added `MOON_PIPELINE_CACHE_LIFETIME` environment variable support for the
    `pipeline.cacheLifetime` setting.
  - Added `MOON_PIPELINE_KILL_PROCESS_THRESHOLD` environment variable support for the
    `pipeline.killProcessThreshold` setting.
- 🆕 **Daemon**
  - Added an unstable daemon that will run in the background and process heavy operations. To start,
    it runs a file watcher on the workspace and invalidates caches.
  - Added a `moon daemon` command with `start`, `stop`, and more subcommands to manage the daemon.
  - Added an `unstable_daemon` setting to `.moon/workspace.*`.
- **Graphs**
  - Improved performance of `taskToolchains` and `taskType` fields when querying the project graph.
  - Greatly reduced memory footprint of the action, project, and task graphs. Nodes in the graph are
    now integers instead of objects.
- **Plugin registry**
  - Improved performance and memory consumption when loading plugins.
- **Task runner**
  - Improved performance of task output archiving, by no longer blocking the main thread pool.
- **Toolchains**
  - Updated the system toolchain to be built-in instead of an external WASM plugin that needs to be
    downloaded.
- 🆕 **Workspace**
  - Added an experimental asynchronous version of the project and task graph builders, that utilizes
    a background thread pool per project to build the graph. This can improve performance by
    100-170% in large workspaces.
    - Enable with the `experiments.asyncGraphBuilding` setting in `.moon/workspace.*`.
    - Unlike the sync version, the async version does not support cycles, and will not cut edges
      automatically to avoid cycles.

#### 🐞 Fixes

- Fixed an issue with VCS hooks generation that could leave around stale hooks.
- Fixed an issue where toolchains not managed by proto directly (like Rust) would consistently
  re-install itself.
- Fixed an issue where OS based tasks would error while executing if they defined `outputs`, and
  you're on a different OS.
- Fixed an issue where proto would be installed even when toolchains were disabled with
  `MOON_TOOLCHAIN_FORCE_GLOBALS`.

#### ⚙️ Internal

- Updated proto to [v0.56.1](https://github.com/moonrepo/proto/releases/tag/v0.56.0) from 0.55.4.
- Updated dependencies.

## 2.1.4

#### 🚀 Updates

- Added `moon toolchain download` and `moon extension download` commands that will download all
  configured toolchain/extension plugins. This allows you to prime the download cache.

#### 🐞 Fixes

- Fixed an "unrecognized subcommand moon" error that can occur when global and local moon binaries
  exist.
- Fixed an EPIPE error in streaming child processes.
- Fixed trailing `--` in task commands being stripped.
- Potential fix for graph visualizer commands failing with a JavaScript error.

#### 🧰 Toolchains

- **Go**
  - Updated `go list` to not require `go.mod` file to run.

## 2.1.3

#### 🧰 Toolchains

- **Go**
  - Fixed an issue where `go list` was not running in the project root.
  - Fixed an issue where `go list` would add a project dependency to itself.
- **JavaScript**
  - Will now remove `node_modules` during Docker prune, as some package managers don't do this
    automatically.
  - Removed `*.config.*` files from the Docker scaffold process.
- **npm/pnpm/yarn**
  - Updated to always include the "shared globals" directory.
- **Python**
  - Fixed install/venv args being passed incorrectly in some situations.

## 2.1.2

#### 🚀 Updates

- Updated the affected tracker to mark project/tasks as affected on-demand, instead of everything up
  front. This allows us to short-circuit early, improving performance for very large repos.
- Updated many commands and call sites to load projects/tasks without expansion, slightly improving
  performance and memory usage.

#### 🧰 Toolchains

- **Go**
  - Added `inferRelationships` and `inferRelationshipsFromTests` settings to control
    `go list --deps` usage.
- **JavaScript**
  - Updated `deno.lock` and `yarn.lock` parsing dependencies.
- **Python**
  - Fixed an issue where install commands didn't have access to venv bins.
  - Fixed an issue where project dependencies were not being inferred correctly when the dependency
    contains extras metadata.
- **Rust**
  - Updated `Cargo.lock` parsing dependencies.
- **TypeScript**
  - Added TypeScript v6 support.

#### ⚙️ Internal

- Updated dependencies.

## 2.1.1

#### 🐞 Fixes

- Fixed an issue with remote caching where the batching max size and limit were not being applied
  correctly.
- Fixed an issue where exclude/rename for task inheritance applied to tasks other than those in the
  current project.
- Fixed an issue where toolchains that loaded project/workspace toolchain configuration would not be
  merged correctly.
- Fixed an issue where task console output may appear out of order.
- Fixed an issue with Git file hashing by temporarily re-enabling Git locks.

## 2.1.0

#### 🚀 Updates

- **Environment**
  - Improved our local and remote detection logic. We now also check for common remote devboxes
    (GitHub Codespaces, Gitpod, etc) in addition to CI environments.
- **Projects**
  - Updated duplicate aliases to no longer be a hard error, and instead will apply to the first
    encountered project. Duplicates are possible when multiple toolchains all use the same package
    name (Go, Rust, Node, etc).
- **Tasks**
  - Added 3 new settings to the `affectedFiles` option when using the object syntax:
    - `filter` - A list of glob patterns to filter the affected files list before passing to the
      task.
    - `ignoreProjectBoundary` - When matching affected files, ignore the project boundary and
      include workspace relative files. Otherwise, only files within the project are matched.
    - `passDotWhenNoResults` - When there are no affected files after matching and filtering, use
      `.` instead of an empty value.
  - Added a new option, `runInSyncPhase`, that will run the task during `moon sync` commands.
- **Toolchains**
  - Added `inheritAliases` (default `true`) setting for each toolchain. Can toggle whether to
    inherit aliases for projects while extending the project graph.
  - Added `installDependencies` (default `true`) setting for each toolchain. Can toggle whether to
    install dependencies (via the `InstallDependencies` action) when running a task.

#### 🧰 Toolchains

- **Go**
  - Will now run `go list --deps` to determine project relationships while extending the project
    graph.
- **Python**
  - Normalized package/dependency names to PEP 503 during graph extending.
  - Fixed an issue where package manager toolchain settings were not being inherited correctly.
- **TypeScript**
  - Added a `pruneProjectReferences` setting that prunes non-moon managed project references when
    syncing.

#### 🐞 Fixes

- Fixed invalid JSON schema in MCP `generate` tool.
- Fixed `$projectTitle` and `$projectAliases` tokens not being substituted.
- Fixed an issue where `bash` may not be available (falls back to `sh`).
- Fixed an issue where a task `command` could not end with `--`.
- Fixed some issues where `.config/moon` was not respected.
- Potential fix for tail-end console output not being written.

#### ⚙️ Internal

- Updated dependencies.

## 2.0.4

#### 🧰 Toolchains

- **JavaScript**
  - Added support for `*` versions when determining project relationships.
  - Reworked `pnpm dedupe` and `yarn dedupe` detection logic.
- **Python**
  - Will now read `pyproject.toml` dependencies to determine project relationships.

#### ⚙️ Internal

- Updated proto to [v0.55.4](https://github.com/moonrepo/proto/releases/tag/v0.55.4) from 0.55.2.
- Updated Rust to v1.94.0.
- Updated dependencies.

## 2.0.3

This is a re-release as the v2.0.0 release workflow failed.

## 2.0.2

#### 🚀 Updates

- Temporarily disabled shallow checkouts triggering a hard error in CI until we can implement a
  better solution. This means that if you have a shallow checkout, you may see incorrect affected
  results, or Git commands may fail.
- Added more logs to `moon docker prune` to help debug edge cases.
- Added `MOON_INCLUDE_RELATIONS` environment variable support for the `--include-relations` CLI
  option.
- Added `.env` and `.env.*` as defaults to the `hasher.ignoreMissingPatterns` setting.

#### 🐞 Fixes

- Fixed an issue where the graph visualizers would not render correctly in the VS Code extension.
- Fixed an issue where a task with `shell: false` would be force enabled when a glob/env was
  detected. We now respect the configured value.
- Fixed an issue where "run" type based tasks would not run in CI.

## 2.0.1

#### 🚀 Updates

- Updated `moon upgrade` to upgrade via proto if we detect that moon is managed by proto. This will
  run `proto install moon latest`.

#### 🐞 Fixes

- Fixed some WASM serialization errors.
- Fixed the `moon upgrade` command not handling the new v2 distribution format correctly. If you are
  on moon v2.0.0, the upgrade command will still be broken until you upgrade to this patch.

## 2.0.0

#### 💥 Breaking

View the [migration guide](https://moonrepo.dev/docs/migrate/2.0) for a full list of breaking
changes and how to easily migrate!

- Renamed "touched files" to "changed files".

- **CLI**
  - Removed canary and nightly releases.
  - Removed commands: `moon node`, `moon migrate from-package-json`, `moon query hash`,
    `moon query hash-diff`
  - Renamed all options and flags to kebab-case instead of camelCase.
  - Reworked many commands and their arguments. Refer to the migration guide for details.
  - Reworked console output handling. Updated `--summary` with different levels.
  - Reworked release distribution to use archives instead of direct executables.
- **Configuration**
  - Renamed, removed, or changed _many_ settings. Refer to the migration guide for details.
  - Renamed `.moon/toolchain.yml` to `.moon/toolchains.yml` (plural).
- **MCP**
  - Updated protocol version to 2025-11-25.
  - Updated `get_projects` and `get_tasks` to return fragments, to reduce the payload size.
- **Projects**
  - Reworked how the `language` is detected.
  - Flattened `project` metadata structure.
- **Tasks**
  - Task inheritance now deep merges instead of shallow merges when dealing with extends and
    multi-global.
  - Task `command` and `args` only support simple commands now. Use `script` for compound commands
    (pipes, redirects, multiple commands, etc).
  - Removed "watcher" task `preset`.
  - Reworked env var merge order, substitution, and more. Refer to the migration guide for details.
  - Reworked `.env` handling.
    - Moved loading to occur before task execution, instead of creation.
    - Can _no longer_ reference task `env` vars for substitution.
- **Toolchain**
  - Removed the old platform system, and replaced it with the new WASM plugin system.
    - All old "stable" toolchains have been replaced with the new "unstable" toolchains.
- **VCS**
  - Reworked the hooks layer for better interoperability.
- **WASM API**
  - Removed the `/cwd` virtual path.
  - Renamed `ProjectFragment.alias` to `ProjectFragment.aliases` and changed its type from
    `Option<String>` to `Vec<String>`.
  - Removed `RegisterExtensionOutput.config_schema` field. Use the new `define_extension_config`
    plugin function instead.

#### 🚀 Updates

View the [announcement blog post](https://moonrepo.dev/blog/moon-v2.0) for all updates, new
features, improvements, and much more!

- **Action pipeline**
  - Will now always generate a hash for a task, even if caching is disabled.
  - Applies "transitive reduction" to the graph, removing unnecessary edges for better performance.
  - Improved console output, logging, and error handling.
  - Improved parallelism when running tasks.
    - Now resolves and expands targets _before_ partitioning.
    - Now partitions _after_ filtering based on affected state.
- **CLI**
  - New commands: `moon exec`, `moon extension`, `moon hash`, `moon projects`, `moon tasks`,
    `moon query affected`, `moon template`
  - Updated commands `moon check`, `moon ci`, and `moon run`:
    - Now uses `moon exec` under the hood.
    - Added levels to `--summary`.
  - Updated commands that require an identifier to prompt for it if not provided.
  - Stabilized the `moonx` binary (which uses `moon exec` under the hood).
  - Added support for `.config/moon` instead of `.moon`.
  - Added support for `...` in task targets, which is an alias for `**/*`. This is similar to how
    Bazel targets work.
  - Improved stack memory usage by pushing thread data to the heap. This resolves spurious stack
    overflow issues.
- **Configuration**
  - Added support for more formats: JSON, TOML, and HCL.
  - Improved error messages for union based settings.
  - `.moon/extensions.*`
    - New file for configuring extensions (formerly in `workspace.extensions`).
  - `.moon/tasks.*`
    - Added `inheritedBy` setting for configuration based task inheritance.
  - `.moon/workspace.*`
    - Added `projects.globFormat` setting.
    - Added `defaultProject` setting.
    - Stabilized remote caching.
  - `moon.*`
    - Added `mergeToolchains` task option.
    - Added "utility" task `preset`.
    - Added "data" `stack`.
- **Docker**
  - Better toolchain integration.
  - Added `--no-setup` and `--template` support to `moon docker file`.
  - Updated project configs to override workspace configs.
- **Extensions**
  - Added a new extension, `unpack`, for unpacking archive files.
  - Added `.moon/extensions.*` configuration file.
  - Added support for new plugin APIs: `define_extension_config`, `extend_command`,
    `extend_project_graph`, `extend_task_command`, `extend_task_script`, `sync_project`, and
    `sync_workspace`.
- **MCP**
  - Added a `generate` tool for running the code generator.
- **Projects**
  - Added a default project concept.
  - Added path based IDs instead of dir name IDs.
  - Updated projects to support multiple aliases (one from each applicable toolchain).
- **Remote cache**
  - Stabilized all settings.
  - Enabled gzip/zstd compression for HTTP requests.
- **Tasks**
  - Added deep merging support for task inheritance.
  - Updated `command` and `args` with better syntax parsing and error handling.
    - Better handling of quotes, escapes, and spaces.
    - Extracts env vars into the task.
  - Updated `env` values to support `null`, which would remove an inherited system env var.
  - Updated `envFile` option to support token/var substitution.
  - Improved `.env` handling:
    - Updated the parser to support more syntax.
    - Updated loading to occur before task execution, instead of creation.
    - Can now reference system/moon/task env vars for substitution.
- **Toolchains**
  - Stabilized the new WASM plugin system.
  - Improved how toolchains extend env vars and paths for commands and scripts.
- **Tokens**
  - Added new tokens: `$projectTitle`, `$projectAliases`, `$taskToolchains`
- **VCS**
  - Replaced the old v1 Git implementation with a new v2 implementation.
  - Improved support for worktrees, submodules, and more.
- **WASM API**
  - Added a `load_extension_config_by_id` host function.
  - Added `define_extension_config`, `initialize_extension`, and `extend_command` plugin functions.
  - Added `load_extension_config`, `parse_extension_config` and `parse_extension_config_schema`
    utility functions.
  - Added `DefineExtensionConfigOutput`, `InitializeExtensionInput`, `InitializeExtensionOutput`,
    `ExtendCommandInput`, and `ExtendCommandOutput` types.
  - Added `ExtendProjectGraphInput.extension_config`, `ExtendTaskCommandInput.extension_config`,
    `ExtendTaskScriptInput.extension_config`, `SyncProjectInput.extension_config`, and
    `SyncWorkspaceInput.extension_config` fields.
  - Added `RegisterToolchainOutput.language` field.

#### 🧩 Extensions

- **Migrate Nx**
  - Added support for the following `project.json` fields: `targets.*.continuous`
- **Migrate Turborepo**
  - Added support for the following `turbo.json` fields: `tags`, `tasks.*.env` (wildcards and
    negation)
- **Unpack**
  - Updated to use `unzip` and `tar` commands.

#### 🧰 Toolchains

- **JavaScript**
  - Added support for Yarn v4.10 catalogs.
  - Fixed an issue where implicit dependencies would sometimes not resolve.

#### 🐞 Fixes

- Fixed local executables in `@moonrepo` packages not being detected correctly.
- Fixed task job parallelism to partition _after_ tasks have been filtered based on affected state.
- Fixed an issue where env var substitution would not process in the order they were defined.
- Fixed an issue where ctrl+c wouldn't exit when a prompt was waiting for input.
- Fixed an issue where `project` based task inputs would not be reflected internally in the input
  files/globs list.
- Fixed an issue where running a task that triggers a system/moon error wouldn't output the error
  message. This also aborts the action pipeline correctly now.
- Fixed an issue where errors during project graph building would not be reported correctly.
- Fixed an issue where a negated glob in a file group would not expand properly when used as an
  argument.

#### ⚙️ Internal

- Updated proto to [v0.55.2](https://github.com/moonrepo/proto/releases/tag/v0.55.0) from 0.53.2
  (view [v0.54](https://github.com/moonrepo/proto/releases/tag/v0.54.0) changes).
- Updated wasmtime to v37.
- Updated Rust to v1.93.0.
- Updated dependencies.
