Skip to content

generate archive urls: tarball, zip, ... #160

@milahu

Description

@milahu

expected result

> const GitUrlParse = require("git-url-parse");

> GitUrlParse("IonicaBizau/node-git-url-parse").getArchiveUrls()
{
  'tar.gz': 'https://github.com/IonicaBizau/git-url-parse/archive/refs/heads/master.tar.gz',
  'zip': 'https://github.com/IonicaBizau/git-url-parse/archive/refs/heads/master.zip'
}

challenge: different git webinterfaces have different archive urls

why: package managers prefer fetching archives, because its faster than git clone
(but less secure, because the commit object is missing, so the commit hash cant be verified...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions