Skip to content

[I] PackageJson

Type for package.json https://docs.npmjs.com/cli/configuring-npm/package-json

PropertyTypeDescription
bugs?objectLocations where package users can report issues.
bugs.email?stringEmail address for issue reports.
bugs.url?stringIssue tracker URL.
dependencies?Record<string, string>Runtime dependency names mapped to package version ranges or other dependency specifiers.
description?stringPackage description
devDependencies?Record<string, string>Dependencies used to develop, build, or test this package.
devEngines?DevEnginesDevelopment-environment requirements and mismatch policies recorded in the manifest.
exports?Exports | nullSubpath exports to define entry points of the package. Read more.
homepage?stringURL of the package’s home page.
imports?Imports | nullSubpath imports to define private mappings for imports within the package itself. Read more.
main?stringLegacy JavaScript entry point relative to the package root.
namestringPackage name
packageManager?stringPackage-manager name and version recorded by the project, such as pnpm@10.0.0.
peerDependencies?Record<string, string>Compatible dependency versions expected to be supplied by the consuming project.
private?booleanWhether the package is marked as non-publishable.
repository?string | RepositorySource repository location, either as a shorthand string or structured metadata.
tspMain?stringTypeSpec entry point relative to the package root.
type?"module" | "commonjs"Default module interpretation for JavaScript files in the package.
version?stringPackage version