Skip to content

fix: 디자인 토큰 미해결 참조 필터링 및 js 플랫폼 제거#50

Merged
wlrnjs merged 1 commit into
developfrom
fix/design-tokens
May 11, 2026
Merged

fix: 디자인 토큰 미해결 참조 필터링 및 js 플랫폼 제거#50
wlrnjs merged 1 commit into
developfrom
fix/design-tokens

Conversation

@wlrnjs
Copy link
Copy Markdown
Member

@wlrnjs wlrnjs commented May 11, 2026

Pull Request

관련 이슈

작업 내용

  • 디자인 토큰 미해결 참조 필터링 및 js 플랫폼 제거

참고 사항

체크리스트

  • 기능이 정상 동작하는지 확인
  • 불필요한 코드/주석 제거

@wlrnjs wlrnjs requested a review from junye0l May 11, 2026 17:00
@wlrnjs wlrnjs self-assigned this May 11, 2026
@wlrnjs wlrnjs added D-0 12시간 이내에 처리가 필요합니다. bug 기능 오류, 화면 깨짐, 예외 발생 등 예상치 못한 문제 chore 의존성 업데이트, 환경 세팅, 빌드 설정 등 유지보수 작업 labels May 11, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

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

Project Deployment Actions Updated (UTC)
finditem-monitoring Ready Ready Preview, Comment May 11, 2026 5:00pm

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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!

이번 PR은 디자인 토큰 빌드 과정에서 발생하는 미해결 참조 문제를 해결하고, 사용하지 않는 JS 플랫폼 설정을 제거하여 빌드 결과물을 최적화하는 데 목적이 있습니다. 또한, 빌드 시 참조 오류를 더 명확하게 파악할 수 있도록 로깅 설정을 보강하였습니다.

Highlights

  • 디자인 토큰 필터링: 미해결 참조({ })를 포함하는 디자인 토큰을 필터링하여 빌드 안정성을 높였습니다.
  • JS 플랫폼 제거: 불필요한 JS 플랫폼 빌드 설정을 제거하고 관련 exports를 정리했습니다.
  • 로그 설정 추가: StyleDictionary 빌드 시 깨진 참조에 대한 경고를 확인하기 위해 로깅 설정을 추가했습니다.
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 the 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 counterproductive. 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.


토큰 속에 숨은 참조, 필터로 걸러내어 정리하니, 깔끔해진 빌드 결과물, 코드의 길도 밝아지네.

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.

@wlrnjs wlrnjs merged commit 59d90bc into develop May 11, 2026
4 checks passed
@wlrnjs wlrnjs deleted the fix/design-tokens branch May 11, 2026 17:00
Copy link
Copy Markdown
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

This pull request updates the design tokens package by adding a comprehensive set of CSS variables and refining the Style Dictionary build configuration. Key changes include the removal of the JS platform and the package's main entry point, alongside the introduction of a filter to exclude tokens with unresolved references. Review feedback suggests improving the isResolved logic to handle complex token objects using JSON.stringify, increasing the severity of broken reference logs from warning to error for better data integrity, and verifying the impact of removing the main export as it constitutes a breaking change for consumers.

Comment on lines +24 to +27
const isResolved = (token) => {
const val = String(token.value ?? '');
return !val.includes('{') && !val.includes('}');
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

isResolved 함수에서 token.value가 객체인 경우(예: typography, shadow 등 복합 토큰) String() 변환 시 "[object Object]"가 되어 내부의 미해결 참조를 감지하지 못합니다. JSON.stringify()를 사용하여 값의 전체 구조를 문자열로 확인하는 것이 더 안전합니다.

const isResolved = (token) => {
  const val = JSON.stringify(token.value);
  return !!val && !val.includes('{') && !val.includes('}');
};

preprocessors: ['tokens-studio'],
log: {
verbosity: 'verbose',
errors: { brokenReferences: 'warn' },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

brokenReferences: 'warn' 설정은 빌드 시 참조 오류가 발생해도 프로세스를 중단하지 않습니다. 이는 의도치 않게 잘못된 스타일 값이 결과물에 포함될 위험이 있으므로, 가급적 'error'로 설정하여 소스 단계에서 문제를 해결하도록 강제하는 것이 권장됩니다. 현재 filter를 통해 결과물에서 제외하고는 있으나, 근본적인 데이터 무결성 확인을 위해 검토가 필요합니다.

    errors: { brokenReferences: 'error' },

"version": "1.0.0",
"type": "module",
"exports": {
".": "./dist/js/tokens.js",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

js 플랫폼 제거와 함께 패키지의 메인 엔트리포인트인 . export가 삭제되었습니다. 이는 이 패키지를 직접 임포트하여 사용하던 기존 프로젝트들에 영향을 주는 Breaking Change입니다. 의도된 변경인지 확인이 필요하며, 필요한 경우 소비자들에게 /css 또는 /tailwind 경로를 명시적으로 사용하도록 안내가 필요합니다.

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

Labels

bug 기능 오류, 화면 깨짐, 예외 발생 등 예상치 못한 문제 chore 의존성 업데이트, 환경 세팅, 빌드 설정 등 유지보수 작업 D-0 12시간 이내에 처리가 필요합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant