@storm-software/workspace-tools 1.30.9 → 1.30.10
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/CHANGELOG.md +7 -0
- package/index.js +116 -41
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +116 -41
- package/src/executors/tsup/get-config.js +0 -1
- package/src/executors/tsup-browser/executor.js +116 -41
- package/src/executors/tsup-neutral/executor.js +116 -41
- package/src/executors/tsup-node/executor.js +116 -41
|
@@ -117072,12 +117072,82 @@ function modernConfig({
|
|
|
117072
117072
|
outExtension
|
|
117073
117073
|
};
|
|
117074
117074
|
}
|
|
117075
|
+
function legacyConfig({
|
|
117076
|
+
entry,
|
|
117077
|
+
outDir,
|
|
117078
|
+
projectRoot,
|
|
117079
|
+
workspaceRoot,
|
|
117080
|
+
tsconfig = "tsconfig.json",
|
|
117081
|
+
splitting,
|
|
117082
|
+
treeshake,
|
|
117083
|
+
debug = false,
|
|
117084
|
+
external,
|
|
117085
|
+
banner = {},
|
|
117086
|
+
platform = "neutral",
|
|
117087
|
+
verbose = false,
|
|
117088
|
+
shims = true,
|
|
117089
|
+
define: define2,
|
|
117090
|
+
env,
|
|
117091
|
+
plugins,
|
|
117092
|
+
generatePackageJson,
|
|
117093
|
+
dtsTsConfig
|
|
117094
|
+
}) {
|
|
117095
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117096
|
+
return {
|
|
117097
|
+
name: "legacy",
|
|
117098
|
+
entry,
|
|
117099
|
+
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
117100
|
+
target: ["es2022", "node18"],
|
|
117101
|
+
tsconfig,
|
|
117102
|
+
splitting,
|
|
117103
|
+
generatePackageJson,
|
|
117104
|
+
treeshake: treeshake ? {
|
|
117105
|
+
preset: "recommended"
|
|
117106
|
+
} : false,
|
|
117107
|
+
projectRoot,
|
|
117108
|
+
workspaceRoot,
|
|
117109
|
+
outDir: outputPath,
|
|
117110
|
+
silent: !verbose,
|
|
117111
|
+
metafile: true,
|
|
117112
|
+
shims,
|
|
117113
|
+
external,
|
|
117114
|
+
platform,
|
|
117115
|
+
banner,
|
|
117116
|
+
define: define2,
|
|
117117
|
+
env,
|
|
117118
|
+
dts: false,
|
|
117119
|
+
experimentalDts: {
|
|
117120
|
+
entry,
|
|
117121
|
+
compilerOptions: {
|
|
117122
|
+
...dtsTsConfig,
|
|
117123
|
+
options: {
|
|
117124
|
+
...dtsTsConfig.options,
|
|
117125
|
+
outDir: outputPath
|
|
117126
|
+
}
|
|
117127
|
+
}
|
|
117128
|
+
},
|
|
117129
|
+
/*minify: debug ? false : "terser",
|
|
117130
|
+
terserOptions: {
|
|
117131
|
+
compress: true,
|
|
117132
|
+
ecma: 2020,
|
|
117133
|
+
keep_classnames: true,
|
|
117134
|
+
keep_fnames: true
|
|
117135
|
+
},*/
|
|
117136
|
+
apiReport: false,
|
|
117137
|
+
docModel: false,
|
|
117138
|
+
tsdocMetadata: false,
|
|
117139
|
+
sourcemap: debug,
|
|
117140
|
+
clean: false,
|
|
117141
|
+
tsconfigDecoratorMetadata: true,
|
|
117142
|
+
plugins,
|
|
117143
|
+
outExtension
|
|
117144
|
+
};
|
|
117145
|
+
}
|
|
117075
117146
|
function getConfig(workspaceRoot, projectRoot, getConfigFn, {
|
|
117076
117147
|
outputPath,
|
|
117077
117148
|
tsConfig,
|
|
117078
117149
|
additionalEntryPoints,
|
|
117079
117150
|
platform,
|
|
117080
|
-
emitOnAll = true,
|
|
117081
117151
|
...rest
|
|
117082
117152
|
}) {
|
|
117083
117153
|
return getConfigFn({
|
|
@@ -117286,15 +117356,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117286
117356
|
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117287
117357
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117288
117358
|
delete packageJson.dependencies;
|
|
117289
|
-
externalDependencies.forEach((
|
|
117290
|
-
const packageConfig =
|
|
117291
|
-
if (packageConfig?.packageName && !!(projectGraph.externalNodes[
|
|
117359
|
+
externalDependencies.forEach((externalDependency) => {
|
|
117360
|
+
const packageConfig = externalDependency.node.data;
|
|
117361
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
117292
117362
|
const { packageName, version } = packageConfig;
|
|
117293
117363
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117294
117364
|
return;
|
|
117295
117365
|
}
|
|
117296
117366
|
packageJson.dependencies ??= {};
|
|
117297
|
-
packageJson.dependencies[packageName] = !!projectGraph.nodes[
|
|
117367
|
+
packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
117298
117368
|
}
|
|
117299
117369
|
});
|
|
117300
117370
|
internalDependencies.forEach((packageName) => {
|
|
@@ -117333,7 +117403,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117333
117403
|
};
|
|
117334
117404
|
packageJson.exports = Object.keys(entry).reduce(
|
|
117335
117405
|
(ret, key) => {
|
|
117336
|
-
|
|
117406
|
+
let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
|
|
117407
|
+
packageJsonKey = packageJsonKey.replaceAll("/index", "");
|
|
117337
117408
|
if (!ret[packageJsonKey]) {
|
|
117338
117409
|
ret[packageJsonKey] = {
|
|
117339
117410
|
import: {
|
|
@@ -117442,47 +117513,51 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
|
117442
117513
|
options.plugins.push(environmentPlugin(stormEnv));
|
|
117443
117514
|
const config = (0, import_tsup.defineConfig)([
|
|
117444
117515
|
...Object.keys(entry).reduce((ret, key) => {
|
|
117445
|
-
|
|
117446
|
-
|
|
117447
|
-
|
|
117448
|
-
|
|
117449
|
-
|
|
117450
|
-
|
|
117451
|
-
|
|
117452
|
-
|
|
117453
|
-
|
|
117454
|
-
|
|
117455
|
-
|
|
117456
|
-
|
|
117457
|
-
|
|
117458
|
-
(0,
|
|
117459
|
-
|
|
117460
|
-
|
|
117461
|
-
|
|
117462
|
-
|
|
117463
|
-
|
|
117464
|
-
|
|
117465
|
-
|
|
117466
|
-
|
|
117467
|
-
|
|
117468
|
-
|
|
117469
|
-
|
|
117470
|
-
|
|
117471
|
-
|
|
117472
|
-
|
|
117473
|
-
|
|
117474
|
-
js: `${options.banner}
|
|
117516
|
+
const getConfigOptions = {
|
|
117517
|
+
...options,
|
|
117518
|
+
define: {
|
|
117519
|
+
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
117520
|
+
},
|
|
117521
|
+
env: {
|
|
117522
|
+
__STORM_CONFIG: JSON.stringify(stormEnv),
|
|
117523
|
+
...stormEnv
|
|
117524
|
+
},
|
|
117525
|
+
dtsTsConfig: getNormalizedTsConfig(
|
|
117526
|
+
context.root,
|
|
117527
|
+
options.outputPath,
|
|
117528
|
+
(0, import_tsc.createTypeScriptCompilationOptions)(
|
|
117529
|
+
(0, import_normalize_options.normalizeOptions)(
|
|
117530
|
+
{
|
|
117531
|
+
...options,
|
|
117532
|
+
watch: false,
|
|
117533
|
+
main: entry[key],
|
|
117534
|
+
transformers: []
|
|
117535
|
+
},
|
|
117536
|
+
context.root,
|
|
117537
|
+
sourceRoot,
|
|
117538
|
+
workspaceRoot
|
|
117539
|
+
),
|
|
117540
|
+
context
|
|
117541
|
+
)
|
|
117542
|
+
),
|
|
117543
|
+
banner: options.banner ? {
|
|
117544
|
+
js: `${options.banner}
|
|
117475
117545
|
|
|
117476
117546
|
`,
|
|
117477
|
-
|
|
117547
|
+
css: `/*
|
|
117478
117548
|
${options.banner}
|
|
117479
117549
|
*/
|
|
117480
117550
|
|
|
117481
117551
|
`
|
|
117482
|
-
|
|
117483
|
-
|
|
117484
|
-
|
|
117485
|
-
|
|
117552
|
+
} : void 0,
|
|
117553
|
+
outputPath: options.outputPath,
|
|
117554
|
+
entry: entry[key]
|
|
117555
|
+
};
|
|
117556
|
+
ret.push(
|
|
117557
|
+
getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
|
|
117558
|
+
);
|
|
117559
|
+
ret.push(
|
|
117560
|
+
getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
|
|
117486
117561
|
);
|
|
117487
117562
|
return ret;
|
|
117488
117563
|
}, [])
|