{"id":16017330,"url":"https://github.com/robertohuertasm/package-lock-json-parser","last_synced_at":"2025-09-02T00:38:35.377Z","repository":{"id":65143529,"uuid":"583109736","full_name":"robertohuertasm/package-lock-json-parser","owner":"robertohuertasm","description":"🦀 📕 Simple package-lock.json parser","archived":false,"fork":false,"pushed_at":"2023-05-23T09:52:19.000Z","size":337,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-20T02:58:13.619Z","etag":null,"topics":["npm","npm-package","package-lock","package-lock-json","parser"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/package-lock-json-parser","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertohuertasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-28T19:48:46.000Z","updated_at":"2025-05-05T06:32:33.000Z","dependencies_parsed_at":"2024-10-30T17:40:55.364Z","dependency_job_id":"f9dbce5d-890c-46e0-9bb5-1e9ba4bd6f4e","html_url":"https://github.com/robertohuertasm/package-lock-json-parser","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"47f555dcfc47108fff2d8415a92aa8d40dd3eeaf"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/robertohuertasm/package-lock-json-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertohuertasm%2Fpackage-lock-json-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertohuertasm%2Fpackage-lock-json-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertohuertasm%2Fpackage-lock-json-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertohuertasm%2Fpackage-lock-json-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertohuertasm","download_url":"https://codeload.github.com/robertohuertasm/package-lock-json-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertohuertasm%2Fpackage-lock-json-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273213951,"owners_count":25065059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["npm","npm-package","package-lock","package-lock-json","parser"],"created_at":"2024-10-08T16:05:05.474Z","updated_at":"2025-09-02T00:38:35.336Z","avatar_url":"https://github.com/robertohuertasm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# package-lock-json-parser\n\n[![ActionsStatus](https://github.com/robertohuertasm/package-lock-json-parser/workflows/Build/badge.svg)](https://github.com/robertohuertasm/package-lock-json-parser/actions) [![Crates.io](https://img.shields.io/crates/v/package-lock-json-parser.svg)](https://crates.io/crates/package-lock-json-parser)\n\nEasily parse `package-lock.json` dependencies.\n\nIt supports lock file versions 1, 2, and 3.\n\n## Example\n\n```rust\n// Getting a full package lock json file.\n// You'll get information about the lock file version and a list of v1 or v2 dependencies.\n// v1 lock files will only have v1 dependencies while v3 lock files will only have v2 dependencies. \n// v2 lock files will get both v1 and v2 dependencies.\n// Check this URL (https://docs.npmjs.com/cli/v9/configuring-npm/package-lock-json?v=true) if you want to learn more about package-lock.json fields.\nuse std::{error::Error, fs};\nuse package_lock_json::{parse, PackageLockJson};\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    let package_lock_json_text = fs::read_to_string(\"package-lock.json\")?;\n    let lock_file: PackageLockJson = parse(package_lock_json_text)?;\n    println!(\"{:?}\", lock_file);\n    Ok(())\n}\n```\n\n```rust\n// If you just a new a simple list of dependencies try the parse_dependencies function.\nuse std::{error::Error, fs};\nuse package_lock_json::{parse_dependencies, SimpleDependency};\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    let package_lock_json_text = fs::read_to_string(\"package-lock.json\")?;\n    let dependencies: Vec\u003cSimpleDependency\u003e = parse_dependencies(package_lock_json_text)?;\n    println!(\"{:?}\", dependencies);\n    Ok(())\n}\n```\n\n## Documentation\n\nVisit [https://docs.rs/package-lock-json-parser/](https://docs.rs/package-lock-json-parser/).\n\n## Build\n\nYou will need [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html), the Rust package manager.\n\n```bash\ncargo build\n```\n\n## Test\n\n```bash\ncargo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertohuertasm%2Fpackage-lock-json-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertohuertasm%2Fpackage-lock-json-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertohuertasm%2Fpackage-lock-json-parser/lists"}