Skip to content

PackageJson

Defined in: package-json.type.ts:2

The package.json fields these utils and their callers read; any other field passes through untyped.

[field: string]: unknown

optional dependencies?: Record<string, string>

Defined in: package-json.type.ts:14

Runtime dependencies, name to range.


optional devDependencies?: Record<string, string>

Defined in: package-json.type.ts:16

Development dependencies, name to range.


optional name?: string

Defined in: package-json.type.ts:4

The package name.


optional optionalDependencies?: Record<string, string>

Defined in: package-json.type.ts:20

Dependencies that are installed when possible but may fail to install.


optional packageManager?: string

Defined in: package-json.type.ts:10

The package manager and version the project declares, such as pnpm@10.0.0.


optional peerDependencies?: Record<string, string>

Defined in: package-json.type.ts:18

Packages the consumer is expected to provide.


optional private?: boolean

Defined in: package-json.type.ts:8

Whether the package is private and so never published.


optional scripts?: Record<string, string>

Defined in: package-json.type.ts:12

Script names mapped to their commands.


optional version?: string

Defined in: package-json.type.ts:6

The package version.