Skip to content

Conversation

@noahchoii
Copy link
Contributor

Description of Changes

  • Added an entry point test for index.ts.

Checklist

Before submitting the PR, please make sure you have checked all of the following items.

  • The PR title follows the Conventional Commits convention. (e.g., feat, fix, docs, style, refactor, test, chore)
  • I have added tests for my changes.
  • I have updated the Storybook or relevant documentation.
  • I have added a changeset for this change. (e.g., for any changes that affect users, such as component prop changes or new features).
  • I have performed a self-code review.
  • I have followed the project's coding conventions and component patterns.

@changeset-bot
Copy link

changeset-bot bot commented Dec 3, 2025

⚠️ No Changeset found

Latest commit: a6f6829

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
vapor-ui Ready Ready Preview Comment Dec 3, 2025 1:25am

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @noahchoii, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a crucial test to the @vapor-ui/core package. Its purpose is to automatically validate that all public components are properly exported through the package's main entry point (index.ts). This helps maintain the integrity of the package's API, preventing issues where new components might be added but not made accessible to consumers, thereby improving discoverability and ensuring consistent module bundling.

Highlights

  • New Test File: A new test file, index.test.ts, has been added to the packages/core/src directory.
  • Entry Point Validation: This new test verifies that the main index.ts entry point correctly exports all components located within the components directory, ensuring no components are inadvertently missed from the public API.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. index.ts의 엔트리포인트가 모든 컴포넌트를 export하는지 확인하는 테스트를 추가해주셔서 감사합니다. 이는 라이브러리의 일관성을 유지하는 데 중요한 역할을 합니다.

리뷰 결과, 테스트 코드 자체에 몇 가지 개선점을 발견했습니다.

  • 테스트가 의도한 대로 동작하도록 패턴 매칭 로직을 수정해야 합니다. (critical)
  • 불필요한 async 키워드를 제거하여 코드 가독성을 높일 수 있습니다. (medium)

자세한 내용은 각 파일의 인라인 코멘트를 참고해주세요.

Comment on lines 20 to 23
const exportPattern = `export * from './components/${folder}'`;
if (!indexContent.includes(exportPattern)) {
missingExports.push(folder);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

현재 테스트 로직은 index.tsexport 구문에 포함된 세미콜론(;)을 확인하지 않아, 모든 컴포넌트에 대해 테스트가 실패하게 됩니다.1

또한, 문자열을 직접 비교하는 방식은 공백이나 따옴표 종류 등 예상치 못한 코드 스타일 변화에 취약할 수 있습니다. 더 안정적인 테스트를 위해 정규식을 사용하여 export 구문을 확인하는 것을 제안합니다. 이렇게 하면 세미콜론 누락 문제를 해결하고 테스트의 안정성을 높일 수 있습니다.

Suggested change
const exportPattern = `export * from './components/${folder}'`;
if (!indexContent.includes(exportPattern)) {
missingExports.push(folder);
}
const exportPattern = new RegExp(`export \* from '\./components/${folder}';`);
if (!exportPattern.test(indexContent)) {
missingExports.push(folder);
}

Style Guide References

Footnotes

  1. 스타일 가이드에 따라 문장 끝에는 항상 세미콜론을 사용해야 합니다. 현재 프로젝트의 index.ts 파일도 이 규칙을 따르고 있으므로, 테스트에서도 세미콜론을 포함하여 검증해야 합니다.

import path from 'path';

describe('@vapor-ui/core', () => {
it('should export all components from the components directory', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

테스트 콜백 함수가 async로 선언되었지만 내부에서 await를 사용하지 않고 있습니다. 불필요한 async 키워드는 코드의 의도를 파악하는 데 혼란을 줄 수 있으므로 제거하는 것이 좋겠습니다.

Suggested change
it('should export all components from the components directory', async () => {
it('should export all components from the components directory', () => {

@vapor-ui
Copy link
Collaborator

vapor-ui commented Dec 3, 2025

All tests passed!

Tests Passed Failed Duration Report
136 136 0 2m 38s Open report ↗︎

Click here if you need to update snapshots.

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

Labels

type: enhancement Issues for feature enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants