@umijs/bundler-utils 4.0.53 → 4.0.55
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.
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -5
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare function parseModule(opts: {
|
|
2
2
|
content: string;
|
|
3
3
|
path: string;
|
|
4
|
-
}): Promise<readonly [imports: readonly import("
|
|
4
|
+
}): Promise<readonly [imports: readonly import("../compiled/es-module-lexer").ImportSpecifier[], exports: readonly string[], facade: boolean]>;
|
|
5
5
|
export declare function parseModuleSync(opts: {
|
|
6
6
|
content: string;
|
|
7
7
|
path: string;
|
|
8
|
-
}): readonly [imports: readonly import("
|
|
8
|
+
}): readonly [imports: readonly import("../compiled/es-module-lexer").ImportSpecifier[], exports: readonly string[], facade: boolean];
|
|
9
9
|
export declare function isDepPath(path: string): boolean;
|
|
10
10
|
export * from './https';
|
|
11
|
-
export * from './types';
|
|
12
11
|
export * from './proxy';
|
|
12
|
+
export * from './types';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
17
19
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -25,14 +35,14 @@ __export(src_exports, {
|
|
|
25
35
|
parseModuleSync: () => parseModuleSync
|
|
26
36
|
});
|
|
27
37
|
module.exports = __toCommonJS(src_exports);
|
|
28
|
-
var import_code_frame = require("@umijs/bundler-utils/compiled/babel/code-frame");
|
|
29
|
-
var import_es_module_lexer = require("@umijs/bundler-utils/compiled/es-module-lexer");
|
|
30
|
-
var import_esbuild = require("@umijs/bundler-utils/compiled/esbuild");
|
|
31
38
|
var import_utils = require("@umijs/utils");
|
|
32
39
|
var import_path = require("path");
|
|
40
|
+
var import_es_module_lexer = require("../compiled/es-module-lexer");
|
|
41
|
+
var import_esbuild = require("../compiled/esbuild");
|
|
33
42
|
__reExport(src_exports, require("./https"), module.exports);
|
|
34
|
-
__reExport(src_exports, require("./types"), module.exports);
|
|
35
43
|
__reExport(src_exports, require("./proxy"), module.exports);
|
|
44
|
+
__reExport(src_exports, require("./types"), module.exports);
|
|
45
|
+
var babelCodeFrame = (0, import_utils.importLazy)(require.resolve("../compiled/babel/code-frame"));
|
|
36
46
|
async function parseModule(opts) {
|
|
37
47
|
await import_es_module_lexer.init;
|
|
38
48
|
return parseModuleSync(opts);
|
|
@@ -66,7 +76,7 @@ function prettyPrintEsBuildErrors(errors = [], opts) {
|
|
|
66
76
|
var _a, _b;
|
|
67
77
|
for (const error of errors) {
|
|
68
78
|
if (((_a = error.location) == null ? void 0 : _a.line) && ((_b = error.location) == null ? void 0 : _b.column)) {
|
|
69
|
-
const message =
|
|
79
|
+
const message = babelCodeFrame.codeFrameColumns(
|
|
70
80
|
opts.content,
|
|
71
81
|
{
|
|
72
82
|
start: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.55",
|
|
4
4
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-utils#readme",
|
|
5
5
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dev": "umi-scripts father dev"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@umijs/utils": "4.0.
|
|
23
|
+
"@umijs/utils": "4.0.55",
|
|
24
24
|
"esbuild": "0.16.17",
|
|
25
25
|
"regenerate": "^1.4.2",
|
|
26
26
|
"regenerate-unicode-properties": "10.1.0",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/code-frame": "7.18.6",
|
|
31
|
-
"@babel/core": "7.
|
|
32
|
-
"@babel/generator": "7.
|
|
31
|
+
"@babel/core": "7.21.0",
|
|
32
|
+
"@babel/generator": "7.21.1",
|
|
33
33
|
"@babel/helper-module-imports": "7.18.6",
|
|
34
|
-
"@babel/parser": "7.
|
|
34
|
+
"@babel/parser": "7.21.2",
|
|
35
35
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
36
|
-
"@babel/plugin-proposal-decorators": "7.
|
|
36
|
+
"@babel/plugin-proposal-decorators": "7.21.0",
|
|
37
37
|
"@babel/plugin-proposal-do-expressions": "7.18.6",
|
|
38
38
|
"@babel/plugin-proposal-export-default-from": "7.18.10",
|
|
39
39
|
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
|
|
@@ -41,23 +41,23 @@
|
|
|
41
41
|
"@babel/plugin-proposal-partial-application": "7.18.9",
|
|
42
42
|
"@babel/plugin-proposal-pipeline-operator": "7.18.9",
|
|
43
43
|
"@babel/plugin-proposal-private-methods": "7.18.6",
|
|
44
|
-
"@babel/plugin-proposal-private-property-in-object": "7.
|
|
44
|
+
"@babel/plugin-proposal-private-property-in-object": "7.21.0",
|
|
45
45
|
"@babel/plugin-proposal-record-and-tuple": "7.18.6",
|
|
46
|
-
"@babel/plugin-transform-runtime": "7.
|
|
46
|
+
"@babel/plugin-transform-runtime": "7.21.0",
|
|
47
47
|
"@babel/preset-env": "7.20.2",
|
|
48
48
|
"@babel/preset-react": "7.18.6",
|
|
49
|
-
"@babel/preset-typescript": "7.
|
|
50
|
-
"@babel/register": "7.
|
|
49
|
+
"@babel/preset-typescript": "7.21.0",
|
|
50
|
+
"@babel/register": "7.21.0",
|
|
51
51
|
"@babel/template": "7.20.7",
|
|
52
|
-
"@babel/traverse": "7.
|
|
53
|
-
"@babel/types": "7.
|
|
52
|
+
"@babel/traverse": "7.21.2",
|
|
53
|
+
"@babel/types": "7.21.2",
|
|
54
54
|
"@types/babel__code-frame": "7.0.3",
|
|
55
|
-
"@types/babel__core": "7.
|
|
55
|
+
"@types/babel__core": "7.20.0",
|
|
56
56
|
"@types/babel__generator": "7.6.4",
|
|
57
57
|
"@types/babel__parser": "7.1.1",
|
|
58
58
|
"@types/babel__template": "7.4.1",
|
|
59
59
|
"@types/babel__traverse": "7.18.3",
|
|
60
|
-
"@types/express": "4.17.
|
|
60
|
+
"@types/express": "4.17.17",
|
|
61
61
|
"@types/less": "3.0.3",
|
|
62
62
|
"@types/spdy": "^3.4.5",
|
|
63
63
|
"cjs-module-lexer": "1.2.2",
|