
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@basiln/codemod
Advanced tools
@basiln/design-system, @basiln/design-system-native 마이그레이션을 위한 codemod CLI 도구입니다.
| 이름 | 설명 |
|---|---|
text-props | Text 컴포넌트의 deprecated size prop을 새 토큰(size + weight)으로 변환 |
npx @basiln/codemod <codemod-name> <path> [options]
| 옵션 | 설명 |
|---|---|
--dry | 파일을 실제로 수정하지 않고 변경 사항만 확인 |
--print | 변환된 코드를 터미널에 출력 |
--verbose=0|1|2 | 상세 출력 레벨 (기본값: 0) |
--list | 사용 가능한 codemod 목록 출력 |
--help, -h | 도움말 출력 |
# src 디렉토리 전체 변환
npx @basiln/codemod text-props ./src
# 특정 디렉토리만 변환
npx @basiln/codemod text-props ./src/components
# 실제 수정 없이 미리보기
npx @basiln/codemod text-props ./src --dry --print
# 사용 가능한 codemod 목록 확인
npx @basiln/codemod --list
@basiln/design-system 또는 @basiln/design-system-native에서 import한 Text 컴포넌트의 deprecated size prop을 새 타이포그래피 토큰으로 변환합니다.
// Before
<Text size="btn-medium">텍스트</Text>
<Text size="title-large">타이틀</Text>
// After
<Text size="caption1" weight="bold">텍스트</Text>
<Text size="title3" weight="bold">타이틀</Text>
weight가 이미 있는 경우 weight는 추가하지 않고 size만 변환합니다.
// Before
<Text size="btn-medium" weight="bold">텍스트</Text>
// After
<Text size="caption1" weight="bold">텍스트</Text>
아래 토큰은 아직 매핑이 확정되지 않아 변환하지 않습니다.
| 보류 토큰 |
|---|
head-medium |
caption-small |
caption-tiny |
btn-small |
btn-tiny |
yarn workspace @basiln/codemod test
# 또는 패키지 디렉토리에서
npm test
yarn workspace @basiln/codemod test:watch
transform 로직이 변경되면 아래 명령으로 예상 output fixture 파일을 갱신합니다.
# 패키지 디렉토리에서 실행
npm run test:preview text-props
src/__tests__/fixtures/text-props.output.tsx 파일이 갱신되며, 이 파일이 테스트의 기준값으로 사용됩니다.
src/transforms/<name>.ts — transform 로직 작성src/__tests__/fixtures/<name>.input.tsx — 변환 전 입력 fixture 작성yarn test:preview <name> — output fixture 자동 생성src/__tests__/<name>.test.ts — fixture 비교 테스트 작성src/cli.ts의 CODEMODS 객체에 항목 추가FAQs
@basiln 패키지 마이그레이션을 위한 codemod CLI
The npm package @basiln/codemod receives a total of 8 weekly downloads. As such, @basiln/codemod popularity was classified as not popular.
We found that @basiln/codemod demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.