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

lerna

Package Overview
Dependencies
Maintainers
3
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerna - npm Package Compare versions

Comparing version 2.0.0-beta.8 to 2.0.0-beta.9

2

lib/commands/PublishCommand.js

@@ -77,3 +77,3 @@ "use strict";

var updatedPackagesCollector = new _UpdatedPackagesCollector2.default(this.packages, this.packageGraph, this.flags);
var updatedPackagesCollector = new _UpdatedPackagesCollector2.default(this.packages, this.packageGraph, this.flags, this.repository.publishConfig);

@@ -80,0 +80,0 @@ try {

@@ -38,3 +38,3 @@ "use strict";

value: function initialize(callback) {
var updatedPackagesCollector = new _UpdatedPackagesCollector2.default(this.packages, this.packageGraph, this.flags);
var updatedPackagesCollector = new _UpdatedPackagesCollector2.default(this.packages, this.packageGraph, this.flags, this.repository.publishConfig);

@@ -41,0 +41,0 @@ this.updates = updatedPackagesCollector.getUpdates();

@@ -108,3 +108,3 @@ "use strict";

value: function diffSinceIn(since, location) {
return _ChildProcessUtilities2.default.execSync("git diff " + since + " -- " + location);
return _ChildProcessUtilities2.default.execSync("git diff --name-only " + since + " -- " + location);
}

@@ -111,0 +111,0 @@ }, {

@@ -63,2 +63,7 @@ "use strict";

}
}, {
key: "publishConfig",
get: function get() {
return this.lernaJson && this.lernaJson.publishConfig || {};
}
}]);

@@ -65,0 +70,0 @@

@@ -10,2 +10,6 @@ "use strict";

var _PackageUtilities = require("./PackageUtilities");
var _PackageUtilities2 = _interopRequireDefault(_PackageUtilities);
var _GitUtilities = require("./GitUtilities");

@@ -19,2 +23,6 @@

var _minimatch = require("minimatch");
var _minimatch2 = _interopRequireDefault(_minimatch);
var _logger = require("./logger");

@@ -28,2 +36,6 @@

var _path = require("path");
var _path2 = _interopRequireDefault(_path);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -40,3 +52,3 @@

var UpdatedPackagesCollector = function () {
function UpdatedPackagesCollector(packages, packageGraph, flags) {
function UpdatedPackagesCollector(packages, packageGraph, flags, publishConfig) {
_classCallCheck(this, UpdatedPackagesCollector);

@@ -47,2 +59,3 @@

this.flags = flags;
this.publishConfig = publishConfig;
}

@@ -102,3 +115,3 @@

} else {
return !!_GitUtilities2.default.diffSinceIn(commits, pkg.location);
return _this.hasDiffSinceThatIsntIgnored(pkg, commits);
}

@@ -163,2 +176,28 @@ }).forEach(function (pkg) {

}
}, {
key: "hasDiffSinceThatIsntIgnored",
value: function hasDiffSinceThatIsntIgnored(pkg, commits) {
var _this5 = this;
var folder = _PackageUtilities2.default.getPackagePath(_PackageUtilities2.default.getPackagesPath(""), pkg.name);
var diff = _GitUtilities2.default.diffSinceIn(commits, pkg.location);
if (diff === "") {
return false;
}
var changedFiles = diff.split("\n").map(function (file) {
return file.replace(folder + _path2.default.sep, "");
});
if (this.publishConfig.ignore) {
changedFiles = changedFiles.filter(function (file) {
return !(0, _lodash2.default)(_this5.publishConfig.ignore, function (pattern) {
return (0, _minimatch2.default)(file, pattern);
});
});
}
return !!changedFiles.length;
}
}]);

@@ -165,0 +204,0 @@

{
"name": "lerna",
"version": "2.0.0-beta.8",
"version": "2.0.0-beta.9",
"description": "Tool for managing JavaScript projects with multiple packages",

@@ -31,2 +31,3 @@ "main": "index.js",

"meow": "^3.7.0",
"minimatch": "^3.0.0",
"mkdirp": "^0.5.1",

@@ -33,0 +34,0 @@ "object-assign": "^4.0.1",

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