Skip to content

feat(WOR-TSK-194): implement bumpSnapshot NAPI function - #105

Merged
miguelramos merged 1 commit into
mainfrom
feat/WOR-TSK-194-BUMP-SBAPSHOT
Dec 12, 2025
Merged

feat(WOR-TSK-194): implement bumpSnapshot NAPI function#105
miguelramos merged 1 commit into
mainfrom
feat/WOR-TSK-194-BUMP-SBAPSHOT

Conversation

@miguelramos

Copy link
Copy Markdown
Member
  • Add bumpSnapshot function for generating temporary snapshot versions
  • Support format template with variables: {version}, {branch}, {short_commit}, {commit}, {timestamp}
  • Validate snapshot format contains at least one valid variable
  • Snapshots do NOT consume/archive changesets (no_archive=true, no_changelog=true)
  • Return packages with originalVersion and snapshotVersion

Implementation details:

  • convert_to_napi_snapshot: Convert CLI response to NAPI types
  • parse_snapshot_response: Parse JSON from CLI to BumpSnapshotData
  • validate_snapshot_params: Validate root path and snapshot format
  • convert_snapshot_params_to_args: Convert NAPI params to CLI args
  • DEFAULT_SNAPSHOT_FORMAT constant: {version}-snapshot.{short_commit}

Tests:

  • Add 50 comprehensive tests for bumpSnapshot
  • shared_buffer_tests (6 tests)
  • parse_response_tests (10 tests)
  • conversion_tests (8 tests)
  • validation_tests (17 tests)
  • bump_types_tests (9 existing tests)

Node.js bindings:

  • Regenerate bindings with build-binding:release
  • Update index.ts exports with bumpSnapshot function
  • Update TypeScript type definitions

Story 5.4 complete - all 746 tests passing, 0 clippy warnings

- Add bumpSnapshot function for generating temporary snapshot versions
- Support format template with variables: {version}, {branch}, {short_commit}, {commit}, {timestamp}
- Validate snapshot format contains at least one valid variable
- Snapshots do NOT consume/archive changesets (no_archive=true, no_changelog=true)
- Return packages with originalVersion and snapshotVersion

Implementation details:
- convert_to_napi_snapshot: Convert CLI response to NAPI types
- parse_snapshot_response: Parse JSON from CLI to BumpSnapshotData
- validate_snapshot_params: Validate root path and snapshot format
- convert_snapshot_params_to_args: Convert NAPI params to CLI args
- DEFAULT_SNAPSHOT_FORMAT constant: {version}-snapshot.{short_commit}

Tests:
- Add 50 comprehensive tests for bumpSnapshot
- shared_buffer_tests (6 tests)
- parse_response_tests (10 tests)
- conversion_tests (8 tests)
- validation_tests (17 tests)
- bump_types_tests (9 existing tests)

Node.js bindings:
- Regenerate bindings with build-binding:release
- Update index.ts exports with bumpSnapshot function
- Update TypeScript type definitions

Story 5.4 complete - all 746 tests passing, 0 clippy warnings
@miguelramos
miguelramos force-pushed the feat/WOR-TSK-194-BUMP-SBAPSHOT branch from ab36797 to 6150a15 Compare December 12, 2025 12:30
@miguelramos
miguelramos merged commit 13093f0 into main Dec 12, 2025
31 checks passed
@miguelramos
miguelramos deleted the feat/WOR-TSK-194-BUMP-SBAPSHOT branch December 12, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ TYPE: Feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant