Update dependency shfmt to v3.7.0
Created by: renovate[bot]
This PR contains the following updates:
Package | Update | New value | References | Sourcegraph |
---|---|---|---|---|
shfmt | minor | 3.7.0 | source |
Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR.
Release Notes
mvdan/sh (shfmt)
v3.7.0
- syntax
-
interp
- Add
ExecHandlers
to support layering multiple middlewares - #964 - Add initial support for the
select
clause - #969 - Support combining the
errexit
andpipefail
options - #870 - Set
EUID
just likeUID
- #958 - Replace panics on unimplemented builtins with errors - #999
- Tweak build tags to support building for
js/wasm
- #983
- Add
-
syntax/typedjson
- Avoid
reflect.Value.MethodByName
to reduce binary sizes - #961
- Avoid
v3.6.0
This release drops support for Go 1.17 and includes many features and fixes.
- cmd/shfmt
-
syntax
- Don't require peeking two bytes after
echo *
- [#835] - Simplify
${name:-}
to the equivalent${name-}
- [#849] - Don't print trailing whitespaces on nested subshells - [#814]
- Don't print extra newlines in some case clauses - [#779]
- Don't indent comments preceding case clause items - [#917]
- Allow escaped newlines before unquoted words again - [#873]
- Parse a redirections edge case without spaces - [#879]
- Give a helpful error when
<<<
is used in POSIX mode - [#881] - Forbid
${!foo*}
and${!foo@}
in mksh mode - [#929] - Batch allocations less aggressively in the parser
- Don't require peeking two bytes after
-
syntax/typedjson
- Expose
--from-json
and--to-json
as Go APIs - [#885]
- Expose
- expand
- interp
-
pattern
- Add
EntireString
to match the entire string using^$
- [#866]
- Add
v3.5.1
-
cmd/shfmt
- Fix the Docker publishing script bug which broke 3.5.0 - [#860]
- interp
-
pattern
-
Regexp
now returns the typed errorSyntaxError
- [#862]
-
v3.5.0
This release drops support for Go 1.16 and includes many new features.
-
cmd/shfmt
- Switch to
-ln=auto
by default to detect the shell language - Add support for long flags, like
--indent
for-i
- Switch to
-
syntax
- Allow extglob wildcards as function names like
@() { ... }
- Add support for heredocs surrounded by backquotes
- Add support for backquoted inline comments
- Add
NewPos
to createPos
values externally - Support escaped newlines with CRLF line endings
-
Minify
no longer omits a leading shebang comment - Avoid printing escaped newlines in non-quoted words
- Fix some printer edge cases where comments weren't properly spaced
- Allow extglob wildcards as function names like
-
fileutil
- Add
Shebang
to extract the shell language from a#!
line
- Add
-
expand
- Reimplement globstar
**
globbing for correctness - Replace
os.Stat
as the last direct use of the filesystem
- Reimplement globstar
-
interp
- Add
CallHandler
to intercept all interpretedCallExpr
nodes - Add
ReadDirHandler
to intercept glob expansion filesystem reads - Add
StatHandler
to interceptos.Stat
andos.Lstat
calls - Always surface exit codes from command substitutions
- Add initial and incomplete support for
set -x
- Add support for
cd -
ascd "$OLDPWD"
- Avoid panic on
set - args
- Add
v3.4.3
-
cmd/shfmt
- New Docker
v3
tag to track the latest stable version - Don't duplicate errors when walking directories
- New Docker
-
interp
- Properly handle empty paths in the
test
builtin - Allow unsetting global vars from inside a function again
- Use
%w
to wrap errors inDir
- Properly handle empty paths in the
v3.4.2
- The tests no longer assume what locales are installed
-
interp
- Keep
PATH
list separators OS-specific to fix a recent regression - Avoid negative elapsed durations in the
time
builtin
- Keep
v3.4.1
-
syntax
- Don't return an empty string on empty input to
Quote
- Don't return an empty string on empty input to
-
expand
- Properly sort in
ListEnviron
to avoid common prefix issues
- Properly sort in
-
interp
-
export
used in functions now affects the global scope - Support looking for scripts in
$PATH
insource
- Properly slice arrays in parameter expansions
-
v3.4.0
This release drops support for Go 1.15,
which allows the code to start benefitting from io/fs
.
-
cmd/shfmt
- Walks directories ~10% faster thanks to
filepath.WalkDir
- Walks directories ~10% faster thanks to
-
syntax
- Add
Quote
to mirrorstrconv.Quote
for shell syntax - Skip null characters when parsing, just like Bash
- Rewrite fuzzers with Go 1.18's native fuzzing
- Add
-
fileutil
- Add
CouldBeScript2
usingio/fs.DirEntry
- Add
-
expand
- Skip or stop at null characters, just like Bash
-
interp
- Set
GID
just likeUID
- Add support for
read -p
- Add support for
pwd
flags - Create random FIFOs for process substitutions more robustly
- Avoid leaking an open file when interpreting
$(<file)
- Set
v3.3.1
-
syntax
- Don't convert
&
in a separate line into;
- Fix a
BinaryNextLine
edge case idempotency bug - Never start printing a command with an escaped newline
- Don't convert
-
interp
- Support calling
Runner.Reset
beforeRunner.Run
- Obey
set -e
for failed redirections
- Support calling
v3.3.0
-
cmd/shfmt
- Document the
FORCE_COLOR
env var to always use colors in diffs
- Document the
-
syntax
- Add the printer
SingleLine
option to avoid printing newlines - Positions now use more bits for line numbers than column numbers
- Test operators like
&&
and||
no longer escape newlines - Properly handle closing backquotes in a few edge cases
- Properly handle trailing escaped newlines in heredocs
- Add the printer
-
interp
- Redesigned variable scoping to fix a number of edge cases
- Refactor
set -o nounset
support to fix many edge cases - Deprecate
LookPath
in favor ofLookPathDir
- Array element words are now expanded correctly
- Add support for
trap
with error and exit signals - Add support for
shopt -s nullglob
- Add support for
type -p
v3.2.4
-
cmd/shfmt
- Don't stop handling arguments when one results in a failure
-
expand
- Don't panic when a backslash is followed by EOF
v3.2.2
-
syntax
- Avoid comment position panic in the printer
v3.2.1
-
syntax
- Fix an endless loop when parsing single quotes in parameter expansions
- Properly print assignments using escaped newlines
- Print inline heredoc comments in the right place
-
interp
- Always expand
~
in Bash test expressions
- Always expand
-
expand
- Don't panic on out of bounds array index expansions
Configuration
-
If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.