Skip to content

chore(deps): update dependency shfmt to v3.13.0#14

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

chore(deps): update dependency shfmt to v3.13.0#14
renovate[bot] wants to merge 1 commit intomainfrom
renovate/shfmt-3.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 20, 2024

This PR contains the following updates:

Package Update Change
shfmt minor 3.9.03.13.0

Release Notes

mvdan/sh (shfmt)

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

Consider becoming a sponsor if you benefit from the work that went into this release!

Binaries built on go version go1.26.1 linux/amd64 with:

CGO_ENABLED=0 go build -trimpath -ldflags="-w -s"

Note that this release no longer includes a sha256sums.txt asset; GitHub now provide digests natively.

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

v3.11.0

Compare Source

This release drops support for Go 1.22 and includes many enhancements.

  • cmd/shfmt
    • Support -l=0 and -f=0 to split filenames with null bytes - #​1096
  • syntax
    • New iterator API: Parser.WordsSeq
    • Fix Parser.Incomplete and IsIncomplete to work well with Parser.Words - #​937
    • Initial support for parsing incomplete shell via RecoverErrors
    • Expand LangError to include which language was used when parsing
  • interp
    • Refactor setting variables to fix array declaration edge cases - #​1108
    • Fix test read/write/exec operators to work correctly on directories - #​1116
    • Replace the cancelreader dependency with os.File.SetReadDeadline
    • Avoid waiting for process substitutions, matching Bash
    • Skip OpenHandler when opening named pipes for process substitutions - #​1120
    • Use TMPDIR if set via Env to create temporary files such as named pipes
  • expand
    • New iterator API: FieldsSeq
    • Correctly handle repeated backslashes in double quotes - #​1106
    • Don't expand backslashes inside here-documents - #​1070
    • Replace the Unset kind with a new Variable.Set boolean field

Consider becoming a sponsor if you benefit from the work that went into this release!

v3.10.0

Compare Source

  • cmd/shfmt
    • Report the correct language variant in parser error messages - #​1102
    • Move --filename out of the parser options category - #​1079
  • syntax
    • Parse all CRLF line endings as LF, including inside heredocs - #​1088
    • Count skipped backslashes inside backticks in position column numbers - #​1098
    • Count skipped null bytes in position column numbers for consistency
  • interp
    • Fix a regression in v3.9.0 which broke redirecting files to stdin - #​1099
    • Fix a regression in v3.9.0 where HandlerContext.Stdin was never nil
    • Add an Interactive option to be used by interactive shells - #​1100
    • Support closing stdin, stdout, and stderr via redirections like <&-

Consider becoming a sponsor if you benefit from the work that went into this release!


Configuration

📅 Schedule: 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 changed the title chore(deps): update dependency shfmt to v3.10.0 chore(deps): update dependency shfmt to v3.11.0 Mar 6, 2025
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from 3a05c29 to 5ac7d6a Compare March 6, 2025 00:38
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from 5ac7d6a to dfceaa0 Compare July 6, 2025 23:13
@renovate renovate bot changed the title chore(deps): update dependency shfmt to v3.11.0 chore(deps): update dependency shfmt to v3.12.0 Jul 6, 2025
@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 dfceaa0 to 8bebdcc Compare March 9, 2026 11:55
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