feat: accept 15-char package version IDs in bundle definition file#1177
Open
sf-haulakh wants to merge 3 commits intot/packaging-distribution/bundle-enhancementfrom
Open
Conversation
This change enables the sf package bundle version create command to accept both 15-character and 18-character Salesforce package version IDs (04t IDs) in the bundle definition file. Previously, only 18-character IDs were supported, and providing a 15-character ID would result in an error: "No package version found with alias: 04t5f000000WM9y" Changes: - Added convertTo18CharId() function to convert 15-char IDs to 18-char using the standard Salesforce ID checksum algorithm - Added normalizePackageVersionIds() function to recursively search and normalize all packageVersion fields in the definition JSON - Modified the run() method to read, normalize, and create a temporary definition file when 15-char IDs are detected - Proper cleanup of temporary files in finally block - Added comprehensive unit tests for ID normalization scenarios Also added CLAUDE.md with codebase documentation for future AI instances. Fixes: W-21383062 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…enhancement' into t/packaging-distribution/accept-15char-apvid
Move node:fs/path/os imports before third-party imports, extract normalizeDefinitionFile, cleanupTempFile, and handleResult into private methods to reduce run() complexity, and capture file content inside test stubs before temp file cleanup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
finallyblockTest plan
packageVersionfields are handled recursively04tIDs🤖 Generated with Claude Code