freemium-ui 2.0.120 → 2.0.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,280 @@
1
+ name: Automated Version Bump and Publish
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_type:
7
+ description: 'Version bump type'
8
+ required: true
9
+ default: 'patch'
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+ push:
16
+ branches:
17
+ - main
18
+
19
+ permissions:
20
+ contents: write
21
+ pull-requests: write
22
+ packages: write
23
+
24
+ jobs:
25
+ create-version-pr:
26
+ name: Create Version Bump PR
27
+ runs-on: fw-shared
28
+ if: github.event_name == 'workflow_dispatch'
29
+
30
+ steps:
31
+ - name: Checkout code
32
+ uses: actions/checkout@v4
33
+ with:
34
+ fetch-depth: 0
35
+ token: ${{ secrets.GITHUB_TOKEN }}
36
+ persist-credentials: true
37
+
38
+ - name: Setup Node.js
39
+ uses: actions/setup-node@v4
40
+ with:
41
+ node-version: '18'
42
+ registry-url: 'https://registry.npmjs.org'
43
+ cache: 'npm'
44
+
45
+ - name: Configure Git
46
+ run: |
47
+ git config --local user.email "survey-serv-ci@users.noreply.github.com"
48
+ git config --local user.name "Survey Serv Release Bot"
49
+ git config --local url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
50
+
51
+ - name: Get current version
52
+ id: current_version
53
+ run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
54
+
55
+ - name: Create feature branch
56
+ id: branch
57
+ run: |
58
+ BRANCH_NAME="version-bump-$(date +'%Y%m%d-%H%M%S')"
59
+ git checkout -b $BRANCH_NAME
60
+ echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
61
+
62
+ - name: Bump version
63
+ id: version_bump
64
+ run: |
65
+ NEW_VERSION=$(npm version ${{ github.event.inputs.version_type }} --no-git-tag-version)
66
+ echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
67
+ echo "Bumped version from ${{ steps.current_version.outputs.version }} to $NEW_VERSION"
68
+
69
+ - name: Generate changes summary
70
+ id: changes
71
+ run: |
72
+ # Get commits since last tag for release notes
73
+ LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
74
+ if [ -z "$LAST_TAG" ]; then
75
+ CHANGES=$(git log --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges | head -10)
76
+ RELEASE_TYPE="Initial Release"
77
+ else
78
+ CHANGES=$(git log $LAST_TAG..HEAD --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges | head -10)
79
+ RELEASE_TYPE="Update"
80
+ fi
81
+
82
+ echo "changes<<EOF" >> $GITHUB_OUTPUT
83
+ echo "$CHANGES" >> $GITHUB_OUTPUT
84
+ echo "EOF" >> $GITHUB_OUTPUT
85
+
86
+ echo "release_type<<EOF" >> $GITHUB_OUTPUT
87
+ echo "$RELEASE_TYPE" >> $GITHUB_OUTPUT
88
+ echo "EOF" >> $GITHUB_OUTPUT
89
+
90
+ - name: Commit version bump
91
+ run: |
92
+ git add package.json package-lock.json
93
+ git commit -m "chore: bump version to ${{ steps.version_bump.outputs.new_version }}
94
+
95
+ Version: ${{ steps.current_version.outputs.version }} → ${{ steps.version_bump.outputs.new_version }}
96
+ Type: ${{ github.event.inputs.version_type }}
97
+
98
+ Ready for automated publish after merge"
99
+
100
+ - name: Push feature branch
101
+ run: git push origin ${{ steps.branch.outputs.branch_name }}
102
+
103
+ - name: Create Pull Request
104
+ run: |
105
+ PR_URL=$(gh pr create \
106
+ --title "chore(release): bump version to ${{ steps.version_bump.outputs.new_version }}" \
107
+ --body "## Automated Version Bump: ${{ steps.version_bump.outputs.new_version }}
108
+
109
+ **Initiated by:** @${{ github.actor }}
110
+ **Workflow run:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
111
+ **Trigger:** Manual workflow dispatch
112
+
113
+ ### Changes:
114
+ - **Version**: ${{ steps.current_version.outputs.version }} → ${{ steps.version_bump.outputs.new_version }}
115
+ - **Type**: ${{ github.event.inputs.version_type }}
116
+
117
+ ### Recent commits:
118
+ ${{ steps.changes.outputs.changes }}
119
+
120
+ ### After Merge - Automatic Actions:
121
+ - npm package published
122
+ - Git tag created
123
+ - GitHub release created
124
+
125
+ **Merge this PR to trigger automated publishing!**" \
126
+ --head ${{ steps.branch.outputs.branch_name }} \
127
+ --base main)
128
+
129
+ echo "Pull request created: $PR_URL"
130
+ echo "Review and merge to complete: $PR_URL"
131
+ env:
132
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133
+
134
+ publish-after-merge:
135
+ name: Publish After PR Merge
136
+ runs-on: fw-shared
137
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
138
+
139
+ steps:
140
+ - name: Checkout code
141
+ uses: actions/checkout@v4
142
+ with:
143
+ fetch-depth: 0
144
+
145
+ - name: Setup Node.js
146
+ uses: actions/setup-node@v4
147
+ with:
148
+ node-version: '18'
149
+ registry-url: 'https://registry.npmjs.org'
150
+ cache: 'npm'
151
+
152
+ - name: Check if this is a version bump commit
153
+ id: check_version
154
+ run: |
155
+ COMMIT_MSG=$(git log -1 --pretty=%s)
156
+ echo "Latest commit message: $COMMIT_MSG"
157
+
158
+ # Check commit message patterns (including merge commit messages)
159
+ COMMIT_MATCH=false
160
+ if echo "$COMMIT_MSG" | grep -q "chore: bump version to\|chore(release): bump version to\|Version Bump to\|bump version"; then
161
+ COMMIT_MATCH=true
162
+ fi
163
+
164
+ # Check the PR branch pattern in merge commit
165
+ PR_BRANCH_MATCH=false
166
+ if echo "$COMMIT_MSG" | grep -q "version-bump-[0-9]"; then
167
+ PR_BRANCH_MATCH=true
168
+ echo "Version bump branch pattern detected in merge"
169
+ fi
170
+
171
+ echo "Commit message match: $COMMIT_MATCH"
172
+ echo "PR branch match: $PR_BRANCH_MATCH"
173
+
174
+ if [ "$COMMIT_MATCH" = true ] || [ "$PR_BRANCH_MATCH" = true ]; then
175
+ echo "is_version_bump=true" >> $GITHUB_OUTPUT
176
+ VERSION=$(node -p "require('./package.json').version")
177
+ echo "version=v$VERSION" >> $GITHUB_OUTPUT
178
+ echo "✅ Version bump detected: $VERSION"
179
+ echo "Reason: Commit=$COMMIT_MATCH, Branch=$PR_BRANCH_MATCH"
180
+ else
181
+ echo "is_version_bump=false" >> $GITHUB_OUTPUT
182
+ echo "❌ Not a version bump commit, skipping publish"
183
+ echo "Commit message: $COMMIT_MSG"
184
+ echo "No version bump indicators found"
185
+ fi
186
+
187
+ - name: Install dependencies and build
188
+ if: steps.check_version.outputs.is_version_bump == 'true'
189
+ run: |
190
+ npm ci
191
+ npm run build
192
+
193
+ - name: Publish to npm
194
+ if: steps.check_version.outputs.is_version_bump == 'true'
195
+ run: |
196
+ echo "Publishing to npm..."
197
+ npm publish
198
+ echo "Successfully published to npm!"
199
+ env:
200
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
201
+
202
+ - name: Create Git tag
203
+ if: steps.check_version.outputs.is_version_bump == 'true'
204
+ run: |
205
+ git config --local user.email "survey-serv-ci@users.noreply.github.com"
206
+ git config --local user.name "Survey Serv Release Bot"
207
+ git tag ${{ steps.check_version.outputs.version }}
208
+ git push origin ${{ steps.check_version.outputs.version }}
209
+ echo "Git tag created and pushed!"
210
+
211
+ - name: Cleanup version bump branch
212
+ if: steps.check_version.outputs.is_version_bump == 'true'
213
+ run: |
214
+ # Extract branch name from merge commit message
215
+ COMMIT_MSG=$(git log -1 --pretty=%s)
216
+ echo "Commit message: $COMMIT_MSG"
217
+
218
+ # Extract branch name (e.g., version-bump-20250810-084452)
219
+ BRANCH_NAME=$(echo "$COMMIT_MSG" | grep -o 'version-bump-[0-9]\{8\}-[0-9]\{6\}' | head -1)
220
+
221
+ if [ -n "$BRANCH_NAME" ]; then
222
+ echo "Attempting to delete branch: $BRANCH_NAME"
223
+
224
+ # Delete the remote branch
225
+ if git push origin --delete "$BRANCH_NAME" 2>/dev/null; then
226
+ echo "✅ Successfully deleted remote branch: $BRANCH_NAME"
227
+ else
228
+ echo "⚠️ Branch $BRANCH_NAME may have been already deleted or doesn't exist"
229
+ fi
230
+ else
231
+ echo "ℹ️ Could not extract version bump branch name from commit message"
232
+ echo "Commit message was: $COMMIT_MSG"
233
+ fi
234
+ env:
235
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
236
+
237
+ - name: Generate release notes
238
+ if: steps.check_version.outputs.is_version_bump == 'true'
239
+ id: release_notes
240
+ run: |
241
+ # Get commits since last tag (excluding current)
242
+ LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
243
+
244
+ if [ -z "$LAST_TAG" ]; then
245
+ CHANGES=$(git log --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges HEAD^)
246
+ RELEASE_TYPE="Initial Release"
247
+ else
248
+ CHANGES=$(git log $LAST_TAG..HEAD^ --pretty=format:"- [%s](https://github.com/${{ github.repository }}/commit/%H)" --no-merges)
249
+ RELEASE_TYPE="Update"
250
+ fi
251
+
252
+ # Create release notes
253
+ cat > release_notes.md << EOF
254
+ ## $RELEASE_TYPE
255
+
256
+ ### Changes in this version:
257
+ $CHANGES
258
+
259
+ ### Installation:
260
+ \`\`\`bash
261
+ npm install freemium-ui@${{ steps.check_version.outputs.version }}
262
+ \`\`\`
263
+
264
+ ### Links:
265
+ - [npm Package](https://www.npmjs.com/package/freemium-ui)
266
+ - [Documentation](https://github.com/${{ github.repository }}/blob/main/README.md)
267
+
268
+ ---
269
+ *This release was automatically generated by GitHub Actions*
270
+ EOF
271
+
272
+ - name: Create GitHub Release
273
+ if: steps.check_version.outputs.is_version_bump == 'true'
274
+ run: |
275
+ gh release create ${{ steps.check_version.outputs.version }} \
276
+ --title "Release ${{ steps.check_version.outputs.version }}" \
277
+ --notes-file release_notes.md
278
+ echo "GitHub release created!"
279
+ env:
280
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/lib/index.cjs.js CHANGED
@@ -3879,6 +3879,7 @@ className:`input-helper ${t.className??""}`.trim()},t.children),ym=xr.textarea`
3879
3879
  min-width: 2.5rem;
3880
3880
  `,wm=xr.input`
3881
3881
  flex: 1;
3882
+ min-width: 0;
3882
3883
  border: unset;
3883
3884
  outline: unset;
3884
3885
  padding: unset;
@@ -3903,6 +3904,7 @@ className:`input-helper ${t.className??""}`.trim()},t.children),ym=xr.textarea`
3903
3904
  `,Cm=xr.div`
3904
3905
  display: flex;
3905
3906
  flex: 1;
3907
+ min-width: 0;
3906
3908
  gap: 4px;
3907
3909
  font-family: ${({theme:e})=>e.typography.fontFamily};
3908
3910
  font-size: ${({theme:e})=>e.typography.primary.fontSize};
package/lib/index.js CHANGED
@@ -3840,6 +3840,7 @@ className:`input-helper ${e.className??""}`.trim()},e.children),Fm=Ur.textarea`
3840
3840
  min-width: 2.5rem;
3841
3841
  `,Bm=Ur.input`
3842
3842
  flex: 1;
3843
+ min-width: 0;
3843
3844
  border: unset;
3844
3845
  outline: unset;
3845
3846
  padding: unset;
@@ -3864,6 +3865,7 @@ className:`input-helper ${e.className??""}`.trim()},e.children),Fm=Ur.textarea`
3864
3865
  `,jm=Ur.div`
3865
3866
  display: flex;
3866
3867
  flex: 1;
3868
+ min-width: 0;
3867
3869
  gap: 4px;
3868
3870
  font-family: ${({theme:e})=>e.typography.fontFamily};
3869
3871
  font-size: ${({theme:e})=>e.typography.primary.fontSize};
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.120",
3
+ "version": "2.0.121",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.120",
3
+ "version": "2.0.121",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.js",