Skip to content

Commit

Permalink
Merge pull request #2197 from grafana/updateGoja
Browse files Browse the repository at this point in the history
Update goja to include Promise and sourcemap fixes
  • Loading branch information
mstoykov authored Oct 26, 2021
2 parents a8f6b73 + bd78f63 commit 59aa1ce
Show file tree
Hide file tree
Showing 19 changed files with 750 additions and 88 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/PuerkitoBio/goquery v1.6.1
github.com/Soontao/goHttpDigestClient v0.0.0-20170320082612-6d28bb1415c5
github.com/andybalholm/brotli v1.0.3
github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06
github.com/fatih/color v1.12.0
github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 // indirect
github.com/golang/protobuf v1.4.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 h1:Izz0+t1Z5nI16/II7vuEo/nHjodOg0p7+OiDpjX5t1E=
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48 h1:iZOop7pqsg+56twTopWgwCGxdB5SI2yDO8Ti7eTRliQ=
github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk=
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06 h1:XqC5eocqw7r3+HOhKYqaYH07XBiBDp9WE3NQK8XHSn4=
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk=
github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down
8 changes: 4 additions & 4 deletions js/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ func TestNewBundle(t *testing.T) {
"Modules", "base", `export default function() {};`,
"file:///script.js: Line 1:1 Unexpected reserved word",
},
// Promises are not supported
// BigInt is not supported
{
"Promise", "base",
`module.exports.default = function() {}; new Promise(function(resolve, reject){});`,
"ReferenceError: Promise is not defined\n\tat file:///script.js:1:45(4)\n",
"BigInt", "base",
`module.exports.default = function() {}; BigInt(1231412444)`,
"ReferenceError: BigInt is not defined\n\tat file:///script.js:1:47(6)\n",
},
}

Expand Down
28 changes: 19 additions & 9 deletions js/tc39/breaking_test_errors.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions js/tc39/tc39_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ var (
"test/built-ins/AsyncIteratorPrototype",
"test/built-ins/Atomics",
"test/built-ins/BigInt",
"test/built-ins/Promise",
"test/built-ins/SharedArrayBuffer",
"test/built-ins/NativeErrors/AggregateError",
"test/language/eval-code/direct/async",
"test/language/expressions/async",
"test/language/expressions/dynamic-import",
Expand Down
6 changes: 1 addition & 5 deletions vendor/github.com/dop251/goja/builtin_array.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions vendor/github.com/dop251/goja/builtin_error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions vendor/github.com/dop251/goja/builtin_map.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 59aa1ce

Please sign in to comment.