makepack 1.7.4 → 1.7.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.
- package/package.json +5 -5
- package/src/actions/build/bundler.js +16 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "makepack",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI tool to create, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for npm projects.",
|
|
6
6
|
"categories": [
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
31
31
|
"@rollup/plugin-terser": "^0.4.4",
|
|
32
32
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
33
|
+
"@types/fs-extra": "^11.0.4",
|
|
33
34
|
"chokidar": "^4.0.3",
|
|
34
35
|
"commander": "^12.1.0",
|
|
35
36
|
"esbuild": "^0.25.5",
|
|
@@ -39,13 +40,12 @@
|
|
|
39
40
|
"lodash.debounce": "^4.0.8",
|
|
40
41
|
"madge": "^8.0.0",
|
|
41
42
|
"ora": "^8.1.1",
|
|
43
|
+
"react": "^19.1.0",
|
|
44
|
+
"react-dom": "^19.0.0",
|
|
42
45
|
"rollup": "^4.43.0",
|
|
43
46
|
"rollup-plugin-dts": "^6.2.1",
|
|
44
47
|
"tslib": "^2.8.1",
|
|
45
|
-
"vite": "^6.0.2"
|
|
46
|
-
"@types/fs-extra": "^11.0.4",
|
|
47
|
-
"react": "^19.1.0",
|
|
48
|
-
"react-dom": "^19.0.0"
|
|
48
|
+
"vite": "^6.0.2"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"CLI",
|
|
@@ -9,38 +9,37 @@ import dts from "rollup-plugin-dts";
|
|
|
9
9
|
import json from '@rollup/plugin-json';
|
|
10
10
|
import terser from "@rollup/plugin-terser";
|
|
11
11
|
|
|
12
|
-
async function
|
|
12
|
+
async function bind(args, spinner) {
|
|
13
13
|
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
|
|
14
|
-
const
|
|
14
|
+
const _external = [
|
|
15
15
|
...builtinModules,
|
|
16
16
|
...Object.keys(pkg.dependencies ?? {}),
|
|
17
17
|
...Object.keys(pkg.devDependencies ?? {}),
|
|
18
18
|
...Object.keys(pkg.peerDependencies ?? {}),
|
|
19
|
+
"tslib",
|
|
19
20
|
];
|
|
20
21
|
|
|
21
|
-
// remove tslib
|
|
22
|
-
const tslibIndex = external.indexOf("tslib");
|
|
23
|
-
if (tslibIndex !== -1) {
|
|
24
|
-
external.splice(tslibIndex, 1);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
22
|
const isTs = args.entry.endsWith(".ts")
|
|
28
23
|
|
|
29
24
|
const config = {
|
|
30
25
|
input: [args.entry],
|
|
31
|
-
external
|
|
26
|
+
external: (id) => {
|
|
27
|
+
return !id.startsWith('.') && !id.startsWith('/') && !/^[A-Za-z]:\\/.test(id);
|
|
28
|
+
},
|
|
32
29
|
plugins: [
|
|
33
30
|
json(),
|
|
34
31
|
resolve(),
|
|
35
32
|
commonjs(),
|
|
36
33
|
isTs ? typescript({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
target: "ES2017",
|
|
35
|
+
module: "ESNext",
|
|
36
|
+
jsx: "react",
|
|
37
|
+
strict: true,
|
|
38
|
+
forceConsistentCasingInFileNames: true,
|
|
39
|
+
esModuleInterop: true,
|
|
40
|
+
importHelpers: true,
|
|
41
|
+
moduleResolution: "node",
|
|
42
|
+
skipLibCheck: true,
|
|
44
43
|
include: ["src/**/*.ts", "src/**/*.tsx"],
|
|
45
44
|
exclude: ["node_modules", ".mpack"],
|
|
46
45
|
}) : null,
|
|
@@ -102,4 +101,4 @@ async function bundler(args, spinner) {
|
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
export default
|
|
104
|
+
export default bind;
|