@umijs/bundler-utils 4.0.0-beta.8 → 4.0.0-canary.20220317.1
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/helper-module-imports.d.ts +3 -0
- package/compiled/babel/helper-module-imports.js +1 -0
- package/compiled/babel/index.js +28728 -17541
- package/compiled/babel/index1.js +50 -0
- 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 +9 -2
- package/dist/index.js +38 -3
- package/package.json +47 -39
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"less","author":{"name":"Alexis Sellier","email":"self@cloudhead.net"},"license":"Apache-2.0"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
1
|
+
export declare function parseModule(opts: {
|
|
2
|
+
content: string;
|
|
3
|
+
path: string;
|
|
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];
|
|
9
|
+
export declare function isDepPath(path: string): boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
5
10
|
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.isDepPath = exports.parseModuleSync = exports.parseModule = void 0;
|
|
13
|
+
const es_module_lexer_1 = require("@umijs/bundler-utils/compiled/es-module-lexer");
|
|
14
|
+
const esbuild_1 = require("@umijs/bundler-utils/compiled/esbuild");
|
|
15
|
+
const utils_1 = require("@umijs/utils");
|
|
16
|
+
const path_1 = require("path");
|
|
17
|
+
function parseModule(opts) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield es_module_lexer_1.init;
|
|
20
|
+
return parseModuleSync(opts);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
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;
|
|
35
|
+
function isDepPath(path) {
|
|
36
|
+
const umiMonorepoPaths = ['umi/packages/', 'umi-next/packages/'];
|
|
37
|
+
return (path.includes('node_modules') ||
|
|
38
|
+
umiMonorepoPaths.some((p) => (0, utils_1.winPath)(path).includes(p)));
|
|
39
|
+
}
|
|
40
|
+
exports.isDepPath = isDepPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-utils",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-canary.20220317.1",
|
|
4
|
+
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-utils#readme",
|
|
5
|
+
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/umijs/umi-next"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
4
11
|
"main": "dist/index.js",
|
|
5
12
|
"types": "dist/index.d.ts",
|
|
6
13
|
"files": [
|
|
@@ -12,64 +19,65 @@
|
|
|
12
19
|
"build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
|
|
13
20
|
"dev": "pnpm build -- --watch"
|
|
14
21
|
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/umijs/umi-next"
|
|
18
|
-
},
|
|
19
|
-
"authors": [
|
|
20
|
-
"chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
|
|
21
|
-
],
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
24
|
-
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-utils#readme",
|
|
25
|
-
"publishConfig": {
|
|
26
|
-
"access": "public"
|
|
27
|
-
},
|
|
28
22
|
"dependencies": {
|
|
29
|
-
"@umijs/utils": "4.0.0-
|
|
30
|
-
"esbuild": "0.
|
|
23
|
+
"@umijs/utils": "4.0.0-canary.20220317.1",
|
|
24
|
+
"esbuild": "0.14.25"
|
|
31
25
|
},
|
|
32
26
|
"devDependencies": {
|
|
33
|
-
"@babel/code-frame": "7.16.
|
|
34
|
-
"@babel/core": "7.
|
|
35
|
-
"@babel/generator": "7.
|
|
36
|
-
"@babel/
|
|
37
|
-
"@babel/
|
|
38
|
-
"@babel/plugin-proposal-
|
|
39
|
-
"@babel/plugin-proposal-
|
|
40
|
-
"@babel/plugin-proposal-export-
|
|
41
|
-
"@babel/plugin-proposal-
|
|
42
|
-
"@babel/plugin-proposal-
|
|
43
|
-
"@babel/plugin-proposal-
|
|
44
|
-
"@babel/plugin-proposal-
|
|
45
|
-
"@babel/plugin-
|
|
46
|
-
"@babel/
|
|
47
|
-
"@babel/preset-
|
|
48
|
-
"@babel/preset-
|
|
49
|
-
"@babel/
|
|
50
|
-
"@babel/
|
|
51
|
-
"@babel/
|
|
52
|
-
"@babel/
|
|
27
|
+
"@babel/code-frame": "7.16.7",
|
|
28
|
+
"@babel/core": "7.17.5",
|
|
29
|
+
"@babel/generator": "7.17.3",
|
|
30
|
+
"@babel/helper-module-imports": "7.16.7",
|
|
31
|
+
"@babel/parser": "7.17.3",
|
|
32
|
+
"@babel/plugin-proposal-decorators": "7.17.2",
|
|
33
|
+
"@babel/plugin-proposal-do-expressions": "7.16.7",
|
|
34
|
+
"@babel/plugin-proposal-export-default-from": "7.16.7",
|
|
35
|
+
"@babel/plugin-proposal-export-namespace-from": "7.16.7",
|
|
36
|
+
"@babel/plugin-proposal-function-bind": "7.16.7",
|
|
37
|
+
"@babel/plugin-proposal-partial-application": "7.16.7",
|
|
38
|
+
"@babel/plugin-proposal-pipeline-operator": "7.17.6",
|
|
39
|
+
"@babel/plugin-proposal-record-and-tuple": "7.16.7",
|
|
40
|
+
"@babel/plugin-transform-runtime": "7.17.0",
|
|
41
|
+
"@babel/preset-env": "7.16.11",
|
|
42
|
+
"@babel/preset-react": "7.16.7",
|
|
43
|
+
"@babel/preset-typescript": "7.16.7",
|
|
44
|
+
"@babel/register": "7.17.0",
|
|
45
|
+
"@babel/template": "7.16.7",
|
|
46
|
+
"@babel/traverse": "7.17.3",
|
|
47
|
+
"@babel/types": "7.17.0",
|
|
53
48
|
"@types/babel__code-frame": "7.0.3",
|
|
54
|
-
"@types/babel__generator": "7.6.
|
|
49
|
+
"@types/babel__generator": "7.6.4",
|
|
55
50
|
"@types/babel__parser": "7.1.1",
|
|
56
51
|
"@types/babel__template": "7.4.1",
|
|
57
52
|
"@types/babel__traverse": "7.14.2",
|
|
53
|
+
"@types/less": "3.0.3",
|
|
58
54
|
"cjs-module-lexer": "1.2.2",
|
|
59
|
-
"es-module-lexer": "0.
|
|
55
|
+
"es-module-lexer": "0.10.0",
|
|
56
|
+
"express": "4.17.3",
|
|
57
|
+
"less": "4.1.2"
|
|
60
58
|
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"authors": [
|
|
63
|
+
"chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
|
|
64
|
+
],
|
|
61
65
|
"compiledConfig": {
|
|
62
66
|
"deps": [
|
|
63
67
|
"cjs-module-lexer",
|
|
64
68
|
"es-module-lexer",
|
|
65
69
|
"esbuild",
|
|
70
|
+
"express",
|
|
71
|
+
"less",
|
|
66
72
|
"./bundles/babel/bundle"
|
|
67
73
|
],
|
|
68
74
|
"externals": {
|
|
69
75
|
"cjs-module-lexer": "$$LOCAL",
|
|
70
76
|
"debug": "@umijs/utils/compiled/debug",
|
|
71
77
|
"esbuild": "$$LOCAL",
|
|
72
|
-
"es-module-lexer": "$$LOCAL"
|
|
78
|
+
"es-module-lexer": "$$LOCAL",
|
|
79
|
+
"express": "$$LOCAL",
|
|
80
|
+
"less": "$$LOCAL"
|
|
73
81
|
},
|
|
74
82
|
"noMinify": [
|
|
75
83
|
"./bundles/babel/bundle"
|