New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

types-package-json

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

types-package-json

A handful set of package.json types and interfaces to improve working with dynamically imported package.json files.

  • 2.0.39
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5.1K
decreased by-2.87%
Maintainers
1
Weekly downloads
 
Created
Source

types-package-json

A handful set of package.json types and interfaces to improve working with dynamically imported package.json files.

Table of contents

  1. Getting Started

  2. Usage

  3. Features

Getting Started

npm i -D types-package-json

Usage

import type { PackageJson } from 'types-package-json';

const packageJsonPath = path.resolve(process.cwd(), `package.json`);
const packageJson: Partial<PackageJson> = await import(packageJsonPath);

Features

Zero overhead - contains only types and interfaces, no actual objects. PackageJson - full package.json interface, name and version is required PackageJsonAddress - optional email and url PackageJsonPerson - required name, optional email and url PackageJsonDependencyTypes - 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies' (bundledDependencies are not included in this type as they serve different purpose).

Keywords

FAQs

Package last updated on 09 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc