feat: ability to start changelog build with different levels of api-processor version validation#87
Merged
Merged
Conversation
b41ex
requested changes
May 20, 2026
JayLim2
requested changes
May 21, 2026
JayLim2
approved these changes
May 22, 2026
b41ex
approved these changes
May 22, 2026
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.
Summary
apiProcessorVersionValidationLeveloption toBuilderRunOptionsto support relaxed version validation during data migrationmajormode, changelog builds are allowed when the major version matches, even if minor/patch differs — this unblocks users from publishing while migration is in progresspreviousVersionBuilderVersion/currentVersionBuilderVersionfields of the build result, so the backend can identify and rebuild them after migration completesChanges
Types
src/types/internal/builder.ts: AddedVersionValidationLeveltype ('major' | 'strict') andapiProcessorVersionValidationLeveltoBuilderRunOptionssrc/types/internal/compare.ts: AddedapiProcessorVersionValidationLeveltoCompareContext, newBuilderVersionInfoandCompareResulttypessrc/types/external/config.ts,src/types/package/config.ts: AddedpreviousVersionBuilderVersionandcurrentVersionBuilderVersionfields toBuildConfigandPackageConfigValidation logic (
src/validators.ts)validateApiProcessorVersion: AddedvalidationLevelparameter (defaultstrict). Inmajormode: compares only major version part, skips validation if either version is unparseablegetMismatchedBuilderVersion: New helper — returns the builder version from resolved version data only if it differs from the current api-processor versionapplyBuilderVersionInfo: New helper — copiespreviousVersionBuilderVersion/currentVersionBuilderVersionfrom comparison result to build config (for persistence ininfo.json)Comparison pipeline
src/components/compare/compare.operations.ts:compareVersionsOperationsnow returnsBuilderVersionInfoalongside the comparison. PassesvalidationLevelfrom context tovalidateApiProcessorVersion. UsesgetMismatchedBuilderVersionto detect version mismatchessrc/components/compare/compare.ts:compareVersionsreturnsCompareResult(comparisons + builder version info). Builder version info from ref-packages is discarded (only relevant at root level)Strategy integration
src/builder.ts,src/strategies/build.strategy.ts,src/strategies/changelog.strategy.ts,src/strategies/prefix-groups-changelog.strategy.ts: All call sites updated to destructureCompareResultand apply builder version info to config viaapplyBuilderVersionInfoTest infrastructure
test/helpers/registry/local.ts: AddedVersionOverrideRegistry— extendsLocalRegistryto overrideapiProcessorVersionper version inversionResolvertest/helpers/utils.ts: AddedbuildChangelogWithVersionOverrideshelper for e2e tests with configurable validation level and spec contentTests (
test/validators.test.ts)validateApiProcessorVersion: parametrized matrix covering strict/major modes, exact matches, minor/patch/major mismatches, prerelease suffixes, unparseable versions, null versions, error prefix formattingPackageVersionBuilder: strict pass/fail, major pass/fail for both previous and current version sidespreviousVersionBuilderVersionandcurrentVersionBuilderVersionare set/unset correctly in changelog build results