ls-exports
v1.1.1
Published
CLI for `list-exports`: Given a package name and a version number, or a path to a package.json, what specifiers does it expose?
Downloads
55
Maintainers
Readme
ls-exports
Given a package name and a version number, or a path to a package.json, what specifiers does it expose?
The package export defaults an async function
. It fulfills with an object with the following keys:
name
the package nameversion
: the package versionengines
: the package'sengines
requirementsbinaries
: the files that are made available as executable programserrors
: any validation errors encountered during parsing. Note that these errors do not necessarily interfere with the listed entry points being accessible at runtime.
For ESM-supporting node versions (at the time of this writing, ^12.17 || >= 13.2
):
require
: valid specifiers to pass intorequire
import
: valid specifiers to pass intoimport()
, or to use in a staticimport
statementfiles
: all files on the filesystem that are directly exposed by the above entry pointstree
: a hierarchical object structure where each directory is represented as a key containing an object, and each file is represented as a key containing a list of the entry points that expose that file
For node versions prior to ESM support (at the time of this writing, < 12.17 || ~13.0 || ~13.1
):
require (pre-exports)
: valid specifiers to pass intorequire
files (pre-exports)
: all files on the filesystem that are directly exposed by the above entry pointstree (pre-exports)
: a hierarchical object structure where each directory is represented as a key containing an object, and each file is represented as a key containing a list of the entry points that expose that file
Example
ls-exports package resolve@1