@storm-software/workspace-tools 1.52.11 → 1.52.13
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 +30 -0
- package/index.js +16 -12
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +16 -12
- package/src/executors/tsup-browser/executor.js +16 -12
- package/src/executors/tsup-neutral/executor.js +16 -12
- package/src/executors/tsup-node/executor.js +16 -12
- package/src/utils/index.js +3 -1
package/package.json
CHANGED
|
@@ -115495,6 +115495,7 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
115495
115495
|
...stormEnv
|
|
115496
115496
|
},
|
|
115497
115497
|
dtsTsConfig: getNormalizedTsConfig(
|
|
115498
|
+
context,
|
|
115498
115499
|
config.workspaceRoot,
|
|
115499
115500
|
options.outputPath,
|
|
115500
115501
|
createTypeScriptCompilationOptions(
|
|
@@ -115546,13 +115547,14 @@ ${options.banner}
|
|
|
115546
115547
|
);
|
|
115547
115548
|
}
|
|
115548
115549
|
};
|
|
115549
|
-
function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
115550
|
+
function getNormalizedTsConfig(context, workspaceRoot, outputPath, options) {
|
|
115550
115551
|
const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
|
|
115551
115552
|
const tsConfig = ts.parseJsonConfigFileContent(
|
|
115552
115553
|
{
|
|
115553
115554
|
...config,
|
|
115554
115555
|
compilerOptions: {
|
|
115555
115556
|
...config.compilerOptions,
|
|
115557
|
+
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
115556
115558
|
outDir: outputPath,
|
|
115557
115559
|
rootDir: workspaceRoot,
|
|
115558
115560
|
baseUrl: workspaceRoot,
|
|
@@ -115800,17 +115802,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115800
115802
|
}
|
|
115801
115803
|
if (options.generatePackageJson !== false) {
|
|
115802
115804
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115803
|
-
|
|
115804
|
-
|
|
115805
|
-
const
|
|
115806
|
-
|
|
115807
|
-
|
|
115808
|
-
|
|
115809
|
-
|
|
115810
|
-
|
|
115811
|
-
|
|
115812
|
-
|
|
115813
|
-
options.external.
|
|
115805
|
+
if (options.bundle === false) {
|
|
115806
|
+
packageJson.dependencies = void 0;
|
|
115807
|
+
for (const externalDependency of externalDependencies) {
|
|
115808
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115809
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115810
|
+
const { packageName, version } = packageConfig;
|
|
115811
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115812
|
+
packageJson.dependencies ??= {};
|
|
115813
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115814
|
+
}
|
|
115815
|
+
if (!options.external.includes(packageName)) {
|
|
115816
|
+
options.external.push(packageName);
|
|
115817
|
+
}
|
|
115814
115818
|
}
|
|
115815
115819
|
}
|
|
115816
115820
|
}
|
|
@@ -109304,6 +109304,7 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
109304
109304
|
...stormEnv
|
|
109305
109305
|
},
|
|
109306
109306
|
dtsTsConfig: getNormalizedTsConfig(
|
|
109307
|
+
context,
|
|
109307
109308
|
config.workspaceRoot,
|
|
109308
109309
|
options.outputPath,
|
|
109309
109310
|
createTypeScriptCompilationOptions(
|
|
@@ -109355,13 +109356,14 @@ ${options.banner}
|
|
|
109355
109356
|
);
|
|
109356
109357
|
}
|
|
109357
109358
|
};
|
|
109358
|
-
function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
109359
|
+
function getNormalizedTsConfig(context, workspaceRoot, outputPath, options) {
|
|
109359
109360
|
const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
|
|
109360
109361
|
const tsConfig = ts.parseJsonConfigFileContent(
|
|
109361
109362
|
{
|
|
109362
109363
|
...config,
|
|
109363
109364
|
compilerOptions: {
|
|
109364
109365
|
...config.compilerOptions,
|
|
109366
|
+
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
109365
109367
|
outDir: outputPath,
|
|
109366
109368
|
rootDir: workspaceRoot,
|
|
109367
109369
|
baseUrl: workspaceRoot,
|
|
@@ -115830,17 +115832,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115830
115832
|
}
|
|
115831
115833
|
if (options.generatePackageJson !== false) {
|
|
115832
115834
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115833
|
-
|
|
115834
|
-
|
|
115835
|
-
const
|
|
115836
|
-
|
|
115837
|
-
|
|
115838
|
-
|
|
115839
|
-
|
|
115840
|
-
|
|
115841
|
-
|
|
115842
|
-
|
|
115843
|
-
options.external.
|
|
115835
|
+
if (options.bundle === false) {
|
|
115836
|
+
packageJson.dependencies = void 0;
|
|
115837
|
+
for (const externalDependency of externalDependencies) {
|
|
115838
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115839
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115840
|
+
const { packageName, version } = packageConfig;
|
|
115841
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115842
|
+
packageJson.dependencies ??= {};
|
|
115843
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115844
|
+
}
|
|
115845
|
+
if (!options.external.includes(packageName)) {
|
|
115846
|
+
options.external.push(packageName);
|
|
115847
|
+
}
|
|
115844
115848
|
}
|
|
115845
115849
|
}
|
|
115846
115850
|
}
|
|
@@ -109304,6 +109304,7 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
109304
109304
|
...stormEnv
|
|
109305
109305
|
},
|
|
109306
109306
|
dtsTsConfig: getNormalizedTsConfig(
|
|
109307
|
+
context,
|
|
109307
109308
|
config.workspaceRoot,
|
|
109308
109309
|
options.outputPath,
|
|
109309
109310
|
createTypeScriptCompilationOptions(
|
|
@@ -109355,13 +109356,14 @@ ${options.banner}
|
|
|
109355
109356
|
);
|
|
109356
109357
|
}
|
|
109357
109358
|
};
|
|
109358
|
-
function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
109359
|
+
function getNormalizedTsConfig(context, workspaceRoot, outputPath, options) {
|
|
109359
109360
|
const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
|
|
109360
109361
|
const tsConfig = ts.parseJsonConfigFileContent(
|
|
109361
109362
|
{
|
|
109362
109363
|
...config,
|
|
109363
109364
|
compilerOptions: {
|
|
109364
109365
|
...config.compilerOptions,
|
|
109366
|
+
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
109365
109367
|
outDir: outputPath,
|
|
109366
109368
|
rootDir: workspaceRoot,
|
|
109367
109369
|
baseUrl: workspaceRoot,
|
|
@@ -115830,17 +115832,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115830
115832
|
}
|
|
115831
115833
|
if (options.generatePackageJson !== false) {
|
|
115832
115834
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115833
|
-
|
|
115834
|
-
|
|
115835
|
-
const
|
|
115836
|
-
|
|
115837
|
-
|
|
115838
|
-
|
|
115839
|
-
|
|
115840
|
-
|
|
115841
|
-
|
|
115842
|
-
|
|
115843
|
-
options.external.
|
|
115835
|
+
if (options.bundle === false) {
|
|
115836
|
+
packageJson.dependencies = void 0;
|
|
115837
|
+
for (const externalDependency of externalDependencies) {
|
|
115838
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115839
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115840
|
+
const { packageName, version } = packageConfig;
|
|
115841
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115842
|
+
packageJson.dependencies ??= {};
|
|
115843
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115844
|
+
}
|
|
115845
|
+
if (!options.external.includes(packageName)) {
|
|
115846
|
+
options.external.push(packageName);
|
|
115847
|
+
}
|
|
115844
115848
|
}
|
|
115845
115849
|
}
|
|
115846
115850
|
}
|
|
@@ -109304,6 +109304,7 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
109304
109304
|
...stormEnv
|
|
109305
109305
|
},
|
|
109306
109306
|
dtsTsConfig: getNormalizedTsConfig(
|
|
109307
|
+
context,
|
|
109307
109308
|
config.workspaceRoot,
|
|
109308
109309
|
options.outputPath,
|
|
109309
109310
|
createTypeScriptCompilationOptions(
|
|
@@ -109355,13 +109356,14 @@ ${options.banner}
|
|
|
109355
109356
|
);
|
|
109356
109357
|
}
|
|
109357
109358
|
};
|
|
109358
|
-
function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
109359
|
+
function getNormalizedTsConfig(context, workspaceRoot, outputPath, options) {
|
|
109359
109360
|
const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
|
|
109360
109361
|
const tsConfig = ts.parseJsonConfigFileContent(
|
|
109361
109362
|
{
|
|
109362
109363
|
...config,
|
|
109363
109364
|
compilerOptions: {
|
|
109364
109365
|
...config.compilerOptions,
|
|
109366
|
+
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
109365
109367
|
outDir: outputPath,
|
|
109366
109368
|
rootDir: workspaceRoot,
|
|
109367
109369
|
baseUrl: workspaceRoot,
|
|
@@ -115830,17 +115832,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115830
115832
|
}
|
|
115831
115833
|
if (options.generatePackageJson !== false) {
|
|
115832
115834
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115833
|
-
|
|
115834
|
-
|
|
115835
|
-
const
|
|
115836
|
-
|
|
115837
|
-
|
|
115838
|
-
|
|
115839
|
-
|
|
115840
|
-
|
|
115841
|
-
|
|
115842
|
-
|
|
115843
|
-
options.external.
|
|
115835
|
+
if (options.bundle === false) {
|
|
115836
|
+
packageJson.dependencies = void 0;
|
|
115837
|
+
for (const externalDependency of externalDependencies) {
|
|
115838
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115839
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115840
|
+
const { packageName, version } = packageConfig;
|
|
115841
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115842
|
+
packageJson.dependencies ??= {};
|
|
115843
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115844
|
+
}
|
|
115845
|
+
if (!options.external.includes(packageName)) {
|
|
115846
|
+
options.external.push(packageName);
|
|
115847
|
+
}
|
|
115844
115848
|
}
|
|
115845
115849
|
}
|
|
115846
115850
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -119819,6 +119819,7 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
119819
119819
|
...stormEnv
|
|
119820
119820
|
},
|
|
119821
119821
|
dtsTsConfig: getNormalizedTsConfig(
|
|
119822
|
+
context,
|
|
119822
119823
|
config.workspaceRoot,
|
|
119823
119824
|
options.outputPath,
|
|
119824
119825
|
createTypeScriptCompilationOptions(
|
|
@@ -119870,13 +119871,14 @@ ${options.banner}
|
|
|
119870
119871
|
);
|
|
119871
119872
|
}
|
|
119872
119873
|
};
|
|
119873
|
-
function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
119874
|
+
function getNormalizedTsConfig(context, workspaceRoot, outputPath, options) {
|
|
119874
119875
|
const config = ts.readConfigFile(options.tsConfig, ts.sys.readFile).config;
|
|
119875
119876
|
const tsConfig = ts.parseJsonConfigFileContent(
|
|
119876
119877
|
{
|
|
119877
119878
|
...config,
|
|
119878
119879
|
compilerOptions: {
|
|
119879
119880
|
...config.compilerOptions,
|
|
119881
|
+
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
119880
119882
|
outDir: outputPath,
|
|
119881
119883
|
rootDir: workspaceRoot,
|
|
119882
119884
|
baseUrl: workspaceRoot,
|