Comparing version 0.25.0 to 0.26.0
@@ -12,6 +12,9 @@ #!/usr/bin/env node | ||
const installCmd = require('../lib/cmd/install') | ||
const uninstallCmd = require('../lib/cmd/uninstall') | ||
const pnpmCmds = { | ||
install: require('../lib/cmd/install'), | ||
uninstall: require('../lib/cmd/uninstall'), | ||
link: require('../lib/cmd/link') | ||
} | ||
const supportedCmds = new Set(['install', 'uninstall', 'help']) | ||
const supportedCmds = new Set(['install', 'uninstall', 'help', 'link']) | ||
@@ -81,4 +84,3 @@ function run (argv) { | ||
const cliArgs = cli.input.slice(1) | ||
const cmdfn = cmd === 'install' ? installCmd : uninstallCmd | ||
return cmdfn(cliArgs, opts) | ||
return pnpmCmds[cmd](cliArgs, opts) | ||
} | ||
@@ -99,2 +101,5 @@ | ||
return 'help' | ||
case 'link': | ||
case 'ln': | ||
return 'link' | ||
default: | ||
@@ -101,0 +106,0 @@ return cmd |
@@ -0,1 +1,10 @@ | ||
## [v0.26.0] | ||
> Aug 19, 2016 | ||
- [#235] - `pnpm link` ([#302], [@zkochan]) | ||
[#235]: https://github.com/rstacruz/pnpm/issues/235 | ||
[#302]: https://github.com/rstacruz/pnpm/pull/302 | ||
[v0.26.0]: https://github.com/rstacruz/pnpm/compare/v0.25.0...v0.26.0 | ||
## [v0.25.0] | ||
@@ -2,0 +11,0 @@ > Aug 18, 2016 |
10
index.js
'use strict' | ||
const install = require('./lib/api/install') | ||
const installPkgDeps = require('./lib/api/install_pkg_deps') | ||
const uninstall = require('./lib/api/uninstall') | ||
const link = require('./lib/api/link') | ||
module.exports = { | ||
module.exports = Object.assign({ | ||
install, | ||
installPkgDeps (opts) { | ||
return install({}, opts) | ||
}, | ||
installPkgDeps, | ||
uninstall | ||
} | ||
}, link) |
@@ -11,2 +11,3 @@ 'use strict' | ||
var expandTilde = require('../fs/expand_tilde') | ||
const resolveGlobalPkgPath = require('../resolve_global_pkg_path') | ||
@@ -53,3 +54,3 @@ var logger = require('../logger') | ||
if (!globalPath) throw new Error('globalPath is required') | ||
const globalPnpm = expandTilde(globalPath) | ||
const globalPnpm = resolveGlobalPkgPath(globalPath) | ||
const globalPkgPath = resolve(globalPnpm, 'package.json') | ||
@@ -56,0 +57,0 @@ return readGlobalPkgJson(globalPkgPath) |
module.exports = { | ||
concurrency: 16, | ||
storePath: 'node_modules/.store', | ||
globalPath: '~/.pnpm', | ||
logger: 'pretty' | ||
} |
@@ -16,6 +16,9 @@ var join = require('path').join | ||
module.exports = function linkAllBins (modules) { | ||
module.exports = linkAllBins | ||
module.exports.linkPkgBins = linkPkgBins | ||
function linkAllBins (modules) { | ||
getDirectories(modules) | ||
.reduce((pkgDirs, dir) => pkgDirs.concat(isScopedPkgsDir(dir) ? getDirectories(dir) : dir), []) | ||
.forEach(pkgDir => linkBins(modules, pkgDir)) | ||
.forEach(pkgDir => linkPkgBins(modules, pkgDir)) | ||
} | ||
@@ -42,3 +45,3 @@ | ||
* target = 'project/node_modules/.store/rimraf@2.5.1' | ||
* linkBins(module, target) | ||
* linkPkgBins(module, target) | ||
* | ||
@@ -48,3 +51,3 @@ * // node_modules/.bin/rimraf -> ../.store/rimraf@2.5.1/cmd.js | ||
function linkBins (modules, target) { | ||
function linkPkgBins (modules, target) { | ||
var pkg = tryRequire(join(target, 'package.json')) | ||
@@ -56,3 +59,3 @@ | ||
return Object.keys(bins).map(bin => { | ||
return Promise.all(Object.keys(bins).map(bin => { | ||
var actualBin = bins[bin] | ||
@@ -87,3 +90,3 @@ var binDir = join(modules, '.bin') | ||
}) | ||
}) | ||
})) | ||
} | ||
@@ -90,0 +93,0 @@ |
@@ -12,2 +12,3 @@ var mkdirp = require('../fs/mkdirp') | ||
module.exports = function linkPeers (pkg, store, installs) { | ||
if (!installs) return | ||
var peers = {} | ||
@@ -14,0 +15,0 @@ var roots = {} |
{ | ||
"name": "pnpm", | ||
"description": "A fast implementation of npm install", | ||
"version": "0.25.0", | ||
"version": "0.26.0", | ||
"author": "Rico Sta. Cruz <rico@ricostacruz.com>", | ||
@@ -57,2 +57,3 @@ "bin": { | ||
"istanbul": "^0.4.4", | ||
"ncp": "^2.0.0", | ||
"nixt": "0.5.0", | ||
@@ -59,0 +60,0 @@ "npm": "3.10.5", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
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
52
1799
76221
14