Skip to content

Commit cd08622

Browse files
committed
v3.42.0
1 parent 1b8b399 commit cd08622

17 files changed

+410
-95
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## Unreleased
3+
## v3.42.0 - 2025-03-08
44

55
- Made `--init` less verbose by default and respect `--silent` and `--verbose`
66
flags (#2009, #2011 by @HeCorr).

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@go-task/cli",
3-
"version": "3.41.0",
3+
"version": "3.42.0",
44
"description": "A task runner / simpler Make alternative written in Go",
55
"scripts": {
66
"postinstall": "go-npm install",

website/docs/changelog.mdx

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,89 @@ sidebar_position: 14
55

66
# Changelog
77

8+
## v3.42.0 - 2025-03-08
9+
10+
- Made `--init` less verbose by default and respect `--silent` and `--verbose`
11+
flags (#2009, #2011 by @HeCorr).
12+
- `--init` now accepts a file name or directory as an argument (#2008, #2018 by
13+
@HeCorr).
14+
- Fix a bug where an HTTP node's location was being mutated incorrectly (#2007
15+
by @jeongukjae).
16+
- Fixed a bug where allowed values didn't work with dynamic var (#2032, #2033 by
17+
@vmaerten).
18+
- Use only the relevant checker (timestamp or checksum) to improve performance
19+
(#2029, #2031 by @vmaerten).
20+
- Print warnings when attempting to enable an inactive experiment or an active
21+
experiment with an invalid value (#1979, #2049 by @pd93).
22+
- Refactored the experiments package and added tests (#2049 by @pd93).
23+
- Show allowed values when a variable with an enum is missing (#2027, #2052 by
24+
@vmaerten).
25+
- Refactored how snippets in error work and added tests (#2068 by @pd93).
26+
- Fixed a bug where errors decoding commands were sometimes unhelpful (#2068 by
27+
@pd93).
28+
- Fixed a bug in the Taskfile schema where `defer` statements in the shorthand
29+
`cmds` syntax were not considered valid (#2068 by @pd93).
30+
- Refactored how task sorting functions work (#1798 by @pd93).
31+
- Added a new `.taskrc.yml` (or `.taskrc.yaml`) file to let users enable
32+
experiments (similar to `.env`) (#1982 by @vmaerten).
33+
- Added new [Getting Started docs](https://taskfile.dev/getting-started) (#2086
34+
by @pd93).
35+
- Allow `matrix` to use references to other variables (#2065, #2069 by @pd93).
36+
- Fixed a bug where, when a dynamic variable is provided, even if it is not
37+
used, all other variables become unavailable in the templating system within
38+
the include (#2092 by @vmaerten).
39+
40+
#### Package API
41+
42+
Unlike our CLI tool,
43+
[Task's package API is not currently stable](https://taskfile.dev/reference/package).
44+
In an effort to ease the pain of breaking changes for our users, we will be
45+
providing changelogs for our package API going forwards. The hope is that these
46+
changes will provide a better long-term experience for our users and allow to
47+
stabilize the API in the future. #121 now tracks this piece of work.
48+
49+
- Bumped the minimum required Go version to 1.23 (#2059 by @pd93).
50+
- [`task.InitTaskfile`](https://pkg.go.dev/github.com/go-task/task/v3#InitTaskfile)
51+
(#2011, ff8c913 by @HeCorr and @pd93)
52+
- No longer accepts an `io.Writer` (output is now the caller's
53+
responsibility).
54+
- The path argument can now be a filename OR a directory.
55+
- The function now returns the full path of the generated file.
56+
- [`TaskfileDecodeError.WithFileInfo`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskfileDecodeError.WithFileInfo)
57+
now accepts a string instead of the arguments required to generate a snippet
58+
(#2068 by @pd93).
59+
- The caller is now expected to create the snippet themselves (see below).
60+
- [`TaskfileSnippet`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Snippet)
61+
and related code moved from the `errors` package to the `taskfile` package
62+
(#2068 by @pd93).
63+
- Renamed `TaskMissingRequiredVars` to
64+
[`TaskMissingRequiredVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskMissingRequiredVarsError)
65+
(#2052 by @vmaerten).
66+
- Renamed `TaskNotAllowedVars` to
67+
[`TaskNotAllowedVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskNotAllowedVarsError)
68+
(#2052 by @vmaerten).
69+
- The
70+
[`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
71+
is now constructed using the functional options pattern (#2082 by @pd93).
72+
- Removed our internal `logger.Logger` from the entire `taskfile` package (#2082
73+
by @pd93).
74+
- Users are now expected to pass a custom debug/prompt functions into
75+
[`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
76+
if they want this functionality by using the new
77+
[`WithDebugFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithDebugFunc)
78+
and
79+
[`WithPromptFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithPromptFunc)
80+
functional options.
81+
- Remove `Range` functions in the `taskfile/ast` package in favour of new
82+
iterator functions (#1798 by @pd93).
83+
- `ast.Call` was moved from the `taskfile/ast` package to the main `task`
84+
package (#2084 by @pd93).
85+
- `ast.Tasks.FindMatchingTasks` was moved from the `taskfile/ast` package to the
86+
`task.Executor.FindMatchingTasks` in the main `task` package (#2084 by @pd93).
87+
- The `Compiler` and its `GetVariables` and `FastGetVariables` methods were
88+
moved from the `internal/compiler` package to the main `task` package (#2084
89+
by @pd93).
90+
891
## v3.41.0 - 2025-01-18
992

1093
- Fixed an issue where dynamic variables were not properly logged in verbose

website/versioned_docs/version-latest/changelog.mdx

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,89 @@ sidebar_position: 14
55

66
# Changelog
77

8+
## v3.42.0 - 2025-03-08
9+
10+
- Made `--init` less verbose by default and respect `--silent` and `--verbose`
11+
flags (#2009, #2011 by @HeCorr).
12+
- `--init` now accepts a file name or directory as an argument (#2008, #2018 by
13+
@HeCorr).
14+
- Fix a bug where an HTTP node's location was being mutated incorrectly (#2007
15+
by @jeongukjae).
16+
- Fixed a bug where allowed values didn't work with dynamic var (#2032, #2033 by
17+
@vmaerten).
18+
- Use only the relevant checker (timestamp or checksum) to improve performance
19+
(#2029, #2031 by @vmaerten).
20+
- Print warnings when attempting to enable an inactive experiment or an active
21+
experiment with an invalid value (#1979, #2049 by @pd93).
22+
- Refactored the experiments package and added tests (#2049 by @pd93).
23+
- Show allowed values when a variable with an enum is missing (#2027, #2052 by
24+
@vmaerten).
25+
- Refactored how snippets in error work and added tests (#2068 by @pd93).
26+
- Fixed a bug where errors decoding commands were sometimes unhelpful (#2068 by
27+
@pd93).
28+
- Fixed a bug in the Taskfile schema where `defer` statements in the shorthand
29+
`cmds` syntax were not considered valid (#2068 by @pd93).
30+
- Refactored how task sorting functions work (#1798 by @pd93).
31+
- Added a new `.taskrc.yml` (or `.taskrc.yaml`) file to let users enable
32+
experiments (similar to `.env`) (#1982 by @vmaerten).
33+
- Added new [Getting Started docs](https://taskfile.dev/getting-started) (#2086
34+
by @pd93).
35+
- Allow `matrix` to use references to other variables (#2065, #2069 by @pd93).
36+
- Fixed a bug where, when a dynamic variable is provided, even if it is not
37+
used, all other variables become unavailable in the templating system within
38+
the include (#2092 by @vmaerten).
39+
40+
#### Package API
41+
42+
Unlike our CLI tool,
43+
[Task's package API is not currently stable](https://taskfile.dev/reference/package).
44+
In an effort to ease the pain of breaking changes for our users, we will be
45+
providing changelogs for our package API going forwards. The hope is that these
46+
changes will provide a better long-term experience for our users and allow to
47+
stabilize the API in the future. #121 now tracks this piece of work.
48+
49+
- Bumped the minimum required Go version to 1.23 (#2059 by @pd93).
50+
- [`task.InitTaskfile`](https://pkg.go.dev/github.com/go-task/task/v3#InitTaskfile)
51+
(#2011, ff8c913 by @HeCorr and @pd93)
52+
- No longer accepts an `io.Writer` (output is now the caller's
53+
responsibility).
54+
- The path argument can now be a filename OR a directory.
55+
- The function now returns the full path of the generated file.
56+
- [`TaskfileDecodeError.WithFileInfo`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskfileDecodeError.WithFileInfo)
57+
now accepts a string instead of the arguments required to generate a snippet
58+
(#2068 by @pd93).
59+
- The caller is now expected to create the snippet themselves (see below).
60+
- [`TaskfileSnippet`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Snippet)
61+
and related code moved from the `errors` package to the `taskfile` package
62+
(#2068 by @pd93).
63+
- Renamed `TaskMissingRequiredVars` to
64+
[`TaskMissingRequiredVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskMissingRequiredVarsError)
65+
(#2052 by @vmaerten).
66+
- Renamed `TaskNotAllowedVars` to
67+
[`TaskNotAllowedVarsError`](https://pkg.go.dev/github.com/go-task/task/v3/errors#TaskNotAllowedVarsError)
68+
(#2052 by @vmaerten).
69+
- The
70+
[`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
71+
is now constructed using the functional options pattern (#2082 by @pd93).
72+
- Removed our internal `logger.Logger` from the entire `taskfile` package (#2082
73+
by @pd93).
74+
- Users are now expected to pass a custom debug/prompt functions into
75+
[`taskfile.Reader`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#Reader)
76+
if they want this functionality by using the new
77+
[`WithDebugFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithDebugFunc)
78+
and
79+
[`WithPromptFunc`](https://pkg.go.dev/github.com/go-task/task/v3/taskfile#WithPromptFunc)
80+
functional options.
81+
- Remove `Range` functions in the `taskfile/ast` package in favour of new
82+
iterator functions (#1798 by @pd93).
83+
- `ast.Call` was moved from the `taskfile/ast` package to the main `task`
84+
package (#2084 by @pd93).
85+
- `ast.Tasks.FindMatchingTasks` was moved from the `taskfile/ast` package to the
86+
`task.Executor.FindMatchingTasks` in the main `task` package (#2084 by @pd93).
87+
- The `Compiler` and its `GetVariables` and `FastGetVariables` methods were
88+
moved from the `internal/compiler` package to the main `task` package (#2084
89+
by @pd93).
90+
891
## v3.41.0 - 2025-01-18
992

1093
- Fixed an issue where dynamic variables were not properly logged in verbose

website/versioned_docs/version-latest/community.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: /community/
3-
sidebar_position: 9
3+
sidebar_position: 10
44
---
55

66
# Community

website/versioned_docs/version-latest/contributing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: /contributing/
3-
sidebar_position: 11
3+
sidebar_position: 12
44
---
55

66
# Contributing

website/versioned_docs/version-latest/deprecations/deprecations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: /deprecations/
3-
sidebar_position: 7
3+
sidebar_position: 8
44
---
55

66
# Deprecations

website/versioned_docs/version-latest/experiments/experiments.mdx

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
22
slug: /experiments/
3-
sidebar_position: 6
3+
sidebar_position: 7
44
---
55

6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
69
# Experiments
710

811
:::caution
@@ -39,23 +42,41 @@ Which method you use depends on how you intend to use the experiment:
3942
1. Prefixing your task commands with the relevant environment variable(s). For
4043
example, `TASK_X_{FEATURE}=1 task {my-task}`. This is intended for one-off
4144
invocations of Task to test out experimental features.
42-
1. Adding the relevant environment variable(s) in your "dotfiles" (e.g.
45+
2. Adding the relevant environment variable(s) in your "dotfiles" (e.g.
4346
`.bashrc`, `.zshrc` etc.). This will permanently enable experimental features
4447
for your personal environment.
4548

4649
```shell title="~/.bashrc"
4750
export TASK_X_FEATURE=1
4851
```
4952

50-
1. Creating a `.env` file in the same directory as your root Taskfile that
51-
contains the relevant environment variable(s). This allows you to enable an
52-
experimental feature at a project level. If you commit the `.env` file to
53-
source control then other users of your project will also have these
54-
experiments enabled.
55-
56-
```shell title=".env"
57-
TASK_X_FEATURE=1
58-
```
53+
3. Creating a `.env` or a `.task-experiments.yml` file in the same directory as
54+
your root Taskfile.\
55+
The `.env` file should contain the relevant environment
56+
variable(s), while the `.task-experiments.yml` file should use a YAML format
57+
where each experiment is defined as a key with a corresponding value.
58+
59+
This allows you to enable an experimental feature at a project level. If you
60+
commit this file to source control, then other users of your project will
61+
also have these experiments enabled.
62+
63+
If both files are present, the values in the `.task-experiments.yml` file
64+
will take precedence.
65+
66+
<Tabs values={[ {label: '.task-experiments.yml', value: 'yaml'}, {label: '.env', value: 'env'}]}>
67+
<TabItem value="yaml">
68+
```yaml title=".taskrc.yml"
69+
experiments:
70+
FEATURE: 1
71+
```
72+
</TabItem>
73+
74+
<TabItem value="env">
75+
```shell title=".env"
76+
TASK_X_FEATURE=1
77+
```
78+
</TabItem>
79+
</Tabs>
5980

6081
## Workflow
6182

0 commit comments

Comments
 (0)