-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
The API is focused on the scanner right now, which is fine.
I’d like to add two new method to the ContactExtractor class (in addition to fromDependencies):
- fromManifest - pull contacts from a manifest
- fromPackument - pull contacts from a packument
Both inputs come from pacote, so we keep using the npm-types workspace.
These helpers will only extract the raw contacts.
They won’t parse them—that still happens in fromDependencies, which returns a proper Contact (because Scanner already deal with that before hand).
We’ll need parseAuthor from the utils workspace for the final step.
Tip
Doing manifest first and then packument in a separated PR would be better (since packument contains all the manifest of the package).
Expected code output would be something like fromDependencies
const manifest = await pacote.manifest("is@x.x.x");
const extractor = new ContactExtractor({
highlight: [
{
name: "Sindre Sorhus"
}
]
});
const contacts = extractor.fromManifest(
manifest
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers