Skip to content

fix: make createClient callable without params #3268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

tasshi-me
Copy link
Member

Why

When used with session authentication, the parameter can be omitted.

What

  • make input parameter of createClient optional

How to test

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required.
  • Added tests if it is required.
  • Passed pnpm lint and pnpm test on the root directory.

@tasshi-me tasshi-me marked this pull request as ready for review April 10, 2025 10:38
@Copilot Copilot AI review requested due to automatic review settings April 10, 2025 10:38
@tasshi-me tasshi-me requested a review from a team as a code owner April 10, 2025 10:38
@tasshi-me tasshi-me requested review from chihiro-adachi and shabaraba and removed request for a team April 10, 2025 10:38
Copy link
Contributor

@Copilot 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.

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

Comments suppressed due to low confidence (2)

packages/rest/src/client/index.ts:15

  • Ensure that the type definition of KintoneClientOptions accepts an empty object as valid input to avoid potential runtime type issues.
clientOptions: KintoneClientOptions = {}

packages/rest/src/client/tests/index.test.ts:5

  • [nitpick] Consider adding tests to validate createClient behavior when valid clientOptions are provided, in addition to the no-argument scenario.
describe("createClient", () => {

Copy link
Member

@shabaraba shabaraba left a comment

Choose a reason for hiding this comment

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

LGTM

@tasshi-me tasshi-me merged commit 7205e1f into main Apr 11, 2025
18 checks passed
@tasshi-me tasshi-me deleted the fix/call-createClient-without-params branch April 11, 2025 09:13
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