@storm-software/esbuild 0.35.10 → 0.35.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/README.md +1 -1
- package/bin/esbuild.cjs +1194 -2706
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +14 -14
- package/dist/build.js +13 -13
- package/dist/{chunk-N6KCNJOR.cjs → chunk-42HYZLJH.cjs} +17 -26
- package/dist/{chunk-SAK5QFCE.js → chunk-47A73LZ7.js} +232 -123
- package/dist/{chunk-Q77NJNNL.cjs → chunk-4PZGT5BH.cjs} +8 -11
- package/dist/{chunk-CHAHHSIR.js → chunk-72UBXZRO.js} +4 -6
- package/dist/chunk-77TTTWKY.cjs +25 -0
- package/dist/{chunk-DU5R4RJA.js → chunk-77XQDMGA.js} +36 -30
- package/dist/{chunk-KK2BGIRB.cjs → chunk-7VE5Y757.cjs} +18 -9
- package/dist/{chunk-JHQYSHQ5.js → chunk-CV2AM72J.js} +28 -13
- package/dist/{chunk-3VHLCZ6F.js → chunk-EBH4ZCN5.js} +189 -116
- package/dist/{chunk-JS5GZ7ZE.cjs → chunk-EGUR2GEF.cjs} +46 -40
- package/dist/{chunk-QBMHS72C.js → chunk-F3R5ZFGB.js} +7 -10
- package/dist/{chunk-GZSSIGNC.js → chunk-GZSSIGNC.cjs} +2 -2
- package/dist/{chunk-ZS2HZUYH.cjs → chunk-HIO4TSG7.cjs} +976 -1206
- package/dist/{chunk-YXJYZG6O.cjs → chunk-HPZXWRI7.cjs} +28 -26
- package/dist/{chunk-TKNLZW4V.cjs → chunk-JCICRU7K.cjs} +3 -5
- package/dist/chunk-KR4NRRPF.js +59 -0
- package/dist/{chunk-JNDYTIRD.js → chunk-MAXDIXOQ.js} +2 -2
- package/dist/{chunk-B4NWTB7S.cjs → chunk-MYUKVBFG.cjs} +288 -179
- package/dist/{chunk-ZDMKNQUW.cjs → chunk-OV5OYAJ7.cjs} +5 -5
- package/dist/{chunk-JZBM4QKF.cjs → chunk-PB5XBFPA.cjs} +36 -21
- package/dist/{chunk-GWGBQKRY.js → chunk-PDYSQLJS.js} +15 -24
- package/dist/{chunk-5ZPCV2IJ.js → chunk-POMR4JSG.js} +154 -266
- package/dist/chunk-Q366M4DV.js +37 -0
- package/dist/{chunk-UA2A6OC6.js → chunk-QOTJTLX7.js} +1 -1
- package/dist/{chunk-EBZ4R3MW.js → chunk-SB2WRTQ2.js} +43 -17
- package/dist/{chunk-2NQYRZKO.cjs → chunk-UAPH32Y3.cjs} +204 -131
- package/dist/{chunk-VGC3FXLU.js → chunk-VGC3FXLU.cjs} +1 -1
- package/dist/{chunk-CY4KF2US.cjs → chunk-WQVSYEMN.cjs} +47 -21
- package/dist/chunk-XHTD4QDZ.cjs +6 -0
- package/dist/{chunk-GKAHDFNO.js → chunk-ZF7HGC35.js} +3 -9
- package/dist/clean.cjs +5 -5
- package/dist/clean.js +4 -4
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/context.cjs +8 -8
- package/dist/context.js +7 -7
- package/dist/index.cjs +16 -16
- package/dist/index.js +14 -14
- package/dist/package-json.cjs +6 -6
- package/dist/package-json.js +5 -5
- package/dist/plugins/deps-check.cjs +5 -5
- package/dist/plugins/deps-check.js +4 -4
- package/dist/plugins/resolve-paths.cjs +4 -4
- package/dist/plugins/resolve-paths.js +3 -3
- package/dist/{rollup.js → rollup.cjs} +3 -3
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types.cjs +2 -2
- package/dist/types.js +2 -2
- package/dist/watch.cjs +19 -29
- package/dist/watch.js +15 -25
- package/package.json +4 -4
- package/dist/chunk-5R3LX6E4.cjs +0 -6
- package/dist/chunk-CA7VVNV2.js +0 -28
- package/dist/chunk-IV2WE7RO.cjs +0 -31
- package/dist/chunk-ZILTNBKJ.js +0 -57
- /package/dist/{chunk-BYH4XDRH.js → chunk-BYH4XDRH.cjs} +0 -0
- /package/dist/{chunk-JZ25TPTY.js → chunk-JZ25TPTY.cjs} +0 -0
- /package/dist/{chunk-TWFEYLU4.js → chunk-TWFEYLU4.cjs} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
copyAssets
|
|
3
|
+
} from "./chunk-47A73LZ7.js";
|
|
4
|
+
import {
|
|
5
|
+
getStopwatch,
|
|
6
|
+
writeDebug
|
|
7
|
+
} from "./chunk-EBH4ZCN5.js";
|
|
8
|
+
import {
|
|
9
|
+
init_esm_shims
|
|
10
|
+
} from "./chunk-72UBXZRO.js";
|
|
11
|
+
|
|
12
|
+
// src/assets.ts
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
async function copyBuildAssets(context) {
|
|
15
|
+
if (context.result?.errors.length === 0) {
|
|
16
|
+
writeDebug(
|
|
17
|
+
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
18
|
+
context.workspaceConfig
|
|
19
|
+
);
|
|
20
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
21
|
+
await copyAssets(
|
|
22
|
+
context.workspaceConfig,
|
|
23
|
+
context.options.assets ?? [],
|
|
24
|
+
context.outputPath,
|
|
25
|
+
context.options.projectRoot,
|
|
26
|
+
context.sourceRoot,
|
|
27
|
+
true,
|
|
28
|
+
false
|
|
29
|
+
);
|
|
30
|
+
stopwatch();
|
|
31
|
+
}
|
|
32
|
+
return context;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
copyBuildAssets
|
|
37
|
+
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addPackageDependencies,
|
|
3
3
|
addWorkspacePackageJsonFields
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-47A73LZ7.js";
|
|
5
5
|
import {
|
|
6
6
|
getStopwatch,
|
|
7
7
|
writeDebug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EBH4ZCN5.js";
|
|
9
9
|
import {
|
|
10
10
|
joinPaths
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F3R5ZFGB.js";
|
|
12
12
|
import {
|
|
13
|
-
__name,
|
|
14
13
|
init_esm_shims
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-72UBXZRO.js";
|
|
16
15
|
|
|
17
16
|
// src/package-json.ts
|
|
18
17
|
init_esm_shims();
|
|
@@ -23,17 +22,39 @@ async function generatePackageJson(context) {
|
|
|
23
22
|
if (context.options.generatePackageJson !== false && existsSync(joinPaths(context.options.projectRoot, "package.json"))) {
|
|
24
23
|
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
25
24
|
const stopwatch = getStopwatch("Write package.json file");
|
|
26
|
-
const packageJsonPath = joinPaths(
|
|
25
|
+
const packageJsonPath = joinPaths(
|
|
26
|
+
context.options.projectRoot,
|
|
27
|
+
"project.json"
|
|
28
|
+
);
|
|
27
29
|
if (!existsSync(packageJsonPath)) {
|
|
28
30
|
throw new Error("Cannot find package.json configuration");
|
|
29
31
|
}
|
|
30
|
-
const packageJsonFile = await hf.readFile(
|
|
32
|
+
const packageJsonFile = await hf.readFile(
|
|
33
|
+
joinPaths(
|
|
34
|
+
context.workspaceConfig.workspaceRoot,
|
|
35
|
+
context.options.projectRoot,
|
|
36
|
+
"package.json"
|
|
37
|
+
),
|
|
38
|
+
"utf8"
|
|
39
|
+
);
|
|
31
40
|
let packageJson = JSON.parse(packageJsonFile);
|
|
32
41
|
if (!packageJson) {
|
|
33
42
|
throw new Error("Cannot find package.json configuration file");
|
|
34
43
|
}
|
|
35
|
-
packageJson = await addPackageDependencies(
|
|
36
|
-
|
|
44
|
+
packageJson = await addPackageDependencies(
|
|
45
|
+
context.workspaceConfig.workspaceRoot,
|
|
46
|
+
context.options.projectRoot,
|
|
47
|
+
context.projectName,
|
|
48
|
+
packageJson
|
|
49
|
+
);
|
|
50
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
51
|
+
context.workspaceConfig,
|
|
52
|
+
context.options.projectRoot,
|
|
53
|
+
context.sourceRoot,
|
|
54
|
+
context.projectName,
|
|
55
|
+
false,
|
|
56
|
+
packageJson
|
|
57
|
+
);
|
|
37
58
|
if (context.options.entry) {
|
|
38
59
|
packageJson.exports ??= {};
|
|
39
60
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -103,20 +124,25 @@ async function generatePackageJson(context) {
|
|
|
103
124
|
if (isDts) {
|
|
104
125
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
105
126
|
}
|
|
106
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
107
|
-
|
|
108
|
-
ret[key.replace("/index", "")]
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
127
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
128
|
+
(ret, key) => {
|
|
129
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
130
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
131
|
+
}
|
|
132
|
+
return ret;
|
|
133
|
+
},
|
|
134
|
+
packageJson.exports
|
|
135
|
+
);
|
|
112
136
|
}
|
|
113
137
|
}
|
|
114
|
-
await writeJsonFile(
|
|
138
|
+
await writeJsonFile(
|
|
139
|
+
joinPaths(context.outputPath, "package.json"),
|
|
140
|
+
packageJson
|
|
141
|
+
);
|
|
115
142
|
stopwatch();
|
|
116
143
|
}
|
|
117
144
|
return context;
|
|
118
145
|
}
|
|
119
|
-
__name(generatePackageJson, "generatePackageJson");
|
|
120
146
|
|
|
121
147
|
export {
|
|
122
148
|
generatePackageJson
|