Skip to content

Releases: flakiness/nodejs-sdk

v3.3.1

02 Jun 00:11
1b837db

Choose a tag to compare

What's Changed

Full Changelog: v3.3.0...v3.3.1

v3.3.0

31 May 22:59
1277a46

Choose a tag to compare

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

15 May 06:32
4cafa0f

Choose a tag to compare

What's Changed

  • feat: introduce a new ReportUtils.detectRuntime function by @aslushnikov in #24

Full Changelog: v3.1.0...v3.2.0

v3.1.0

23 Apr 17:20
d8d95f4

Choose a tag to compare

What's Changed

Full Changelog: v3.0.0...v3.1.0

v3.0.0

23 Apr 14:55
8c1056a

Choose a tag to compare

What's Changed

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 in try/catch.
  • After the !result.ok early return, TypeScript narrows result.worktree and
    result.commitId to their non-undefined types.
  • result.error is 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

11 Apr 12:07
778ede9

Choose a tag to compare

What's Changed

Full Changelog: v2.6.0...v2.7.0

v2.6.0

24 Mar 03:29
442b8f6

Choose a tag to compare

What's Changed

Full Changelog: v2.5.0...v2.6.0

v2.5.0

23 Mar 18:58
072e655

Choose a tag to compare

What's Changed

Full Changelog: v2.4.0...v2.5.0

v2.4.0

22 Mar 20:07
fd57ebd

Choose a tag to compare

What's Changed

Full Changelog: v2.3.1...v2.4.0

v2.3.1

22 Mar 18:14
99fd37d

Choose a tag to compare

What's Changed

Full Changelog: v2.3.0...v2.3.1