Skip to content

Commit

Permalink
fix(js): generate nx release config correctly for js libraries in new…
Browse files Browse the repository at this point in the history
… ts setup and set tags
  • Loading branch information
leosvelperez committed Oct 1, 2024
1 parent 29d8899 commit d4ec1f7
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions packages/js/src/generators/library/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,27 @@ async function configureProject(
}

if (!options.useProjectJson) {
// we create a cleaner project configuration for the package.json file
const projectConfiguration: ProjectConfiguration = {
root: options.projectRoot,
};

if (options.name !== options.importPath) {
// if the name is different than the package.json name, we need to set
// the proper name in the configuration
updateProjectConfiguration(tree, options.name, {
name: options.name,
root: options.projectRoot,
});
projectConfiguration.name = options.name;
}

if (options.parsedTags?.length) {
projectConfiguration.tags = options.parsedTags;
}

if (options.publishable) {
await addProjectToNxReleaseConfig(tree, options, projectConfiguration);
}

updateProjectConfiguration(tree, options.name, projectConfiguration);

return;
}

Expand Down

0 comments on commit d4ec1f7

Please # to comment.