Skip to content

chore(deps): update dependency shfmt to v3.14.1 - #46

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/shfmt-3.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/shfmt-3.x

Conversation

@renovate

@renovate renovate Bot commented Jul 6, 2025 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Update Change
shfmt minor 3.11.0 → 3.14.1

Release Notes

mvdan/sh (shfmt)

v3.14.1

Compare Source

  • syntax
    • Fix the indentation of heredocs nested inside command substitutions - #​1403
    • Keep literal tabs in <<- heredoc bodies rather than replacing them with spaces
    • Don't indent heredocs without dashes nested in <<- ones, whose output no longer parsed
    • Zsh: don't drop the prefix in short forms like $#"$foo" and $+"$foo" - #​1405
  • interp
    • Fix the build on 32-bit FreeBSD and NetBSD
  • expand
    • Don't let escaped characters such as \* act as glob metacharacters
  • pattern
    • Treat unclosed extended operator groups like @(a as literals, avoiding a panic

v3.14.0

Compare Source

This release drops support for Go 1.25 and includes many enhancements,
particularly in the interpreter, which implements more shell features
and fixes many divergences from Bash.

  • cmd/shfmt
    • Add --detect to find shell files by executable bit or shebang - #​944
  • syntax
    • Add Preorder, an iterator over all nodes, complementing Walk
    • Add encoding.TextUnmarshaler implementations for each operator type
    • Support ${ foo;} and ${|foo;} inside double quotes - #​1368
    • Support array elements in {varname} redirects, like exec {fds[3]}>&- - #​719
    • Backslashes inside backquotes within double quotes escape double quotes - #​1083
    • Allow pound signs in associative array keys like ${args[cmd,#]} - #​1285
    • Don't treat # as the start of a comment inside [[ ]] tests - #​1326
    • Don't join then or do with a semicolon when heredocs are pending - #​1047
    • Print a space after ! in arithmetic expressions, avoiding history expansion - #​987
    • Space nested closing parentheses like the opening ones - #​876
    • Make SplitBraces reject malformed sequences and skip backslash escapes - #​1330
    • Zsh: support the ${=name}, ${~name}, and ${^name} prefixes - #​1238
    • Zsh: support the ;| case terminator and leading parentheses for globs - #​1293, #​1279
    • Zsh: parse subscript flag arguments as patterns, and allow [ globs in arrays - #​1278, #​1322
  • syntax/typedjson
    • Encode operators as their syntax form, such as ">>", rather than integers - #​1321
    • Return errors rather than panicking on malformed input
  • interp
    • Add BashOpts to set Bash options like shopt - #​962
    • Add AccessHandler to control file access checks, used by -r and cd - #​1318
    • Add HandlerContext.LastExitStatus, and provide a HandlerContext to stat handlers
    • Implement the help and times builtins, as well as $- - #​1398
    • Implement the ;& and ;;& case terminators - #​1391
    • Implement the -N test operator, and make -nt and -ot follow POSIX - #​1340
    • Support sparse indexed arrays such as a=([5]=x) - #​1373
    • Run files as shell scripts when exec fails with ENOEXEC - #​1065
    • Support empty here-documents, and don't expand quoted ones - #​1390
    • Support js/wasm, where subprocesses and pipes are unavailable
    • Keep the redirections applied by exec with no arguments
    • Only fire the exit trap when the shell exits, rather than after every Run
  • expand
    • Add BracesSeq with a config and error reporting, deprecating Braces
    • Add Variable.Indexes to describe sparse indexed arrays
    • Support integer bases in arithmetic - #​339
    • Short-circuit the arithmetic && and || operators - #​1371
    • Apply per-element operators to quoted array expansions like "${a[@]%o}" - #​1081
    • Make unquoted ${!arr[@]} consistent with the quoted form - #​672
    • Fix many divergences from Bash in arithmetic, string, and brace expansions
    • Reject unsupported Zsh syntax rather than panicking - #​1363
  • pattern
    • Treat an unmatched [ as a literal character, like Bash - #​1372
    • Fix panics and mismatches in bracket expressions, such as [![:space:]]
  • fileutil
    • Recognize dash shebangs as POSIX shell for -ln=auto - #​1307

v3.13.1

Compare Source

  • cmd/shfmt
    • Add support for [[zsh]] in EditorConfig files
    • Detect the shell variant from filenames like .zshrc and .bash_profile
    • Fix --apply-ignore when used with explicit args - #​1310
  • syntax
    • Revert an accidental change to how array subscripts are formatted - #​1314
    • Never join ;; with the previous line when formatting - #​1289
    • Fix a bug where $1[foo] was parsed as a subscript in Zsh - #​1288
    • Correctly parse $! in double quotes in Zsh - #​1298
    • Allow indexing into special parameters in Zsh - #​1299
    • Allow parameter expansions with empty names in Zsh - #​1280
  • interp
    • Test against Bash 5.3 and fix three new discrepancies
    • Fix a few bugs related to nameref variables
    • Avoid panics when user input encounters unimplemented features

v3.13.0

Compare Source

This release introduces support for Zsh
in the parser and formatter, which was tracked in issue #​120
alongside the label https://github.com/mvdan/sh/labels/zsh.
While support is not complete, it should be far enough for many use cases.

This release also drops support for Go 1.24 and includes many other enhancements:

  • cmd/shfmt
    • Exit with a non-zero status when -l prints any filenames
    • shfmt -version is now derived from the git current tag, dropping the -ldflags workaround
  • syntax
    • New nodes types and node fields are introduced alongside LangZsh
    • LangVariant is now a bitset, allowing the use of sets like "Bash-like"
    • Add InteractiveSeq and StmtsSeq iterator methods for Parser
    • Stop exposing the internal buffer in Printer via struct embedding
    • Support the use of brace expansions like declare {a,b}_c=value
    • Fix a bug where POSIX and Bash incorrectly allowed empty command lists
  • interp
    • Add support for shopt -s dotglob and shopt -s extglob
    • Add support for simple uses of !(expr) extended glob patterns
    • Support more builtin flags for declare, type, read
    • Fix various bugs relating to nulls, errors, and arrays
  • expand
    • Add Config.DotGlob and Config.ExtGlob for the interpreter
    • Add Variable.Flags to get the one-character declare flags
    • Do not force env vars on Windows to be uppercase
    • Fix various bugs relating to glob pattern matching
  • pattern
    • Add GlobLeadingDot and ExtendedOperators for the interpreter
    • Add NegExtGlobError to mark the use of !(expr) negation patterns

v3.12.0

Compare Source

  • The mvdan-sh JS package is discontinued in favor of sh-syntax - #​1145
  • cmd/shfmt
    • Support the "simplify" and "minify" flags via EditorConfig - #​819
    • Do not allow --write to replace non-regular files - #​843
  • interp
    • Add IsBuiltin to check if a command name is a shell built-in - #​1164
    • Add HandlerContext.Builtin to allow ExecHandlerFunc to call built-ins
    • Initial support for $! and wait PID - #​221
    • Return non-fatal ExecHandlerFunc errors via the Runner.Run API
    • Add HandlerContext.Pos to provide handlers with source positions
    • Deprecate NewExitStatus and IsExitStatus in favor of ExitStatus
    • Fix wait to always return the status of the last given job
    • Copy all env vars for background subshells to avoid data races
    • Support reading random numbers via $RANDOM and $SRANDOM
    • Set $BASH_REMATCH when matching regular expressions via =~
    • Support modifying local vars from the parent calling function
  • expand
    • Adjust which backslash sequences are expanded in here-docs - #​1138
    • Tweak tilde expansions to match Bash semantics
  • pattern
    • Remove the flawed and broken Braces mode; use syntax.SplitBraces instead
    • Tweak ** to only act as "globstar" when alone as a path element - #​1149
    • Tweak * and ** to not match leading dots in basenames
    • Add a NoGlobStar mode to match the POSIX semantics
  • fileutil
    • Treat all non-regular files as definitely not shell scripts - #​1089

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from looztra as a code owner July 6, 2025 22:14
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from a859a51 to 1999443 Compare August 10, 2025 12:44
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 1999443 to e63f770 Compare September 25, 2025 18:59
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from e63f770 to 852b68b Compare October 30, 2025 07:32
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 852b68b to 866846a Compare November 13, 2025 10:46
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from c833700 to 54d09e3 Compare November 22, 2025 21:51
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from 6ff138b to 927dc28 Compare December 7, 2025 12:54
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 927dc28 to 791067e Compare December 27, 2025 05:11
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 791067e to 31727cf Compare January 13, 2026 15:50
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from c8a354b to 6089121 Compare March 5, 2026 01:06
@renovate renovate Bot changed the title chore(deps): update dependency shfmt to v3.12.0 chore(deps): update dependency shfmt to v3.13.0 Mar 9, 2026
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 6089121 to 2b4f0ad Compare March 9, 2026 12:41
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 2b4f0ad to 2a0d9c2 Compare March 22, 2026 04:39
@renovate renovate Bot changed the title chore(deps): update dependency shfmt to v3.13.0 chore(deps): update dependency shfmt to v3.13.1 Apr 7, 2026
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 2a0d9c2 to fc42ea6 Compare April 7, 2026 01:34
@renovate renovate Bot changed the title chore(deps): update dependency shfmt to v3.13.1 chore(deps): update dependency shfmt to v3.14.0 Aug 28, 2026
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from fc42ea6 to 223c39d Compare August 28, 2026 22:07
@renovate renovate Bot changed the title chore(deps): update dependency shfmt to v3.14.0 chore(deps): update dependency shfmt to v3.14.1 Sep 6, 2026
@renovate
renovate Bot force-pushed the renovate/shfmt-3.x branch from 223c39d to c7e8a7d Compare September 6, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants