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:
dependabot[bot]
2026-07-02 14:44:13 +00:00
committed by Ralf Haferkamp
parent 2683b2db6f
commit bce52eec38
6 changed files with 4975 additions and 12 deletions

2
go.mod
View File

@@ -61,7 +61,7 @@ require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.32.0
github.com/onsi/gomega v1.42.1
github.com/open-policy-agent/opa v1.18.1
github.com/open-policy-agent/opa v1.18.2
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
github.com/opencloud-eu/reva/v2 v2.46.4-0.20260625152426-8cff2a7032ec

4
go.sum
View File

@@ -938,8 +938,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.42.1 h1:iN1rCUX+44NZ1Dc97MPoeFYbFR0vh8zxoxMFwKdyZ6I=
github.com/onsi/gomega v1.42.1/go.mod h1:REff/hsDsodHoKlWsP2mAPhu1+5/6hVYNf9rIEBpeSg=
github.com/open-policy-agent/opa v1.18.1 h1:PQXN8BZN0zRf5NcI7yt1LfQ7pF1pLgWVAGNM3WgJI/4=
github.com/open-policy-agent/opa v1.18.1/go.mod h1:9GY+hER4ZEXtxPlMjftVbqJJY9xLtCD3Q0oufRCfAKo=
github.com/open-policy-agent/opa v1.18.2 h1:VBiLJpioTuk7XTW1JoQi4ILo+FVxD2/8uD8iP9/OcxY=
github.com/open-policy-agent/opa v1.18.2/go.mod h1:9GY+hER4ZEXtxPlMjftVbqJJY9xLtCD3Q0oufRCfAKo=
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a h1:Sakl76blJAaM6NxylVkgSzktjo2dS504iDotEFJsh3M=
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY=
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+lP5lUUIzjRGDg93WrQfZJZCaV1ZP3KeyXi8bzY=

View File

File diff suppressed because it is too large Load Diff

View File

@@ -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()

View File

@@ -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()

2
vendor/modules.txt vendored
View File

@@ -1275,7 +1275,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge
github.com/onsi/gomega/matchers/support/goraph/node
github.com/onsi/gomega/matchers/support/goraph/util
github.com/onsi/gomega/types
# github.com/open-policy-agent/opa v1.18.1
# github.com/open-policy-agent/opa v1.18.2
## explicit; go 1.25.0
github.com/open-policy-agent/opa/ast
github.com/open-policy-agent/opa/ast/json