Skip to content

Conversation

@fangnx
Copy link
Member

@fangnx fangnx commented Dec 4, 2025

Please prefix all TypeScript pull-requests with [Typescript]

What

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA: https://confluentinc.atlassian.net/browse/DGS-22770

Test & Review

Open questions / Follow-ups

Copilot AI review requested due to automatic review settings December 4, 2025 21:13
@fangnx fangnx requested review from a team as code owners December 4, 2025 21:13
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 adds a Confluent-Client-Version header to all Schema Registry requests to identify the client library and version being used.

  • Imports the version from package.json
  • Sets the Confluent-Client-Version header with format javascript/{version}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { RestError } from './rest-error';
import axiosRetry from "axios-retry";
import { fullJitter, isRetriable, isSuccess } from './retry-helper';
import { version } from './package.json';
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Importing directly from package.json may fail at runtime depending on the TypeScript configuration. Consider using require() or ensure resolveJsonModule is enabled in tsconfig.json. Alternatively, use a dynamically imported version constant to avoid potential compilation issues.

Suggested change
import { version } from './package.json';
const { version } = require('./package.json');

Copilot uses AI. Check for mistakes.
@fangnx fangnx changed the title Add Confluent-Client-Version header to requests to SR Add Confluent-Client-Version header to requests to SR, JS client Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants