@umijs/bundler-utils 4.0.0-beta.1 → 4.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -59,6 +59,26 @@ function hasGlobalProcessEventEmitter() {
|
|
|
59
59
|
return ((typeof process === 'object') && (process !== null) && (typeof process.on === 'function'));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
function globalProcessVersion() {
|
|
63
|
+
if ((typeof process === 'object') && (process !== null)) {
|
|
64
|
+
return process.version;
|
|
65
|
+
} else {
|
|
66
|
+
return '';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function globalProcessStderr() {
|
|
71
|
+
if ((typeof process === 'object') && (process !== null)) {
|
|
72
|
+
return process.stderr;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function globalProcessExit(code) {
|
|
77
|
+
if ((typeof process === 'object') && (process !== null) && (typeof process.exit === 'function')) {
|
|
78
|
+
return process.exit(code);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
62
82
|
function handlerExec(list) {
|
|
63
83
|
return function(arg) {
|
|
64
84
|
for (var i = 0; i < list.length; i++) {
|
|
@@ -369,7 +389,7 @@ function wrapCallSite(frame, state) {
|
|
|
369
389
|
// v11 is not an LTS candidate, we can just test the one version with it.
|
|
370
390
|
// Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11
|
|
371
391
|
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
|
|
372
|
-
var headerLength = noHeader.test(
|
|
392
|
+
var headerLength = noHeader.test(globalProcessVersion()) ? 0 : 62;
|
|
373
393
|
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
|
|
374
394
|
column -= headerLength;
|
|
375
395
|
}
|
|
@@ -466,8 +486,9 @@ function printErrorAndExit (error) {
|
|
|
466
486
|
var source = getErrorSource(error);
|
|
467
487
|
|
|
468
488
|
// Ensure error is printed synchronously and not truncated
|
|
469
|
-
|
|
470
|
-
|
|
489
|
+
var stderr = globalProcessStderr();
|
|
490
|
+
if (stderr && stderr._handle && stderr._handle.setBlocking) {
|
|
491
|
+
stderr._handle.setBlocking(true);
|
|
471
492
|
}
|
|
472
493
|
|
|
473
494
|
if (source) {
|
|
@@ -476,7 +497,7 @@ function printErrorAndExit (error) {
|
|
|
476
497
|
}
|
|
477
498
|
|
|
478
499
|
console.error(error.stack);
|
|
479
|
-
|
|
500
|
+
globalProcessExit(1);
|
|
480
501
|
}
|
|
481
502
|
|
|
482
503
|
function shimEmitUncaughtException () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-utils",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,30 +26,30 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@umijs/utils": "4.0.0-beta.
|
|
30
|
-
"esbuild": "0.13.
|
|
29
|
+
"@umijs/utils": "4.0.0-beta.5",
|
|
30
|
+
"esbuild": "0.13.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/code-frame": "7.
|
|
34
|
-
"@babel/core": "7.
|
|
35
|
-
"@babel/generator": "7.
|
|
36
|
-
"@babel/parser": "7.
|
|
37
|
-
"@babel/plugin-proposal-decorators": "7.
|
|
38
|
-
"@babel/plugin-proposal-do-expressions": "7.
|
|
39
|
-
"@babel/plugin-proposal-export-default-from": "7.
|
|
40
|
-
"@babel/plugin-proposal-export-namespace-from": "7.
|
|
41
|
-
"@babel/plugin-proposal-function-bind": "7.
|
|
42
|
-
"@babel/plugin-proposal-partial-application": "7.
|
|
43
|
-
"@babel/plugin-proposal-pipeline-operator": "7.
|
|
44
|
-
"@babel/plugin-proposal-record-and-tuple": "7.
|
|
45
|
-
"@babel/plugin-transform-runtime": "7.
|
|
46
|
-
"@babel/preset-env": "7.
|
|
47
|
-
"@babel/preset-react": "7.
|
|
48
|
-
"@babel/preset-typescript": "7.
|
|
49
|
-
"@babel/register": "7.
|
|
50
|
-
"@babel/template": "7.
|
|
51
|
-
"@babel/traverse": "7.
|
|
52
|
-
"@babel/types": "7.
|
|
33
|
+
"@babel/code-frame": "7.16.0",
|
|
34
|
+
"@babel/core": "7.16.0",
|
|
35
|
+
"@babel/generator": "7.16.0",
|
|
36
|
+
"@babel/parser": "7.16.0",
|
|
37
|
+
"@babel/plugin-proposal-decorators": "7.16.0",
|
|
38
|
+
"@babel/plugin-proposal-do-expressions": "7.16.0",
|
|
39
|
+
"@babel/plugin-proposal-export-default-from": "7.16.0",
|
|
40
|
+
"@babel/plugin-proposal-export-namespace-from": "7.16.0",
|
|
41
|
+
"@babel/plugin-proposal-function-bind": "7.16.0",
|
|
42
|
+
"@babel/plugin-proposal-partial-application": "7.16.0",
|
|
43
|
+
"@babel/plugin-proposal-pipeline-operator": "7.16.0",
|
|
44
|
+
"@babel/plugin-proposal-record-and-tuple": "7.16.0",
|
|
45
|
+
"@babel/plugin-transform-runtime": "7.16.0",
|
|
46
|
+
"@babel/preset-env": "7.16.0",
|
|
47
|
+
"@babel/preset-react": "7.16.0",
|
|
48
|
+
"@babel/preset-typescript": "7.16.0",
|
|
49
|
+
"@babel/register": "7.16.0",
|
|
50
|
+
"@babel/template": "7.16.0",
|
|
51
|
+
"@babel/traverse": "7.16.0",
|
|
52
|
+
"@babel/types": "7.16.0",
|
|
53
53
|
"@types/babel__code-frame": "7.0.3",
|
|
54
54
|
"@types/babel__generator": "7.6.3",
|
|
55
55
|
"@types/babel__parser": "7.1.1",
|