Skip to content

Commit 6c43c4b

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 6c43c4b

2 files changed

Lines changed: 16 additions & 177 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: 16 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,15 @@ content directly into the editor is a high-value feature.
102102
- [9.1 Continuous Integration Pipeline](#91-continuous-integration-pipeline)
103103
- [9.1.1 Pull Request Validation (`pr-validation.yml`)](#911-pull-request-validation-pr-validationyml)
104104
- [9.1.2 Security Scanning (`security.yml`)](#912-security-scanning-securityyml)
105-
- [9.2 Release Management with release-please](#92-release-management-with-release-please)
106-
- [9.2.1 Release Please Configuration](#921-release-please-configuration)
107-
- [9.2.2 Release Workflow (`release.yml`)](#922-release-workflow-releaseyml)
108-
- [9.2.3 Version Management](#923-version-management)
109-
- [9.3 Marketplace Publishing Requirements](#93-marketplace-publishing-requirements)
110-
- [9.3.1 Pre-Publish Checklist](#931-pre-publish-checklist)
111-
- [9.3.2 Publishing Process](#932-publishing-process)
105+
- [9.2 Marketplace Publishing Requirements](#92-marketplace-publishing-requirements)
106+
- [9.2.1 Pre-Publish Checklist](#921-pre-publish-checklist)
107+
- [9.2.2 Publishing Process](#922-publishing-process)
112108
- [9.3.3 Rollback Procedure](#933-rollback-procedure)
113-
- [9.4 Branch Protection and Workflow](#94-branch-protection-and-workflow)
114-
- [9.5 Environment and Secrets Management](#95-environment-and-secrets-management)
115-
- [9.6 Monitoring and Notifications](#96-monitoring-and-notifications)
116-
- [9.7 Testing in CI/CD](#97-testing-in-cicd)
117-
- [9.8 Documentation in CI/CD](#98-documentation-in-cicd)
109+
- [9.3 Branch Protection and Workflow](#93-branch-protection-and-workflow)
110+
- [9.4 Environment and Secrets Management](#94-environment-and-secrets-management)
111+
- [9.5 Monitoring and Notifications](#95-monitoring-and-notifications)
112+
- [9.6 Testing in CI/CD](#96-testing-in-cicd)
113+
- [9.7 Documentation in CI/CD](#97-documentation-in-cicd)
118114

119115
## About This Document
120116

@@ -2342,165 +2338,9 @@ Runs on schedule (weekly) and on pull requests.
23422338
- Weekly scheduled run (every Monday)
23432339
- On pull requests that modify `package.json` or `package-lock.json`
23442340

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

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
2343+
#### 9.2.1 Pre-Publish Checklist
25042344

25052345
Before first marketplace publication, ensure:
25062346

@@ -2520,7 +2360,7 @@ Before first marketplace publication, ensure:
25202360
- `bugs`
25212361
- `license`
25222362

2523-
#### 9.3.2 Publishing Process
2363+
#### 9.2.2 Publishing Process
25242364

25252365
**Manual First Release:**
25262366

@@ -2565,7 +2405,7 @@ If a published version has critical issues:
25652405
- Consider posting in marketplace Q&A
25662406
- Update GitHub release notes if needed
25672407

2568-
### 9.4 Branch Protection and Workflow
2408+
### 9.3 Branch Protection and Workflow
25692409

25702410
**Protected Branch:** `main`
25712411

@@ -2664,7 +2504,7 @@ commitlint:
26642504
- Reword last commit: `git commit --amend`
26652505
- Interactive rebase to fix old commits: `git rebase -i HEAD~n`
26662506

2667-
### 9.5 Environment and Secrets Management
2507+
### 9.4 Environment and Secrets Management
26682508

26692509
**Required Secrets:**
26702510

@@ -2684,7 +2524,7 @@ commitlint:
26842524
- No sensitive data in workflow files
26852525
- All secrets via GitHub Secrets only
26862526

2687-
### 9.6 Monitoring and Notifications
2527+
### 9.5 Monitoring and Notifications
26882528

26892529
**Build Status:**
26902530

@@ -2708,7 +2548,7 @@ commitlint:
27082548
- Code coverage trend
27092549
- Time from commit to release
27102550

2711-
### 9.7 Testing in CI/CD
2551+
### 9.6 Testing in CI/CD
27122552

27132553
**Test Execution:**
27142554

@@ -2730,7 +2570,7 @@ commitlint:
27302570
- Fail fast: stop other jobs if one platform fails
27312571
- Archive platform-specific test results separately
27322572

2733-
### 9.8 Documentation in CI/CD
2573+
### 9.7 Documentation in CI/CD
27342574

27352575
**Automated Checks:**
27362576

0 commit comments

Comments
 (0)