UNPKG

@pnpm/git-resolver

Version:
13 lines 437 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createGitHostedPkgId = createGitHostedPkgId; function createGitHostedPkgId({ repo, commit, path }) { let id = `${repo.includes('://') ? '' : 'https://'}${repo}#${commit}`; if (!id.startsWith('git+')) id = `git+${id}`; if (path) { id += `&path:${path}`; } return id; } //# sourceMappingURL=createGitHostedPkgId.js.map