chore(deps)!: migrate from regexp2 v1 to regexp2 v2

This commit is contained in:
Julien Neuhart
2026-09-17 15:33:55 +02:00
parent ab18384a51
commit ff817f6cf8
22 changed files with 42 additions and 42 deletions

View File

@@ -12,7 +12,7 @@ import (
"time"
"github.com/alexliesenfeld/health"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/labstack/echo/v5"
flag "github.com/spf13/pflag"
"golang.org/x/sync/errgroup"

View File

@@ -19,7 +19,7 @@ import (
"testing"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/labstack/echo/v5"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"
@@ -875,7 +875,7 @@ func TestNewContext_DownloadFromRedirectVerdictStaysGeneric(t *testing.T) {
fs := gotenberg.NewFileSystem(new(gotenberg.OsMkdirAll))
// The first hop is allowed, the redirect target is denied by the deny-list.
denyList := []*regexp2.Regexp{regexp2.MustCompile("^"+regexp.QuoteMeta(private.URL), 0)}
denyList := []*regexp2.Regexp{regexp2.MustCompile("^"+regexp.QuoteMeta(private.URL), regexp2.None)}
_, cancel, err := newContext(echoCtx, logger, fs, 10*time.Second, 0, downloadFromConfig{
denyList: denyList,

View File

@@ -17,7 +17,7 @@ import (
"github.com/chromedp/cdproto/page"
"github.com/chromedp/cdproto/runtime"
"github.com/chromedp/chromedp"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/shirou/gopsutil/v4/process"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"

View File

@@ -14,7 +14,7 @@ import (
"github.com/alexliesenfeld/health"
"github.com/chromedp/cdproto/network"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
flag "github.com/spf13/pflag"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"

View File

@@ -19,7 +19,7 @@ import (
"github.com/chromedp/cdproto/page"
"github.com/chromedp/cdproto/runtime"
"github.com/chromedp/chromedp"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"golang.org/x/sync/errgroup"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"

View File

@@ -14,7 +14,7 @@ import (
"sync/atomic"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"golang.org/x/net/http/httpproxy"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"

View File

@@ -18,7 +18,7 @@ import (
"testing"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"
)

View File

@@ -14,7 +14,7 @@ import (
"testing"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"
)

View File

@@ -14,7 +14,7 @@ import (
"strings"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/gomarkdown/markdown"
"github.com/labstack/echo/v5"
"github.com/microcosm-cc/bluemonday"

View File

@@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"
)

View File

@@ -14,7 +14,7 @@ import (
"sync"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
"golang.org/x/net/http/httpproxy"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"

View File

@@ -17,14 +17,14 @@ import (
"testing"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
)
func compileRegexes(t *testing.T, patterns ...string) []*regexp2.Regexp {
t.Helper()
out := make([]*regexp2.Regexp, 0, len(patterns))
for _, p := range patterns {
r, err := regexp2.Compile(p, 0)
r, err := regexp2.Compile(p, regexp2.None)
if err != nil {
t.Fatalf("compile %q: %v", p, err)
}

View File

@@ -5,7 +5,7 @@ import (
"sync/atomic"
"time"
"github.com/dlclark/regexp2"
"github.com/dlclark/regexp2/v2"
flag "github.com/spf13/pflag"
"github.com/gotenberg/gotenberg/v8/pkg/gotenberg"