Skip to content

Expose descriptive package metadata in ParseResult #101

Description

@andrew

I'm extracting package descriptions and keywords for offline content analysis. Parse currently returns identity, dependencies, licenses, and scripts, but drops descriptive fields even when the input format is supported.

At library revision 04d388904f3439cbabf24ac986353a7f12266086, using Go 1.27.1:

result, err := manifests.Parse("package.json", []byte(`{
  "name": "example",
  "version": "1.0.0",
  "description": "A currency conversion library",
  "keywords": ["currency", "conversion"],
  "homepage": "https://example.test"
}`))
fmt.Printf("result=%+v error=%v\n", result, err)

Parsing succeeds, but ParseResult has no fields for the description, keywords, or homepage. The nuspec parser similarly omits description, summary, tags, project URL, and a declared README path. Callers must parse the same file again to recover them. This is a library call; no git-pkgs CLI is involved.

Please expose descriptive metadata alongside the existing results, initially for package.json and nuspec. Preserve summary and long description separately where applicable, declared URLs, content type when supplied, and absent versus explicitly empty values. A declared README path should remain a reference without triggering filesystem access.

Public Parse tests should cover these fields while retaining the existing identity, dependency, license, and script results.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions