@mnci/cli 4.40.7 → 4.40.8

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/dist/cli.js CHANGED
@@ -5974,6 +5974,7 @@ async function addReactLib(workspaceRoot, name, options, kindProvided, stack) {
5974
5974
  publishableManifest,
5975
5975
  () => {
5976
5976
  markPublic(publishableManifest);
5977
+ dropNxProjectName(publishableManifest);
5977
5978
  repairPublishableManifest(publishableManifest);
5978
5979
  repairDeclarationSpecifiers(projectRoot);
5979
5980
  writeProjectReadme(projectRoot, `${scope}/${name}`, stack.testRunner);
@@ -5988,6 +5989,15 @@ async function addReactLib(workspaceRoot, name, options, kindProvided, stack) {
5988
5989
  }
5989
5990
  );
5990
5991
  }
5992
+ function dropNxProjectName(manifestPath) {
5993
+ const manifest = readJson(manifestPath);
5994
+ if (manifest.nx?.name === void 0) {
5995
+ return;
5996
+ }
5997
+ const { name: _projectName, ...nx } = manifest.nx;
5998
+ const { nx: _nx, ...rest } = manifest;
5999
+ writeFileEnsured(manifestPath, toJson(Object.keys(nx).length > 0 ? { ...rest, nx } : rest));
6000
+ }
5991
6001
  function addReactInternalLib(workspaceRoot, name, stack, empty = false) {
5992
6002
  ensurePlugin(workspaceRoot, "@nx/react");
5993
6003
  const projectRoot = (0, import_node_path27.join)(workspaceRoot, "libs", name);