Skip to content

Conversation

@hyoseong1994
Copy link
Contributor

@hyoseong1994 hyoseong1994 commented Dec 30, 2025

변경 사항

  • deprecated 워크 플로우를 추가했습니다.

목적

  • 문제있는 라이브러리가 배포되었을 경우 deprecated하여 사용자가 라이브러리에 문제가 있음을 인지시키기 위해서입니다.

리뷰어에게

  • 최소한의 설정으로만 작성을 하였으며 간소한 설정(.npmrc 생성관련)을 위하여 setup-node@v6를 사용하였습니다

테스트 방법

act를 이용해 테스트를 진행했으며, 개인 레포지토리에 배포한 라이브러리를 대상으로 했습니다.
package.json의 name을 변경하고, 로컬 secret에 npm 토큰을 별도로 설정하여 테스트했습니다.

image

개인 레포에서 deprecated 테스트 진행했습니다.

image

PR 작성자 체크 리스트

  • UI Review를 요청하고 검토를 받았나요?
  • UI Tests를 진행했나요?

@hyoseong1994 hyoseong1994 linked an issue Dec 30, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented Dec 30, 2025

Bundle Report

Changes will increase total bundle size by 18 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
daleui-bundle-esm 555.02kB 18 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: daleui-bundle-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 18 bytes 254.15kB 0.01%

Copy link
Member

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

oven-sh/setup-bun@v2 액션만 제거해주시면 될 것 같습니다.

Copy link
Member

@sounmind sounmind left a comment

Choose a reason for hiding this comment

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

github 봇이 자동으로 달아놓은 코멘트들은 해결하지 않아도 되나요?

NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
PACKAGE_NAME=$(jq -r .name package.json)
npm deprecate "$PACKAGE_NAME@${{ inputs.version }}" "${{ inputs.reason }}"
Copy link
Member

Choose a reason for hiding this comment

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

저도 이런 워크플로우는 작성해보지 않아서 잘 모르겠지만, 제가 알아보기로는 npm deprecate 하기 전에 npm view package@version을 호출하면 해당 버전이 실제로 존재하는지 사전에 검증할 수 있다고 합니다.

Copy link
Member

Choose a reason for hiding this comment

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

그런 검증이 굳이 필요할까요? 버전이 없으면 npm deprecate가 버전이 없다는 메시지와 함께 실패할 것입니다.

Copy link
Contributor Author

@hyoseong1994 hyoseong1994 Jan 7, 2026

Choose a reason for hiding this comment

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

에반님 좋은의견 감사합니다. 달레님 말씀대로 npm deprecate가 메시지를 주지만 실패코드로 주지는 않는걸로 확인했습니다.
(deprecate는 이 버전은 쓰지말라이지만 이미없는 버전이니 정상처리라고 표현한것으로 예상됩니다.)

image

따라서 에반님이 제안주신대로 npm view package@version 를 사용하여 404에 대해서 validation을 추가하는것이 올바르다고 생각됩니다.
(참고로 deprecate된 버전에 경우 message 수정때문에 재요청할수있어서 404에 대해서만 실패 처리하는것으로 제안합니다.)

Copy link
Member

Choose a reason for hiding this comment

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

@hyoseong1994 직접 실행까지 해서 검증해주셔서 감사합니다. 버전이 없다면 실패 메시지를 던지는 게 바람직한 워크플로우라고 생각해요.

Copy link
Contributor Author

@hyoseong1994 hyoseong1994 Jan 7, 2026

Choose a reason for hiding this comment

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

작업완료했습니다 확인하시고 다른 의견있으시면 피드백 부탁드립니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sounmind 안녕하세요 에반님 작업이 완료되어 리마인드 드립니다.
@DaleSeo 달레님 의견 달아주시고 별다른 피드백이 없어서 혹시나 싶어 태그합니다. 이모지라도 하나 달아주시면 감사하겠습니다. :)

Copy link
Member

Choose a reason for hiding this comment

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

@hyoseong1994 님, 앞으로 승인한 PR은 저한테 다시 확인 안 받으셔도 됩니다. 다시 확인 받으실 만큼 추가 변경이 있을 때는 🔄 버튼 눌러서 명시적으로 요청해주세용~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아하 알겠습니다! 다음부터는 🔄 로 요청하겠습니다.

Comment on lines 17 to 46
runs-on: ubuntu-latest
steps:
- name: Validate version format
run: |
VERSION="${{ inputs.version }}"
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "❌ Invalid version format: $VERSION"
echo "Version must be in format: X.Y.Z (e.g., 1.2.3)"
exit 1
fi

- uses: actions/checkout@v6
- name: Get package information
id: package-info
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
PACKAGE_NAME=$(jq -r .name package.json)
echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT

- name: Validate version exists in npm registry
id: validate-version
run: |
NPM_OUTPUT=$(npm view "${{ steps.package-info.outputs.package_name }}@${{ inputs.version }}" 2>&1) || {
echo "$NPM_OUTPUT" | grep -q "404" && echo "❌ Version does not exist in npm registry"
exit 1
}

- name: Deprecate npm package version
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm deprecate "${{ steps.package-info.outputs.package_name }}@${{ inputs.version }}" "${{ inputs.reason }}"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
@RiaOh
Copy link
Contributor

RiaOh commented Jan 8, 2026

deprecated 워크플로우에 대해 잘 몰라서 cursor에 물어보며 코드리뷰를 했는데 큰 문제 없는 것 같습니다!
제가 내일 한번 더 확인하고 approve 하겠습니다.
효성님 수고하셨습니다!

@hyoseong1994 hyoseong1994 added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit 61a26c3 Jan 9, 2026
11 checks passed
@hyoseong1994 hyoseong1994 deleted the 612-deprecated-workflow branch January 9, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecated 워크플로우 구현

5 participants