@kununu/eslint-config 7.3.2 → 7.3.3-test-verify-sanitize-beta.0

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.
@@ -214,6 +214,11 @@ jobs:
214
214
  current_branch=${{ env.BRANCH_NAME }}
215
215
  echo "Current branch name: $current_branch"
216
216
 
217
+ # Sanitize the branch name to the semver prerelease-legal charset [0-9A-Za-z-]
218
+ # so branch names containing e.g. "/" do not produce an invalid version
219
+ SAFE_BRANCH=$(printf '%s' "$current_branch" | sed 's/[^0-9A-Za-z-]/-/g')
220
+ echo "Sanitized branch name: $SAFE_BRANCH"
221
+
217
222
  # Get the current version from package.json
218
223
  current_version=$(npm pkg get version --json | tr -d '"')
219
224
  echo "Current package.json version: $current_version"
@@ -226,7 +231,7 @@ jobs:
226
231
  else
227
232
  # If the current version does not contain beta,
228
233
  # set the pre-release version to beta including the branch name and increment the version
229
- npm --no-git-tag-version version prepatch --preid=${current_branch}-beta -f
234
+ npm --no-git-tag-version version prepatch --preid=${SAFE_BRANCH}-beta -f
230
235
  fi
231
236
 
232
237
  # Publish the package with the beta tag
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kununu/eslint-config",
3
- "version": "7.3.2",
3
+ "version": "7.3.3-test-verify-sanitize-beta.0",
4
4
  "description": "kununu's ESLint config",
5
5
  "main": "eslint.config.mjs",
6
6
  "type": "module",