@changesets/git
Advanced tools
Comparing version 0.1.2 to 0.2.0
# @changesets/git | ||
## 0.2.0 | ||
### Minor Changes | ||
- [296a6731](https://github.com/atlassian/changesets/commit/296a6731) - Safety bump: Towards the end of preparing changesets v2, there was a lot of chaos - this bump is to ensure every package on npm matches what is found in the repository. | ||
### Patch Changes | ||
- Updated dependencies [296a6731]: | ||
- get-workspaces@0.5.0 | ||
- @changesets/types@0.2.0 | ||
## 0.1.2 | ||
@@ -4,0 +16,0 @@ |
@@ -13,4 +13,4 @@ 'use strict'; | ||
// TODO: Currently getting this working, need to decide how to | ||
// share projectDir between packages if that's what we need | ||
async function getProjectDirectory(cwd) { | ||
@@ -37,2 +37,7 @@ const projectDir = await pkgDir(cwd); | ||
}); | ||
if (gitCmd.code !== 0) { | ||
console.log(pathToFile, gitCmd.stderr.toString()); | ||
} | ||
return gitCmd.code === 0; | ||
@@ -39,0 +44,0 @@ } |
@@ -26,5 +26,6 @@ "use strict"; | ||
async function add(pathToFile, cwd) { | ||
return 0 === (await spawn("git", [ "add", pathToFile ], { | ||
const gitCmd = await spawn("git", [ "add", pathToFile ], { | ||
cwd: cwd | ||
})).code; | ||
}); | ||
return 0 !== gitCmd.code && console.log(pathToFile, gitCmd.stderr.toString()), 0 === gitCmd.code; | ||
} | ||
@@ -31,0 +32,0 @@ |
@@ -7,4 +7,4 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread'; | ||
// TODO: Currently getting this working, need to decide how to | ||
// share projectDir between packages if that's what we need | ||
async function getProjectDirectory(cwd) { | ||
@@ -31,2 +31,7 @@ const projectDir = await pkgDir(cwd); | ||
}); | ||
if (gitCmd.code !== 0) { | ||
console.log(pathToFile, gitCmd.stderr.toString()); | ||
} | ||
return gitCmd.code === 0; | ||
@@ -33,0 +38,0 @@ } |
{ | ||
"name": "@changesets/git", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Some git helpers that changesets use to get information", | ||
@@ -11,4 +11,5 @@ "main": "dist/git.cjs.js", | ||
"@babel/runtime": "^7.4.4", | ||
"@changesets/types": "^0.2.0", | ||
"spawndamnit": "^2.0.0", | ||
"get-workspaces": "^0.4.2", | ||
"get-workspaces": "^0.5.0", | ||
"pkg-dir": "^4.1.0" | ||
@@ -19,2 +20,2 @@ }, | ||
} | ||
} | ||
} |
@@ -5,2 +5,3 @@ import spawn from "spawndamnit"; | ||
import pkgDir from "pkg-dir"; | ||
import { Workspace } from "@changesets/types"; | ||
@@ -27,2 +28,6 @@ // TODO: Currently getting this working, need to decide how to | ||
const gitCmd = await spawn("git", ["add", pathToFile], { cwd }); | ||
if (gitCmd.code !== 0) { | ||
console.log(pathToFile, gitCmd.stderr.toString()); | ||
} | ||
return gitCmd.code === 0; | ||
@@ -117,4 +122,4 @@ } | ||
const fileNameToPackage = (fileName: string) => | ||
allPackages.find(pkg => fileName.startsWith(pkg.dir + path.sep)); | ||
const fileNameToPackage = (fileName: string): Workspace => | ||
allPackages.find(pkg => fileName.startsWith(pkg.dir + path.sep))!; | ||
@@ -121,0 +126,0 @@ const fileExistsInPackage = (fileName: string) => |
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
28435
657
5
+ Added@changesets/types@^0.2.0
+ Added@changesets/types@0.2.00.4.0(transitive)
+ Addedget-workspaces@0.5.2(transitive)
- Removedget-workspaces@0.4.2(transitive)
Updatedget-workspaces@^0.5.0