Feat | Enterprise-Grade Semantic Release Platform#34
Merged
Conversation
- Add E2E tests for CLI subcommands (init, validate, plan, release, rollback, doctor) - Add integration tests for config hierarchy and workflow scenarios - Add property-based tests for command routing, config loading/merging, YAML roundtrip - Add property-based tests for interaction manager, operation log, and provenance - Add unit tests for all command implementations (init, plan, release, rollback, validate, doctor) - Add unit tests for core modules (command router, config loader/merger, interaction manager, operation log, YAML parser) - Implement command router for subcommand dispatch and backward compatibility - Implement config loader with multi-source hierarchy support - Implement config merger for combining configurations - Implement interaction manager for user prompts and confirmations - Implement operation log for tracking and rollback capabilities - Implement YAML parser with roundtrip validation - Add doctor command for system diagnostics - Update build configuration and dependencies to support expanded test suite - Validates requirements 6.1, 7.1, 8.1, 9.1, 9.3, 10.2, 11.1, 12.1, 12.2, 12.5, 14.4, 15.1, 16.2, 17.1
…lows - Replace execSync with spawnSync for more reliable CLI output capture - Add spawnSync import and yaml dependency for config format testing - Add git helper import from repo-fixture utilities - Implement runCli function with environment variable support - Add 40+ new test cases covering init --format=yaml, validate --strict - Add plan --json and plan --push workflow tests - Add release --dry-run, release --json, and release --push scenarios - Add full release → rollback cycle test with state verification - Add remote repository verification for pushed branches and tags - Improve test coverage for JSON output validation and ANSI escape filtering - Extend timeout handling and error capture for complex workflows
…ty-based validation - Add E2E tests for PR-related CLI commands (release --no-pr, release --json --push, plan --json --push, doctor --json) - Add integration tests for PR workflow scenarios and multi-provider support - Add property-based tests for auth resolver, HTTP client, PR creator, reporter, schema validation, SCM registry, and URL parser - Add unit tests for auth resolver, Azure/Bitbucket/GitHub/GitLab providers, HTTP client, PR creator, and SCM registry - Implement auth resolver for token resolution across multiple authentication methods - Implement SCM provider abstraction with concrete implementations for Azure DevOps, Bitbucket, GitHub, and GitLab - Implement SCM registry for dynamic provider discovery and instantiation - Implement HTTP client with retry logic and error handling - Implement PR creator for cross-platform pull request creation - Implement URL parser for extracting repository metadata from various SCM URLs - Update existing modules (command router, config loader/validator, pipeline, reporter, etc.) to integrate PR creation workflow - Update version schema to include PR-related output fields and configuration options - Validates requirements 4.6, 7.4, 7.5, 13.3, 15.1, 15.2 with comprehensive test coverage and backward compatibility
… e2e, integration, and property-based tests - Add E2E CLI command tests for branching policy enforcement across default, trunk-based, and gitflow strategies - Add integration workflow tests validating branching strategy behavior with real git operations - Add property-based tests for branching artifacts, reporters, rollback, policy checker, and strategy components - Add unit tests for all branching strategy implementations (default, trunk-based, gitflow, hotfix, maintenance, release) - Add strategy registry and policy checker unit tests for strategy management and validation - Implement branching strategy abstraction with concrete strategy classes for multiple git workflows - Add template renderer for dynamic branch and tag naming based on strategy configuration - Update config loader and validator to support git.branching configuration section - Update artifact checker, reporter, and rollback to integrate with branching strategies - Update SCM provider to work with strategy-specific branch and tag patterns - Update version schema to include branching strategy configuration - Ensures comprehensive coverage of branching policy enforcement requirements (2.1, 10.5, 10.6, 10.7, 17.1, 17.3, 17.5, 17.6)
…tegies
- Add trunk-based strategy release tests: no branch creation, tag v{version}, stays on main
- Add git-flow strategy release tests: creates hotfix/{version} branch for patch releases
- Add JSON output validation tests for release command with strategy field
- Add error handling tests: invalid strategy config (exit code 1), wrong branch for strategy (exit code 3)
- Add dry-run mutation prevention tests to ensure no repo changes occur
- Add assertNoMutation helper import for validating repo state immutability
- Expand test coverage for release command across multiple branching strategies and error scenarios
- Add E2E tests for changelog command with stdout, JSON, and file output - Add integration tests for auto-bump workflow with version bumping scenarios - Add property-based tests for auto-bump pipeline, config, changelog, and commit analysis - Add unit tests for changelog command, generator, commit analyzer, parser, and printer - Update existing unit tests to align with new test structure and requirements - Implement changelog.command.ts and changelog.generator.ts modules - Implement commit.analyzer.ts, commit.parser.ts, and commit.printer.ts modules - Update command router, config loader/validator, and pipeline to support changelog workflow - Update version schema and utilities to handle auto-bump and changelog generation - Validates Requirements 5.1, 5.4, 7.1, 7.7, 7.8, 7.9, 12.1, 13.5, 14.1
- Add critical production-readiness test suite for auto-bump edge cases - Add tests for breaking change detection (feat! syntax and BREAKING CHANGE footer) - Add prerelease version tests with --preid flag - Add fallbackBump configuration tests for conventional commits - Add changelog file operations tests (creation, inclusion in commits) - Add changelog prepend tests to verify old content preservation - Add changelog format tests (plain text, markdown, JSON output) - Add helper function writeVersionJsonWithCC for config-based test setup - Expand coverage for edge cases in version bumping and changelog generation - Ensure production-readiness of auto-bump and changelog features
…ucture - Move source files from root to src/ directory with logical module organization (branching, cli, config, core, scm, utils, versioning) - Reorganize test files into __tests__/ directory maintaining parallel structure (unit, integration, properties, e2e) - Update all import paths across test and source files to reflect new directory structure - Add src/ and __tests__/ to .npmignore to exclude from published package - Update TypeScript configuration files to reference new paths - Add version.schema.json to src/config/ for centralized schema management - Rename property-based test files to use .property.test.ts suffix for clarity - Update build configuration to work with new directory layout
…st coverage - Add integration tests for lock workflow (acquire/release, dry-run, conflict, cleanup) - Add integration tests for observability workflow (tracing, logging, metrics) - Add property-based tests for actor resolver, audit entry, lock manager, reporter, structured logger, and token masking - Update unit tests for doctor, validate, config loader, executor, reporter, and rollback commands - Add action tracer module for distributed tracing across pipeline operations - Add actor resolver module for identifying and tracking operation initiators - Add lock manager module for concurrent operation synchronization and stale lock cleanup - Add structured logger module for consistent JSON-formatted logging with operation context - Update executor, pipeline, and reporter to integrate new observability and locking infrastructure - Update CLI commands and config validation to support new tracing and locking features - Validates requirements 6.1, 6.5, 7.1, 7.2, 9.1, 12.1, 12.2, 12.3 for observability and concurrency control
…on tests - Add 9 property-based tests for documentation consistency (CI examples, code examples, cross-references, document format, exit codes, platforms, semvers, strategies, subcommands) - Add 9 new documentation files (branch-strategy-cookbook, changelog-format-guide, ci-examples, cli-reference, configuration-reference, failure-matrix, index, migration-guide, scm-provider-guide, setup-guide) - Update README with clearer quick start, command table, features list, and links to detailed documentation - Update .gitignore to exclude sandbox directory - Ensure documentation stays synchronized with code through property-based validation
…coverage - Add exit-codes.test.ts with deterministic and best-effort tests for exit codes 5, 6, 7, and 9 - Add flags-pr-modes.test.ts covering PR mode flag combinations and validation - Add platforms-semver.test.ts for platform-specific semantic versioning scenarios - Add strategies.test.ts for branching strategy and workflow integration tests - Update repo-fixture.ts helper with enhanced fixture creation and cleanup utilities - Validates Requirements 1.1, 1.3, 2.1–2.6 across error paths and CLI workflows
- Replace custom build.js with esbuild.config.mjs for faster, more reliable bundling - Update build output directory from dist/ to out/dist/ for cleaner project structure - Add comprehensive build integrity tests (build.integrity.test.ts) to verify artifact validity, external dependency resolution, and JSON output contracts - Update .gitignore and .npmignore to reflect new build output location and exclude build configuration files - Add barrel exports (index.ts) across all source modules for cleaner imports and better tree-shaking - Update all e2e test CLI_PATH references to point to new out/dist/version.js location - Update TypeScript configuration for improved module resolution and test isolation - Ensure published npm package excludes source, tests, and build configuration artifacts
- Update esbuild config to output CLI bundle as out/dist/index.js instead of version.js - Update package.json main entry point to reference out/dist/index.js - Update package.json bin reference to point to out/dist/index.js - Update package.json types reference to out/tsc/index.d.ts - Update version:next script to reference out/dist/index.js - Update all e2e test files to reference CLI_PATH as out/dist/index.js - Standardizes output naming convention across build and configuration files
- Update description to clarify tool purpose and core functionality - Add files field to specify package distribution contents - Replace version:next script with clean, build, typecheck, and lint scripts - Add granular test scripts for unit, integration, e2e, and property-based tests - Add test:ci script for continuous integration environments - Add prepublishOnly hook to ensure clean builds before publishing - Expand keywords to improve discoverability (semver, git, release, changelog, etc.) - Improve test command with --no-coverage and --forceExit flags for better CI/CD compatibility
- Add comprehensive E2E tests for npm pack workflow simulating user installation - Verify package structure includes built artifacts (out/dist/index.js, out/tsc/index.d.ts) - Validate shebang preservation in CLI binary after pack/unpack cycle - Confirm source and test files are excluded from package distribution - Test CLI functionality from extracted tarball against real repo fixtures - Verify all subcommands respond correctly when invoked from packed binary - Catch issues invisible to normal E2E tests: missing files, broken shebangs, unresolvable dependencies, corrupted bundles
- Extract CLI_PATH and PROJECT_ROOT constants into shared cli-path helper module - Add IS_PACKED flag to detect when running against npm-packed distribution - Conditionally skip build step in beforeAll hooks when IS_PACKED is true - Update all e2e test files to import shared constants instead of duplicating path logic - Add test-pack.sh script for testing against packed npm distribution - Update package.json with pack and test:pack npm scripts - Enables e2e tests to run against both development and production-packaged builds
- Add npm package version badge with link to npmjs.com - Add MIT license badge with link to LICENSE file - Add Node.js version requirement badge (>=18) - Add TypeScript strict mode badge - Add esbuild build tool badge - Improve project visibility and credibility with standardized badge styling
…tion - Add Operational Hardening Guide covering structured logging, operation IDs, actor metadata, action trace, and concurrency lock - Document new configuration fields: logLevel and lockTimeoutMs - Add P4 → P5 migration section explaining structured logging and audit log v2 changes - Add P5 → P6 migration section documenting source code reorganization into src/ with domain subdirectories - Update README with new features: structured JSON logging, concurrency lock, and action trace - Add comprehensive project structure diagram showing cli/, core/, config/, scm/, branching/, versioning/, and utils/ directories - Expand test structure documentation with mirrored domain organization - Update development commands to include typecheck and lint - Add Operational Hardening Guide link to documentation index - Remove version number from docs/index.md header for cleaner presentation
- Change project title from "versionings" to "Versionings — Semantic Release Platform for Git" - Improve discoverability and clarity of project purpose in documentation - Align with project metadata and branding standards
…ests - Add Express API example with health and user routes - Add React component library example with Button, Card, Modal components - Add NestJS microservice example with task management module - Add CLI tool example with count and greet commands - Add monorepo packages example with core and logger packages - Add Fastify service example with health and items plugins - Add Electron desktop app example with main and renderer processes - Add GraphQL server example with books datasource and resolvers - Add Next.js webapp example with pages and API routes - Add enterprise platform example with orders, products, and users domains - Add comprehensive conformance test suite validating structure, schemas, and coverage - Include CI/CD workflows for GitHub Actions, GitLab CI, Azure Pipelines, and Bitbucket Pipelines - Provide examples covering multiple platforms, strategies, and configuration formats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.0.0 — Enterprise-Grade Semantic Release Platform
Summary
This PR delivers the complete v1.0.0 release of versionings — transforming it from a basic version-bumping utility into a production-grade semantic release platform for Git repositories.
321 files changed · 52,286 insertions · 1,577 deletions · 1,998 tests passing across 115 test suites.
What Changed
Architecture Overhaul
The entire codebase has been restructured into a modular architecture under
src/with clear dependency boundaries:src/cli/— Command router with yargs, 7 subcommands (init, validate, plan, release, rollback, doctor, changelog)src/core/— Pipeline orchestration, executor, rollback manager, structured logger, lock manager, action tracer, actor resolversrc/config/— Multi-source config loading (version.json, .versioningsrc, package.json#versionings, env vars, CLI flags) with merge precedence and Ajv validationsrc/branching/— Strategy pattern with 6 strategies (default, trunk-based, git-flow, release-branch, hotfix, maintenance) and policy checkersrc/scm/— Provider abstraction with 6 SCM platforms (GitHub, GitHub Enterprise, GitLab, Bitbucket, Bitbucket Server, Azure DevOps) and full PR/MR automationsrc/versioning/— Conventional Commits parser, commit analyzer, auto-bump pipeline, changelog generatorBuild migrated from
tscto esbuild. Single CJS bundle output toout/dist/index.js.6 Branching Strategies
Each strategy implements the
Branching_Strategyinterface and is registered in the strategy registry:defaulttrunk-basedgit-flowrelease-branchhotfixmaintenancesupport/{major}.{minor}branchesPolicy checker validates branching rules at runtime (e.g., git-flow enforces releases from develop).
6 SCM Platforms with PR Automation
apiUrlapiUrlThree PR creation modes:
auto(API with URL fallback),api(API only),url(browser).Conventional Commits and Changelog
--semver=autoanalyzes commit history to determine bump levelsecurity,deps)fallbackBumpfor when no conventional commits are foundCHANGELOG.mdupdates on release withchangelog.filegroupTitles,excludeTypes,includeNonConventionalOperational Hardening
logLevelconfig, JSON lines to stderr, CI-friendly capturelockTimeoutMswith stale lock detectionCLI
7 subcommands with global flags:
initvalidateplanreleaserollbackdoctorchangelogGlobal flags:
--json,--ci,--strict,--print-config,--verbose,--yes,--non-interactive12 exit codes (0–11) with named constants, never magic numbers.
Configuration System
6 sources with merge precedence (highest wins):
VERSIONINGS_*)version.json.versioningsrc/.versioningsrc.json/.versioningsrc.yml/.versioningsrc.yamlpackage.json#versioningsConfig Provenance via
--print-configshows the source of every resolved value.Documentation (11 documents)
10 Real-World Examples
Complete standalone projects in
examples/demonstrating every combination of strategy, platform, and config format:--ci --json, non-interactive modeapiUrl, emergency releaseEach example includes:
package.json, versionings config, source code, CI config, and README.Test Suite
1,998 tests across 115 test suites, 4 test tiers:
src/structureIncludes conformance test suite validating all 10 examples (128 structural, schema, content, and coverage matrix tests).
Breaking Changes
dist/version.jstoout/dist/index.jssrc/to modular subdirectoriesversion.schema.jsonis now empty (validation handled by Ajv at runtime)conventionalCommits.enabledis nowtrueHow to Verify