Skip to main content

XpmPackage.jsonPackage property

The parsed package.json content, when available.

Signature

jsonPackage?: JsonXpmPackage;

Remarks

This property caches the parsed package.json content after successful reading, avoiding repeated file I/O and parsing operations.

Lifecycle states:

  1. Initially undefined when the XpmPackage instance is created.
  2. Populated by XpmPackage.readPackageDotJson() upon successful read and parse.
  3. Cleared to undefined if parsing fails with withThrow enabled.
  4. Used by validation methods (isNpmPackage, isXpmPackage, isBinaryXpmPackage) to check package capabilities.
  5. Not automatically updated when package.json is modified externally; call XpmPackage.readPackageDotJson() again to refresh.

The cached content improves performance for packages that perform multiple validation checks without file system access overhead.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.