@babel/core
Advanced tools
Comparing version 7.23.6 to 7.23.7
@@ -11,20 +11,45 @@ "use strict"; | ||
let resultP; | ||
let promiseReferenced = false; | ||
return function* () { | ||
if (result) return result; | ||
if (!(yield* (0, _async.isAsync)())) return result = yield* fn(); | ||
if (resultP) return yield* (0, _async.waitFor)(resultP); | ||
let resolve, reject; | ||
resultP = new Promise((res, rej) => { | ||
resolve = res; | ||
reject = rej; | ||
}); | ||
try { | ||
result = yield* fn(); | ||
resultP = null; | ||
resolve(result); | ||
return result; | ||
} catch (error) { | ||
reject(error); | ||
throw error; | ||
if (!result) { | ||
if (resultP) { | ||
promiseReferenced = true; | ||
return yield* (0, _async.waitFor)(resultP); | ||
} | ||
if (!(yield* (0, _async.isAsync)())) { | ||
try { | ||
result = { | ||
ok: true, | ||
value: yield* fn() | ||
}; | ||
} catch (error) { | ||
result = { | ||
ok: false, | ||
value: error | ||
}; | ||
} | ||
} else { | ||
let resolve, reject; | ||
resultP = new Promise((res, rej) => { | ||
resolve = res; | ||
reject = rej; | ||
}); | ||
try { | ||
result = { | ||
ok: true, | ||
value: yield* fn() | ||
}; | ||
resultP = null; | ||
if (promiseReferenced) resolve(result.value); | ||
} catch (error) { | ||
result = { | ||
ok: false, | ||
value: error | ||
}; | ||
resultP = null; | ||
if (promiseReferenced) reject(error); | ||
} | ||
} | ||
} | ||
if (result.ok) return result.value;else throw result.value; | ||
}; | ||
@@ -31,0 +56,0 @@ } |
@@ -227,3 +227,3 @@ "use strict"; | ||
; | ||
const version = exports.version = "7.23.6"; | ||
const version = exports.version = "7.23.7"; | ||
const DEFAULT_EXTENSIONS = exports.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]); | ||
@@ -230,0 +230,0 @@ ; |
{ | ||
"name": "@babel/core", | ||
"version": "7.23.6", | ||
"version": "7.23.7", | ||
"description": "Babel compiler core.", | ||
@@ -54,6 +54,6 @@ "main": "./lib/index.js", | ||
"@babel/helper-module-transforms": "^7.23.3", | ||
"@babel/helpers": "^7.23.6", | ||
"@babel/helpers": "^7.23.7", | ||
"@babel/parser": "^7.23.6", | ||
"@babel/template": "^7.22.15", | ||
"@babel/traverse": "^7.23.6", | ||
"@babel/traverse": "^7.23.7", | ||
"@babel/types": "^7.23.6", | ||
@@ -71,3 +71,3 @@ "convert-source-map": "^2.0.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.23.3", | ||
"@babel/preset-env": "^7.23.6", | ||
"@babel/preset-env": "^7.23.7", | ||
"@babel/preset-typescript": "^7.23.3", | ||
@@ -74,0 +74,0 @@ "@jridgewell/trace-mapping": "^0.3.17", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
778305
6853
+ Added@babel/code-frame@7.26.0(transitive)
+ Added@babel/compat-data@7.26.0(transitive)
+ Added@babel/generator@7.26.0(transitive)
+ Added@babel/parser@7.26.1(transitive)
+ Addedcaniuse-lite@1.0.30001674(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/compat-data@7.26.2(transitive)
- Removed@babel/generator@7.26.2(transitive)
- Removed@babel/parser@7.26.2(transitive)
- Removedcaniuse-lite@1.0.30001675(transitive)
Updated@babel/helpers@^7.23.7
Updated@babel/traverse@^7.23.7