Skip to content

Conversation

@subzero10
Copy link
Member

@subzero10 subzero10 commented Sep 16, 2025

Status

READY

Description

Exporting check-ins client so that it can be utilized programmatically.

Usage

See #1457.

#1208 (comment)

@subzero10 subzero10 self-assigned this Sep 16, 2025
@subzero10 subzero10 requested a review from Copilot September 16, 2025 18:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR makes the check-ins client public by exporting CheckInsClient, CheckIn, and ServerTransport classes from the honeybadger-js server package. This enables programmatic usage of the check-ins functionality outside of the main Honeybadger client.

  • Exports CheckInsClient, CheckIn, and ServerTransport classes from the server package
  • Adds TypeScript type definitions test to verify the exported types work correctly
  • Fixes a comment typo referencing the correct field name

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/js/src/server.ts Exports CheckInsClient, CheckIn, and ServerTransport classes
packages/js/src/server/check-ins-manager/index.ts Re-exports CheckInsClient and CheckIn classes and removes semicolon
packages/js/test-d/server.test-d.tsx Adds type definition tests for the newly exported classes
packages/js/src/server/check-ins-manager/types.ts Fixes comment typo from "report_report" to "reportPeriod"
packages/js/scripts/copy-typedefs.js Removes path replacement logic for type definitions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

fs.writeFileSync(targetFile, fs.readFileSync(source, 'utf8').replace(/'\.\//g, '\'./types/'));
fs.writeFileSync(targetFile, fs.readFileSync(source, 'utf8'));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why this was here. I had to remove it in order to have correct type definitions.

@subzero10 subzero10 requested a review from stympy September 16, 2025 19:09
@subzero10 subzero10 mentioned this pull request Sep 16, 2025
@subzero10 subzero10 merged commit 63de374 into master Sep 16, 2025
14 checks passed
@subzero10 subzero10 deleted the public-check-ins-client branch September 16, 2025 19:34
@subzero10
Copy link
Member Author

subzero10 commented Sep 17, 2025

Update: I've tested this manually and I'm facing some issues with rollup's tree shaking: it's not exporting the CheckInsClient class because it's not explicitly used in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants