package-store
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "package-store", | ||
"description": "A global package store", | ||
"version": "0.0.0", | ||
"description": "A storage for npm packages. Used by pnpm", | ||
"version": "0.0.1", | ||
"author": { | ||
@@ -19,2 +19,24 @@ "name": "Zoltan Kochan", | ||
"dependencies": { | ||
"@types/load-json-file": "^2.0.5", | ||
"@types/node": "^7.0.33", | ||
"@types/ramda": "^0.24.1", | ||
"@types/semver": "^5.3.32", | ||
"dint": "^1.0.0", | ||
"load-json-file": "^2.0.0", | ||
"mkdirp-promise": "^5.0.1", | ||
"mz": "^2.6.0", | ||
"normalize-path": "^2.1.1", | ||
"p-limit": "^1.1.0", | ||
"parse-npm-tarball-url": "^1.0.1", | ||
"path-exists": "^3.0.0", | ||
"pnpm-logger": "^0.4.0", | ||
"ramda": "^0.24.1", | ||
"read-package-json": "^2.0.10", | ||
"rename-overwrite": "^1.0.0", | ||
"rimraf-then": "^1.0.1", | ||
"semver": "^5.3.0", | ||
"symlink-dir": "^1.0.3", | ||
"thenify": "^3.3.0", | ||
"unpack-stream": "^2.0.0", | ||
"write-json-file": "^2.2.0" | ||
}, | ||
@@ -68,2 +90,3 @@ "devDependencies": { | ||
"scripts": { | ||
"prepare": "cd test && pnpm install", | ||
"info": "npm-scripts-info", | ||
@@ -76,3 +99,4 @@ "start": "npm run tsc -- --watch", | ||
"test": "npm run tsc && npm run lint && cd test && npm test", | ||
"tsc": "rimraf lib && tsc" | ||
"tsc": "rimraf lib && tsc", | ||
"prepublishOnly": "npm run tsc" | ||
}, | ||
@@ -79,0 +103,0 @@ "config": { |
118
README.md
@@ -1,7 +0,7 @@ | ||
# supi | ||
# package-store | ||
[![Status](https://travis-ci.org/pnpm/supi.svg?branch=master)](https://travis-ci.org/pnpm/supi "See test builds") | ||
[![Windows build status](https://ci.appveyor.com/api/projects/status/18j52s5bdd71pjy5/branch/master?svg=true)](https://ci.appveyor.com/project/zkochan/supi/branch/master) | ||
[![Status](https://travis-ci.org/pnpm/package-store.svg?branch=master)](https://travis-ci.org/pnpm/package-store "See test builds") | ||
[![Windows build status](https://ci.appveyor.com/api/projects/status/g1r9qe7rgclsm9h6/branch/master?svg=true)](https://ci.appveyor.com/project/zkochan/supi/branch/master) | ||
> Fast, disk space efficient installation engine. Used by [pnpm](https://github.com/pnpm/pnpm) | ||
> A storage for npm packages. Used by [pnpm](https://github.com/pnpm/pnpm) | ||
@@ -13,115 +13,7 @@ ## Install | ||
``` | ||
npm install supi | ||
npm install package-store | ||
``` | ||
## API | ||
### `pnpm.installPkgs(pkgsToInstall, [options])` | ||
Install packages. | ||
**Arguments:** | ||
* `pkgsToInstall` - *Object | String[]* - either an object that maps package names to version ranges or inputs usually passed to `npm install` (e.g., `foo@1.0.0`, `foo`). | ||
* `options.saveProd` - *Boolean* - package will appear in `dependencies`. | ||
* `options.saveDev` - *Boolean* - package will appear in `devDependencies`. | ||
* `options.saveOptional` - *Boolean* - package will appear in `optionalDependencies`. | ||
* `options.saveExact` - *Boolean* - saved dependencies will be configured with an exact version rather than using npm's default semver range operator. | ||
* `options.global` - *Boolean* - the packages will be installed globally rather than locally. | ||
* `options.prefix` - *String* - the directory in which the installation will be performed. By default the `process.cwd()` value is used. | ||
* `options.quiet` - *Boolean* - `false` by default. No output to the console. | ||
* `options.metaCache` - *Map* - a cache for package meta info. | ||
* `options.networkConcurrency` - *Number* - `16` by default. Max amount of network requests to perform concurrently. | ||
* `options.offline` - *Boolean* - `false` by default. Install packages using only the local registry mirror, w/o doing any network requests. | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
* `options.packageManager` - *Object* - The `package.json` of the package manager. | ||
**Returns:** a Promise | ||
**Example:** | ||
```js | ||
const pnpm = require('pnpm') | ||
pnpm.install({ | ||
'is-positive': '1.0.0', | ||
'hello-world': '^2.3.1' | ||
}, { save: true, quiet: true }) | ||
``` | ||
### `pnpm.install([options])` | ||
Install all modules listed as dependencies in `package.json`. | ||
**Arguments:** (same as in named install and additionally) | ||
* `options.production` - *Boolean* - `false` by default or `true` when the `NODE_ENV` environment variable is set to `production`. Modules listed in `devDependencies` will not be installed. | ||
### `pnpm.uninstall(pkgsToUninstall, [options])` | ||
Uninstalls a package, completely removing everything pnpm installed on its behalf. | ||
**Arguments:** | ||
* `pkgsToUninstall` - *String[]* - the package names to be uninstalled. | ||
* `options.saveProd` - *Boolean* - the package will be removed from `dependencies`. | ||
* `options.saveDev` - *Boolean* - the package will be removed from `devDependencies`. | ||
* `options.saveOptional` - *Boolean* - the package will be removed from `optionalDependencies`. | ||
* `options.global` - *Boolean* - the packages will be uninstalled globally. | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
### `pnpm.link(linkFrom, lintTo, [options])` | ||
Create a symbolic link from the linked package to the target package's `node_modules` (and its `node_modules/.bin`). | ||
**Arguments:** | ||
* `linkFrom` - *String* - path to the package that should be linked. | ||
* `lintTo` - *String* - path to the dependent package. | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
### `pnpm.linkToGlobal(linkFrom, options)` | ||
Create a symbolic link from the specified package to the global `node_modules`. | ||
**Arguments:** | ||
* `linkFrom` - *String* - path to the package that should be linked. | ||
* `globalPrefix` - *String* - path to the global directory. | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
### `pnpm.linkFromGlobal(pkgName, linkTo, options)` | ||
Create a symbolic link from the global `pkgName` to the `linkTo/node_modules` folder. | ||
**Arguments:** | ||
* `pkgName` - *String* - package to link. | ||
* `linkTo` - *String* - package to link to. | ||
* `globalPrefix` - *String* - path to the global directory. | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
### `pnpm.prune([options])` | ||
Remove extraneous packages. Extraneous packages are packages that are not listed on the parent package's dependencies list. | ||
**Arguments:** | ||
* `options.production` - *Boolean* - by default `false`. If this property is `true`, prune will remove the packages specified in `devDependencies`. | ||
* `options.prefix` - *String* - by default `process.cwd()`. | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
### `pnpm.storeStatus([options])` | ||
Return the list of modified dependencies. | ||
**Arguments:** | ||
* `options.reporter` - *Function* - A function that listens for logs. | ||
**Returns:** `Promise<string[]>` - the paths to the modified packages of the current project. The paths contain the location of packages in the store, | ||
not in the projects `node_modules` folder. | ||
## License | ||
[MIT](LICENSE) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
87008
69
1364
22
19
1
3
+ Added@types/load-json-file@^2.0.5
+ Added@types/node@^7.0.33
+ Added@types/ramda@^0.24.1
+ Added@types/semver@^5.3.32
+ Addeddint@^1.0.0
+ Addedload-json-file@^2.0.0
+ Addedmkdirp-promise@^5.0.1
+ Addedmz@^2.6.0
+ Addednormalize-path@^2.1.1
+ Addedp-limit@^1.1.0
+ Addedparse-npm-tarball-url@^1.0.1
+ Addedpath-exists@^3.0.0
+ Addedpnpm-logger@^0.4.0
+ Addedramda@^0.24.1
+ Addedread-package-json@^2.0.10
+ Addedrename-overwrite@^1.0.0
+ Addedrimraf-then@^1.0.1
+ Addedsemver@^5.3.0
+ Addedsymlink-dir@^1.0.3
+ Addedthenify@^3.3.0
+ Addedunpack-stream@^2.0.0
+ Addedwrite-json-file@^2.2.0
+ Added@types/load-json-file@2.0.7(transitive)
+ Added@types/mz@0.0.32(transitive)
+ Added@types/node@10.17.607.10.148.10.669.6.61(transitive)
+ Added@types/ramda@0.24.18(transitive)
+ Added@types/semver@5.5.0(transitive)
+ Addedany-promise@1.3.0(transitive)
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarray.prototype.reduce@1.0.7(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@1.2.3(transitive)
+ Addedbluebird@3.7.2(transitive)
+ Addedbole@3.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbrowserify-zlib@0.1.4(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedbzip2-maybe@1.0.0(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addeddecompress-maybe@1.1.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddetect-indent@5.0.0(transitive)
+ Addeddint@1.0.0(transitive)
+ Addedduplex-maker@1.0.0(transitive)
+ Addedduplexify@3.7.14.1.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedes-abstract@1.23.3(transitive)
+ Addedes-array-method-boxes-properly@1.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.2.1(transitive)
+ Addedfast-safe-stringify@1.1.13(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedgunzip-maybe@1.4.2(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhosted-git-info@2.8.9(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedindividual@3.0.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-bzip2@1.0.0(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-deflate@1.0.0(transitive)
+ Addedis-gzip@1.0.0(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedis-zst@1.0.0(transitive)
+ Addedisarray@1.0.02.0.5(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedload-json-file@2.0.0(transitive)
+ Addedmake-dir@1.3.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.63.0.1(transitive)
+ Addedmkdirp-promise@5.0.1(transitive)
+ Addedmz@2.7.0(transitive)
+ Addednormalize-package-data@2.5.0(transitive)
+ Addednormalize-path@2.1.1(transitive)
+ Addednpm-normalize-package-bin@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedobject.getownpropertydescriptors@2.1.8(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedp-every@1.0.2(transitive)
+ Addedp-limit@1.3.0(transitive)
+ Addedp-map@1.2.0(transitive)
+ Addedp-try@1.0.0(transitive)
+ Addedpako@0.2.9(transitive)
+ Addedparse-json@2.2.0(transitive)
+ Addedparse-npm-tarball-url@1.0.3(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpeek-stream@1.1.3(transitive)
+ Addedpify@2.3.03.0.0(transitive)
+ Addedpnpm-logger@0.4.0(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedprocess-streams@1.0.3(transitive)
+ Addedpump@1.0.32.0.13.0.2(transitive)
+ Addedpumpify@1.5.12.0.1(transitive)
+ Addedramda@0.24.1(transitive)
+ Addedread-package-json@2.1.2(transitive)
+ Addedreadable-stream@2.3.83.6.2(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrename-overwrite@1.0.3(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedrimraf-then@1.0.1(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsemver-regex@1.0.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsimple-zstd@1.4.2(transitive)
+ Addedsort-keys@2.0.0(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.20(transitive)
+ Addedssri@4.1.65.3.0(transitive)
+ Addedstream-shift@1.0.3(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedstring_decoder@1.1.11.3.0(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedsymlink-dir@1.1.3(transitive)
+ Addedtar-fs@1.16.3(transitive)
+ Addedtar-stream@1.6.2(transitive)
+ Addedthenify@3.3.1(transitive)
+ Addedthenify-all@1.6.0(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedthrough2@2.0.54.0.2(transitive)
+ Addedto-buffer@1.1.1(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.2(transitive)
+ Addedtyped-array-length@1.0.6(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addedunbzip2-stream@1.4.3(transitive)
+ Addedunpack-stream@2.2.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedutil.promisify@1.1.2(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedwrite-file-atomic@2.4.3(transitive)
+ Addedwrite-json-file@2.3.0(transitive)
+ Addedxtend@4.0.2(transitive)