diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6eb18a73..5f27b45b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
# Changelog
-## Unreleased
+## v3.42.0 - 2025-03-08
- Made `--init` less verbose by default and respect `--silent` and `--verbose`
flags (#2009, #2011 by @HeCorr).
diff --git a/package-lock.json b/package-lock.json
index 1624fdf2..75785efb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@go-task/cli",
- "version": "3.41.0",
+ "version": "3.42.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
diff --git a/package.json b/package.json
index da587753..b80d2afe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@go-task/cli",
- "version": "3.41.0",
+ "version": "3.42.0",
"description": "A task runner / simpler Make alternative written in Go",
"scripts": {
"postinstall": "go-npm install",
diff --git a/website/docs/changelog.mdx b/website/docs/changelog.mdx
index ff72992f..d326b9b8 100644
--- a/website/docs/changelog.mdx
+++ b/website/docs/changelog.mdx
@@ -5,6 +5,89 @@ sidebar_position: 14
# Changelog
+## v3.42.0 - 2025-03-08
+
+- Made `--init` less verbose by default and respect `--silent` and `--verbose`
+ flags (#2009, #2011 by @HeCorr).
+- `--init` now accepts a file name or directory as an argument (#2008, #2018 by
+ @HeCorr).
+- Fix a bug where an HTTP node's location was being mutated incorrectly (#2007
+ by @jeongukjae).
+- Fixed a bug where allowed values didn't work with dynamic var (#2032, #2033 by
+ @vmaerten).
+- Use only the relevant checker (timestamp or checksum) to improve performance
+ (#2029, #2031 by @vmaerten).
+- Print warnings when attempting to enable an inactive experiment or an active
+ experiment with an invalid value (#1979, #2049 by @pd93).
+- Refactored the experiments package and added tests (#2049 by @pd93).
+- Show allowed values when a variable with an enum is missing (#2027, #2052 by
+ @vmaerten).
+- Refactored how snippets in error work and added tests (#2068 by @pd93).
+- Fixed a bug where errors decoding commands were sometimes unhelpful (#2068 by
+ @pd93).
+- Fixed a bug in the Taskfile schema where `defer` statements in the shorthand
+ `cmds` syntax were not considered valid (#2068 by @pd93).
+- Refactored how task sorting functions work (#1798 by @pd93).
+- Added a new `.taskrc.yml` (or `.taskrc.yaml`) file to let users enable
+ experiments (similar to `.env`) (#1982 by @vmaerten).
+- Added new [Getting Started docs](https://taskfile.dev/getting-started) (#2086
+ by @pd93).
+- Allow `matrix` to use references to other variables (#2065, #2069 by @pd93).
+- Fixed a bug where, when a dynamic variable is provided, even if it is not
+ used, all other variables become unavailable in the templating system within
+ the include (#2092 by @vmaerten).
+
+#### Package API
+
+Unlike our CLI tool,
+[Task's package API is not currently stable](https://taskfile.dev/reference/package).
+In an effort to ease the pain of breaking changes for our users, we will be
+providing changelogs for our package API going forwards. The hope is that these
+changes will provide a better long-term experience for our users and allow to
+stabilize the API in the future. #121 now tracks this piece of work.
+
+- Bumped the minimum required Go version to 1.23 (#2059 by @pd93).
+- [`task.InitTaskfile`](https://pkg.go.dev/github.com/go-task/task/v3#InitTaskfile)
+ (#2011, ff8c913 by @HeCorr and @pd93)
+ - No longer accepts an `io.Writer` (output is now the caller's
+ responsibility).
+ - The path argument can now be a filename OR a directory.
+ - The function now returns the full path of the generated file.
+- [`TaskfileDecodeError.WithFileInfo`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskfileDecodeError.WithFileInfo)
+ now accepts a string instead of the arguments required to generate a snippet
+ (#2068 by @pd93).
+ - The caller is now expected to create the snippet themselves (see below).
+- [`TaskfileSnippet`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Snippet)
+ and related code moved from the `errors` package to the `taskfile` package
+ (#2068 by @pd93).
+- Renamed `TaskMissingRequiredVars` to
+ [`TaskMissingRequiredVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskMissingRequiredVarsError)
+ (#2052 by @vmaerten).
+- Renamed `TaskNotAllowedVars` to
+ [`TaskNotAllowedVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskNotAllowedVarsError)
+ (#2052 by @vmaerten).
+- The
+ [`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
+ is now constructed using the functional options pattern (#2082 by @pd93).
+- Removed our internal `logger.Logger` from the entire `taskfile` package (#2082
+ by @pd93).
+ - Users are now expected to pass a custom debug/prompt functions into
+ [`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
+ if they want this functionality by using the new
+ [`WithDebugFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithDebugFunc)
+ and
+ [`WithPromptFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithPromptFunc)
+ functional options.
+- Remove `Range` functions in the `taskfile/ast` package in favour of new
+ iterator functions (#1798 by @pd93).
+- `ast.Call` was moved from the `taskfile/ast` package to the main `task`
+ package (#2084 by @pd93).
+- `ast.Tasks.FindMatchingTasks` was moved from the `taskfile/ast` package to the
+ `task.Executor.FindMatchingTasks` in the main `task` package (#2084 by @pd93).
+- The `Compiler` and its `GetVariables` and `FastGetVariables` methods were
+ moved from the `internal/compiler` package to the main `task` package (#2084
+ by @pd93).
+
## v3.41.0 - 2025-01-18
- Fixed an issue where dynamic variables were not properly logged in verbose
diff --git a/website/versioned_docs/version-latest/changelog.mdx b/website/versioned_docs/version-latest/changelog.mdx
index ff72992f..d326b9b8 100644
--- a/website/versioned_docs/version-latest/changelog.mdx
+++ b/website/versioned_docs/version-latest/changelog.mdx
@@ -5,6 +5,89 @@ sidebar_position: 14
# Changelog
+## v3.42.0 - 2025-03-08
+
+- Made `--init` less verbose by default and respect `--silent` and `--verbose`
+ flags (#2009, #2011 by @HeCorr).
+- `--init` now accepts a file name or directory as an argument (#2008, #2018 by
+ @HeCorr).
+- Fix a bug where an HTTP node's location was being mutated incorrectly (#2007
+ by @jeongukjae).
+- Fixed a bug where allowed values didn't work with dynamic var (#2032, #2033 by
+ @vmaerten).
+- Use only the relevant checker (timestamp or checksum) to improve performance
+ (#2029, #2031 by @vmaerten).
+- Print warnings when attempting to enable an inactive experiment or an active
+ experiment with an invalid value (#1979, #2049 by @pd93).
+- Refactored the experiments package and added tests (#2049 by @pd93).
+- Show allowed values when a variable with an enum is missing (#2027, #2052 by
+ @vmaerten).
+- Refactored how snippets in error work and added tests (#2068 by @pd93).
+- Fixed a bug where errors decoding commands were sometimes unhelpful (#2068 by
+ @pd93).
+- Fixed a bug in the Taskfile schema where `defer` statements in the shorthand
+ `cmds` syntax were not considered valid (#2068 by @pd93).
+- Refactored how task sorting functions work (#1798 by @pd93).
+- Added a new `.taskrc.yml` (or `.taskrc.yaml`) file to let users enable
+ experiments (similar to `.env`) (#1982 by @vmaerten).
+- Added new [Getting Started docs](https://taskfile.dev/getting-started) (#2086
+ by @pd93).
+- Allow `matrix` to use references to other variables (#2065, #2069 by @pd93).
+- Fixed a bug where, when a dynamic variable is provided, even if it is not
+ used, all other variables become unavailable in the templating system within
+ the include (#2092 by @vmaerten).
+
+#### Package API
+
+Unlike our CLI tool,
+[Task's package API is not currently stable](https://taskfile.dev/reference/package).
+In an effort to ease the pain of breaking changes for our users, we will be
+providing changelogs for our package API going forwards. The hope is that these
+changes will provide a better long-term experience for our users and allow to
+stabilize the API in the future. #121 now tracks this piece of work.
+
+- Bumped the minimum required Go version to 1.23 (#2059 by @pd93).
+- [`task.InitTaskfile`](https://pkg.go.dev/github.com/go-task/task/v3#InitTaskfile)
+ (#2011, ff8c913 by @HeCorr and @pd93)
+ - No longer accepts an `io.Writer` (output is now the caller's
+ responsibility).
+ - The path argument can now be a filename OR a directory.
+ - The function now returns the full path of the generated file.
+- [`TaskfileDecodeError.WithFileInfo`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskfileDecodeError.WithFileInfo)
+ now accepts a string instead of the arguments required to generate a snippet
+ (#2068 by @pd93).
+ - The caller is now expected to create the snippet themselves (see below).
+- [`TaskfileSnippet`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Snippet)
+ and related code moved from the `errors` package to the `taskfile` package
+ (#2068 by @pd93).
+- Renamed `TaskMissingRequiredVars` to
+ [`TaskMissingRequiredVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskMissingRequiredVarsError)
+ (#2052 by @vmaerten).
+- Renamed `TaskNotAllowedVars` to
+ [`TaskNotAllowedVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskNotAllowedVarsError)
+ (#2052 by @vmaerten).
+- The
+ [`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
+ is now constructed using the functional options pattern (#2082 by @pd93).
+- Removed our internal `logger.Logger` from the entire `taskfile` package (#2082
+ by @pd93).
+ - Users are now expected to pass a custom debug/prompt functions into
+ [`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
+ if they want this functionality by using the new
+ [`WithDebugFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithDebugFunc)
+ and
+ [`WithPromptFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithPromptFunc)
+ functional options.
+- Remove `Range` functions in the `taskfile/ast` package in favour of new
+ iterator functions (#1798 by @pd93).
+- `ast.Call` was moved from the `taskfile/ast` package to the main `task`
+ package (#2084 by @pd93).
+- `ast.Tasks.FindMatchingTasks` was moved from the `taskfile/ast` package to the
+ `task.Executor.FindMatchingTasks` in the main `task` package (#2084 by @pd93).
+- The `Compiler` and its `GetVariables` and `FastGetVariables` methods were
+ moved from the `internal/compiler` package to the main `task` package (#2084
+ by @pd93).
+
## v3.41.0 - 2025-01-18
- Fixed an issue where dynamic variables were not properly logged in verbose
diff --git a/website/versioned_docs/version-latest/community.mdx b/website/versioned_docs/version-latest/community.mdx
index 316b4a17..a0d49b7c 100644
--- a/website/versioned_docs/version-latest/community.mdx
+++ b/website/versioned_docs/version-latest/community.mdx
@@ -1,6 +1,6 @@
---
slug: /community/
-sidebar_position: 9
+sidebar_position: 10
---
# Community
diff --git a/website/versioned_docs/version-latest/contributing.mdx b/website/versioned_docs/version-latest/contributing.mdx
index 2c820ffd..546129de 100644
--- a/website/versioned_docs/version-latest/contributing.mdx
+++ b/website/versioned_docs/version-latest/contributing.mdx
@@ -1,6 +1,6 @@
---
slug: /contributing/
-sidebar_position: 11
+sidebar_position: 12
---
# Contributing
diff --git a/website/versioned_docs/version-latest/deprecations/deprecations.mdx b/website/versioned_docs/version-latest/deprecations/deprecations.mdx
index aa5011a8..f09a95cb 100644
--- a/website/versioned_docs/version-latest/deprecations/deprecations.mdx
+++ b/website/versioned_docs/version-latest/deprecations/deprecations.mdx
@@ -1,6 +1,6 @@
---
slug: /deprecations/
-sidebar_position: 7
+sidebar_position: 8
---
# Deprecations
diff --git a/website/versioned_docs/version-latest/experiments/experiments.mdx b/website/versioned_docs/version-latest/experiments/experiments.mdx
index 8a665ce8..a3284ff8 100644
--- a/website/versioned_docs/version-latest/experiments/experiments.mdx
+++ b/website/versioned_docs/version-latest/experiments/experiments.mdx
@@ -1,8 +1,11 @@
---
slug: /experiments/
-sidebar_position: 6
+sidebar_position: 7
---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
# Experiments
:::caution
@@ -39,7 +42,7 @@ Which method you use depends on how you intend to use the experiment:
1. Prefixing your task commands with the relevant environment variable(s). For
example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off
invocations of Task to test out experimental features.
-1. Adding the relevant environment variable(s) in your "dotfiles" (e.g.
+2. Adding the relevant environment variable(s) in your "dotfiles" (e.g.
`.bashrc`, `.zshrc` etc.). This will permanently enable experimental features
for your personal environment.
@@ -47,15 +50,33 @@ Which method you use depends on how you intend to use the experiment:
export TASK_X_FEATURE=1
```
-1. Creating a `.env` file in the same directory as your root Taskfile that
- contains the relevant environment variable(s). This allows you to enable an
- experimental feature at a project level. If you commit the `.env` file to
- source control then other users of your project will also have these
- experiments enabled.
+3. Creating a `.env` or a `.task-experiments.yml` file in the same directory as
+ your root Taskfile.\
+ The `.env` file should contain the relevant environment
+ variable(s), while the `.task-experiments.yml` file should use a YAML format
+ where each experiment is defined as a key with a corresponding value.
- ```shell title=".env"
- TASK_X_FEATURE=1
- ```
+ This allows you to enable an experimental feature at a project level. If you
+ commit this file to source control, then other users of your project will
+ also have these experiments enabled.
+
+ If both files are present, the values in the `.task-experiments.yml` file
+ will take precedence.
+
+