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

@lerna/collect-updates

Package Overview
Dependencies
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/collect-updates - npm Package Compare versions

Comparing version 3.0.0-beta.15 to 3.0.0-beta.18

lib/has-tags.js

19

CHANGELOG.md

@@ -6,2 +6,21 @@ # Change Log

<a name="3.0.0-beta.18"></a>
# [3.0.0-beta.18](https://github.com/lerna/lerna/compare/v3.0.0-beta.17...v3.0.0-beta.18) (2018-04-24)
### Features
* **collect-updates:** Copy remaining git utilities into module ([cb9c19d](https://github.com/lerna/lerna/commit/cb9c19d))
* **git-utils:** Devolve getShortSHA() to consumers ([95d179d](https://github.com/lerna/lerna/commit/95d179d))
### BREAKING CHANGES
* **collect-updates:** GitUtilities is going away soon.
* **git-utils:** Don't use GitUtilities!
<a name="3.0.0-beta.15"></a>

@@ -8,0 +27,0 @@ # [3.0.0-beta.15](https://github.com/lerna/lerna/compare/v3.0.0-beta.14...v3.0.0-beta.15) (2018-04-09)

9

collect-updates.js
"use strict";
const childProcess = require("@lerna/child-process");
const semver = require("semver");
const GitUtilities = require("@lerna/git-utils");
const hasTags = require("./lib/has-tags");
const collectDependents = require("./lib/collect-dependents");

@@ -22,5 +23,5 @@ const getForcedPackages = require("./lib/get-forced-packages");

if (GitUtilities.hasTags(execOpts)) {
if (hasTags(execOpts)) {
if (options.canary) {
const sha = GitUtilities.getShortSHA(execOpts);
const sha = childProcess.execSync("git", ["rev-parse", "--short", "HEAD"], execOpts);

@@ -31,3 +32,3 @@ // if it's a merge commit, it will return all the commits that were part of the merge

} else if (!committish) {
committish = GitUtilities.getLastTag(execOpts);
committish = childProcess.execSync("git", ["describe", "--tags", "--abbrev=0"], execOpts);
}

@@ -34,0 +35,0 @@ }

"use strict";
const childProcess = require("@lerna/child-process");
const log = require("npmlog");
const minimatch = require("minimatch");
const GitUtilities = require("@lerna/git-utils");
const path = require("path");
const slash = require("slash");

@@ -12,3 +15,3 @@ module.exports = makeDiffPredicate;

return function hasDiffSinceThatIsntIgnored(node) {
const diff = GitUtilities.diffSinceIn(committish, node.location, execOpts);
const diff = diffSinceIn(committish, node.location, execOpts);

@@ -30,1 +33,18 @@ if (diff === "") {

}
function diffSinceIn(committish, location, opts) {
const args = ["diff", "--name-only", committish];
const formattedLocation = slash(path.relative(opts.cwd, location));
if (formattedLocation) {
// avoid same-directory path.relative() === ""
args.push("--", formattedLocation);
}
log.silly("diffSinceIn", committish, formattedLocation);
const diff = childProcess.execSync("git", args, opts);
log.silly("diff", diff);
return diff;
}
{
"name": "@lerna/collect-updates",
"version": "3.0.0-beta.15",
"version": "3.0.0-beta.18",
"description": "TODO",

@@ -34,7 +34,9 @@ "keywords": [

"dependencies": {
"@lerna/git-utils": "^3.0.0-beta.15",
"@lerna/child-process": "^3.0.0-beta.13",
"minimatch": "^3.0.4",
"semver": "^5.5.0"
"npmlog": "^4.1.2",
"semver": "^5.5.0",
"slash": "^1.0.0"
},
"gitHead": "f7a8e7bc271a5966035a5cbe3bf0eee556c8053a"
"gitHead": "7995561e8d010d9fa2e59109b57b9ad8573baba1"
}
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