@changesets/git
Advanced tools
Comparing version 1.0.5 to 1.0.6
# @changesets/git | ||
## 1.0.6 | ||
### Patch Changes | ||
- [`1dd3117`](https://github.com/atlassian/changesets/commit/1dd311708c65321e1a1c99d36129190f940435ed) [#418](https://github.com/atlassian/changesets/pull/418) Thanks [@jonathanmorley](https://github.com/jonathanmorley)! - Don't return paths for unchanged packages | ||
- Updated dependencies [[`a57d163`](https://github.com/atlassian/changesets/commit/a57d16355ad7d67b18b768c8f79224d80afa507c)]: | ||
- @changesets/types@3.1.1 | ||
## 1.0.5 | ||
@@ -4,0 +13,0 @@ |
@@ -79,3 +79,3 @@ 'use strict'; | ||
const files = cmd.stdout.toString().trim().split("\n"); | ||
const files = cmd.stdout.toString().trim().split("\n").filter(a => a); | ||
if (!fullPath) return files; | ||
@@ -82,0 +82,0 @@ return files.map(file => path.resolve(cwd, file)); |
@@ -53,3 +53,3 @@ "use strict"; | ||
if (0 !== cmd.code) throw new Error(`Failed to diff against ${divergedAt}. Is ${divergedAt} a valid ref?`); | ||
const files = cmd.stdout.toString().trim().split("\n"); | ||
const files = cmd.stdout.toString().trim().split("\n").filter(a => a); | ||
return fullPath ? files.map(file => path.resolve(cwd, file)) : files; | ||
@@ -56,0 +56,0 @@ } |
@@ -73,3 +73,3 @@ import spawn from 'spawndamnit'; | ||
const files = cmd.stdout.toString().trim().split("\n"); | ||
const files = cmd.stdout.toString().trim().split("\n").filter(a => a); | ||
if (!fullPath) return files; | ||
@@ -76,0 +76,0 @@ return files.map(file => path.resolve(cwd, file)); |
{ | ||
"name": "@changesets/git", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Some git helpers that changesets use to get information", | ||
@@ -10,5 +10,5 @@ "main": "dist/git.cjs.js", | ||
"dependencies": { | ||
"@babel/runtime": "^7.4.4", | ||
"@babel/runtime": "^7.10.4", | ||
"@changesets/errors": "^0.1.4", | ||
"@changesets/types": "^3.0.0", | ||
"@changesets/types": "^3.1.1", | ||
"@manypkg/get-packages": "^1.0.1", | ||
@@ -15,0 +15,0 @@ "is-subdir": "^1.1.1", |
@@ -211,11 +211,22 @@ import fixtures from "fixturez"; | ||
it("should be empty if no changes", async () => { | ||
it("should be empty if no changes (partial path)", async () => { | ||
const head = await spawn("git", ["rev-parse", "HEAD"], { cwd }); | ||
const changedFiles = await getChangedFilesSince({ | ||
ref: head.stdout.toString().trim(), | ||
cwd | ||
cwd, | ||
fullPath: false | ||
}); | ||
expect(changedFiles.filter(a => a)).toHaveLength(0); | ||
expect(changedFiles).toHaveLength(0); | ||
}); | ||
it("should be empty if no changes (full path)", async () => { | ||
const head = await spawn("git", ["rev-parse", "HEAD"], { cwd }); | ||
const changedFiles = await getChangedFilesSince({ | ||
ref: head.stdout.toString().trim(), | ||
cwd, | ||
fullPath: true | ||
}); | ||
expect(changedFiles).toHaveLength(0); | ||
}); | ||
it("should get list of files that have been committed", async () => { | ||
@@ -222,0 +233,0 @@ const firstRef = await spawn("git", ["rev-parse", "HEAD"], { cwd }); |
@@ -76,3 +76,4 @@ import spawn from "spawndamnit"; | ||
.trim() | ||
.split("\n"); | ||
.split("\n") | ||
.filter(a => a); | ||
if (!fullPath) return files; | ||
@@ -79,0 +80,0 @@ return files.map(file => path.resolve(cwd, file)); |
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
36268
727
Updated@babel/runtime@^7.10.4
Updated@changesets/types@^3.1.1