Skip to content

hotfix: npm 배포 동기화 문제 해결 #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/fix-npm-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"vue-pivottable": patch
"@vue-pivottable/plotly-renderer": patch
"@vue-pivottable/lazy-table-renderer": patch
---

fix: 워크플로우 및 버전 관리 시스템 개선

- develop 브랜치에서 항상 베타 버전 보장하는 로직 추가
- peerDependencies를 현재 npm latest와 일치하도록 수정
- changeset이 없어도 베타 접미사가 자동으로 추가되도록 개선
- npm 배포 충돌 및 버전 불일치 문제 근본 해결
38 changes: 26 additions & 12 deletions .github/workflows/release-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,43 @@ jobs:
# Apply changesets and consume them
pnpm changeset version

# Check for version changes and update to beta
# Ensure beta versions on develop branch
TIMESTAMP=$(date +%s)
CHANGED_PACKAGES=""

# Check main package
NEW_MAIN=$(node -p "require('./package.json').version")
if [ "$ORIGINAL_MAIN" != "$NEW_MAIN" ]; then
BETA_VERSION="${NEW_MAIN}-beta.${TIMESTAMP}"
npm version $BETA_VERSION --no-git-tag-version
# Function to ensure beta version
ensure_beta_version() {
local current_version=$1
local timestamp=$2

# If already has beta suffix, keep it
if [[ "$current_version" == *"-beta."* ]]; then
echo "$current_version"
else
# Add beta suffix
echo "${current_version}-beta.${timestamp}"
fi
}

# Check main package - always ensure beta on develop
CURRENT_MAIN=$(node -p "require('./package.json').version")
BETA_MAIN=$(ensure_beta_version "$CURRENT_MAIN" "$TIMESTAMP")

if [ "$CURRENT_MAIN" != "$BETA_MAIN" ]; then
npm version $BETA_MAIN --no-git-tag-version
CHANGED_PACKAGES="vue-pivottable"
fi

# Check sub-packages
# Check sub-packages - always ensure beta on develop
for pkg in packages/*/; do
if [ -d "$pkg" ] && [ -f "$pkg/package.json" ]; then
cd "$pkg"
PKG_NAME=$(basename "$pkg")
NEW_VERSION=$(node -p "require('./package.json').version")
CURRENT_VERSION=$(node -p "require('./package.json').version")
BETA_VERSION=$(ensure_beta_version "$CURRENT_VERSION" "$TIMESTAMP")

# Only add beta if version changed
if [ "${ORIGINAL_VERSIONS[$PKG_NAME]}" != "$NEW_VERSION" ]; then
PKG_BETA="${NEW_VERSION}-beta.${TIMESTAMP}"
npm version $PKG_BETA --no-git-tag-version
if [ "$CURRENT_VERSION" != "$BETA_VERSION" ]; then
npm version $BETA_VERSION --no-git-tag-version
CHANGED_PACKAGES="$CHANGED_PACKAGES $PKG_NAME"
fi
cd -
Expand Down
44 changes: 0 additions & 44 deletions fix-workflow.yml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/lazy-table-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"peerDependencies": {
"vue": "^3.2.0",
"vue-pivottable": "^1.1.5"
"vue-pivottable": "^1.1.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/plotly-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"peerDependencies": {
"vue": "^3.2.0",
"vue-pivottable": "^1.1.5"
"vue-pivottable": "^1.1.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
Expand Down
Loading