@arolariu/website / types / NodePackagesJSON
Type Alias: NodePackagesJSON
NodePackagesJSON =
{ [depType in NodePackageDependencyType]?: NodePackageInformation[] }
Defined in: types/index.ts:195
Structured container for categorized package dependency information.
Remarks
Structure: Maps dependency types to arrays of package metadata:
production: Runtime dependencies shipped in production buildsdevelopment: Build tools and dev-only dependencies (linters, test frameworks)peer: Dependencies expected to be provided by the consuming application
Optional Properties: All keys are optional to allow partial dependency data.
For example, a library might only have peer dependencies.
Usage Context:
- Generating attribution/acknowledgments pages
- License compliance documentation
- Dependency analysis dashboards
- Bundle size breakdown reports
Type Safety: Uses mapped type to ensure only valid dependency types are keys.
Data Generation: Typically populated by build scripts that parse package.json and package-lock.json files.
Example
const packages: NodePackagesJSON = {
production: [
{
name: "react",
version: "19.2.0",
description: "React library",
homepage: "https://react.dev",
license: "MIT",
author: "Meta"
}
],
development: [
{
name: "eslint",
version: "9.0.0",
description: "JavaScript linter",
homepage: "https://eslint.org",
license: "MIT",
author: "ESLint Team"
}
]
};