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

libnpmaccess

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libnpmaccess - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.2.1"></a>
## [1.2.1](https://github.com/npm/libnpmaccess/compare/v1.2.0...v1.2.1) (2018-08-20)
### Bug Fixes
* **docs:** document the stream interfaces ([c435aa2](https://github.com/npm/libnpmaccess/commit/c435aa2))
<a name="1.2.0"></a>

@@ -7,0 +17,0 @@ # [1.2.0](https://github.com/npm/libnpmaccess/compare/v1.1.0...v1.2.0) (2018-08-20)

2

package.json
{
"name": "libnpmaccess",
"version": "1.2.0",
"version": "1.2.1",
"description": "programmatic library for `npm access` commands",

@@ -5,0 +5,0 @@ "author": {

@@ -32,3 +32,5 @@ # libnpmaccess [![npm version](https://img.shields.io/npm/v/libnpmaccess.svg)](https://npm.im/libnpmaccess) [![license](https://img.shields.io/npm/l/libnpmaccess.svg)](https://npm.im/libnpmaccess) [![Travis](https://img.shields.io/travis/npm/libnpmaccess/latest.svg)](https://travis-ci.org/npm/libnpmaccess) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/libnpmaccess/latest.svg)](https://ci.appveyor.com/project/zkat/libnpmaccess) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmaccess/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmaccess?branch=latest)

* [`lsPackages()`](#ls-packages)
* [`lsPackages.stream()`](#ls-packages-stream)
* [`lsCollaborators()`](#ls-collaborators)
* [`lsCollaborators.stream()`](#ls-collaborators-stream)

@@ -175,2 +177,4 @@ ### Install

For a streamed version of these results, see [`access.lsPackages.stream()`](#ls-package-stream).
##### Example

@@ -186,2 +190,25 @@

#### <a name="ls-packages-stream"></a> `> access.lsPackages.stream(scope, [team], [opts]) -> Stream`
`scope` must be a valid org or user name, with or without the `@` prefix. `team`
is optional and, if provided, must be a valid team within that scope. `team`
must be `null` in order to pass in `opts`.
Streams out packages a user, org, or team has access to, with corresponding
permissions, with each stream entry being formatted like `[packageName,
permissions]`. Packages that the access token does not have access to won't be
listed.
The returned stream is a valid `asyncIterator`.
##### Example
```javascript
for await (let [pkg, perm], value] of access.lsPackages.stream('zkat')) {
console.log('zkat has', perm, 'access to', pkg)
}
// zkat has read-write access to eggplant
// zkat has read-only access to @npmcorp/secret
```
#### <a name="ls-collaborators"></a> `> access.lsCollaborators(spec, [user], [opts]) -> Promise`

@@ -198,2 +225,4 @@

For a streamed version of these results, see [`access.lsCollaborators.stream()`](#ls-collaborators-stream).
##### Example

@@ -207,1 +236,25 @@

```
#### <a name="ls-collaborators-stream"></a> `> access.lsCollaborators.stream(spec, [user], [opts]) -> Stream`
`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible
registry spec. `scope` must be a valid org or user name, with or without the `@`
prefix. `team` is optional and, if provided, must be a valid team within that
scope. `team` must be `null` in order to pass in `opts`.
Stream out access privileges for a certain package, with each entry in `[user,
permissions]` format. Will only show permissions for packages to which you have
at least read access. If `user` is passed in, the list is filtered only to teams
_that_ user happens to belong to.
The returned stream is a valid `asyncIterator`.
##### Example
```javascript
for await (let [usr, perm], value] of access.lsCollaborators.stream('npm')) {
console.log(usr, 'has', perm, 'access to npm')
}
// zkat has read-write access to npm
// iarna has read-write access to npm
```
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