@storm-software/workspace-tools 1.177.2 → 1.178.1

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,10 @@
1
+ ## 1.178.1 (2024-09-08)
2
+
3
+ ### Features
4
+
5
+ - **workspace-tools:** Added custom code for generating the Nx configuration
6
+ ([651a589e](https://github.com/storm-software/storm-ops/commit/651a589e))
7
+
1
8
  ## 1.177.2 (2024-09-08)
2
9
 
3
10
  ### Bug Fixes
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.174.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![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 Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&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)
24
+ [![Version](https://img.shields.io/badge/version-1.178.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![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 Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&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)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/index.js CHANGED
@@ -437508,7 +437508,7 @@ function analyze() {
437508
437508
  }
437509
437509
  };
437510
437510
  }
437511
- function withRollupConfig(rawOptions, rollupConfig = {}, dependencies) {
437511
+ function withRollupConfig(rawOptions, rollupConfig = {}, dependencies, config) {
437512
437512
  const finalConfig = { ...rollupConfig };
437513
437513
  const projectNode = getProjectNode();
437514
437514
  const projectRoot = (0, import_node_path14.join)(import_devkit7.workspaceRoot, projectNode.data.root);
@@ -437645,13 +437645,14 @@ function withRollupConfig(rawOptions, rollupConfig = {}, dependencies) {
437645
437645
  tsconfig: options.tsConfig,
437646
437646
  tsconfigOverride: {
437647
437647
  compilerOptions: createTsCompilerOptions(
437648
- projectRoot,
437649
437648
  tsConfig,
437650
437649
  options,
437651
- dependencies
437650
+ dependencies,
437651
+ config
437652
437652
  )
437653
437653
  },
437654
- verbosity: 3
437654
+ verbosity: 3,
437655
+ useTsconfigDeclarationDir: true
437655
437656
  }),
437656
437657
  (0, import_type_definitions.typeDefinitions)({
437657
437658
  projectRoot
@@ -437712,18 +437713,18 @@ function createInput(options) {
437712
437713
  });
437713
437714
  return input;
437714
437715
  }
437715
- function createTsCompilerOptions(projectRoot, config, options, dependencies) {
437716
+ function createTsCompilerOptions(parsedCommandLine, options, dependencies, config) {
437716
437717
  const compilerOptionPaths = (0, import_buildable_libs_utils.computeCompilerOptionsPaths)(
437717
- config,
437718
+ parsedCommandLine,
437718
437719
  dependencies ?? []
437719
437720
  );
437720
437721
  const compilerOptions = {
437721
- rootDir: projectRoot,
437722
+ rootDir: config?.workspaceRoot,
437722
437723
  allowJs: options.allowJs,
437723
437724
  declaration: true,
437724
437725
  paths: compilerOptionPaths
437725
437726
  };
437726
- if (config.options.module === ts.ModuleKind.CommonJS) {
437727
+ if (parsedCommandLine.options.module === ts.ModuleKind.CommonJS) {
437727
437728
  compilerOptions["module"] = "ESNext";
437728
437729
  }
437729
437730
  if (options.compiler === "swc") {
@@ -437834,7 +437835,11 @@ ${formatLogMessage2(options)}`, config);
437834
437835
  perf: true,
437835
437836
  treeshake: true
437836
437837
  };
437837
- const rollupOptions = await createRollupOptions(normalizedOptions, context);
437838
+ const rollupOptions = await createRollupOptions(
437839
+ normalizedOptions,
437840
+ context,
437841
+ config
437842
+ );
437838
437843
  const outfile = resolveOutfile(context, normalizedOptions);
437839
437844
  if (normalizedOptions.watch) {
437840
437845
  return yield* (0, import_async_iterable.createAsyncIterable)(({ next: next2 }) => {
@@ -437887,7 +437892,7 @@ ${formatLogMessage2(options)}`, config);
437887
437892
  }
437888
437893
  }
437889
437894
  }
437890
- async function createRollupOptions(options, context) {
437895
+ async function createRollupOptions(options, context, config) {
437891
437896
  const { dependencies } = (0, import_buildable_libs_utils2.calculateProjectBuildableDependencies)(
437892
437897
  context.taskGraph,
437893
437898
  context.projectGraph,
@@ -437897,7 +437902,7 @@ async function createRollupOptions(options, context) {
437897
437902
  context.configurationName,
437898
437903
  true
437899
437904
  );
437900
- const rollupConfig = withRollupConfig(options, {}, dependencies);
437905
+ const rollupConfig = withRollupConfig(options, {}, dependencies, config);
437901
437906
  const generatePackageJsonPlugin = Array.isArray(rollupConfig.plugins) ? rollupConfig.plugins.find(
437902
437907
  (p2) => p2?.["name"] === import_generate_package_json2.pluginName
437903
437908
  ) : null;
@@ -437906,16 +437911,16 @@ async function createRollupOptions(options, context) {
437906
437911
  );
437907
437912
  let finalConfig = rollupConfig;
437908
437913
  for (const _config of userDefinedRollupConfigs) {
437909
- const config = await _config;
437910
- if (typeof config === "function") {
437911
- finalConfig = config(finalConfig, options);
437914
+ const config2 = await _config;
437915
+ if (typeof config2 === "function") {
437916
+ finalConfig = config2(finalConfig, options);
437912
437917
  } else {
437913
437918
  finalConfig = {
437914
437919
  ...finalConfig,
437915
- ...config,
437920
+ ...config2,
437916
437921
  plugins: [
437917
437922
  ...Array.isArray(finalConfig.plugins) && finalConfig.plugins?.length > 0 ? finalConfig.plugins : [],
437918
- ...config.plugins?.length > 0 ? config.plugins : []
437923
+ ...config2.plugins?.length > 0 ? config2.plugins : []
437919
437924
  ]
437920
437925
  };
437921
437926
  }