browser | @vltpkg/dep-id
Type Aliases
Delimiter
Defined in
browser.ts:4
DepID
Dependency IDs are a URI-encoded set of strings, separated
by the Delimiter character ('·'
).
The first entry is always the specifier type. The rest depend on the
type. git
, registry
, and workspace
entries have 3 fields, the rest
have 2.
registry
:'registry·<registry>·name@specifier'
The<registry>
portion can be a known named registry name, or a url to a registry. If empty, it is the default registry. Examples:··[email protected]
·npm·[email protected]
·http%3A%2F%2Fvlt.sh%2F·[email protected]
git
:'git·<git remote>·<git selector>'
. For example:git·github:user/project·branchname
git·git%2Bssh%3A%2F%2Fuser%40host%3Aproject.git·semver:1.x
workspace
:'workspace·<path>'
. For example:workspace·src/mything
remote
:'remote·<url>'
file
:'file·<path>'
Lastly, the final portion can contain arbitrary string data, and is used to store peer dep resolutions to maintain the peerDep contract.
Defined in
browser.ts:31
DepIDTuple
A DepID, split apart and URI-decoded
Defined in
browser.ts:40
Variables
delimiter
Defined in
browser.ts:3
Functions
asDepID()
Parameters
• str: string
Returns
Defined in
browser.ts:70
isDepID()
Parameters
• str: unknown
Returns
str is DepID
Defined in
browser.ts:67
joinDepIDTuple()
turn a DepIDTuple into a DepID
Parameters
• list: DepIDTuple
Returns
Defined in
browser.ts:82
splitDepID()
turn a DepID into a DepIDTuple
Parameters
• id: string
Returns
Defined in
browser.ts:102