Skip to content

normalizeRepositoryUrl

normalizeRepositoryUrl(url, baseDir): string

Defined in: simply-package-core/src/packageDependenciesClone.ts:205

Reduce a git URL to host/path so that the same repository compares equal however it’s written: https:// or ssh://, scp-like git@host:path, with or without .git or a trailing /. The host is lowercased, and the scheme, user, and port are dropped. A local path resolves against baseDir.

string

The repository URL.

string

The directory a relative local path is relative to.

string

The comparison key.