Skip to content

feat: lifecycle hooks#16

Merged
nkskaare merged 15 commits intomainfrom
feat-install-hooks
Apr 1, 2026
Merged

feat: lifecycle hooks#16
nkskaare merged 15 commits intomainfrom
feat-install-hooks

Conversation

@nkskaare
Copy link
Copy Markdown
Contributor

@nkskaare nkskaare commented Apr 1, 2026

This pull request introduces lifecycle hook support and significant improvements to version bumping and Git integration across the CLI and core packages. The changes enable per-package lifecycle hooks via a new LifecycleEngine, improve the project:version:bump command to support org and Git-based diff strategies, and enhance the GitService with new utilities and cleaner initialization. Additionally, new exports and a utility for resolving hook configuration are added to the core package.

Lifecycle hook integration:

  • Added LifecycleEngine support to the build, install, and validate-pr commands, allowing hooks from sfpmConfig.hooks to be registered and executed during these operations. [1] [2] [3] [4] [5] [6] [7]

Version bump command enhancements:

  • Refactored project:version:bump to support new diff strategies: Git-based (using a new GitService.initialize) and org-based (fetches installed package versions from a target org), improving flexibility and accuracy of version updates. Improved error handling, output formatting, and code organization. [1] [2] [3] [4] [5]

Core utilities and exports:

  • Added a new utility resolveHookConfig (with type ResolvedHookConfig) and isHookEnabled for normalizing and checking per-package lifecycle hook configuration, and exported them from the core index. Also exported new org-related types. [1] [2] [3]
  • Exported lifecycle stages and related types for broader use.

GitService improvements:

  • Refactored GitService for cleaner imports, added a getChangedPackagePaths method to detect changed packages between refs, and improved temporary repository creation and initialization logic. [1] [2] [3] [4] [5]

Lifecycle hook integration

  • Added LifecycleEngine wiring and hook registration to build, install, and validate-pr commands, enabling execution of lifecycle hooks from sfpmConfig.hooks. [1] [2] [3] [4] [5] [6] [7]

Version bump command enhancements

  • Refactored project:version:bump to support org-based and Git-based diff strategies, improved error handling, and enhanced output formatting for updated and dependent packages. [1] [2] [3] [4] [5]

Core utilities and exports

  • Introduced resolveHookConfig, isHookEnabled, and ResolvedHookConfig for per-package lifecycle hook configuration, and exported them along with new org types and lifecycle stage types. [1] [2] [3]

GitService improvements

  • Refactored GitService for cleaner structure, added getChangedPackagePaths for package diffing, and improved temporary repo handling and initialization. [1] [2] [3] [4] [5]

nkskaare added 15 commits March 18, 2026 11:16
…set plugins

- Implement comprehensive tests for the picklist plugin.
- Create tests for the script plugin
- Add tests for the standard value set plugin
@nkskaare nkskaare merged commit f26e1bf into main Apr 1, 2026
0 of 6 checks passed
@nkskaare nkskaare deleted the feat-install-hooks branch April 1, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant