Releases: flakiness/nodejs-sdk
Releases · flakiness/nodejs-sdk
v3.3.1
v3.3.0
What's Changed
- feat: introduce method to fetch test durations from the Flakiness.io by @aslushnikov in #25
- chore: harden all HTTP calls across SDK by @aslushnikov in #26
Full Changelog: v3.2.0...v3.3.0
v3.2.0
What's Changed
- feat: introduce a new
ReportUtils.detectRuntimefunction by @aslushnikov in #24
Full Changelog: v3.1.0...v3.2.0
v3.1.0
What's Changed
- feat(normalize): drop empty errors array by @aslushnikov in #23
Full Changelog: v3.0.0...v3.1.0
v3.0.0
What's Changed
- feat: new API for ergonomic worktree creation. by @aslushnikov in #22
Migration notes
v3.0.0
GitWorktree.create() and GitWorktree.headCommitId() → GitWorktree.initialize()
Both removed methods could throw. The replacement GitWorktree.initialize() returns a
discriminated union that forces the caller to handle failure explicitly, and it also
resolves the HEAD commit in the same call.
export type GitWorktreeInitResult =
| { ok: true; worktree: GitWorktree; commitId: FlakinessReport.CommitId }
| { ok: false; error: string };Rewrite the try/catch pattern that wrapped GitWorktree.create() +
worktree.headCommitId() into an ok check.
Before
let worktree: GitWorktree;
let commitId: FK.CommitId;
try {
worktree = GitWorktree.create(rootDir);
commitId = worktree.headCommitId();
} catch {
console.warn('Failed to fetch commit info - is this a git repo?');
console.error('Report is NOT generated.');
return;
}After
const result = GitWorktree.initialize(rootDir);
if (!result.ok) {
console.warn(`Failed to fetch commit info - is this a git repo? (${result.error})`);
console.error('Report is NOT generated.');
return;
}
const { worktree, commitId } = result;Notes:
GitWorktree.initialize()never throws — do not wrap it intry/catch.- After the
!result.okearly return, TypeScript narrowsresult.worktreeand
result.commitIdto their non-undefinedtypes. result.erroris a human-readable string describing which git command failed; log
it instead of a generic message if you want better diagnostics.
Full Changelog: v2.7.0...v3.0.0
v2.7.0
What's Changed
- feat: support step-level attachments by @aslushnikov in #21
Full Changelog: v2.6.0...v2.7.0
v2.6.0
What's Changed
- chore: depreacte
CIUtils.runTitle()method by @aslushnikov in #20
Full Changelog: v2.5.0...v2.6.0
v2.5.0
What's Changed
- feat: introduce
CIUtils.runTitle()method by @aslushnikov in #19
Full Changelog: v2.4.0...v2.5.0
v2.4.0
What's Changed
- chore: relax Node.js version to 20+ by @aslushnikov in #17
- devops: externalize peer dependencies by @aslushnikov in #18
Full Changelog: v2.3.1...v2.4.0
v2.3.1
What's Changed
- chore: add @types/which to fix build by @aslushnikov in #15
- devops: bump action version in Github YAML by @aslushnikov in #14
- devops: make sure build succeeds before running tests by @aslushnikov in #16
Full Changelog: v2.3.0...v2.3.1