mirror of https://github.com/veonik/squircy3
parent
9eaf171b7d
commit
214e01504f
|
@ -4,6 +4,7 @@ extra_plugins=[
|
|||
"node_compat.so",
|
||||
"squircy2_compat.so",
|
||||
"script.so",
|
||||
"discord.so",
|
||||
]
|
||||
|
||||
[irc]
|
||||
|
@ -34,3 +35,8 @@ data_path="data"
|
|||
|
||||
[node_compat]
|
||||
enable_exec=false
|
||||
|
||||
[discord]
|
||||
token=""
|
||||
#owner=""
|
||||
#activity=""
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/standalone": "7.5.5",
|
||||
"assert": "2.0.0",
|
||||
"assert-polyfill": "0.0.0",
|
||||
"buffer": "5.2.1",
|
||||
"core-js-bundle": "3.1.4",
|
||||
"@babel/standalone": "^7.16.11",
|
||||
"assert": "^2.0.0",
|
||||
"assert-polyfill": "^0.0.0",
|
||||
"buffer": "^6.0.0",
|
||||
"core-js-bundle": "^3.1.4",
|
||||
"es5-shim": "^4.6.5",
|
||||
"error-polyfill": "0.1.2",
|
||||
"process": "0.11.10",
|
||||
"regenerator-runtime": "0.13.3",
|
||||
"regenerator-transform": "0.14.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"util": "0.12.1"
|
||||
"readable-stream": "3.6.0",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"regenerator-transform": "^0.14.1"
|
||||
}
|
||||
}
|
20
package.json
20
package.json
|
@ -4,16 +4,14 @@
|
|||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/standalone": "7.5.5",
|
||||
"assert": "2.0.0",
|
||||
"assert-polyfill": "0.0.0",
|
||||
"buffer": "5.2.1",
|
||||
"core-js-bundle": "3.1.4",
|
||||
"process": "0.11.10",
|
||||
"regenerator-runtime": "0.13.3",
|
||||
"regenerator-transform": "0.14.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"util": "0.12.1"
|
||||
"@babel/standalone": "^7.16.11",
|
||||
"assert": "^2.0.0",
|
||||
"assert-polyfill": "^0.0.0",
|
||||
"buffer": "^6.0.0",
|
||||
"core-js-bundle": "^3.1.4",
|
||||
"es5-shim": "^4.6.5",
|
||||
"process": "^0.11.10",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"regenerator-transform": "^0.14.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,27 +16,11 @@ func New(r *goja.Runtime) (*Babel, error) {
|
|||
v, err := b.runtime.RunString(`
|
||||
this.global = this.global || this;
|
||||
this.process = this.process || require('process/browser');
|
||||
// core-js does not set this up correctly, so we do it explicitly here
|
||||
Object.setPrototypeOf = function(O, proto) {
|
||||
if(! (O instanceof Object)) {
|
||||
throw new TypeError("Expected object");
|
||||
}
|
||||
if(proto !== null && ! (proto instanceof Object)) {
|
||||
throw new TypeError("Expected prototype to be object or null");
|
||||
}
|
||||
O.__proto__ = proto;
|
||||
return O;
|
||||
};
|
||||
Object.getPrototypeOf = function(O) {
|
||||
if(! (O instanceof Object)) {
|
||||
throw new TypeError("Expected object");
|
||||
}
|
||||
return O.__proto__;
|
||||
}
|
||||
require('es5-shim');
|
||||
require('core-js-bundle');
|
||||
this.Babel = require('@babel/standalone');
|
||||
var plugin = require('regenerator-transform');
|
||||
(function(src) {
|
||||
(function(src) {
|
||||
var res = Babel.transform(src, {presets: ['es2015','es2016','es2017'], plugins: [plugin]});
|
||||
return res.code;
|
||||
})`)
|
||||
|
|
|
@ -71,7 +71,6 @@ func (p *nodeCompatPlugin) HandleRuntimeInit(r *goja.Runtime) {
|
|||
}
|
||||
|
||||
_, err := r.RunString(`this.global = this.global || this;
|
||||
require('core-js-bundle');
|
||||
this.process = this.process || require('process/browser');
|
||||
require('regenerator-runtime');`)
|
||||
if err != nil {
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/standalone": "7.5.5",
|
||||
"assert": "2.0.0",
|
||||
"@babel/standalone": "^7.16.11",
|
||||
"assert": "^2.0.0",
|
||||
"assert-polyfill": "^0.0.0",
|
||||
"buffer": "5.2.1",
|
||||
"core-js-bundle": "3.1.4",
|
||||
"buffer": "^6.0.0",
|
||||
"core-js-bundle": "^3.1.4",
|
||||
"es5-shim": "^4.6.5",
|
||||
"error-polyfill": "0.1.2",
|
||||
"process": "0.11.10",
|
||||
"readable-stream": "3.6.0",
|
||||
"regenerator-runtime": "0.13.3",
|
||||
"regenerator-transform": "0.14.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"util": "0.12.1"
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"regenerator-transform": "^0.14.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue