@umijs/bundler-utils 4.0.0-rc.1 → 4.0.0-rc.12
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/compiled/babel/index.js +78723 -41918
- package/compiled/babel/index1.js +44 -0
- package/compiled/es-module-lexer/LICENSE +1 -1
- package/compiled/es-module-lexer/index.js +1 -1
- package/compiled/express/LICENSE +24 -0
- package/compiled/express/body-parser/index.d.ts +107 -0
- package/compiled/express/connect/index.d.ts +93 -0
- package/compiled/express/express-serve-static-core/index.d.ts +1252 -0
- package/compiled/express/index.d.ts +133 -0
- package/compiled/express/index.js +321 -0
- package/compiled/express/mime/index.d.ts +35 -0
- package/compiled/express/package.json +1 -0
- package/compiled/express/qs/index.d.ts +62 -0
- package/compiled/express/range-parser/index.d.ts +35 -0
- package/compiled/express/serve-static/index.d.ts +108 -0
- package/compiled/less/index.d.ts +284 -0
- package/compiled/less/index.js +17 -0
- package/compiled/less/package.json +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +15 -10
- package/package.json +35 -27
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"less","author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"license":"Apache-2.0"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,8 @@ export declare function parseModule(opts: {
|
|
|
2
2
|
content: string;
|
|
3
3
|
path: string;
|
|
4
4
|
}): Promise<readonly [imports: readonly import("@umijs/bundler-utils/compiled/es-module-lexer").ImportSpecifier[], exports: readonly string[], facade: boolean]>;
|
|
5
|
+
export declare function parseModuleSync(opts: {
|
|
6
|
+
content: string;
|
|
7
|
+
path: string;
|
|
8
|
+
}): readonly [imports: readonly import("@umijs/bundler-utils/compiled/es-module-lexer").ImportSpecifier[], exports: readonly string[], facade: boolean];
|
|
5
9
|
export declare function isDepPath(path: string): boolean;
|
package/dist/index.js
CHANGED
|
@@ -9,27 +9,32 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.isDepPath = exports.parseModule = void 0;
|
|
12
|
+
exports.isDepPath = exports.parseModuleSync = exports.parseModule = void 0;
|
|
13
13
|
const es_module_lexer_1 = require("@umijs/bundler-utils/compiled/es-module-lexer");
|
|
14
14
|
const esbuild_1 = require("@umijs/bundler-utils/compiled/esbuild");
|
|
15
|
+
const utils_1 = require("@umijs/utils");
|
|
15
16
|
const path_1 = require("path");
|
|
16
17
|
function parseModule(opts) {
|
|
17
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
let content = opts.content;
|
|
19
|
-
if (opts.path.endsWith('.tsx') || opts.path.endsWith('.jsx')) {
|
|
20
|
-
content = (0, esbuild_1.transformSync)(content, {
|
|
21
|
-
loader: (0, path_1.extname)(opts.path).slice(1),
|
|
22
|
-
format: 'esm',
|
|
23
|
-
}).code;
|
|
24
|
-
}
|
|
25
19
|
yield es_module_lexer_1.init;
|
|
26
|
-
return (
|
|
20
|
+
return parseModuleSync(opts);
|
|
27
21
|
});
|
|
28
22
|
}
|
|
29
23
|
exports.parseModule = parseModule;
|
|
24
|
+
function parseModuleSync(opts) {
|
|
25
|
+
let content = opts.content;
|
|
26
|
+
if (opts.path.endsWith('.tsx') || opts.path.endsWith('.jsx')) {
|
|
27
|
+
content = (0, esbuild_1.transformSync)(content, {
|
|
28
|
+
loader: (0, path_1.extname)(opts.path).slice(1),
|
|
29
|
+
format: 'esm',
|
|
30
|
+
}).code;
|
|
31
|
+
}
|
|
32
|
+
return (0, es_module_lexer_1.parse)(content);
|
|
33
|
+
}
|
|
34
|
+
exports.parseModuleSync = parseModuleSync;
|
|
30
35
|
function isDepPath(path) {
|
|
31
36
|
const umiMonorepoPaths = ['umi/packages/', 'umi-next/packages/'];
|
|
32
37
|
return (path.includes('node_modules') ||
|
|
33
|
-
umiMonorepoPaths.some((p) => path.includes(p)));
|
|
38
|
+
umiMonorepoPaths.some((p) => (0, utils_1.winPath)(path).includes(p)));
|
|
34
39
|
}
|
|
35
40
|
exports.isDepPath = isDepPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-utils",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.12",
|
|
4
4
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-utils#readme",
|
|
5
5
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
6
6
|
"repository": {
|
|
@@ -20,38 +20,42 @@
|
|
|
20
20
|
"dev": "pnpm build -- --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@umijs/utils": "4.0.0-rc.
|
|
24
|
-
"esbuild": "0.14.
|
|
23
|
+
"@umijs/utils": "4.0.0-rc.12",
|
|
24
|
+
"esbuild": "0.14.36",
|
|
25
|
+
"regenerate-unicode-properties": "10.0.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@babel/code-frame": "7.16.
|
|
28
|
-
"@babel/core": "7.
|
|
29
|
-
"@babel/generator": "7.
|
|
30
|
-
"@babel/helper-module-imports": "7.16.
|
|
31
|
-
"@babel/parser": "7.
|
|
32
|
-
"@babel/plugin-proposal-decorators": "7.
|
|
33
|
-
"@babel/plugin-proposal-do-expressions": "7.16.
|
|
34
|
-
"@babel/plugin-proposal-export-default-from": "7.16.
|
|
35
|
-
"@babel/plugin-proposal-export-namespace-from": "7.16.
|
|
36
|
-
"@babel/plugin-proposal-function-bind": "7.16.
|
|
37
|
-
"@babel/plugin-proposal-partial-application": "7.16.
|
|
38
|
-
"@babel/plugin-proposal-pipeline-operator": "7.
|
|
39
|
-
"@babel/plugin-proposal-record-and-tuple": "7.16.
|
|
40
|
-
"@babel/plugin-transform-runtime": "7.
|
|
41
|
-
"@babel/preset-env": "7.16.
|
|
42
|
-
"@babel/preset-react": "7.16.
|
|
43
|
-
"@babel/preset-typescript": "7.16.
|
|
44
|
-
"@babel/register": "7.
|
|
45
|
-
"@babel/template": "7.16.
|
|
46
|
-
"@babel/traverse": "7.
|
|
47
|
-
"@babel/types": "7.
|
|
28
|
+
"@babel/code-frame": "7.16.7",
|
|
29
|
+
"@babel/core": "7.17.9",
|
|
30
|
+
"@babel/generator": "7.17.9",
|
|
31
|
+
"@babel/helper-module-imports": "7.16.7",
|
|
32
|
+
"@babel/parser": "7.17.9",
|
|
33
|
+
"@babel/plugin-proposal-decorators": "7.17.9",
|
|
34
|
+
"@babel/plugin-proposal-do-expressions": "7.16.7",
|
|
35
|
+
"@babel/plugin-proposal-export-default-from": "7.16.7",
|
|
36
|
+
"@babel/plugin-proposal-export-namespace-from": "7.16.7",
|
|
37
|
+
"@babel/plugin-proposal-function-bind": "7.16.7",
|
|
38
|
+
"@babel/plugin-proposal-partial-application": "7.16.7",
|
|
39
|
+
"@babel/plugin-proposal-pipeline-operator": "7.17.6",
|
|
40
|
+
"@babel/plugin-proposal-record-and-tuple": "7.16.7",
|
|
41
|
+
"@babel/plugin-transform-runtime": "7.17.0",
|
|
42
|
+
"@babel/preset-env": "7.16.11",
|
|
43
|
+
"@babel/preset-react": "7.16.7",
|
|
44
|
+
"@babel/preset-typescript": "7.16.7",
|
|
45
|
+
"@babel/register": "7.17.7",
|
|
46
|
+
"@babel/template": "7.16.7",
|
|
47
|
+
"@babel/traverse": "7.17.9",
|
|
48
|
+
"@babel/types": "7.17.0",
|
|
48
49
|
"@types/babel__code-frame": "7.0.3",
|
|
49
|
-
"@types/babel__generator": "7.6.
|
|
50
|
+
"@types/babel__generator": "7.6.4",
|
|
50
51
|
"@types/babel__parser": "7.1.1",
|
|
51
52
|
"@types/babel__template": "7.4.1",
|
|
52
53
|
"@types/babel__traverse": "7.14.2",
|
|
54
|
+
"@types/less": "3.0.3",
|
|
53
55
|
"cjs-module-lexer": "1.2.2",
|
|
54
|
-
"es-module-lexer": "0.
|
|
56
|
+
"es-module-lexer": "0.10.5",
|
|
57
|
+
"express": "4.17.3",
|
|
58
|
+
"less": "4.1.2"
|
|
55
59
|
},
|
|
56
60
|
"publishConfig": {
|
|
57
61
|
"access": "public"
|
|
@@ -64,13 +68,17 @@
|
|
|
64
68
|
"cjs-module-lexer",
|
|
65
69
|
"es-module-lexer",
|
|
66
70
|
"esbuild",
|
|
71
|
+
"express",
|
|
72
|
+
"less",
|
|
67
73
|
"./bundles/babel/bundle"
|
|
68
74
|
],
|
|
69
75
|
"externals": {
|
|
70
76
|
"cjs-module-lexer": "$$LOCAL",
|
|
71
77
|
"debug": "@umijs/utils/compiled/debug",
|
|
72
78
|
"esbuild": "$$LOCAL",
|
|
73
|
-
"es-module-lexer": "$$LOCAL"
|
|
79
|
+
"es-module-lexer": "$$LOCAL",
|
|
80
|
+
"express": "$$LOCAL",
|
|
81
|
+
"less": "$$LOCAL"
|
|
74
82
|
},
|
|
75
83
|
"noMinify": [
|
|
76
84
|
"./bundles/babel/bundle"
|