vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • link-tree
    • index
    • pool
    • Reference
    • store-entry
    • store-index
    • unpack
  • Type Aliases
  • LinkFromStoreOptions
  • StoreLinker
  • StoreLinkResult
  • Functions
  • linkFromStore()
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/tar
  6. /
  7. link-tree

link-tree

Type Aliases

LinkFromStoreOptions

TypeScript
type LinkFromStoreOptions = object;

Defined in: link-tree.ts:42

Type declaration

NameTypeDescription
copy?booleancopy every file instead of hardlinking. Implied when the index says the package runs install scripts, which must not write into the store.

StoreLinker

TypeScript
type StoreLinker = "auto" | "hardlink" | "copy" | "unpack";

Defined in: link-tree.ts:33

How reify places packages: auto and hardlink link from the global store, copy copies from it, unpack skips it.


StoreLinkResult

TypeScript
type StoreLinkResult = 
  | {
  how: "link" | "copy";
  index: StoreIndex;
 }
  | false;

Defined in: link-tree.ts:39

How a store entry was placed (copy: every file copied, for install scripts, copy or a downgrade) and its index, or false on a miss.

Functions

linkFromStore()

TypeScript
function linkFromStore(
   storeEntry, 
   target, 
   __namedParameters): StoreLinkResult

Defined in: link-tree.ts:158

Materialize a global store entry at target from its sidecar index: hardlink each file into a sibling temp dir (package.json last), then rename it into place. Files that cannot be linked are copied, as is every file of a package with install scripts. Returns how, with the index, or false, leaving target untouched, on a store miss (no valid index, entry not a directory, symlinked target parent), a name clash on a case-insensitive target, or a damaged entry, which is removed.

Parameters

ParameterType
storeEntrystring
targetstring
__namedParametersLinkFromStoreOptions

Returns

StoreLinkResult


Previous@vltpkg/tarNextindex

On this page

  • Type Aliases
  • LinkFromStoreOptions
  • StoreLinker
  • StoreLinkResult
  • Functions
  • linkFromStore()

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now