@storm-software/workspace-tools 1.30.9 → 1.30.11
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 +14 -0
- package/index.js +120 -44
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +120 -44
- package/src/executors/tsup/get-config.js +0 -1
- package/src/executors/tsup-browser/executor.js +120 -44
- package/src/executors/tsup-neutral/executor.js +120 -44
- package/src/executors/tsup-node/executor.js +120 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.30.10](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.9...workspace-tools-v1.30.10) (2023-12-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Updated the code to define tsup config ([6d6889e](https://github.com/storm-software/storm-ops/commit/6d6889e81e493dbdb73386e10ea4583246886232))
|
|
7
|
+
|
|
8
|
+
## [1.30.9](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.8...workspace-tools-v1.30.9) (2023-12-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **workspace-tools:** Update package.json export to include new options ([480d5d0](https://github.com/storm-software/storm-ops/commit/480d5d06eee301206ac0ed7c03ae6d7a22835b84))
|
|
14
|
+
|
|
1
15
|
## [1.30.8](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.7...workspace-tools-v1.30.8) (2023-12-14)
|
|
2
16
|
|
|
3
17
|
|
package/index.js
CHANGED
|
@@ -117280,12 +117280,82 @@ function modernConfig({
|
|
|
117280
117280
|
outExtension
|
|
117281
117281
|
};
|
|
117282
117282
|
}
|
|
117283
|
+
function legacyConfig({
|
|
117284
|
+
entry,
|
|
117285
|
+
outDir,
|
|
117286
|
+
projectRoot,
|
|
117287
|
+
workspaceRoot,
|
|
117288
|
+
tsconfig = "tsconfig.json",
|
|
117289
|
+
splitting,
|
|
117290
|
+
treeshake,
|
|
117291
|
+
debug = false,
|
|
117292
|
+
external,
|
|
117293
|
+
banner = {},
|
|
117294
|
+
platform = "neutral",
|
|
117295
|
+
verbose = false,
|
|
117296
|
+
shims = true,
|
|
117297
|
+
define: define2,
|
|
117298
|
+
env: env2,
|
|
117299
|
+
plugins,
|
|
117300
|
+
generatePackageJson,
|
|
117301
|
+
dtsTsConfig
|
|
117302
|
+
}) {
|
|
117303
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117304
|
+
return {
|
|
117305
|
+
name: "legacy",
|
|
117306
|
+
entry,
|
|
117307
|
+
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
117308
|
+
target: ["es2022", "node18"],
|
|
117309
|
+
tsconfig,
|
|
117310
|
+
splitting,
|
|
117311
|
+
generatePackageJson,
|
|
117312
|
+
treeshake: treeshake ? {
|
|
117313
|
+
preset: "recommended"
|
|
117314
|
+
} : false,
|
|
117315
|
+
projectRoot,
|
|
117316
|
+
workspaceRoot,
|
|
117317
|
+
outDir: outputPath,
|
|
117318
|
+
silent: !verbose,
|
|
117319
|
+
metafile: true,
|
|
117320
|
+
shims,
|
|
117321
|
+
external,
|
|
117322
|
+
platform,
|
|
117323
|
+
banner,
|
|
117324
|
+
define: define2,
|
|
117325
|
+
env: env2,
|
|
117326
|
+
dts: false,
|
|
117327
|
+
experimentalDts: {
|
|
117328
|
+
entry,
|
|
117329
|
+
compilerOptions: {
|
|
117330
|
+
...dtsTsConfig,
|
|
117331
|
+
options: {
|
|
117332
|
+
...dtsTsConfig.options,
|
|
117333
|
+
outDir: outputPath
|
|
117334
|
+
}
|
|
117335
|
+
}
|
|
117336
|
+
},
|
|
117337
|
+
/*minify: debug ? false : "terser",
|
|
117338
|
+
terserOptions: {
|
|
117339
|
+
compress: true,
|
|
117340
|
+
ecma: 2020,
|
|
117341
|
+
keep_classnames: true,
|
|
117342
|
+
keep_fnames: true
|
|
117343
|
+
},*/
|
|
117344
|
+
apiReport: false,
|
|
117345
|
+
docModel: false,
|
|
117346
|
+
tsdocMetadata: false,
|
|
117347
|
+
sourcemap: debug,
|
|
117348
|
+
clean: false,
|
|
117349
|
+
tsconfigDecoratorMetadata: true,
|
|
117350
|
+
plugins,
|
|
117351
|
+
outExtension
|
|
117352
|
+
};
|
|
117353
|
+
}
|
|
117283
117354
|
function getConfig(workspaceRoot, projectRoot, getConfigFn, {
|
|
117284
117355
|
outputPath,
|
|
117285
117356
|
tsConfig,
|
|
117286
117357
|
additionalEntryPoints,
|
|
117287
117358
|
platform,
|
|
117288
|
-
emitOnAll = true,
|
|
117289
117359
|
...rest
|
|
117290
117360
|
}) {
|
|
117291
117361
|
return getConfigFn({
|
|
@@ -117494,15 +117564,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117494
117564
|
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117495
117565
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117496
117566
|
delete packageJson.dependencies;
|
|
117497
|
-
externalDependencies.forEach((
|
|
117498
|
-
const packageConfig =
|
|
117499
|
-
if (packageConfig?.packageName && !!(projectGraph.externalNodes[
|
|
117567
|
+
externalDependencies.forEach((externalDependency) => {
|
|
117568
|
+
const packageConfig = externalDependency.node.data;
|
|
117569
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
117500
117570
|
const { packageName, version } = packageConfig;
|
|
117501
117571
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117502
117572
|
return;
|
|
117503
117573
|
}
|
|
117504
117574
|
packageJson.dependencies ??= {};
|
|
117505
|
-
packageJson.dependencies[packageName] = !!projectGraph.nodes[
|
|
117575
|
+
packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
117506
117576
|
}
|
|
117507
117577
|
});
|
|
117508
117578
|
internalDependencies.forEach((packageName) => {
|
|
@@ -117541,7 +117611,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117541
117611
|
};
|
|
117542
117612
|
packageJson.exports = Object.keys(entry).reduce(
|
|
117543
117613
|
(ret, key) => {
|
|
117544
|
-
|
|
117614
|
+
let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
|
|
117615
|
+
packageJsonKey = packageJsonKey.replaceAll("/index", "");
|
|
117545
117616
|
if (!ret[packageJsonKey]) {
|
|
117546
117617
|
ret[packageJsonKey] = {
|
|
117547
117618
|
import: {
|
|
@@ -117648,53 +117719,58 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
|
117648
117719
|
})
|
|
117649
117720
|
);
|
|
117650
117721
|
options.plugins.push(environmentPlugin(stormEnv));
|
|
117651
|
-
|
|
117652
|
-
|
|
117653
|
-
|
|
117654
|
-
|
|
117655
|
-
|
|
117656
|
-
|
|
117657
|
-
|
|
117658
|
-
|
|
117659
|
-
|
|
117660
|
-
|
|
117661
|
-
|
|
117662
|
-
|
|
117663
|
-
|
|
117664
|
-
|
|
117665
|
-
|
|
117666
|
-
|
|
117667
|
-
|
|
117668
|
-
|
|
117669
|
-
|
|
117670
|
-
|
|
117671
|
-
|
|
117672
|
-
|
|
117673
|
-
|
|
117674
|
-
|
|
117675
|
-
|
|
117676
|
-
|
|
117677
|
-
|
|
117678
|
-
|
|
117679
|
-
|
|
117680
|
-
|
|
117681
|
-
|
|
117682
|
-
|
|
117722
|
+
console.log("\u26A1 Building with the following entry points: ", entry);
|
|
117723
|
+
const config = (0, import_tsup.defineConfig)(
|
|
117724
|
+
Object.keys(entry).reduce((ret, key) => {
|
|
117725
|
+
const getConfigOptions = {
|
|
117726
|
+
...options,
|
|
117727
|
+
define: {
|
|
117728
|
+
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
117729
|
+
},
|
|
117730
|
+
env: {
|
|
117731
|
+
__STORM_CONFIG: JSON.stringify(stormEnv),
|
|
117732
|
+
...stormEnv
|
|
117733
|
+
},
|
|
117734
|
+
dtsTsConfig: getNormalizedTsConfig(
|
|
117735
|
+
context.root,
|
|
117736
|
+
options.outputPath,
|
|
117737
|
+
(0, import_tsc.createTypeScriptCompilationOptions)(
|
|
117738
|
+
(0, import_normalize_options.normalizeOptions)(
|
|
117739
|
+
{
|
|
117740
|
+
...options,
|
|
117741
|
+
watch: false,
|
|
117742
|
+
main: entry[key],
|
|
117743
|
+
transformers: []
|
|
117744
|
+
},
|
|
117745
|
+
context.root,
|
|
117746
|
+
sourceRoot,
|
|
117747
|
+
workspaceRoot
|
|
117748
|
+
),
|
|
117749
|
+
context
|
|
117750
|
+
)
|
|
117751
|
+
),
|
|
117752
|
+
banner: options.banner ? {
|
|
117753
|
+
js: `${options.banner}
|
|
117683
117754
|
|
|
117684
117755
|
`,
|
|
117685
|
-
|
|
117756
|
+
css: `/*
|
|
117686
117757
|
${options.banner}
|
|
117687
117758
|
*/
|
|
117688
117759
|
|
|
117689
117760
|
`
|
|
117690
|
-
|
|
117691
|
-
|
|
117692
|
-
|
|
117693
|
-
|
|
117761
|
+
} : void 0,
|
|
117762
|
+
outputPath: options.outputPath,
|
|
117763
|
+
entry: entry[key]
|
|
117764
|
+
};
|
|
117765
|
+
ret.push(
|
|
117766
|
+
getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
|
|
117767
|
+
);
|
|
117768
|
+
ret.push(
|
|
117769
|
+
getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
|
|
117694
117770
|
);
|
|
117695
117771
|
return ret;
|
|
117696
117772
|
}, [])
|
|
117697
|
-
|
|
117773
|
+
);
|
|
117698
117774
|
if (typeof config === "function") {
|
|
117699
117775
|
await build(await Promise.resolve(config({})));
|
|
117700
117776
|
} else {
|