Skip to content

Commit c9ca72c

Browse files
committed
fix: allow feat commits to bump minor version in pre-1.0.0 releases
Remove bump-patch-for-minor-pre-major setting to restore standard semantic versioning behavior for pre-1.0.0 versions. With this change: - feat: commits bump minor version (0.1.1 → 0.2.0) - BREAKING CHANGE: commits bump minor version (0.1.1 → 0.2.0) - fix: commits bump patch version (0.1.1 → 0.1.2) Previously, bump-patch-for-minor-pre-major caused feat: commits to only bump patch versions, which prevented proper version signaling for new features in pre-1.0.0 releases.
1 parent eb0d40b commit c9ca72c

2 files changed

Lines changed: 3 additions & 160 deletions

File tree

.release-please-config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
".": {
55
"release-type": "node",
66
"bump-minor-pre-major": true,
7-
"bump-patch-for-minor-pre-major": true,
87
"changelog-path": "CHANGELOG.md",
98
"include-component-in-tag": false,
109
"pull-request-title-pattern": "chore: release v${version}",

REQUIREMENTS.md

Lines changed: 3 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,165 +2342,9 @@ Runs on schedule (weekly) and on pull requests.
23422342
- Weekly scheduled run (every Monday)
23432343
- On pull requests that modify `package.json` or `package-lock.json`
23442344

2345-
### 9.2 Release Management with release-please
2345+
### 9.2 Marketplace Publishing Requirements
23462346

2347-
**Tool:** [release-please](https://github.com/googleapis/release-please) by Google
2348-
2349-
**Strategy:** Conventional Commits + Automated Changelog
2350-
2351-
#### 9.2.1 Release Please Configuration
2352-
2353-
**Commit Convention:** [Conventional Commits](https://www.conventionalcommits.org/)
2354-
2355-
**Required Commit Types:**
2356-
2357-
- `feat:` - New feature (triggers MINOR version bump)
2358-
- `fix:` - Bug fix (triggers PATCH version bump)
2359-
- `docs:` - Documentation changes (no version bump)
2360-
- `chore:` - Maintenance tasks (no version bump)
2361-
- `test:` - Test changes (no version bump)
2362-
- `refactor:` - Code refactoring (no version bump)
2363-
- `BREAKING CHANGE:` - Breaking change (triggers MAJOR version bump)
2364-
- Include in commit footer or use `!` suffix: `feat!:`
2365-
2366-
**Example Commits:**
2367-
2368-
```text
2369-
feat: add support for named section snippets
2370-
2371-
fix: resolve path traversal vulnerability in symlink handling
2372-
2373-
docs: update README with new toggle commands
2374-
2375-
feat!: change default preview state to 'off'
2376-
BREAKING CHANGE: Users who relied on previews being on by default will need to update settings
2377-
```
2378-
2379-
**Configuration File:** `.release-please-manifest.json`
2380-
2381-
```json
2382-
{
2383-
".": "0.0.1"
2384-
}
2385-
```
2386-
2387-
**Config File:** `release-please-config.json`
2388-
2389-
```json
2390-
{
2391-
"packages": {
2392-
".": {
2393-
"release-type": "node",
2394-
"package-name": "mkdocs-snippet-lens",
2395-
"changelog-path": "CHANGELOG.md",
2396-
"bump-minor-pre-major": true,
2397-
"bump-patch-for-minor-pre-major": true,
2398-
"extra-files": [
2399-
"package.json"
2400-
]
2401-
}
2402-
}
2403-
}
2404-
```
2405-
2406-
#### 9.2.2 Release Workflow (`release.yml`)
2407-
2408-
**Trigger:** On push to `main` branch
2409-
2410-
**Jobs:**
2411-
2412-
1. **Create or Update Release PR**
2413-
- Use `google-github-actions/release-please-action`
2414-
- Analyzes commits since last release
2415-
- Creates/updates a release PR with:
2416-
- Updated version in `package.json`
2417-
- Updated `CHANGELOG.md` with all changes
2418-
- Git tag for the new version
2419-
- Groups related changes by type (Features, Bug Fixes, etc.)
2420-
2421-
2. **Build and Publish** (runs only when release PR is merged)
2422-
- Triggered by release-please creating a GitHub Release
2423-
- Runs on `ubuntu-latest` only (publishing needs single run)
2424-
- Steps:
2425-
1. Checkout code at release tag
2426-
2. Install dependencies (`npm ci`)
2427-
3. Run tests (`npm test`)
2428-
4. Build production package (`npm run package`)
2429-
5. Publish to VS Code Marketplace using `@vscode/vsce`
2430-
6. Upload .vsix to GitHub Release as asset
2431-
2432-
**Required Secrets:**
2433-
2434-
- `VSCE_PAT` - Personal Access Token for VS Code Marketplace publishing
2435-
- Obtained from Azure DevOps for VS Code Marketplace
2436-
- Stored in GitHub repository secrets
2437-
- Scoped to marketplace publishing only
2438-
2439-
**Example Workflow Structure:**
2440-
2441-
```yaml
2442-
name: Release
2443-
2444-
on:
2445-
push:
2446-
branches:
2447-
- main
2448-
2449-
jobs:
2450-
release-please:
2451-
runs-on: ubuntu-latest
2452-
outputs:
2453-
release_created: ${{ steps.release.outputs.release_created }}
2454-
tag_name: ${{ steps.release.outputs.tag_name }}
2455-
steps:
2456-
- uses: google-github-actions/release-please-action@v4
2457-
id: release
2458-
with:
2459-
release-type: node
2460-
package-name: mkdocs-snippet-lens
2461-
2462-
publish:
2463-
needs: release-please
2464-
if: ${{ needs.release-please.outputs.release_created }}
2465-
runs-on: ubuntu-latest
2466-
steps:
2467-
- uses: actions/checkout@v4
2468-
- uses: actions/setup-node@v4
2469-
with:
2470-
node-version: '20'
2471-
- run: npm ci
2472-
- run: npm test
2473-
- run: npm run package
2474-
- run: npx @vscode/vsce publish -p ${{ secrets.VSCE_PAT }}
2475-
- uses: actions/upload-release-asset@v1
2476-
# Upload .vsix to GitHub Release
2477-
```
2478-
2479-
#### 9.2.3 Version Management
2480-
2481-
**Versioning Scheme:** Semantic Versioning (SemVer)
2482-
2483-
- **Format:** MAJOR.MINOR.PATCH (e.g., 1.2.3)
2484-
- **Initial Version:** 0.1.0 (pre-1.0 for initial development)
2485-
- **Pre-1.0 Behavior:**
2486-
- Minor bumps for new features
2487-
- Patch bumps for bug fixes
2488-
- Breaking changes allowed without major bump (0.x.y is unstable)
2489-
- **Post-1.0 Behavior:**
2490-
- Strict SemVer compliance
2491-
- MAJOR for breaking changes
2492-
- MINOR for new features
2493-
- PATCH for bug fixes
2494-
2495-
**Version Sources:**
2496-
2497-
- Single source of truth: `package.json` `version` field
2498-
- Automatically updated by release-please
2499-
- Git tags created automatically (e.g., `v1.2.3`)
2500-
2501-
### 9.3 Marketplace Publishing Requirements
2502-
2503-
#### 9.3.1 Pre-Publish Checklist
2347+
#### 9.2.1 Pre-Publish Checklist
25042348

25052349
Before first marketplace publication, ensure:
25062350

@@ -2520,7 +2364,7 @@ Before first marketplace publication, ensure:
25202364
- `bugs`
25212365
- `license`
25222366

2523-
#### 9.3.2 Publishing Process
2367+
#### 9.2.2 Publishing Process
25242368

25252369
**Manual First Release:**
25262370

0 commit comments

Comments
 (0)