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

Add support for package-lock.json #210

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gabelluardo
Copy link
Contributor

Fixes #188

@zkat zkat force-pushed the main branch 3 times, most recently from 84f604d to 6970173 Compare May 12, 2023 22:25
@zkat
Copy link
Member

zkat commented May 19, 2023

hey, just checking in. How's this going? :)

@gabelluardo
Copy link
Contributor Author

Hi @zkat, I think it's almost done, I will finish it and submit it to review in a couple of weeks, i guess c:

@gabelluardo gabelluardo force-pushed the json-lock-support branch 2 times, most recently from da8cfde to 29594fa Compare July 7, 2023 18:03
@gabelluardo gabelluardo marked this pull request as ready for review July 7, 2023 19:55
@gabelluardo
Copy link
Contributor Author

hey @zkat can you check if it is correct?

crates/node-maintainer/src/lockfile.rs Show resolved Hide resolved
let mut deps_v1 = IndexMap::new();
deps.insert("".to_string(), self.root.to_json());
for (name, pkg) in packages {
deps.insert("node_modules/".to_string() + name.as_str(), pkg.to_json());
Copy link
Member

Choose a reason for hiding this comment

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

This actually needs to be the path of the dependency on disk. Nested dependencies will look like node_modules/foo/node_modules/bar.

deps.insert("".to_string(), self.root.to_json());
for (name, pkg) in packages {
deps.insert("node_modules/".to_string() + name.as_str(), pkg.to_json());
deps_v1.insert(name.as_ref(), pkg.to_json_v1());
Copy link
Member

Choose a reason for hiding this comment

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

This needs to take into account nested dependencies.

@zkat
Copy link
Member

zkat commented Sep 27, 2023

hey @gabelluardo do you think you'll still pick up this PR?

@gabelluardo
Copy link
Contributor Author

Hi @zkat sorry but I think I can't manage this in a short time

@zkat
Copy link
Member

zkat commented Sep 29, 2023

No worries. Thanks for letting me know :)

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.

render package-lock.json lockfiles
2 participants