refactor parse_package_deps