Skip to main content

Crate pkglock_lib

Crate pkglock_lib 

Source

Enums§

InstallHookResult
Outcome of install_pre_commit_hook. Both variants are “no error” — the caller decides whether AlreadyExists triggers a non-zero exit.

Functions§

install_pre_commit_hook
Install a pre-commit git hook under repo_root/.git/hooks/.
npmrc_registry
Parse registry=... from a .npmrc-style file. Supports:
rewrite_lockfile
rewrite_lockfile_to_local
Read the lockfile, rewrite any resolved URL whose host is exactly registry.npmjs.org to point at local_url, write it back, and return the number of URLs changed.
rewrite_lockfile_to_public
Read the lockfile, rewrite any resolved URL whose host is local (see is_local_host) to point at https://registry.npmjs.org, write it back, and return the number of URLs changed.
update_urls
update_urls_from_config
update_urls_in_package_lock