@pnpm/types

  • Version 11.0.0
  • Published
  • 12.3 kB
  • No dependencies
  • MIT license

Install

npm i @pnpm/types
yarn add @pnpm/types
pnpm add @pnpm/types

Overview

Basic types used by pnpm

Index

Variables

variable DEPENDENCIES_FIELDS

const DEPENDENCIES_FIELDS: DependenciesField[];

    variable DEPENDENCIES_OR_PEER_FIELDS

    const DEPENDENCIES_OR_PEER_FIELDS: DependenciesOrPeersField[];

      Interfaces

      interface BadPeerDependencyIssue

      interface BadPeerDependencyIssue extends MissingPeerDependencyIssue {}

        property foundVersion

        foundVersion: string;

          property resolvedFrom

          resolvedFrom: ParentPackages;

            interface BaseManifest

            interface BaseManifest {}

              property author

              author?: string;

                property bin

                bin?: PackageBin;

                  property bundledDependencies

                  bundledDependencies?: string[] | boolean;

                    property bundleDependencies

                    bundleDependencies?: string[] | boolean;

                      property config

                      config?: object;

                        property cpu

                        cpu?: string[];

                          property dependencies

                          dependencies?: Dependencies;

                            property dependenciesMeta

                            dependenciesMeta?: DependenciesMeta;

                              property description

                              description?: string;

                                property devDependencies

                                devDependencies?: Dependencies;

                                  property directories

                                  directories?: {
                                  bin?: string;
                                  };

                                    property engines

                                    engines?: {
                                    node?: string;
                                    npm?: string;
                                    pnpm?: string;
                                    };

                                      property exports

                                      exports?: Record<string, string>;

                                        property files

                                        files?: string[];

                                          property homepage

                                          homepage?: string;

                                            property keywords

                                            keywords?: string[];

                                              property libc

                                              libc?: string[];

                                                property license

                                                license?: string;

                                                  property main

                                                  main?: string;

                                                    property module

                                                    module?: string;

                                                      property name

                                                      name?: string;

                                                        property optionalDependencies

                                                        optionalDependencies?: Dependencies;

                                                          property os

                                                          os?: string[];

                                                            property peerDependencies

                                                            peerDependencies?: Dependencies;

                                                              property peerDependenciesMeta

                                                              peerDependenciesMeta?: PeerDependenciesMeta;

                                                                property publishConfig

                                                                publishConfig?: PublishConfig;

                                                                  property readme

                                                                  readme?: string;

                                                                    property repository

                                                                    repository?:
                                                                    | string
                                                                    | {
                                                                    url: string;
                                                                    };

                                                                      property scripts

                                                                      scripts?: PackageScripts;

                                                                        property types

                                                                        types?: string;

                                                                          property typesVersions

                                                                          typesVersions?: TypesVersions;

                                                                            property typings

                                                                            typings?: string;

                                                                              property version

                                                                              version?: string;

                                                                                interface DependenciesMeta

                                                                                interface DependenciesMeta {}

                                                                                  index signature

                                                                                  [dependencyName: string]: {
                                                                                  injected?: boolean;
                                                                                  node?: string;
                                                                                  patch?: string;
                                                                                  };

                                                                                    interface DependencyManifest

                                                                                    interface DependencyManifest extends BaseManifest {}

                                                                                      property name

                                                                                      name: string;

                                                                                        property version

                                                                                        version: string;

                                                                                          interface MissingPeerDependencyIssue

                                                                                          interface MissingPeerDependencyIssue {}

                                                                                            property optional

                                                                                            optional: boolean;

                                                                                              property parents

                                                                                              parents: ParentPackages;

                                                                                                property wantedRange

                                                                                                wantedRange: string;

                                                                                                  interface PackageManifest

                                                                                                  interface PackageManifest extends DependencyManifest {}

                                                                                                    property deprecated

                                                                                                    deprecated?: string;

                                                                                                      interface PatchFile

                                                                                                      interface PatchFile {}

                                                                                                        property hash

                                                                                                        hash: string;

                                                                                                          property path

                                                                                                          path: string;

                                                                                                            interface PeerDependenciesMeta

                                                                                                            interface PeerDependenciesMeta {}

                                                                                                              index signature

                                                                                                              [dependencyName: string]: {
                                                                                                              optional?: boolean;
                                                                                                              };

                                                                                                                interface PeerDependencyIssues

                                                                                                                interface PeerDependencyIssues {}

                                                                                                                  property bad

                                                                                                                  bad: BadPeerIssuesByPeerName;

                                                                                                                    property conflicts

                                                                                                                    conflicts: string[];

                                                                                                                      property intersections

                                                                                                                      intersections: Record<string, string>;

                                                                                                                        property missing

                                                                                                                        missing: MissingPeerIssuesByPeerName;

                                                                                                                          interface PeerDependencyRules

                                                                                                                          interface PeerDependencyRules {}

                                                                                                                            property allowAny

                                                                                                                            allowAny?: string[];

                                                                                                                              property allowedVersions

                                                                                                                              allowedVersions?: Record<string, string>;

                                                                                                                                property ignoreMissing

                                                                                                                                ignoreMissing?: string[];

                                                                                                                                  interface Project

                                                                                                                                  interface Project {}

                                                                                                                                    property manifest

                                                                                                                                    manifest: ProjectManifest;

                                                                                                                                      property rootDir

                                                                                                                                      rootDir: ProjectRootDir;

                                                                                                                                        property rootDirRealPath

                                                                                                                                        rootDirRealPath: ProjectRootDirRealPath;

                                                                                                                                          property writeProjectManifest

                                                                                                                                          writeProjectManifest: (
                                                                                                                                          manifest: ProjectManifest,
                                                                                                                                          force?: boolean | undefined
                                                                                                                                          ) => Promise<void>;

                                                                                                                                            interface ProjectManifest

                                                                                                                                            interface ProjectManifest extends BaseManifest {}

                                                                                                                                              property packageManager

                                                                                                                                              packageManager?: string;

                                                                                                                                                property pnpm

                                                                                                                                                pnpm?: {
                                                                                                                                                neverBuiltDependencies?: string[];
                                                                                                                                                onlyBuiltDependencies?: string[];
                                                                                                                                                onlyBuiltDependenciesFile?: string;
                                                                                                                                                overrides?: Record<string, string>;
                                                                                                                                                packageExtensions?: Record<string, PackageExtension>;
                                                                                                                                                ignoredOptionalDependencies?: string[];
                                                                                                                                                peerDependencyRules?: PeerDependencyRules;
                                                                                                                                                allowedDeprecatedVersions?: AllowedDeprecatedVersions;
                                                                                                                                                allowNonAppliedPatches?: boolean;
                                                                                                                                                patchedDependencies?: Record<string, string>;
                                                                                                                                                updateConfig?: {
                                                                                                                                                ignoreDependencies?: string[];
                                                                                                                                                };
                                                                                                                                                auditConfig?: {
                                                                                                                                                ignoreCves?: string[];
                                                                                                                                                };
                                                                                                                                                requiredScripts?: string[];
                                                                                                                                                supportedArchitectures?: SupportedArchitectures;
                                                                                                                                                };

                                                                                                                                                  property private

                                                                                                                                                  private?: boolean;

                                                                                                                                                    property resolutions

                                                                                                                                                    resolutions?: Record<string, string>;

                                                                                                                                                      property workspaces

                                                                                                                                                      workspaces?: string[];

                                                                                                                                                        interface PublishConfig

                                                                                                                                                        interface PublishConfig extends Record<string, unknown> {}

                                                                                                                                                          property directory

                                                                                                                                                          directory?: string;

                                                                                                                                                            property executableFiles

                                                                                                                                                            executableFiles?: string[];

                                                                                                                                                              property linkDirectory

                                                                                                                                                              linkDirectory?: boolean;

                                                                                                                                                                property registry

                                                                                                                                                                registry?: string;

                                                                                                                                                                  interface Registries

                                                                                                                                                                  interface Registries {}

                                                                                                                                                                    property default

                                                                                                                                                                    default: string;

                                                                                                                                                                      index signature

                                                                                                                                                                      [scope: string]: string;

                                                                                                                                                                        interface SslConfig

                                                                                                                                                                        interface SslConfig {}

                                                                                                                                                                          property ca

                                                                                                                                                                          ca?: string;

                                                                                                                                                                            property cert

                                                                                                                                                                            cert: string;

                                                                                                                                                                              property key

                                                                                                                                                                              key: string;

                                                                                                                                                                                interface SupportedArchitectures

                                                                                                                                                                                interface SupportedArchitectures {}

                                                                                                                                                                                  property cpu

                                                                                                                                                                                  cpu?: string[];

                                                                                                                                                                                    property libc

                                                                                                                                                                                    libc?: string[];

                                                                                                                                                                                      property os

                                                                                                                                                                                      os?: string[];

                                                                                                                                                                                        interface TypesVersions

                                                                                                                                                                                        interface TypesVersions {}

                                                                                                                                                                                          index signature

                                                                                                                                                                                          [version: Version]: {
                                                                                                                                                                                          [pattern: Pattern]: string[];
                                                                                                                                                                                          };

                                                                                                                                                                                            Type Aliases

                                                                                                                                                                                            type AllowedDeprecatedVersions

                                                                                                                                                                                            type AllowedDeprecatedVersions = Record<string, string>;

                                                                                                                                                                                              type BadPeerIssuesByPeerName

                                                                                                                                                                                              type BadPeerIssuesByPeerName = Record<string, BadPeerDependencyIssue[]>;

                                                                                                                                                                                                type Dependencies

                                                                                                                                                                                                type Dependencies = Record<string, string>;

                                                                                                                                                                                                  type DependenciesField

                                                                                                                                                                                                  type DependenciesField = 'optionalDependencies' | 'dependencies' | 'devDependencies';

                                                                                                                                                                                                    type DependenciesOrPeersField

                                                                                                                                                                                                    type DependenciesOrPeersField = DependenciesField | 'peerDependencies';

                                                                                                                                                                                                      type DepPath

                                                                                                                                                                                                      type DepPath = string & {
                                                                                                                                                                                                      __brand: 'DepPath';
                                                                                                                                                                                                      };

                                                                                                                                                                                                        type HoistedDependencies

                                                                                                                                                                                                        type HoistedDependencies = Record<
                                                                                                                                                                                                        DepPath | ProjectId,
                                                                                                                                                                                                        Record<string, 'public' | 'private'>
                                                                                                                                                                                                        >;

                                                                                                                                                                                                          type IncludedDependencies

                                                                                                                                                                                                          type IncludedDependencies = {
                                                                                                                                                                                                          [dependenciesField in DependenciesField]: boolean;
                                                                                                                                                                                                          };

                                                                                                                                                                                                            type LogBase

                                                                                                                                                                                                            type LogBase =
                                                                                                                                                                                                            | {
                                                                                                                                                                                                            level: 'debug' | 'error';
                                                                                                                                                                                                            }
                                                                                                                                                                                                            | {
                                                                                                                                                                                                            level: 'info' | 'warn';
                                                                                                                                                                                                            prefix: string;
                                                                                                                                                                                                            message: string;
                                                                                                                                                                                                            };

                                                                                                                                                                                                              type MissingPeerIssuesByPeerName

                                                                                                                                                                                                              type MissingPeerIssuesByPeerName = Record<string, MissingPeerDependencyIssue[]>;

                                                                                                                                                                                                                type PackageBin

                                                                                                                                                                                                                type PackageBin =
                                                                                                                                                                                                                | string
                                                                                                                                                                                                                | {
                                                                                                                                                                                                                [commandName: string]: string;
                                                                                                                                                                                                                };

                                                                                                                                                                                                                  type PackageExtension

                                                                                                                                                                                                                  type PackageExtension = Pick<
                                                                                                                                                                                                                  BaseManifest,
                                                                                                                                                                                                                  | 'dependencies'
                                                                                                                                                                                                                  | 'optionalDependencies'
                                                                                                                                                                                                                  | 'peerDependencies'
                                                                                                                                                                                                                  | 'peerDependenciesMeta'
                                                                                                                                                                                                                  >;

                                                                                                                                                                                                                    type PackageScripts

                                                                                                                                                                                                                    type PackageScripts = {
                                                                                                                                                                                                                    [name: string]: string;
                                                                                                                                                                                                                    } & {
                                                                                                                                                                                                                    prepublish?: string;
                                                                                                                                                                                                                    prepare?: string;
                                                                                                                                                                                                                    prepublishOnly?: string;
                                                                                                                                                                                                                    prepack?: string;
                                                                                                                                                                                                                    postpack?: string;
                                                                                                                                                                                                                    publish?: string;
                                                                                                                                                                                                                    postpublish?: string;
                                                                                                                                                                                                                    preinstall?: string;
                                                                                                                                                                                                                    install?: string;
                                                                                                                                                                                                                    postinstall?: string;
                                                                                                                                                                                                                    preuninstall?: string;
                                                                                                                                                                                                                    uninstall?: string;
                                                                                                                                                                                                                    postuninstall?: string;
                                                                                                                                                                                                                    preversion?: string;
                                                                                                                                                                                                                    version?: string;
                                                                                                                                                                                                                    postversion?: string;
                                                                                                                                                                                                                    pretest?: string;
                                                                                                                                                                                                                    test?: string;
                                                                                                                                                                                                                    posttest?: string;
                                                                                                                                                                                                                    prestop?: string;
                                                                                                                                                                                                                    stop?: string;
                                                                                                                                                                                                                    poststop?: string;
                                                                                                                                                                                                                    prestart?: string;
                                                                                                                                                                                                                    start?: string;
                                                                                                                                                                                                                    poststart?: string;
                                                                                                                                                                                                                    prerestart?: string;
                                                                                                                                                                                                                    restart?: string;
                                                                                                                                                                                                                    postrestart?: string;
                                                                                                                                                                                                                    preshrinkwrap?: string;
                                                                                                                                                                                                                    shrinkwrap?: string;
                                                                                                                                                                                                                    postshrinkwrap?: string;
                                                                                                                                                                                                                    };

                                                                                                                                                                                                                      type ParentPackages

                                                                                                                                                                                                                      type ParentPackages = Array<{
                                                                                                                                                                                                                      name: string;
                                                                                                                                                                                                                      version: string;
                                                                                                                                                                                                                      }>;

                                                                                                                                                                                                                        type PeerDependencyIssuesByProjects

                                                                                                                                                                                                                        type PeerDependencyIssuesByProjects = Record<string, PeerDependencyIssues>;

                                                                                                                                                                                                                          type PkgId

                                                                                                                                                                                                                          type PkgId = string & {
                                                                                                                                                                                                                          __brand: 'PkgId';
                                                                                                                                                                                                                          };

                                                                                                                                                                                                                            type PkgIdWithPatchHash

                                                                                                                                                                                                                            type PkgIdWithPatchHash = string & {
                                                                                                                                                                                                                            __brand: 'PkgIdWithPatchHash';
                                                                                                                                                                                                                            };

                                                                                                                                                                                                                              type PkgResolutionId

                                                                                                                                                                                                                              type PkgResolutionId = string & {
                                                                                                                                                                                                                              __brand: 'PkgResolutionId';
                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                type ProjectId

                                                                                                                                                                                                                                type ProjectId = string & {
                                                                                                                                                                                                                                __brand: 'ProjectId';
                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                  type ProjectRootDir

                                                                                                                                                                                                                                  type ProjectRootDir = string & {
                                                                                                                                                                                                                                  __brand: 'ProjectRootDir';
                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                    type ProjectRootDirRealPath

                                                                                                                                                                                                                                    type ProjectRootDirRealPath = string & {
                                                                                                                                                                                                                                    __brand: 'ProjectRootDirRealPath';
                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                      type ProjectsGraph

                                                                                                                                                                                                                                      type ProjectsGraph = Record<
                                                                                                                                                                                                                                      ProjectRootDir,
                                                                                                                                                                                                                                      {
                                                                                                                                                                                                                                      dependencies: ProjectRootDir[];
                                                                                                                                                                                                                                      package: Project;
                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                      >;

                                                                                                                                                                                                                                        type ReadPackageHook

                                                                                                                                                                                                                                        type ReadPackageHook = <Pkg extends BaseManifest>(
                                                                                                                                                                                                                                        pkg: Pkg,
                                                                                                                                                                                                                                        dir?: string
                                                                                                                                                                                                                                        ) => Pkg | Promise<Pkg>;

                                                                                                                                                                                                                                          Package Files (6)

                                                                                                                                                                                                                                          Dependencies (0)

                                                                                                                                                                                                                                          No dependencies.

                                                                                                                                                                                                                                          Dev Dependencies (1)

                                                                                                                                                                                                                                          Peer Dependencies (0)

                                                                                                                                                                                                                                          No peer dependencies.

                                                                                                                                                                                                                                          Badge

                                                                                                                                                                                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@pnpm/types.

                                                                                                                                                                                                                                          • Markdown
                                                                                                                                                                                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@pnpm/types)
                                                                                                                                                                                                                                          • HTML
                                                                                                                                                                                                                                            <a href="https://www.jsdocs.io/package/@pnpm/types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>