Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): refactor usages of npmScope #16947

Merged
merged 1 commit into from
May 15, 2023

Conversation

FrozenPandaz
Copy link
Collaborator

Current Behavior

create-nx-workspace and nx init set npmScope in nx.json.

Expected Behavior

create-nx-workspace and nx init no longer set npmScope in nx.json. If npmScope is still in nx.json, then that is still read but if not then the scope is read from the root package.json if available. Otherwise, it will be as if there is no npmScope.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented May 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2023 8:07pm

Copy link
Contributor

@Coly010 Coly010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be missing a file where you would also want to make the change:

https://github.com/nrwl/nx/blob/master/packages/angular/src/generators/utils/project.ts#L63

@@ -28,7 +27,7 @@ export async function migrateFromAngularCli(
): Promise<GeneratorCallback> {
validateWorkspace(tree);
const projects = getAllProjects(tree);
const options = normalizeOptions(tree, rawOptions, projects);
const options = rawOptions;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: change this

@@ -68,6 +68,7 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
*/
targetDefaults?: TargetDefaults;
/**
* @deprecated This is inferred from the package.json in the workspace root. Please use {@link getNpmScope} instead.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update nx-schema.json

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants