@storm-software/workspace-tools 1.30.3 → 1.30.4
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 +32 -24
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +30 -29
- package/src/executors/tsup-browser/executor.js +30 -29
- package/src/executors/tsup-neutral/executor.js +30 -29
- package/src/executors/tsup-node/executor.js +30 -29
- package/src/utils/index.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.30.3](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.2...workspace-tools-v1.30.3) (2023-12-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Resolved issue with bad reference to internal packages ([8dec631](https://github.com/storm-software/storm-ops/commit/8dec63115d4f1fd7af8b4c4fb1b7076d1b8c5e8b))
|
|
7
|
+
|
|
1
8
|
## [1.30.2](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.1...workspace-tools-v1.30.2) (2023-12-12)
|
|
2
9
|
|
|
3
10
|
|
package/index.js
CHANGED
|
@@ -106561,6 +106561,7 @@ __export(workspace_tools_exports, {
|
|
|
106561
106561
|
getExtraDependencies: () => getExtraDependencies,
|
|
106562
106562
|
getFileBanner: () => getFileBanner,
|
|
106563
106563
|
getInternalDependencies: () => getInternalDependencies,
|
|
106564
|
+
getProjectConfiguration: () => getProjectConfiguration,
|
|
106564
106565
|
getProjectConfigurations: () => getProjectConfigurations,
|
|
106565
106566
|
getWorkspaceRoot: () => getWorkspaceRoot2,
|
|
106566
106567
|
lintStagedVersion: () => lintStagedVersion,
|
|
@@ -117134,6 +117135,13 @@ function findFileName(filePath) {
|
|
|
117134
117135
|
)?.pop() ?? "";
|
|
117135
117136
|
}
|
|
117136
117137
|
|
|
117138
|
+
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
117139
|
+
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
117140
|
+
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
|
|
117141
|
+
getWorkspaceRoot2()
|
|
117142
|
+
);
|
|
117143
|
+
var getProjectConfiguration = (projectName) => getProjectConfigurations()?.[projectName];
|
|
117144
|
+
|
|
117137
117145
|
// packages/workspace-tools/src/utils/get-project-deps.ts
|
|
117138
117146
|
function getExtraDependencies(projectName, graph) {
|
|
117139
117147
|
const deps = /* @__PURE__ */ new Map();
|
|
@@ -117575,16 +117583,25 @@ ${Object.keys(options).map(
|
|
|
117575
117583
|
}
|
|
117576
117584
|
return acc;
|
|
117577
117585
|
}, []);
|
|
117578
|
-
|
|
117579
|
-
|
|
117580
|
-
|
|
117581
|
-
|
|
117582
|
-
|
|
117583
|
-
|
|
117584
|
-
|
|
117585
|
-
|
|
117586
|
-
|
|
117587
|
-
|
|
117586
|
+
const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
|
|
117587
|
+
const internalDependencies = [];
|
|
117588
|
+
if (implicitDependencies && implicitDependencies.length > 0) {
|
|
117589
|
+
options.external = implicitDependencies.reduce(
|
|
117590
|
+
(ret, key) => {
|
|
117591
|
+
const projectConfig = getProjectConfiguration(key);
|
|
117592
|
+
if (projectConfig.targets?.build) {
|
|
117593
|
+
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117594
|
+
projectConfig.targets?.build.options.project
|
|
117595
|
+
);
|
|
117596
|
+
if (packageJson?.name && !options.external.includes(packageJson.name)) {
|
|
117597
|
+
ret.push(packageJson.name);
|
|
117598
|
+
internalDependencies.push(packageJson.name);
|
|
117599
|
+
}
|
|
117600
|
+
}
|
|
117601
|
+
return ret;
|
|
117602
|
+
},
|
|
117603
|
+
options.external
|
|
117604
|
+
);
|
|
117588
117605
|
}
|
|
117589
117606
|
if (options.bundle === false) {
|
|
117590
117607
|
for (const thirdPartyDependency of getExternalDependencies(
|
|
@@ -117599,7 +117616,7 @@ ${Object.keys(options).map(
|
|
|
117599
117616
|
}
|
|
117600
117617
|
}
|
|
117601
117618
|
console.log(`Building with the following dependencies marked as external:
|
|
117602
|
-
|
|
117619
|
+
${externalDependencies.map((dep) => {
|
|
117603
117620
|
return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
|
|
117604
117621
|
}).join("\n")}`);
|
|
117605
117622
|
const prettierOptions = {
|
|
@@ -117632,13 +117649,9 @@ ${Object.keys(options).map(
|
|
|
117632
117649
|
packageJson.dependencies[packageName] = !!projectGraph.nodes[entry.node.name] ? "latest" : version;
|
|
117633
117650
|
}
|
|
117634
117651
|
});
|
|
117635
|
-
internalDependencies.forEach((
|
|
117636
|
-
|
|
117637
|
-
|
|
117638
|
-
const { packageName, version } = packageConfig;
|
|
117639
|
-
packageJson.dependencies ??= {};
|
|
117640
|
-
packageJson.dependencies[packageName] = version ? version : "latest";
|
|
117641
|
-
}
|
|
117652
|
+
internalDependencies.forEach((packageName) => {
|
|
117653
|
+
packageJson.dependencies ??= {};
|
|
117654
|
+
packageJson.dependencies[packageName] = "latest";
|
|
117642
117655
|
});
|
|
117643
117656
|
packageJson.type = "module";
|
|
117644
117657
|
packageJson.exports ??= {
|
|
@@ -119008,12 +119021,6 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
119008
119021
|
return combined;
|
|
119009
119022
|
};
|
|
119010
119023
|
|
|
119011
|
-
// packages/workspace-tools/src/utils/get-project-configurations.ts
|
|
119012
|
-
var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
|
|
119013
|
-
var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
|
|
119014
|
-
getWorkspaceRoot2()
|
|
119015
|
-
);
|
|
119016
|
-
|
|
119017
119024
|
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
119018
119025
|
async function configSchemaGeneratorFn(tree, options) {
|
|
119019
119026
|
const projectConfigurations = getProjectConfigurations();
|
|
@@ -119864,6 +119871,7 @@ var WorkspaceStorage = class {
|
|
|
119864
119871
|
getExtraDependencies,
|
|
119865
119872
|
getFileBanner,
|
|
119866
119873
|
getInternalDependencies,
|
|
119874
|
+
getProjectConfiguration,
|
|
119867
119875
|
getProjectConfigurations,
|
|
119868
119876
|
getWorkspaceRoot,
|
|
119869
119877
|
lintStagedVersion,
|