Skip to main content

PackageStructure

Shape of package.json, with support for third-party properties like Yarn, Webpack, and TypeScript.

Index

Properties

optionalauthor

author?: string | PeopleSetting

optionalbin

bin?: string | SettingMap<string>

optionalbrowser

browser?: string

optionalbrowserslist

browserslist?: string[]

optionalbugs

bugs?: string | BugSetting

optionalbundledDependencies

bundledDependencies?: string[]

optionalconfig

config?: ConfigSetting

optionalcontributors

contributors?: string[] | PeopleSetting[]

optionalcpu

cpu?: string[]

optionaldependencies

dependencies?: DependencyMap

optionaldependenciesMeta

dependenciesMeta?: Record<string, DependencyMetaSetting>

optionaldescription

description?: string

optionaldevDependencies

devDependencies?: DependencyMap

optionaldirectories

directories?: SettingMap<test | bin | doc | example | lib | man>

optionalengines

engines?: SettingMap<string>

optionalexports

exports?: string | Record<string, string | string[] | SettingMap<string>>

optionalfiles

files?: string[]

optionalfunding

funding?: string | TypeSetting | (string | TypeSetting)[]

optionalhomepage

homepage?: string

optionalimports

imports?: Record<string, SettingMap<string>>

optionalinstallConfig

installConfig?: { hoistingLimits?: boolean }

optionalkeywords

keywords?: string[]

optionallanguageName

languageName?: string

optionallicense

license?: string | TypeSetting | TypeSetting[]

optionalmain

main?: string

optionalman

man?: string | string[]

optionalmodule

module?: string

name

name: string

optionaloptionalDependencies

optionalDependencies?: DependencyMap

optionalos

os?: string[]

optionalpeerDependencies

peerDependencies?: DependencyMap

optionalpeerDependenciesMeta

peerDependenciesMeta?: Record<string, PeerDependencyMetaSetting>

optionalpreferUnplugged

preferUnplugged?: boolean

optionalprivate

private?: boolean

optionalpublishConfig

publishConfig?: ConfigSetting

optionalrepository

repository?: string | RepositorySetting

optionalresolutions

resolutions?: DependencyMap

optionalscripts

scripts?: SettingMap<string>

optionalsideEffects

sideEffects?: boolean | string[]

optionaltype

type?: commonjs | module

optionaltypes

types?: string

optionaltypesVersions

typesVersions?: Record<string, Record<string, string[]>>

optionaltypings

typings?: string

version

version: string

optionalworkspaces

workspaces?: string[] | { nohoist?: string[]; packages?: string[] }