fix(dashboard): js-yaml 5 호환 위해 namespace import로 변경#133
Merged
Conversation
js-yaml 5는 ESM 전환으로 default export를 제거함. import yaml from 'js-yaml'가 [MISSING_EXPORT]로 빌드 실패하므로 import * as yaml로 변경. namespace import는 v4/v5 모두에서 yaml.load가 동작해 양쪽 호환.
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.
배경
Dependabot PR #127(js-yaml 4.2.0 → 5.x)이 Frontend Build 실패로 머지 불가 상태입니다.
원인
js-yaml 5는 ESM-first로 전환하며 default export를 제거했습니다. v4까지 동작하던
import yaml from 'js-yaml'(default import)가 v5에서 깨집니다.수정
import yaml from 'js-yaml'→import * as yaml from 'js-yaml'(namespace import).namespace import는 v4·v5 모두에서
yaml.load가 동작하므로 양방향 호환됩니다. 사용처(yaml.load(content))는 변경 없음.영향 범위
YamlEditor.tsx단 1곳 (전체 grep 확인)검증
tsc -b: yaml/YamlEditor 관련 에러 0 (현재 js-yaml 4 기준 빌드 통과 = 하위 호환 확인)후속
머지 후 #127에
@dependabot rebase→ CI 통과 시 #127 머지