feat: use pnpm & lock core-js shim

This commit is contained in:
2023-10-25 11:29:01 +08:00
parent 5bf4b1c09e
commit 54eaae96bd
32 changed files with 444 additions and 178 deletions

View File

@@ -18,15 +18,11 @@
"scripts": {
"clean": "rimraf dist",
"watch": "tsc --watch",
"build": "yarn clean && tsc",
"build": "pnpm clean && tsc",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"devDependencies": {
"@ccms/nashorn": "^0.28.0-beta.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^4.4.1",
"tslib": "^2.6.2",
"typescript": "^4.9.5"
"@ccms/nashorn": "^0.28.0-beta.3"
},
"gitHead": "781524f83e52cad26d7c480513e3c525df867121"
}

View File

@@ -145,8 +145,8 @@ EventEmitter.prototype.emit = function emit(type) {
if (er.error instanceof Error || er.error instanceof Throwable) {
throw er.error; // Unhandled 'error' event
}
if (er.cause instanceof Error || er.error instanceof Throwable) {
throw er.error; // Unhandled 'error' event
if (er.cause instanceof Error || er.cause instanceof Throwable) {
throw er.cause; // Unhandled 'error' event
}
// At least give some kind of context to the user
var err = new Error('Unhandled error.' + (er ? ' (' + (er.message || er.error || er.cause || er) + ')' : ''));

View File

@@ -715,6 +715,7 @@ function callbackify(original) {
// implications (stack, `uncaughtException`, `async_hooks`)
// @ts-ignore
original.apply(this, args)
// @ts-ignore
.then(function (ret) { process.nextTick(cb.bind(null, null, ret)) },
function (rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });
}