Compare commits

..

4 Commits

Author SHA1 Message Date
Valentin Maerten
24a3ccdf42 chore: changelog for #2871 2026-06-07 16:39:02 +02:00
Christian Provenzano
b455286b63 fix: deterministic ordering of required var prompts (#2871) 2026-06-07 16:36:58 +02:00
Valentin Maerten
81d621d8aa chore: add mise config for dev environment setup (#2863)
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
2026-06-07 14:46:01 +02:00
dependabot[bot]
f50327f2a2 chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /website (#2846)
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-31 11:13:28 +02:00
7 changed files with 49 additions and 44 deletions

View File

@@ -2,13 +2,14 @@
## Unreleased
- Fixed --interactive prompts for required vars sometimes appearing in a random
order. Prompts now follow the order the vars are declared in the Taskfile.
(#2871 by @caproven)
- Fixed Fish completions not being picked up correctly by installing them to
Fish's `vendor_completions.d` directory instead of `completions` (#2850, #2859
by @Legimity).
- PowerShell completions now work with aliases of the `task` command, not just
the `task` binary itself (#2852 by @kojiishi).
- Fixed task and namespace aliases not being completed by the Zsh completion.
A `show-aliases` zstyle can turn this off (#2865, #2864 by @vmaerten).
## v3.51.1 - 2026-05-16
@@ -18,9 +19,9 @@
cleaning `..` and `.` components (#2681, #2788 by @mateenanjum).
- Added `joinEnv` function to join paths based on your oprating system: `;` for
Windows and `:` elsewhere, and `joinUrl` to join URL paths. Also, added two
new special variables: `FILE_PATH_SEPARATOR` which returns `\` on Windows
and `/` elsewhere, and `PATH_LIST_SEPARATOR` which returns `;` on Windows and
`:` elsewhere (#2406, #2408 by @solvingj).
new special variables: `FILE_PATH_SEPARATOR` which returns `\` on Windows and
`/` elsewhere, and `PATH_LIST_SEPARATOR` which returns `;` on Windows and `:`
elsewhere (#2406, #2408 by @solvingj).
- Update the shell interpreter with a regression fix (#2812, #2832 by
@andreynering).
- Fix potential panic with the shell interpreter (#2810 by @trulede).
@@ -36,13 +37,13 @@
- Fixed watch mode ignoring SIGHUP signal, causing the watcher to exit instead
of restarting (#2764, #2642).
- Fixed a long time bug where the task wouldn't re-run as it should when using
`method: timestamp` and the files listed on `generates:` were deleted.
This makes `method: timestamp` behaves the same as `method: checksum`
(#1230, #2716 by @drichardson).
`method: timestamp` and the files listed on `generates:` were deleted. This
makes `method: timestamp` behaves the same as `method: checksum` (#1230, #2716
by @drichardson).
## v3.49.1 - 2026-03-08
* Reverted #2632 for now, which caused some regressions. That change will be
- Reverted #2632 for now, which caused some regressions. That change will be
reworked (#2720, #2722, #2723).
## v3.49.0 - 2026-03-07

View File

@@ -13,9 +13,9 @@ function __task_is_experiment_enabled() {
# Listing commands from Taskfile.yml
function __task_list() {
local -a scripts cmd task_aliases match mbegin mend
local -a scripts cmd
local -i enabled=0
local taskfile item task desc task_alias
local taskfile item task desc
cmd=($TASK_CMD)
taskfile=${(Qv)opt_args[(i)-t|--taskfile]}
@@ -50,31 +50,14 @@ function __task_list() {
local show_desc
zstyle -T ":completion:${curcontext}:" verbose && show_desc=true || show_desc=false
# Read zstyle show-aliases option (default = true via -T)
local show_aliases
zstyle -T ":completion:${curcontext}:" show-aliases && show_aliases=true || show_aliases=false
for item in "${(@)${(f)output}[2,-1]#\* }"; do
task="${item%%:[[:space:]]*}"
# Extract the aliases listed in the trailing "(aliases: a, b)" column.
# NB: `aliases` is a reserved zsh parameter, so use a different name.
task_aliases=()
if [[ "$show_aliases" == "true" && "$item" == (#b)*'(aliases: '(*)')' ]]; then
task_aliases=( "${(@s:, :)match[1]}" )
fi
if [[ "$show_desc" == "true" ]]; then
local desc="${item##[^[:space:]]##[[:space:]]##}"
scripts+=( "${task//:/\\:}:$desc" )
for task_alias in $task_aliases; do
scripts+=( "${task_alias//:/\\:}:$desc" )
done
else
scripts+=( "$task" )
for task_alias in $task_aliases; do
scripts+=( "$task_alias" )
done
fi
done

12
mise.toml Normal file
View File

@@ -0,0 +1,12 @@
[tools]
# Runtimes
go = "1.25.10"
node = "24"
pnpm = "11.5.0"
# Dev tools
golangci-lint = "2.12.2"
mockery = "3.2.2"
gotestsum = "latest"
goreleaser = "2"
"go:golang.org/x/exp/cmd/gorelease" = "latest"

View File

@@ -3,6 +3,8 @@ package task
import (
"slices"
"github.com/elliotchance/orderedmap/v3"
"github.com/go-task/task/v3/errors"
"github.com/go-task/task/v3/internal/input"
"github.com/go-task/task/v3/internal/term"
@@ -32,7 +34,7 @@ func (e *Executor) promptDepsVars(calls []*Call) error {
// Collect all missing vars from the dependency tree
visited := make(map[string]bool)
varsMap := make(map[string]*ast.VarsWithValidation)
varsMap := orderedmap.NewOrderedMap[string, *ast.VarsWithValidation]()
var collect func(call *Call) error
collect = func(call *Call) error {
@@ -42,8 +44,8 @@ func (e *Executor) promptDepsVars(calls []*Call) error {
}
for _, v := range getMissingRequiredVars(compiledTask) {
if _, exists := varsMap[v.Name]; !exists {
varsMap[v.Name] = v
if !varsMap.Has(v.Name) {
varsMap.Set(v.Name, v)
}
}
@@ -73,14 +75,14 @@ func (e *Executor) promptDepsVars(calls []*Call) error {
}
}
if len(varsMap) == 0 {
if varsMap.Len() == 0 {
return nil
}
prompter := e.newPrompter()
e.promptedVars = ast.NewVars()
for _, v := range varsMap {
for v := range varsMap.Values() {
value, err := prompter.Prompt(v.Name, getEnumValues(v.Enum))
if err != nil {
if errors.Is(err, input.ErrCancelled) {

View File

@@ -3428,8 +3428,8 @@ packages:
mdast-util-phrasing@4.1.0:
resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==}
mdast-util-to-hast@13.2.0:
resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==}
mdast-util-to-hast@13.2.1:
resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==}
mdast-util-to-markdown@2.1.2:
resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==}
@@ -8215,7 +8215,7 @@ snapshots:
comma-separated-tokens: 2.0.3
hast-util-whitespace: 3.0.0
html-void-elements: 3.0.0
mdast-util-to-hast: 13.2.0
mdast-util-to-hast: 13.2.1
property-information: 7.1.0
space-separated-tokens: 2.0.2
stringify-entities: 4.0.4
@@ -8843,7 +8843,7 @@ snapshots:
'@types/mdast': 4.0.4
unist-util-is: 6.0.1
mdast-util-to-hast@13.2.0:
mdast-util-to-hast@13.2.1:
dependencies:
'@types/hast': 3.0.4
'@types/mdast': 4.0.4

View File

@@ -65,6 +65,19 @@ a human. Always remind contributors to disclose AI usage in their submissions.
## 1. Setup
The easiest way to install everything you need to work on Task is
[mise][mise]. From the repository root, run:
```shell
mise install
```
This installs the pinned versions of Go, Node.js, pnpm and the dev tools
(`golangci-lint`, `mockery`, `gotestsum`, `goreleaser` and `gorelease`)
declared in the `mise.toml` file.
If you'd rather install things manually, you'll need:
- **Go** - Task is written in [Go][go]. We always support the latest two major
Go versions, so make sure your version is recent enough.
- **Node.js** - [Node.js][nodejs] is used to host Task's documentation server
@@ -194,6 +207,7 @@ If you have questions, feel free to ask them in the `#help` forum channel on our
[prettier]: https://prettier.io
[nodejs]: https://nodejs.org/en/
[pnpm]: https://pnpm.io/
[mise]: https://mise.jdx.dev
[vitepress]: https://vitepress.dev
[json-schema]:
https://github.com/go-task/task/blob/main/website/src/public/schema.json

View File

@@ -439,10 +439,3 @@ names without descriptions, add this to your `~/.zshrc` (after the completion is
```shell
zstyle ':completion:*:*:task:*' verbose false
```
By default, task aliases are also offered as completions. To complete only the
canonical task names, add the `show-aliases` zstyle:
```shell
zstyle ':completion:*:*:task:*' show-aliases false
```