Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 1, 2022

Mend Renovate

This PR contains the following updates:

Package Update New value References Sourcegraph
shfmt minor 3.8.0 source code search for "shfmt"

Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR.


Release Notes

mvdan/sh (shfmt)

v3.8.0

Compare Source

This release drops support for Go 1.19 and 1.20 and includes many
features and bugfixes, such as improving EditorConfig support in shfmt.

  • cmd/shfmt
    • Support EditorConfig language sections such as [[shell]] - #​664
    • Add --apply-ignore for tools and editors - #​1037
  • syntax
    • Allow formatting redirects before all command argumetnts - #​942
    • Support brace expansions with uppercase letters - #​1042
    • Unescape backquotes in single quotes within backquotes - #​1041
    • Better error when using function in POSIX mode - #​993
    • Better column numbers for escapes inside backquotes - #​1028
  • interp
    • Support parentheses in classic test commands - #​1036
    • Determine access to a directory via unix.Access - #​1033
    • Support subshells with FuncEnviron as Env - #​1043
    • Add support for fs.DirEntry via ReadDirHandler2
  • expand
    • Add support for fs.DirEntry via ReadDir2
    • Support zero-padding in brace expansions - #​1042

v3.7.0

Compare Source

  • syntax
    • Correctly parse $foo#bar as a single word - #​1003
    • Make &> redirect operators an error in POSIX mode - #​991
    • Avoid producing invalid shell when minifying some heredocs - #​923
    • Revert the simplification of ${foo:-} into ${foo-} - #​970
  • interp
    • Add ExecHandlers to support layering multiple middlewares - #​964
    • Add initial support for the select clause - #​969
    • Support combining the errexit and pipefail options - #​870
    • Set EUID just like UID - #​958
    • Replace panics on unimplemented builtins with errors - #​999
    • Tweak build tags to support building for js/wasm - #​983
  • syntax/typedjson
    • Avoid reflect.Value.MethodByName to reduce binary sizes - #​961

v3.6.0

Compare Source

This release drops support for Go 1.17 and includes many features and fixes.

  • cmd/shfmt
    • Implement --from-json as the reverse of --to-json - [#​900]
    • Improve the quality of the --to-json output - [#​900]
    • Provide detected language when erroring with -ln=auto - [#​803]
  • 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
  • syntax/typedjson
    • Expose --from-json and --to-json as Go APIs - [#​885]
  • expand
    • Improve support for expanding array keys and values - [#​884]
    • Don't panic on unsupported syntax nodes - [#​841]
    • Don't panic on division by zero - [#​892]
    • Properly expand unquoted parameters with spaces - [#​886]
    • Trim spaces when converting strings to integers - [#​928]
  • interp
    • Add initial implementation for mapfile and readarray - [#​863]
    • Improve matching patterns against multiple lines - [#​866]
    • Support %b in the printf builtin - [#​955]
    • Display all Bash options in shopt - [#​877]
  • pattern
    • Add EntireString to match the entire string using ^$ - [#​866]

v3.5.1

Compare Source

  • cmd/shfmt
    • Fix the Docker publishing script bug which broke 3.5.0 - [#​860]
  • interp
    • Support multi-line strings when pattern matching in [[ - [#​861]
    • Invalid glob words are no longer removed with nullglob - [#​862]
  • pattern
    • Regexp now returns the typed error SyntaxError - [#​862]

v3.5.0

Compare Source

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
  • syntax
    • Allow extglob wildcards as function names like @() { ... }
    • Add support for heredocs surrounded by backquotes
    • Add support for backquoted inline comments
    • Add NewPos to create Pos 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
  • fileutil
    • Add Shebang to extract the shell language from a #! line
  • expand
    • Reimplement globstar ** globbing for correctness
    • Replace os.Stat as the last direct use of the filesystem
  • interp
    • Add CallHandler to intercept all interpreted CallExpr nodes
    • Add ReadDirHandler to intercept glob expansion filesystem reads
    • Add StatHandler to intercept os.Stat and os.Lstat calls
    • Always surface exit codes from command substitutions
    • Add initial and incomplete support for set -x
    • Add support for cd - as cd "$OLDPWD"
    • Avoid panic on set - args

v3.4.3

Compare Source

  • cmd/shfmt
    • New Docker v3 tag to track the latest stable version
    • Don't duplicate errors when walking directories
  • interp
    • Properly handle empty paths in the test builtin
    • Allow unsetting global vars from inside a function again
    • Use %w to wrap errors in Dir

v3.4.2

Compare Source

  • 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

v3.4.1

Compare Source

  • syntax
    • Don't return an empty string on empty input to Quote
  • expand
    • Properly sort in ListEnviron to avoid common prefix issues
  • interp
    • export used in functions now affects the global scope
    • Support looking for scripts in $PATH in source
    • Properly slice arrays in parameter expansions

v3.4.0

Compare Source

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
  • syntax
    • Add Quote to mirror strconv.Quote for shell syntax
    • Skip null characters when parsing, just like Bash
    • Rewrite fuzzers with Go 1.18's native fuzzing
  • fileutil
    • Add CouldBeScript2 using io/fs.DirEntry
  • expand
    • Skip or stop at null characters, just like Bash
  • interp
    • Set GID just like UID
    • 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)

v3.3.1

Compare Source

  • 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
  • interp
    • Support calling Runner.Reset before Runner.Run
    • Obey set -e for failed redirections

v3.3.0

Compare Source

  • cmd/shfmt
    • Document the FORCE_COLOR env var to always use colors in diffs
  • 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
  • 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 of LookPathDir
    • 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

Compare Source

  • 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

Compare Source

  • syntax
    • Avoid comment position panic in the printer

v3.2.1

Compare Source

  • 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
  • expand
    • Don't panic on out of bounds array index expansions

Configuration

📅 Schedule: Branch creation - "on the 1st through 7th day of the month" in timezone America/Los_Angeles, 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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the bot label Dec 1, 2022
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 3 times, most recently from 7392a8b to d05a9e5 Compare December 12, 2022 11:13
@renovate renovate bot changed the title Update dependency shfmt to v3.5.1 Update dependency shfmt to v3.6.0 Dec 12, 2022
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 3 times, most recently from c192b84 to 8c6decd Compare December 19, 2022 09:23
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from 8c6decd to 00ccd23 Compare December 19, 2022 21:56
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 4 times, most recently from dfc0265 to 4a11f41 Compare January 10, 2023 15:04
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 6 times, most recently from aa7a2b7 to e86aa8d Compare January 17, 2023 19:55
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 4 times, most recently from 495eb90 to 50e6844 Compare January 29, 2023 10:57
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from 50e6844 to 53baa74 Compare February 3, 2023 00:36
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 3 times, most recently from a39a62c to 6960510 Compare February 15, 2023 15:13
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 3 times, most recently from be85752 to 6287dea Compare February 23, 2023 08:20
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from d8b8869 to f9db90a Compare October 6, 2023 16:17
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 4 times, most recently from d042c4f to cd4b8c5 Compare November 8, 2023 19:27
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from cd4b8c5 to c09ad7e Compare December 13, 2023 13:18
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from c09ad7e to 505245f Compare January 1, 2024 21:41
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from f2102af to f795a46 Compare February 7, 2024 11:07
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from f795a46 to 50641e7 Compare February 11, 2024 16:37
@renovate renovate bot changed the title Update dependency shfmt to v3.7.0 Update dependency shfmt to v3.8.0 Feb 11, 2024
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from 50641e7 to a3b1661 Compare February 23, 2024 16:33
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from a3b1661 to c389c15 Compare March 8, 2024 23:48
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from c389c15 to 9f7683c Compare March 28, 2024 15:45
@renovate renovate bot requested a review from a team March 28, 2024 15:45
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 3 times, most recently from 09717ca to 5d9fd42 Compare April 1, 2024 13:35
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from c99c370 to b7aacaf Compare April 1, 2024 13:47
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch 2 times, most recently from 1ddc8a9 to 7a43fe0 Compare April 1, 2024 14:21
@renovate renovate bot force-pushed the renovate/shfmt-3.x branch from 7a43fe0 to f837978 Compare April 1, 2024 15:15
@camdencheek camdencheek merged commit 612873d into main Apr 1, 2024
@camdencheek camdencheek deleted the renovate/shfmt-3.x branch April 1, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants