shithub: mycel

Download patch

ref: 912c90f60fc126d091e324de8a16986efaffecaf
parent: 8284150e95b9d54dbd9e1ee7b730beeeef0ccc88
author: Philip Silva <philip.silva@protonmail.com>
date: Sun Mar 7 13:41:02 EST 2021

Use patched goja-babel

- that uses babel 7 (instead of 6)

--- a/domino/domino.go
+++ b/domino/domino.go
@@ -256,13 +256,13 @@
 }
 
 func (d *Domino) Exec6(script string, initial bool) (res string, err error) {
-	babel.Init(4) // Setup 4 transformers (can be any number > 0)
+	babel.Init(2) // Setup 4 transformers (can be any number > 0)
 	r, err := babel.Transform(strings.NewReader(script), map[string]interface{}{
 		"plugins": []string{
-			"transform-es2015-block-scoping",
-			"transform-es2015-destructuring",
-			"transform-es2015-spread",
-			"transform-es2015-parameters",
+			"transform-block-scoping",
+			"transform-destructuring",
+			"transform-spread",
+			"transform-parameters",
 		},
 	})
 	if err != nil {
--- a/domino/domintf.js
+++ b/domino/domintf.js
@@ -60,6 +60,7 @@
 	userAgent: 'opossum'
 };
 HTMLElement = domino.impl.HTMLElement;
+Node = domino.impl.Node;
 
 function XMLHttpRequest() {
 	var _method, _uri;
--- a/go.mod
+++ b/go.mod
@@ -6,6 +6,8 @@
 
 replace github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 => github.com/psilva261/oksvg v0.0.0-20210212153200-941e54e245a3
 
+replace github.com/jvatic/goja-babel v0.0.0-20200102152603-63c66b7c796a => github.com/psilva261/goja-babel v0.0.0-20210306090754-19ff80ef8bef
+
 exclude github.com/aymerick/douceur v0.1.0
 
 exclude github.com/aymerick/douceur v0.2.0
@@ -14,10 +16,8 @@
 	9fans.net/go v0.0.0-00010101000000-000000000000
 	github.com/andybalholm/cascadia v1.1.0
 	github.com/chris-ramon/douceur v0.2.1-0.20160603235419-f3463056cd52
-	github.com/dlclark/regexp2 v1.4.0 // indirect
 	github.com/dop251/goja v0.0.0-20210227132020-101e13ab2c34
 	github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7
-	github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
 	github.com/gorilla/css v1.0.0 // indirect
 	github.com/jvatic/goja-babel v0.0.0-20200102152603-63c66b7c796a
 	github.com/mjl-/duit v0.0.0-20200330125617-580cb0b2843f
@@ -27,5 +27,4 @@
 	golang.org/x/image v0.0.0-20200927104501-e162460cd6b5
 	golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
 	golang.org/x/text v0.3.5
-	gopkg.in/yaml.v2 v2.3.0 // indirect
 )
--- a/go.sum
+++ b/go.sum
@@ -2,32 +2,31 @@
 github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
 github.com/chris-ramon/douceur v0.2.1-0.20160603235419-f3463056cd52 h1:xJWyi77j4VQwdeo6bO3wQSQ7o7yVwEM0ZvwXpyKHZZ8=
 github.com/chris-ramon/douceur v0.2.1-0.20160603235419-f3463056cd52/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE=
-github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
 github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
-github.com/dop251/goja v0.0.0-20191203121440-007eef3bc40f/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=
 github.com/dop251/goja v0.0.0-20210227132020-101e13ab2c34 h1:6EdB02rE/HuQr2fZT8D0nJJmXhFd6pCq41262yJlp1I=
 github.com/dop251/goja v0.0.0-20210227132020-101e13ab2c34/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=
 github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7 h1:tYwu/z8Y0NkkzGEh3z21mSWggMg4LwLRFucLS7TjARg=
 github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y=
-github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
 github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=
 github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
 github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
 github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
-github.com/jvatic/goja-babel v0.0.0-20200102152603-63c66b7c796a h1:WuwcEKWfDriJzlronFYhSDz9me9Xl7UbanAxTHpCLXA=
-github.com/jvatic/goja-babel v0.0.0-20200102152603-63c66b7c796a/go.mod h1:2Rjou2jq2BUH7Adnd9cIcU2fOYAIz2GxyuyqsNJm0N4=
 github.com/knusbaum/go v0.0.0-20200413212707-848f58a0ec6e h1:sMC7OcZa45aGaUJlCN2gK6l5IQD9WXTLXtFWIzZaeJQ=
 github.com/knusbaum/go v0.0.0-20200413212707-848f58a0ec6e/go.mod h1:VCPNE8vAcDWdtdY1piEGVOtcdrgFfQ3xV6q4XUwdAm8=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/mjl-/duit v0.0.0-20200330125617-580cb0b2843f h1:eGFou1VfXmiti7EMQED6BIzfALMYi6/fBMIRL4usKfw=
 github.com/mjl-/duit v0.0.0-20200330125617-580cb0b2843f/go.mod h1:OlRagobzQ97GoM+WaQ5kyzdyts952BFYsuY5bMyv9tw=
 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
+github.com/psilva261/goja-babel v0.0.0-20210306090754-19ff80ef8bef h1:LK5jGYmHyePe3r0jRPAa9LLiaUxFu6ziGO/eIpf1FTQ=
+github.com/psilva261/goja-babel v0.0.0-20210306090754-19ff80ef8bef/go.mod h1:5NHa0M/kGAhy4C5ELE23ujvNwbUrMz88DvVZkU6usqg=
 github.com/psilva261/oksvg v0.0.0-20210212153200-941e54e245a3 h1:LiOcewq9fY3XoorTvhD4vF/s/YdA+paymQXI48RIolw=
 github.com/psilva261/oksvg v0.0.0-20210212153200-941e54e245a3/go.mod h1:rIYdSIGJXvMv8Qw3fNAiSMBurAP18jyln+wR3PI0qKo=
 github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 h1:m59mIOBO4kfcNCEzJNy71UkeF4XIx2EVmL9KLwDQdmM=
@@ -46,11 +45,10 @@
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
 golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=