Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

all-contributors-inferred

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

all-contributors-inferred

Infers All Contributors settings from an existing README.md table and package.json. πŸ’—

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
123
decreased by-2.38%
Maintainers
0
Weekly downloads
Β 
Created
Source

All Contributors Inferred

Infers All Contributors settings from an existing README.md table and package.json. πŸ’—

πŸ‘ͺ All Contributors: 1 🀝 Code of Conduct: Kept πŸ§ͺ Coverage πŸ“ License: MIT πŸ“¦ npm version πŸ’ͺ TypeScript: Strict

Usage

Use this package's exported inferAllContributors function to infer .all-contributorsrc configuration options from package.json and README.md contents.

npm i all-contributors-inferred
import { inferAllContributors } from "all-contributors-inferred";
import fs from "node:fs/promises";

inferAllContributors({
	packageJson: JSON.parse((await fs.readFile("package.json")).toString()),
	readmeMd: (await fs.readFile("README.md")).toString(),
});
/*
[
	{
		"contributors": ...,
		"projectName": ...,
		"projectOwner": ...
	}
]
*/

Options

inferAllContributors takes in a required options object. It may have the following required properties:

  • packageJson: Data from a parsed package.json file
  • readmeMd: Text read from the README.md file

Return Type

The returned value is the same shape as you'd see in .all-contributorsrc configuration options, but with everything optional. See the exported InferredAllContributors type.

Why?

All Contributors is one of many great pieces of tooling available for repositories. Repositories that use many tools often end up with a dauntingly large number of configuration files -- over a dozen in many cases.

Many users find it exhausting and overwhelming to open a new repository with many config files. Reducing the number of config files in repositories can help make developing them more approachable.

πŸ’‘ Wish this was built into All Contributors? Lend a πŸ‘ to all-contributors/all-contributors#808 Make the .all-contributorsrc file optional (infer contributors from README.md)!

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! πŸ’–

Contributors

Josh Goldberg
Josh Goldberg

πŸ› πŸ’» 🚧 πŸ‘€ πŸ”§ πŸ“– πŸš‡ ⚠️ πŸ€”

πŸ’ This package was templated with create-typescript-app using the create engine.

FAQs

Package last updated on 31 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc