Skip to content
Provide a package name, get a list of every version, and who published it.
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows [actions] add automatic rebasing / merge commit blocking Feb 3, 2020
bin [Fix] `--json`: output valid json Feb 4, 2020
test Tests Feb 3, 2020
.eslintignore [Tests] add 100% coverage Feb 4, 2020
.eslintrc
.gitignore
.npmrc [meta] add `auto-changelog` Feb 3, 2020
.nycrc [Tests] add 100% coverage Feb 4, 2020
.travis.yml [Tests] add 100% coverage Feb 4, 2020
CHANGELOG.md v1.0.1 Feb 4, 2020
LICENSE Initial commit Feb 3, 2020
README.md [readme] add v1.0.1 example, and `--sort` example Feb 4, 2020
index.js [Refactor] remove useless comparison Feb 3, 2020
package.json [Deps] update `pacote`, `semver` Feb 18, 2020

README.md

publishers Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

Provide a package name, get a list of every version, and who published it.

Example

CLI

> publishers publishers
┌─────────┬──────────┬────────────────────┬────────────────────────────┐
│ (index) │   name   │       email        │          created           │
├─────────┼──────────┼────────────────────┼────────────────────────────┤
│ v1.0.1  │ 'ljharb' │ 'ljharb@gmail.com' │ '2020-02-04T02:26:10.321Z' │
│ v1.0.0  │ 'ljharb' │ 'ljharb@gmail.com' │ '2020-02-03T21:34:48.957Z' │
└─────────┴──────────┴────────────────────┴────────────────────────────┘
> publishers publishers --json
{
	"v1.0.1": {
		"name": "ljharb",
		"email": "ljharb@gmail.com",
		"created": "2020-02-04T02:26:10.321Z"
	},
	"v1.0.0": {
		"name": "ljharb",
		"email": "ljharb@gmail.com",
		"created": "2020-02-03T21:34:48.957Z"
	}
}
> publishers publishers --json --sort=asc
{
	"v1.0.0": {
		"name": "ljharb",
		"email": "ljharb@gmail.com",
		"created": "2020-02-03T21:34:48.957Z"
	},
	"v1.0.1": {
		"name": "ljharb",
		"email": "ljharb@gmail.com",
		"created": "2020-02-04T02:26:10.321Z"
	}
}

API

const assert = require('assert');
const { execSync } = require('child_process');
const getPublishers = require('publishers');

const results = getPublishers('publishers').then((results) => {
	assert.deepEqual(
		results,
		JSON.parse(String(execSync('npx publishers --json publishers')))
	);
}).catch((e) => {
	console.error(e);
	process.exit(1);
});
You can’t perform that action at this time.