diff --git a/go.mod b/go.mod index 3c47bee5113..aeace54548d 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/PuerkitoBio/goquery v1.8.0 github.com/Soontao/goHttpDigestClient v0.0.0-20170320082612-6d28bb1415c5 github.com/andybalholm/brotli v1.0.4 - github.com/dop251/goja v0.0.0-20230110123741-af048f025cbb + github.com/dop251/goja v0.0.0-20230113101057-bf9ef13dd7b1 github.com/fatih/color v1.13.0 github.com/go-sourcemap/sourcemap v2.1.4-0.20211119122758-180fcef48034+incompatible github.com/golang/protobuf v1.5.2 diff --git a/go.sum b/go.sum index 335a72dda02..66e01de1f00 100644 --- a/go.sum +++ b/go.sum @@ -85,8 +85,8 @@ github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRP github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20221003171542-5ea1285e6c91/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= github.com/dop251/goja v0.0.0-20221106173738-3b8a68ca89b4/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= -github.com/dop251/goja v0.0.0-20230110123741-af048f025cbb h1:35N2yi2cM6XjKILDhSDWJuCg7ANcjUxRZw0TXJH4kH0= -github.com/dop251/goja v0.0.0-20230110123741-af048f025cbb/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= +github.com/dop251/goja v0.0.0-20230113101057-bf9ef13dd7b1 h1:xWehtM7T4bJajHcIV93/K6XFtq9d8jN4VLCUJT2L+xs= +github.com/dop251/goja v0.0.0-20230113101057-bf9ef13dd7b1/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= diff --git a/vendor/github.com/dop251/goja/parser/expression.go b/vendor/github.com/dop251/goja/parser/expression.go index 8a394cded3c..2b2243c50c4 100644 --- a/vendor/github.com/dop251/goja/parser/expression.go +++ b/vendor/github.com/dop251/goja/parser/expression.go @@ -400,7 +400,7 @@ func (self *_parser) parseObjectProperty() ast.Property { if value == nil { return nil } - if token.IsId(tkn) || tkn == token.STRING || tkn == token.ILLEGAL { + if token.IsId(tkn) || tkn == token.STRING || tkn == token.NUMBER || tkn == token.ILLEGAL { switch { case self.token == token.LEFT_PARENTHESIS: return &ast.PropertyKeyed{ diff --git a/vendor/github.com/dop251/goja/runtime.go b/vendor/github.com/dop251/goja/runtime.go index d19ba51c02e..fc394a379ae 100644 --- a/vendor/github.com/dop251/goja/runtime.go +++ b/vendor/github.com/dop251/goja/runtime.go @@ -1992,11 +1992,17 @@ func (r *Runtime) wrapReflectFunc(value reflect.Value) func(FunctionCall) Value if last := out[len(out)-1]; last.Type().Name() == "error" { if !last.IsNil() { - err := last.Interface() + err := last.Interface().(error) if _, ok := err.(*Exception); ok { panic(err) } - panic(r.NewGoError(last.Interface().(error))) + var intErr *InterruptedError + if errors.As(err, &intErr) { + panic(&uncatchableException{ + err: err, + }) + } + panic(r.NewGoError(err)) } out = out[:len(out)-1] } diff --git a/vendor/modules.txt b/vendor/modules.txt index b8198ac544f..f74309f7e9a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -32,7 +32,7 @@ github.com/dgryski/go-rendezvous ## explicit; go 1.13 github.com/dlclark/regexp2 github.com/dlclark/regexp2/syntax -# github.com/dop251/goja v0.0.0-20230110123741-af048f025cbb +# github.com/dop251/goja v0.0.0-20230113101057-bf9ef13dd7b1 ## explicit; go 1.16 github.com/dop251/goja github.com/dop251/goja/ast