@lerna/collect-updates
Advanced tools
Comparing version 3.0.0-beta.15 to 3.0.0-beta.18
@@ -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) |
"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" | ||
} |
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
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
8465
8
157
5
+ Addednpmlog@^4.1.2
+ Addedslash@^1.0.0
- Removed@lerna/git-utils@^3.0.0-beta.15
- Removed@lerna/git-utils@3.0.0-beta.15(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedmake-dir@1.3.0(transitive)
- Removedpify@3.0.0(transitive)
- Removedtemp-dir@1.0.0(transitive)
- Removedtemp-write@3.4.0(transitive)
- Removeduuid@3.4.0(transitive)