@storm-software/workspace-tools 1.30.3 → 1.30.5
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 +33 -24
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +31 -29
- package/src/executors/tsup-browser/executor.js +31 -29
- package/src/executors/tsup-neutral/executor.js +31 -29
- package/src/executors/tsup-node/executor.js +31 -29
- package/src/utils/index.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.30.4](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.3...workspace-tools-v1.30.4) (2023-12-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Resovled issue with internal references ([54334e6](https://github.com/storm-software/storm-ops/commit/54334e65c01f40b92b40c73361cfb1023df8e780))
|
|
7
|
+
|
|
8
|
+
## [1.30.3](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.2...workspace-tools-v1.30.3) (2023-12-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **workspace-tools:** Resolved issue with bad reference to internal packages ([8dec631](https://github.com/storm-software/storm-ops/commit/8dec63115d4f1fd7af8b4c4fb1b7076d1b8c5e8b))
|
|
14
|
+
|
|
1
15
|
## [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
16
|
|
|
3
17
|
|
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,26 @@ ${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
|
+
console.log(`\u26A1 Adding implicit dependency: ${key}`);
|
|
117592
|
+
const projectConfig = getProjectConfiguration(key);
|
|
117593
|
+
if (projectConfig?.targets?.build) {
|
|
117594
|
+
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117595
|
+
projectConfig.targets?.build.options.project
|
|
117596
|
+
);
|
|
117597
|
+
if (packageJson?.name && !options.external.includes(packageJson.name)) {
|
|
117598
|
+
ret.push(packageJson.name);
|
|
117599
|
+
internalDependencies.push(packageJson.name);
|
|
117600
|
+
}
|
|
117601
|
+
}
|
|
117602
|
+
return ret;
|
|
117603
|
+
},
|
|
117604
|
+
options.external
|
|
117605
|
+
);
|
|
117588
117606
|
}
|
|
117589
117607
|
if (options.bundle === false) {
|
|
117590
117608
|
for (const thirdPartyDependency of getExternalDependencies(
|
|
@@ -117599,7 +117617,7 @@ ${Object.keys(options).map(
|
|
|
117599
117617
|
}
|
|
117600
117618
|
}
|
|
117601
117619
|
console.log(`Building with the following dependencies marked as external:
|
|
117602
|
-
|
|
117620
|
+
${externalDependencies.map((dep) => {
|
|
117603
117621
|
return `name: ${dep.name}, node: ${dep.node}, outputs: ${dep.outputs}`;
|
|
117604
117622
|
}).join("\n")}`);
|
|
117605
117623
|
const prettierOptions = {
|
|
@@ -117632,13 +117650,9 @@ ${Object.keys(options).map(
|
|
|
117632
117650
|
packageJson.dependencies[packageName] = !!projectGraph.nodes[entry.node.name] ? "latest" : version;
|
|
117633
117651
|
}
|
|
117634
117652
|
});
|
|
117635
|
-
internalDependencies.forEach((
|
|
117636
|
-
|
|
117637
|
-
|
|
117638
|
-
const { packageName, version } = packageConfig;
|
|
117639
|
-
packageJson.dependencies ??= {};
|
|
117640
|
-
packageJson.dependencies[packageName] = version ? version : "latest";
|
|
117641
|
-
}
|
|
117653
|
+
internalDependencies.forEach((packageName) => {
|
|
117654
|
+
packageJson.dependencies ??= {};
|
|
117655
|
+
packageJson.dependencies[packageName] = "latest";
|
|
117642
117656
|
});
|
|
117643
117657
|
packageJson.type = "module";
|
|
117644
117658
|
packageJson.exports ??= {
|
|
@@ -119008,12 +119022,6 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
119008
119022
|
return combined;
|
|
119009
119023
|
};
|
|
119010
119024
|
|
|
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
119025
|
// packages/workspace-tools/src/generators/config-schema/generator.ts
|
|
119018
119026
|
async function configSchemaGeneratorFn(tree, options) {
|
|
119019
119027
|
const projectConfigurations = getProjectConfigurations();
|
|
@@ -119864,6 +119872,7 @@ var WorkspaceStorage = class {
|
|
|
119864
119872
|
getExtraDependencies,
|
|
119865
119873
|
getFileBanner,
|
|
119866
119874
|
getInternalDependencies,
|
|
119875
|
+
getProjectConfiguration,
|
|
119867
119876
|
getProjectConfigurations,
|
|
119868
119877
|
getWorkspaceRoot,
|
|
119869
119878
|
lintStagedVersion,
|