@storm-software/workspace-tools 1.31.10 → 1.31.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.31.11](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.31.10...workspace-tools-v1.31.11) (2023-12-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **config-tools:** Added more accurate search for workspace root ([c418b08](https://github.com/storm-software/storm-ops/commit/c418b08c8bb8917e562bef50cb324d66244d98a3))
7
+
8
+ ## [1.31.10](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.31.9...workspace-tools-v1.31.10) (2023-12-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **config-tools:** Mark the package type as module ([3ca24c0](https://github.com/storm-software/storm-ops/commit/3ca24c0149ce2a56d2b64f69441b0f8f7efa76a5))
14
+
1
15
  ## [1.31.9](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.31.8...workspace-tools-v1.31.9) (2023-12-20)
2
16
 
3
17
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
16
16
 
17
17
  <h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
18
18
 
19
- [![Version](https://img.shields.io/badge/version-1.31.6-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.31.9-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
21
21
 
22
22
  <h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
package/index.js CHANGED
@@ -106232,7 +106232,7 @@ __export(workspace_tools_exports, {
106232
106232
  getInternalDependencies: () => getInternalDependencies,
106233
106233
  getProjectConfiguration: () => getProjectConfiguration,
106234
106234
  getProjectConfigurations: () => getProjectConfigurations,
106235
- getWorkspaceRoot: () => getWorkspaceRoot2,
106235
+ getWorkspaceRoot: () => getWorkspaceRoot,
106236
106236
  lintStagedVersion: () => lintStagedVersion,
106237
106237
  nodeLibraryGeneratorFn: () => nodeLibraryGeneratorFn,
106238
106238
  nodeVersion: () => nodeVersion,
@@ -109991,7 +109991,10 @@ var getDefaultConfig = (config = {}) => {
109991
109991
  let repository = "https://github.com/storm-software/storm-stack";
109992
109992
  let license = DefaultStormConfig.license;
109993
109993
  let homepage = DefaultStormConfig.homepage;
109994
- const workspaceRoot = getWorkspaceRoot() ?? process.cwd();
109994
+ const workspaceRoot = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
109995
+ if (typeof workspaceRoot !== "string") {
109996
+ throw new Error("Could not find workspace root");
109997
+ }
109995
109998
  if ((0, import_fs.existsSync)((0, import_path.join)(workspaceRoot, "package.json"))) {
109996
109999
  const file = (0, import_fs.readFileSync)((0, import_path.join)(workspaceRoot, "package.json"), {
109997
110000
  encoding: "utf-8"
@@ -110019,12 +110022,6 @@ var getDefaultConfig = (config = {}) => {
110019
110022
  })
110020
110023
  );
110021
110024
  };
110022
- var getWorkspaceRoot = () => {
110023
- const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
110024
- process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
110025
- process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
110026
- return root?.dir;
110027
- };
110028
110025
 
110029
110026
  // packages/config-tools/src/utilities/get-log-level.ts
110030
110027
  var getLogLevel = (label) => {
@@ -110210,7 +110207,7 @@ var chalk = __toESM(require_source());
110210
110207
 
110211
110208
  // packages/workspace-tools/src/utils/get-workspace-root.ts
110212
110209
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
110213
- var getWorkspaceRoot2 = () => {
110210
+ var getWorkspaceRoot = () => {
110214
110211
  const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
110215
110212
  process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
110216
110213
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
@@ -110262,7 +110259,7 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
110262
110259
  if (result.includes("{workspaceRoot}")) {
110263
110260
  result = result.replaceAll(
110264
110261
  "{workspaceRoot}",
110265
- tokenizerOptions.workspaceRoot ?? getWorkspaceRoot2()
110262
+ tokenizerOptions.workspaceRoot ?? getWorkspaceRoot()
110266
110263
  );
110267
110264
  }
110268
110265
  return result;
@@ -110288,7 +110285,7 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
110288
110285
  if (result.includes("{workspaceRoot}")) {
110289
110286
  result = result.replaceAll(
110290
110287
  "{workspaceRoot}",
110291
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ?? getWorkspaceRoot2()
110288
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config.workspaceRoot ?? getWorkspaceRoot()
110292
110289
  );
110293
110290
  }
110294
110291
  return result;
@@ -110336,7 +110333,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {
110336
110333
  "The Build process failed because the context is not valid. Please run this command from a workspace."
110337
110334
  );
110338
110335
  }
110339
- const workspaceRoot = getWorkspaceRoot2();
110336
+ const workspaceRoot = getWorkspaceRoot();
110340
110337
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
110341
110338
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
110342
110339
  const projectName = context.projectsConfigurations.projects[context.projectName].name;
@@ -116807,7 +116804,7 @@ function findFileName(filePath) {
116807
116804
  // packages/workspace-tools/src/utils/get-project-configurations.ts
116808
116805
  var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
116809
116806
  var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(
116810
- getWorkspaceRoot2()
116807
+ getWorkspaceRoot()
116811
116808
  );
116812
116809
  var getProjectConfiguration = (projectName) => getProjectConfigurations()?.[projectName];
116813
116810
 
@@ -117072,7 +117069,7 @@ ${Object.keys(options).map(
117072
117069
  "The Build process failed because the context is not valid. Please run this command from a workspace."
117073
117070
  );
117074
117071
  }
117075
- const workspaceRoot = getWorkspaceRoot2();
117072
+ const workspaceRoot = getWorkspaceRoot();
117076
117073
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
117077
117074
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
117078
117075
  if (options.clean !== false) {
@@ -118640,7 +118637,7 @@ var zodToJsonSchema = (schema, options) => {
118640
118637
  // packages/workspace-tools/src/generators/config-schema/generator.ts
118641
118638
  async function configSchemaGeneratorFn(tree, options) {
118642
118639
  const projectConfigurations = getProjectConfigurations();
118643
- const workspaceRoot = getWorkspaceRoot2();
118640
+ const workspaceRoot = getWorkspaceRoot();
118644
118641
  const modules = await Promise.all(
118645
118642
  Object.keys(projectConfigurations).map(async (key) => {
118646
118643
  if (projectConfigurations[key]?.config) {
@@ -119384,7 +119381,7 @@ function findCacheDirectory({
119384
119381
  create
119385
119382
  } = {
119386
119383
  name: "storm",
119387
- workspaceRoot: getWorkspaceRoot2(),
119384
+ workspaceRoot: getWorkspaceRoot(),
119388
119385
  create: true
119389
119386
  }) {
119390
119387
  if (import_node_process.env.CACHE_DIR && !["true", "false", "1", "0"].includes(import_node_process.env.CACHE_DIR)) {