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

pnpm

Package Overview
Dependencies
Maintainers
1
Versions
1075
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pnpm - npm Package Compare versions

Comparing version 0.23.0 to 0.24.0

12

HISTORY.md

@@ -0,1 +1,13 @@

## [v0.24.0]
> Jul 17, 2016
- [#180] - Add `--debug` to `--help`. ([@PeterDaveHello])
- [#39] - Support `optionalDependencies`. ([#256], [@zkochan])
[#39]: https://github.com/rstacruz/pnpm/issues/39
[#180]: https://github.com/rstacruz/pnpm/issues/180
[#256]: https://github.com/rstacruz/pnpm/issues/256
[@PeterDaveHello]: https://github.com/PeterDaveHello
[v0.24.0]: https://github.com/rstacruz/pnpm/compare/v0.23.0...v0.24.0
## [v0.23.0]

@@ -2,0 +14,0 @@ > Jul 12, 2016

6

lib/cmd/install.js

@@ -52,3 +52,3 @@ var readPkgUp = require('read-pkg-up');

return installMultiple(ctx, packagesToInstall, join(ctx.root, 'node_modules'), flags).then(savePkgs);
return installMultiple(ctx, packagesToInstall, pkg.pkg && pkg.pkg.optionalDependencies, join(ctx.root, 'node_modules'), flags).then(savePkgs);
}

@@ -79,3 +79,3 @@

function mainPostInstall() {
var scripts = pkg.pkg.scripts || {};
var scripts = pkg.pkg && pkg.pkg.scripts || {};
if (scripts.postinstall) runScript('postinstall');

@@ -105,2 +105,2 @@ if (!isProductionInstall && scripts.prepublish) runScript('prepublish');

module.exports = installCmd;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYn4vY21kL2luc3RhbGwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxZQUFZLFFBQVEsYUFBUixDQUFoQjtBQUNBLElBQUksVUFBVSxRQUFRLE1BQVIsRUFBZ0IsT0FBOUI7QUFDQSxJQUFJLE9BQU8sUUFBUSxNQU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7,54 @@ var install = require('./install');

* ctx = { }
* installMultiple(ctx, ['minimatch@2'], './node_modules')
* installMultiple(ctx, { minimatch: '^2.0.0' }, './node_modules')
* installMultiple(ctx, ['minimatch@2'], 'chokidar@1.6.0', './node_modules')
* installMultiple(ctx, { minimatch: '^2.0.0' }, {chokidar: '^1.6.0'}, './node_modules')
*/
module.exports = function installMultiple(ctx, pkgs, modules, options) {
pkgs = arrayify(pkgs);
return Promise.all(pkgs.map(function (pkg) {
return install(ctx, pkg, modules, options);
module.exports = function installMultiple(ctx, requiredPkgsMap, optionalPkgsMap, modules, options) {
requiredPkgsMap = mapify(requiredPkgsMap);
optionalPkgsMap = mapify(optionalPkgsMap);
var optionalPkgs = Object.keys(optionalPkgsMap).map(function (pkgName) {
return pkgMeta(pkgName, optionalPkgsMap[pkgName], true);
});
var requiredPkgs = Object.keys(requiredPkgsMap).filter(function (pkgName) {
return !optionalPkgsMap[pkgName];
}).map(function (pkgName) {
return pkgMeta(pkgName, requiredPkgsMap[pkgName], false);
});
return Promise.all(optionalPkgs.concat(requiredPkgs).map(function (pkg) {
return install(ctx, pkg.fullName, modules, options).catch(function (err) {
if (pkg.optional) {
console.log('Skipping failed optional dependency ' + pkg.fullName + ':');
console.log(err.message || err);
return;
}
throw err;
});
}));
};
function arrayify(pkgs) {
if (!pkgs) return [];
if (typeof pkgs !== 'object') return [pkgs];
if (Array.isArray(pkgs)) return pkgs;
function mapify(pkgs) {
if (!pkgs) return {};
if (Array.isArray(pkgs)) {
return pkgs.reduce(function (pkgsMap, pkgFullName) {
var matches = /(@?[^@]+)@(.*)/.exec(pkgFullName);
if (!matches) {
pkgsMap[pkgFullName] = null;
} else {
pkgsMap[matches[1]] = matches[2];
}
return pkgsMap;
}, {});
}
return pkgs;
}
return Object.keys(pkgs).map(function (name) {
return '' + name + '@' + pkgs[name];
});
function pkgMeta(name, version, optional) {
return {
fullName: version ? '' + name + '@' + version : name,
optional: optional
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2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pcHBpbmcgZmFpbGVkIG9wdGlvbmFsIGRlcGVuZGVuY3kgJyArIHBrZy5mdWxsTmFtZSArICc6JylcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIubWVzc2FnZSB8fCBlcnIpXG4gICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZXJyXG4gICAgICB9KVxuICB9KSlcbn1cblxuZnVuY3Rpb24gbWFwaWZ5IChwa2dzKSB7XG4gIGlmICghcGtncykgcmV0dXJuIHt9XG4gIGlmIChBcnJheS5pc0FycmF5KHBrZ3MpKSB7XG4gICAgcmV0dXJuIHBrZ3MucmVkdWNlKChwa2dzTWFwLCBwa2dGdWxsTmFtZSkgPT4ge1xuICAgICAgdmFyIG1hdGNoZXMgPSAvKEA/W15AXSspQCguKikvLmV4ZWMocGtnRnVsbE5hbWUpXG4gICAgICBpZiAoIW1hdGNoZXMpIHtcbiAgICAgICAgcGtnc01hcFtwa2dGdWxsTmFtZV0gPSBudWxsXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwa2dzTWFwW21hdGNoZXNbMV1dID0gbWF0Y2hlc1syXVxuICAgICAgfVxuICAgICAgcmV0dXJuIHBrZ3NNYXBcbiAgICB9LCB7fSlcbiAgfVxuICByZXR1cm4gcGtnc1xufVxuXG5mdW5jdGlvbiBwa2dNZXRhIChuYW1lLCB2ZXJzaW9uLCBvcHRpb25hbCkge1xuICByZXR1cm4ge1xuICAgIGZ1bGxOYW1lOiB2ZXJzaW9uID8gJycgKyBuYW1lICsgJ0AnICsgdmVyc2lvbiA6IG5hbWUsXG4gICAgb3B0aW9uYWw6IG9wdGlvbmFsXG4gIH1cbn1cbiJdfQ==

@@ -232,3 +232,3 @@ var Promise = require('./promise');

}).then(function (_) {
return installAll(ctx, fulldata.dependencies, join(paths.tmp, '_', 'node_modules'), { keypath: pkg.keypath.concat([pkg.fullname]) });
return installAll(ctx, fulldata.dependencies, fulldata.optionalDependencies, join(paths.tmp, '_', 'node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UgcHJvbWlzZXMgZm9yIGxhdGVyXG4gKi9cblxuZnVuY3Rpb24gbWVtb2l6ZSAobG9ja3MsIGtleSwgZm4pIHtcbiAgaWYgKGxvY2tzICYmIGxvY2tzW2tleV0pIHJldHVybiBsb2Nrc1trZXldXG4gIGxvY2tzW2tleV0gPSBmbigpXG4gIHJldHVybiBsb2Nrc1trZXldXG59XG4iXX0=
{
"name": "pnpm",
"description": "A fast implementation of npm install",
"version": "0.23.0",
"version": "0.24.0",
"author": "Rico Sta. Cruz <rico@ricostacruz.com>",

@@ -6,0 +6,0 @@ "bin": {

Sorry, the diff of this file is not supported yet

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