From 4ce743542b15aa4e4148cbbaed680d5794c19d03 Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Mon, 24 Jun 2024 19:27:43 +0300 Subject: [PATCH] Update sobek --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/grafana/sobek/parser/statement.go | 13 ++++++++++--- vendor/modules.txt | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 7660eec76aba..d461720cf894 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/go-sourcemap/sourcemap v2.1.4+incompatible github.com/golang/protobuf v1.5.4 github.com/gorilla/websocket v1.5.1 - github.com/grafana/sobek v0.0.0-20240621115154-ed22587d72ba + github.com/grafana/sobek v0.0.0-20240624162318-afbc13aa071b github.com/grafana/xk6-browser v1.6.0 github.com/grafana/xk6-dashboard v0.7.4 github.com/grafana/xk6-output-prometheus-remote v0.4.0 diff --git a/go.sum b/go.sum index 9bd985ae4d72..8e3e4d7d80d9 100644 --- a/go.sum +++ b/go.sum @@ -82,8 +82,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= -github.com/grafana/sobek v0.0.0-20240621115154-ed22587d72ba h1:5jGQ3qO7gvAshMmQOAS4bf7LCV8MIH7pf+oXMU2iewk= -github.com/grafana/sobek v0.0.0-20240621115154-ed22587d72ba/go.mod h1:tUEHKWaMrxFGrMgjeAH85OEceCGQiSl6a/6Wckj/Vf4= +github.com/grafana/sobek v0.0.0-20240624162318-afbc13aa071b h1:CX/3ThBRroXW/4sLbyfXtHPBdzQFFESeWlkHO6/JvWw= +github.com/grafana/sobek v0.0.0-20240624162318-afbc13aa071b/go.mod h1:tUEHKWaMrxFGrMgjeAH85OEceCGQiSl6a/6Wckj/Vf4= github.com/grafana/xk6-browser v1.6.0 h1:x8ZfBwiUJRRKNEw+Asr5ae9o2gFvYU1Ll/4dDMNIPZ8= github.com/grafana/xk6-browser v1.6.0/go.mod h1:xLaGGhTMHIRsMvkVWFYh9RPy87kG2n4L4Or6DeI8U+o= github.com/grafana/xk6-dashboard v0.7.4 h1:0ZRPTAXW+6A3Xqq/a/OaIZhxUt1SOMwUFff0IPwBHrs= diff --git a/vendor/github.com/grafana/sobek/parser/statement.go b/vendor/github.com/grafana/sobek/parser/statement.go index 736037114cf5..a28396904229 100644 --- a/vendor/github.com/grafana/sobek/parser/statement.go +++ b/vendor/github.com/grafana/sobek/parser/statement.go @@ -1152,6 +1152,15 @@ func (self *_parser) parseExportDeclaration() *ast.ExportDeclaration { switch self.token { case token.ASYNC: f := self.parseMaybeAsyncFunction(false) + if f == nil { + exp = &ast.ExportDeclaration{ + Idx: idx, + AssignExpression: self.parseAssignmentExpression(), + IsDefault: true, + } + self.semicolon() + break + } if f.Name == nil { f.Name = &ast.Identifier{Name: unistring.String("default"), Idx: f.Idx0()} } @@ -1175,7 +1184,7 @@ func (self *_parser) parseExportDeclaration() *ast.ExportDeclaration { IsDefault: true, } case token.CLASS: - decl := &ast.ExportDeclaration{ + exp = &ast.ExportDeclaration{ Idx: idx, ClassDeclaration: &ast.ClassDeclaration{ Class: self.parseClass(false), @@ -1183,8 +1192,6 @@ func (self *_parser) parseExportDeclaration() *ast.ExportDeclaration { IsDefault: true, } self.insertSemicolon = true - return decl - default: exp = &ast.ExportDeclaration{ Idx: idx, diff --git a/vendor/modules.txt b/vendor/modules.txt index 2cc20870142b..ee3c619386ad 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -163,7 +163,7 @@ github.com/google/uuid # github.com/gorilla/websocket v1.5.1 ## explicit; go 1.20 github.com/gorilla/websocket -# github.com/grafana/sobek v0.0.0-20240621115154-ed22587d72ba +# github.com/grafana/sobek v0.0.0-20240624162318-afbc13aa071b ## explicit; go 1.20 github.com/grafana/sobek github.com/grafana/sobek/ast