fix: process.exit(1) 대신 Rollup 에러 처리 메커니즘 사용#98
Merged
yceffort-naver merged 2 commits intomainfrom Mar 11, 2026
Merged
Conversation
publint 플러그인에서 process.exit(1) 호출 시 프로세스가 즉시 종료되어 다른 플러그인(e.g. preserve-directives)의 에러가 출력되지 않는 문제를 수정합니다. - buildStart: this.error()를 사용하여 Rollup의 공식 에러 처리 파이프라인을 활용 - closeBundle: throw new Error()를 사용하여 Rollup이 에러를 적절히 처리하도록 변경 외부 인터페이스(publint.severity 옵션)는 변경 없음. Fixes #89 Co-authored-by: yceffort_naver <yceffort-naver@users.noreply.github.com>
Contributor
✅ Changeset detectedLatest commit: e61dc8c
If no version change is needed, please add The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
|
Contributor
NPM Packages📦 @naverpay/piteTotal Sizes: 10.3 kB Total Changes: +78 B (+1%) (Size Increased)
ℹ️ View Unchanged Files
powered by: naverpay size-action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
publint 플러그인에서
process.exit(1)호출 시 Node.js 프로세스가 즉시 종료되어,severity: 'error'(기본값) 설정 환경에서 다른 플러그인의 에러가 출력되지 않는 문제를 수정합니다.변경 내용
buildStart훅 (src/plugins/rollup-plugin-publint.ts):severity === 'error' && process.exit(1)if (severity === 'error') { this.error(...) }— Rollup 공식 플러그인 에러 API 사용closeBundle핸들러 (src/plugins/rollup-plugin-publint.ts):severity === 'error' && process.exit(1)if (severity === 'error') { throw new Error('publint check failed after build') }— Rollup이 처리할 수 있도록 에러를 throw.changeset/fix-publint-process-exit.md:@naverpay/pitepatch 버전 변경을 위한 changeset 파일 추가개선 효과
process.exit(1)프로세스 즉시 종료preserve-directivesRangeError)severity옵션 동일)Closes #89
Generated with Claude Code