bindings

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package bindings parses project-local package-manager metadata into source import bindings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCargoManifest

func ParseCargoManifest(filename string, content []byte) (provides.BindingResult, error)

ParseCargoManifest extracts dependency bindings from Cargo.toml content. Version constraints are not used as package versions, so the returned PURLs are versionless. Path and Git dependencies are omitted because their registry identity cannot be established from the manifest alone.

func ParseCargoMetadata

func ParseCargoMetadata(content []byte) (provides.BindingResult, error)

ParseCargoMetadata extracts the dependency names visible to the current package or workspace members from cargo metadata JSON.

func ParseDenoConfig

func ParseDenoConfig(filename string, content []byte) (provides.BindingResult, error)

ParseDenoConfig extracts npm package bindings from the imports map in a deno.json file. Other target schemes and relative targets are left to their owning resolvers.

func ParseGoList

func ParseGoList(content []byte) (provides.BindingResult, error)

ParseGoList extracts package import paths and local identifiers from the concatenated JSON stream produced by go list -deps -json.

func ParseNPMManifest

func ParseNPMManifest(filename string, content []byte) (provides.BindingResult, error)

ParseNPMManifest extracts registry dependency bindings from package.json. Manifest ranges do not become PURL versions. Local, Git, and URL dependencies are omitted because the manifest does not establish an npm registry identity.

func ParseNPMPackage

func ParseNPMPackage(
	packageURL string,
	filename string,
	content []byte,
) (provides.SurfaceResult, error)

ParseNPMPackage extracts the root and explicit exported subpaths provided by an npm package. Export patterns are reported as diagnostics because matching them requires the package file list, which this manifest-only parser lacks.

func ParseNPMPackageFiles

func ParseNPMPackageFiles(
	packageURL string,
	filename string,
	content []byte,
	files []string,
) (provides.SurfaceResult, error)

ParseNPMPackageFiles is like ParseNPMPackage but expands export patterns against package-relative artifact paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL