@storm-software/workspace-tools 1.52.10 → 1.52.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/CHANGELOG.md +34 -0
- package/index.js +26 -27
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/npm-publish/executor.js +9 -27
- package/src/executors/tsup/executor.js +13 -12
- package/src/executors/tsup-browser/executor.js +18 -17
- package/src/executors/tsup-neutral/executor.js +18 -17
- package/src/executors/tsup-node/executor.js +18 -17
- package/src/utils/index.js +0 -1
package/package.json
CHANGED
|
@@ -19799,9 +19799,7 @@ function runExecutor(options, context) {
|
|
|
19799
19799
|
const packageTxt = packageName === context.projectName ? `package "${packageName}"` : `package "${packageName}" from project "${context.projectName}"`;
|
|
19800
19800
|
if (projectPackageJson.private === true) {
|
|
19801
19801
|
console.warn(`Skipped ${packageTxt}, because it has \`"private": true\` in ${packageJsonPath}`);
|
|
19802
|
-
return {
|
|
19803
|
-
success: true
|
|
19804
|
-
};
|
|
19802
|
+
return new Promise((resolve) => resolve({ success: true }));
|
|
19805
19803
|
}
|
|
19806
19804
|
const npmPublishCommandSegments = ["npm publish --json"];
|
|
19807
19805
|
const npmViewCommandSegments = [`npm view ${packageName} versions dist-tags --json`];
|
|
@@ -19838,9 +19836,7 @@ function runExecutor(options, context) {
|
|
|
19838
19836
|
console.warn(
|
|
19839
19837
|
`Skipped ${packageTxt} because v${currentVersion} already exists in ${registry} with tag "${tag}"`
|
|
19840
19838
|
);
|
|
19841
|
-
return {
|
|
19842
|
-
success: true
|
|
19843
|
-
};
|
|
19839
|
+
return new Promise((resolve) => resolve({ success: true }));
|
|
19844
19840
|
}
|
|
19845
19841
|
if (resultJson.versions.includes(currentVersion)) {
|
|
19846
19842
|
try {
|
|
@@ -19868,9 +19864,7 @@ function runExecutor(options, context) {
|
|
|
19868
19864
|
`
|
|
19869
19865
|
);
|
|
19870
19866
|
}
|
|
19871
|
-
return {
|
|
19872
|
-
success: true
|
|
19873
|
-
};
|
|
19867
|
+
return new Promise((resolve) => resolve({ success: true }));
|
|
19874
19868
|
} catch (err) {
|
|
19875
19869
|
try {
|
|
19876
19870
|
const stdoutData = JSON.parse(err.stdout?.toString() || "{}");
|
|
@@ -19886,18 +19880,14 @@ function runExecutor(options, context) {
|
|
|
19886
19880
|
console.error("npm dist-tag add stdout:");
|
|
19887
19881
|
console.error(JSON.stringify(stdoutData, null, 2));
|
|
19888
19882
|
}
|
|
19889
|
-
return {
|
|
19890
|
-
success: false
|
|
19891
|
-
};
|
|
19883
|
+
return new Promise((resolve) => resolve({ success: false }));
|
|
19892
19884
|
}
|
|
19893
19885
|
} catch (err2) {
|
|
19894
19886
|
console.error(
|
|
19895
19887
|
"Something unexpected went wrong when processing the npm dist-tag add output\n",
|
|
19896
19888
|
err2
|
|
19897
19889
|
);
|
|
19898
|
-
return {
|
|
19899
|
-
success: false
|
|
19900
|
-
};
|
|
19890
|
+
return new Promise((resolve) => resolve({ success: false }));
|
|
19901
19891
|
}
|
|
19902
19892
|
}
|
|
19903
19893
|
}
|
|
@@ -19908,9 +19898,7 @@ function runExecutor(options, context) {
|
|
|
19908
19898
|
"Something unexpected went wrong when checking for existing dist-tags.\n",
|
|
19909
19899
|
err
|
|
19910
19900
|
);
|
|
19911
|
-
return {
|
|
19912
|
-
success: false
|
|
19913
|
-
};
|
|
19901
|
+
return new Promise((resolve) => resolve({ success: false }));
|
|
19914
19902
|
}
|
|
19915
19903
|
}
|
|
19916
19904
|
}
|
|
@@ -19937,9 +19925,7 @@ function runExecutor(options, context) {
|
|
|
19937
19925
|
} else {
|
|
19938
19926
|
console.log(`Published to ${registry} with tag "${tag}"`);
|
|
19939
19927
|
}
|
|
19940
|
-
return {
|
|
19941
|
-
success: true
|
|
19942
|
-
};
|
|
19928
|
+
return new Promise((resolve) => resolve({ success: true }));
|
|
19943
19929
|
} catch (err) {
|
|
19944
19930
|
try {
|
|
19945
19931
|
const stdoutData = JSON.parse(err.stdout?.toString() || "{}");
|
|
@@ -19954,17 +19940,13 @@ function runExecutor(options, context) {
|
|
|
19954
19940
|
console.error("npm publish stdout:");
|
|
19955
19941
|
console.error(JSON.stringify(stdoutData, null, 2));
|
|
19956
19942
|
}
|
|
19957
|
-
return {
|
|
19958
|
-
success: false
|
|
19959
|
-
};
|
|
19943
|
+
return new Promise((resolve) => resolve({ success: false }));
|
|
19960
19944
|
} catch (err2) {
|
|
19961
19945
|
console.error(
|
|
19962
19946
|
"Something unexpected went wrong when processing the npm publish output\n",
|
|
19963
19947
|
err2
|
|
19964
19948
|
);
|
|
19965
|
-
return {
|
|
19966
|
-
success: false
|
|
19967
|
-
};
|
|
19949
|
+
return new Promise((resolve) => resolve({ success: false }));
|
|
19968
19950
|
}
|
|
19969
19951
|
}
|
|
19970
19952
|
}
|
|
@@ -115486,7 +115486,6 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
115486
115486
|
const getConfigOptions = {
|
|
115487
115487
|
...options,
|
|
115488
115488
|
main: context.main,
|
|
115489
|
-
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
115490
115489
|
define: {
|
|
115491
115490
|
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
115492
115491
|
},
|
|
@@ -115800,17 +115799,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115800
115799
|
}
|
|
115801
115800
|
if (options.generatePackageJson !== false) {
|
|
115802
115801
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115803
|
-
|
|
115804
|
-
|
|
115805
|
-
const
|
|
115806
|
-
|
|
115807
|
-
|
|
115808
|
-
|
|
115809
|
-
|
|
115810
|
-
|
|
115811
|
-
|
|
115812
|
-
|
|
115813
|
-
options.external.
|
|
115802
|
+
if (options.bundle === false) {
|
|
115803
|
+
packageJson.dependencies = void 0;
|
|
115804
|
+
for (const externalDependency of externalDependencies) {
|
|
115805
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115806
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115807
|
+
const { packageName, version } = packageConfig;
|
|
115808
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115809
|
+
packageJson.dependencies ??= {};
|
|
115810
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115811
|
+
}
|
|
115812
|
+
if (!options.external.includes(packageName)) {
|
|
115813
|
+
options.external.push(packageName);
|
|
115814
|
+
}
|
|
115814
115815
|
}
|
|
115815
115816
|
}
|
|
115816
115817
|
}
|
|
@@ -109241,11 +109241,6 @@ var outExtension = ({ format: format2 }) => {
|
|
|
109241
109241
|
};
|
|
109242
109242
|
};
|
|
109243
109243
|
|
|
109244
|
-
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
109245
|
-
var removeExtension = (filePath) => {
|
|
109246
|
-
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
109247
|
-
};
|
|
109248
|
-
|
|
109249
109244
|
// packages/workspace-tools/src/utils/run-tsup-build.ts
|
|
109250
109245
|
var applyDefaultOptions = (options) => {
|
|
109251
109246
|
options.entry ??= "{sourceRoot}/index.ts";
|
|
@@ -109295,7 +109290,6 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
109295
109290
|
const getConfigOptions = {
|
|
109296
109291
|
...options,
|
|
109297
109292
|
main: context.main,
|
|
109298
|
-
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
109299
109293
|
define: {
|
|
109300
109294
|
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
109301
109295
|
},
|
|
@@ -115617,6 +115611,11 @@ glob.glob = glob;
|
|
|
115617
115611
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
115618
115612
|
var import_prettier = require("prettier");
|
|
115619
115613
|
|
|
115614
|
+
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
115615
|
+
var removeExtension = (filePath) => {
|
|
115616
|
+
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
115617
|
+
};
|
|
115618
|
+
|
|
115620
115619
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
115621
115620
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
115622
115621
|
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(getWorkspaceRoot());
|
|
@@ -115830,17 +115829,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115830
115829
|
}
|
|
115831
115830
|
if (options.generatePackageJson !== false) {
|
|
115832
115831
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115833
|
-
|
|
115834
|
-
|
|
115835
|
-
const
|
|
115836
|
-
|
|
115837
|
-
|
|
115838
|
-
|
|
115839
|
-
|
|
115840
|
-
|
|
115841
|
-
|
|
115842
|
-
|
|
115843
|
-
options.external.
|
|
115832
|
+
if (options.bundle === false) {
|
|
115833
|
+
packageJson.dependencies = void 0;
|
|
115834
|
+
for (const externalDependency of externalDependencies) {
|
|
115835
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115836
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115837
|
+
const { packageName, version } = packageConfig;
|
|
115838
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115839
|
+
packageJson.dependencies ??= {};
|
|
115840
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115841
|
+
}
|
|
115842
|
+
if (!options.external.includes(packageName)) {
|
|
115843
|
+
options.external.push(packageName);
|
|
115844
|
+
}
|
|
115844
115845
|
}
|
|
115845
115846
|
}
|
|
115846
115847
|
}
|
|
@@ -109241,11 +109241,6 @@ var outExtension = ({ format: format2 }) => {
|
|
|
109241
109241
|
};
|
|
109242
109242
|
};
|
|
109243
109243
|
|
|
109244
|
-
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
109245
|
-
var removeExtension = (filePath) => {
|
|
109246
|
-
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
109247
|
-
};
|
|
109248
|
-
|
|
109249
109244
|
// packages/workspace-tools/src/utils/run-tsup-build.ts
|
|
109250
109245
|
var applyDefaultOptions = (options) => {
|
|
109251
109246
|
options.entry ??= "{sourceRoot}/index.ts";
|
|
@@ -109295,7 +109290,6 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
109295
109290
|
const getConfigOptions = {
|
|
109296
109291
|
...options,
|
|
109297
109292
|
main: context.main,
|
|
109298
|
-
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
109299
109293
|
define: {
|
|
109300
109294
|
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
109301
109295
|
},
|
|
@@ -115617,6 +115611,11 @@ glob.glob = glob;
|
|
|
115617
115611
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
115618
115612
|
var import_prettier = require("prettier");
|
|
115619
115613
|
|
|
115614
|
+
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
115615
|
+
var removeExtension = (filePath) => {
|
|
115616
|
+
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
115617
|
+
};
|
|
115618
|
+
|
|
115620
115619
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
115621
115620
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
115622
115621
|
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(getWorkspaceRoot());
|
|
@@ -115830,17 +115829,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115830
115829
|
}
|
|
115831
115830
|
if (options.generatePackageJson !== false) {
|
|
115832
115831
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115833
|
-
|
|
115834
|
-
|
|
115835
|
-
const
|
|
115836
|
-
|
|
115837
|
-
|
|
115838
|
-
|
|
115839
|
-
|
|
115840
|
-
|
|
115841
|
-
|
|
115842
|
-
|
|
115843
|
-
options.external.
|
|
115832
|
+
if (options.bundle === false) {
|
|
115833
|
+
packageJson.dependencies = void 0;
|
|
115834
|
+
for (const externalDependency of externalDependencies) {
|
|
115835
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115836
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115837
|
+
const { packageName, version } = packageConfig;
|
|
115838
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115839
|
+
packageJson.dependencies ??= {};
|
|
115840
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115841
|
+
}
|
|
115842
|
+
if (!options.external.includes(packageName)) {
|
|
115843
|
+
options.external.push(packageName);
|
|
115844
|
+
}
|
|
115844
115845
|
}
|
|
115845
115846
|
}
|
|
115846
115847
|
}
|
|
@@ -109241,11 +109241,6 @@ var outExtension = ({ format: format2 }) => {
|
|
|
109241
109241
|
};
|
|
109242
109242
|
};
|
|
109243
109243
|
|
|
109244
|
-
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
109245
|
-
var removeExtension = (filePath) => {
|
|
109246
|
-
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
109247
|
-
};
|
|
109248
|
-
|
|
109249
109244
|
// packages/workspace-tools/src/utils/run-tsup-build.ts
|
|
109250
109245
|
var applyDefaultOptions = (options) => {
|
|
109251
109246
|
options.entry ??= "{sourceRoot}/index.ts";
|
|
@@ -109295,7 +109290,6 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
109295
109290
|
const getConfigOptions = {
|
|
109296
109291
|
...options,
|
|
109297
109292
|
main: context.main,
|
|
109298
|
-
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
109299
109293
|
define: {
|
|
109300
109294
|
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
109301
109295
|
},
|
|
@@ -115617,6 +115611,11 @@ glob.glob = glob;
|
|
|
115617
115611
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
115618
115612
|
var import_prettier = require("prettier");
|
|
115619
115613
|
|
|
115614
|
+
// packages/workspace-tools/src/utils/file-path-utils.ts
|
|
115615
|
+
var removeExtension = (filePath) => {
|
|
115616
|
+
return filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
115617
|
+
};
|
|
115618
|
+
|
|
115620
115619
|
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
115621
115620
|
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
115622
115621
|
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(getWorkspaceRoot());
|
|
@@ -115830,17 +115829,19 @@ ${externalDependencies.map((dep) => {
|
|
|
115830
115829
|
}
|
|
115831
115830
|
if (options.generatePackageJson !== false) {
|
|
115832
115831
|
const projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
115833
|
-
|
|
115834
|
-
|
|
115835
|
-
const
|
|
115836
|
-
|
|
115837
|
-
|
|
115838
|
-
|
|
115839
|
-
|
|
115840
|
-
|
|
115841
|
-
|
|
115842
|
-
|
|
115843
|
-
options.external.
|
|
115832
|
+
if (options.bundle === false) {
|
|
115833
|
+
packageJson.dependencies = void 0;
|
|
115834
|
+
for (const externalDependency of externalDependencies) {
|
|
115835
|
+
const packageConfig = externalDependency?.node?.data;
|
|
115836
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
115837
|
+
const { packageName, version } = packageConfig;
|
|
115838
|
+
if (!workspacePackageJson.dependencies?.[packageName] && !workspacePackageJson.devDependencies?.[packageName] && !packageJson?.devDependencies?.[packageName]) {
|
|
115839
|
+
packageJson.dependencies ??= {};
|
|
115840
|
+
packageJson.dependencies[packageName] = projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
115841
|
+
}
|
|
115842
|
+
if (!options.external.includes(packageName)) {
|
|
115843
|
+
options.external.push(packageName);
|
|
115844
|
+
}
|
|
115844
115845
|
}
|
|
115845
115846
|
}
|
|
115846
115847
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -119810,7 +119810,6 @@ var runTsupBuild = async (context, config, options) => {
|
|
|
119810
119810
|
const getConfigOptions = {
|
|
119811
119811
|
...options,
|
|
119812
119812
|
main: context.main,
|
|
119813
|
-
entry: { [removeExtension(context.main).replace(context.sourceRoot, "")]: context.main },
|
|
119814
119813
|
define: {
|
|
119815
119814
|
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
119816
119815
|
},
|