mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 09:02:09 -04:00
build(deps): bump github.com/open-policy-agent/opa from 1.18.1 to 1.18.2
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 1.18.1 to 1.18.2. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v1.18.1...v1.18.2) --- updated-dependencies: - dependency-name: github.com/open-policy-agent/opa dependency-version: 1.18.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
2683b2db6f
commit
bce52eec38
4955
vendor/github.com/open-policy-agent/opa/capabilities/v1.18.2.json
generated
vendored
Normal file
4955
vendor/github.com/open-policy-agent/opa/capabilities/v1.18.2.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
22
vendor/github.com/open-policy-agent/opa/v1/format/format.go
generated
vendored
22
vendor/github.com/open-policy-agent/opa/v1/format/format.go
generated
vendored
@@ -1902,13 +1902,10 @@ func (w *writer) writeIterable(elements []any, last *ast.Location, close *ast.Lo
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hasBoundaryComment := false
|
||||
newlinePrecedesItem := false
|
||||
// If there are comments within the single line, don't collapse it and keep it as-is
|
||||
// Return an error so that writeTerm will write the original formatting
|
||||
if len(lines) == 1 {
|
||||
if w.beforeEnd != nil {
|
||||
hasBoundaryComment = w.beforeEnd.Location.Row >= last.Row && w.beforeEnd.Location.Row <= close.Row
|
||||
}
|
||||
for _, c := range comments {
|
||||
if c.Location.Row > last.Row && c.Location.Row < close.Row {
|
||||
return comments, unexpectedCommentError{
|
||||
@@ -1916,13 +1913,24 @@ func (w *writer) writeIterable(elements []any, last *ast.Location, close *ast.Lo
|
||||
newCommentRow: c.Location.Row,
|
||||
}
|
||||
}
|
||||
if c.Location.Row == last.Row || c.Location.Row == close.Row {
|
||||
hasBoundaryComment = true
|
||||
}
|
||||
if len(elements) > 0 {
|
||||
var first *ast.Term
|
||||
if term, ok := elements[0].(*ast.Term); ok {
|
||||
first = term
|
||||
} else if pair, ok := elements[0].([2]*ast.Term); ok {
|
||||
first = pair[0]
|
||||
}
|
||||
cut := bytes.Index(last.Text, first.Location.Text)
|
||||
if cut > 0 {
|
||||
txt := last.Text[:cut]
|
||||
newlinePrecedesItem = bytes.IndexByte(txt, '\n') > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
isMultiline := len(lines) > 1 || (len(lines) == 1 && len(elements) > 0 && close.Row > last.Row && !hasBoundaryComment)
|
||||
isMultiline := len(lines) > 1 || (len(lines) == 1 && newlinePrecedesItem)
|
||||
|
||||
if isMultiline {
|
||||
w.delayBeforeEnd()
|
||||
w.startMultilineSeq()
|
||||
|
||||
2
vendor/github.com/open-policy-agent/opa/v1/version/version.go
generated
vendored
2
vendor/github.com/open-policy-agent/opa/v1/version/version.go
generated
vendored
@@ -10,7 +10,7 @@ import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
var Version = "1.18.1"
|
||||
var Version = "1.18.2"
|
||||
|
||||
// GoVersion is the version of Go this was built with
|
||||
var GoVersion = runtime.Version()
|
||||
|
||||
Reference in New Issue
Block a user