@coveo/semantic-monorepo-tools
Advanced tools
Comparing version 2.5.9 to 2.6.0
@@ -0,1 +1,10 @@ | ||
# 2.6.0 (2024-12-03) | ||
### Features | ||
* **git:** allow additional args on gitDiff and getSHA1FromRef ([#277](https://github.com/coveo/semantic-monorepo-tools/issues/277)) ([504db98](https://github.com/coveo/semantic-monorepo-tools/commits/504db98e546bc4776c36197abebead7aa9ec4184)) | ||
## 2.5.9 (2024-12-02) | ||
@@ -2,0 +11,0 @@ |
@@ -1,1 +0,1 @@ | ||
export default function gitDiff(): Promise<string[]>; | ||
export default function gitDiff(args?: string[]): Promise<string[]>; |
import spawn from "../utils/spawn.js"; | ||
import gitLogger from "./utils/gitLogger.js"; | ||
export default async function gitDiff() { | ||
return (await spawn("git", ["--no-pager", "diff", "--name-only"], gitLogger)).stdout | ||
export default async function gitDiff(args = []) { | ||
return (await spawn("git", ["--no-pager", "diff", "--name-only", ...args], gitLogger)).stdout | ||
.trim() | ||
.split("\n"); | ||
} |
@@ -1,1 +0,1 @@ | ||
export default function (ref: string): Promise<string>; | ||
export default function (ref: string, args?: string[]): Promise<string>; |
import spawn from "../utils/spawn.js"; | ||
import gitLogger from "./utils/gitLogger.js"; | ||
export default async function (ref) { | ||
return (await spawn("git", ["rev-parse", ref], gitLogger)).stdout.trim(); | ||
export default async function (ref, args = []) { | ||
return (await spawn("git", ["rev-parse", ...args, ref], gitLogger)).stdout.trim(); | ||
} |
{ | ||
"name": "@coveo/semantic-monorepo-tools", | ||
"version": "2.5.9", | ||
"version": "2.6.0", | ||
"description": "A library of helper functions to do SemVer2 compliant releases from Conventional Commits in monorepos", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/coveo/semantic-monorepo-tools#readme", |
import spawn from "../utils/spawn.js"; | ||
import gitLogger from "./utils/gitLogger.js"; | ||
export default async function gitDiff() { | ||
export default async function gitDiff(args: string[] = []): Promise<string[]> { | ||
return ( | ||
await spawn("git", ["--no-pager", "diff", "--name-only"], gitLogger) | ||
await spawn( | ||
"git", | ||
["--no-pager", "diff", "--name-only", ...args], | ||
gitLogger, | ||
) | ||
).stdout | ||
@@ -8,0 +12,0 @@ .trim() |
import spawn from "../utils/spawn.js"; | ||
import gitLogger from "./utils/gitLogger.js"; | ||
export default async function (ref: string) { | ||
return (await spawn("git", ["rev-parse", ref], gitLogger)).stdout.trim(); | ||
export default async function ( | ||
ref: string, | ||
args: string[] = [], | ||
): Promise<string> { | ||
return ( | ||
await spawn("git", ["rev-parse", ...args, ref], gitLogger) | ||
).stdout.trim(); | ||
} |
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
142464
2780