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: migrate to @npmcli/package-json #225

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

wesleytodd
Copy link
Member

Passes all the tests, but frankly I am surprised this did not break more tests. I am worried this is a breaking change we just don't have tests for lol. Anyway, let me know what y'all think.

} else if (pkg && typeof pkg.repository !== 'undefined' && pkg.repository.url) {
repo = pkg.repository.url;
}
return repo;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

I am wondering now if we can delete all this since @npmcli/package-json does more normalization?

index.js Outdated Show resolved Hide resolved
lib/git.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
packageInstance = await PackageJson.load(opts.cwd, {
create: true
});
pkg = packageInstance.content;
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if there was a better way, but to reduce the surface of this change I do this so we can just modify the object and leave all those other lines alone.

@wesleytodd
Copy link
Member Author

@ljharb I am going to take the fact this is "comments" and they have been resolved it is not a blocking review. I will merge this up and publish sometime today if I don't hear a back.

@wesleytodd wesleytodd merged commit 6e1df67 into main Dec 11, 2023
4 checks passed
@ljharb ljharb deleted the package-json-npmcli branch December 11, 2023 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants