Skip to content

feat: unlocked package build#6

Merged
nkskaare merged 41 commits intomainfrom
feat-package-build
Jan 25, 2026
Merged

feat: unlocked package build#6
nkskaare merged 41 commits intomainfrom
feat-package-build

Conversation

@nkskaare
Copy link
Copy Markdown
Contributor

Summary

This pull request introduces several significant enhancements and refactors across the codebase, focusing on improved Apex analysis capabilities, CLI command additions, and project configuration updates. The most notable changes include the addition of a robust Apex AST parsing and classification system, the introduction of a new CLI build command, updates to dependencies and project structure, and the implementation of a flexible analyzer registry for package analysis.

Apex Analysis and Parsing Enhancements:

  • Added a new ApexAstSerializer class for obtaining and parsing Apex ASTs, supporting both remote server and local binary execution. This enables robust and type-safe Apex code analysis.
  • Introduced the ApexParser class, which leverages the serializer to classify Apex files as classes, interfaces, triggers, or enums, and detect test classes. Includes bulk classification support.
  • Implemented an ApexTypeAnalyzer as a package analyzer, using the parser to categorize Apex classes, triggers, and test classes within a package.
  • Added an ApexService utility for categorizing Apex classes and tests from source components.

CLI and Project Configuration Updates:

  • Added a new CLI command build in build.ts for building packages, with support for various flags and integration with the core package builder.
  • Updated the project.ts command to use the new ProjectService for project definition loading, improving maintainability and consistency. [1] [2]
  • Improved the version bump command to use a new bump method, clarifying version management logic.

Analyzer Registry & Core Library Improvements:

  • Added an extensible AnalyzerRegistry system with a decorator for registering and retrieving package analyzers, promoting modular analysis.
  • Refactored core exports for clarity and to avoid naming conflicts, and updated the main entry point for improved project instantiation.

Project and Dependency Management:

  • Updated the project name and description in package.json to "sfpm" and "Salesforce Package Manager". Upgraded the pnpm version requirement. [1] [2]
  • Added and updated several dependencies and devDependencies in the core package, including Salesforce libraries, vitest, and Prettier plugins for Apex. [1] [2]
  • Added a basic README for the core package.

Development and Editor Configuration:

  • Added a .prettierrc file for consistent code formatting and a VSCode settings file for SOQL syntax highlighting. [1] [2]

Apex Analysis and Parsing:

  • Added ApexAstSerializer and ApexParser classes for robust and type-safe Apex code classification, including support for server and binary AST retrieval, and bulk file analysis. [1] [2]
  • Implemented ApexTypeAnalyzer for categorizing Apex classes, triggers, and tests in packages, and registered it via the new analyzer registry system. [1] [2]
  • Introduced ApexService for categorizing Apex classes and tests from source components.

CLI and Project Configuration:

  • Added a new build CLI command for building packages with various options, and updated project command logic to use the new ProjectService. [1] [2] [3]
  • Improved version bumping logic to use a new bump method in the version manager.

Core Library and Analyzer Registry:

  • Introduced an extensible AnalyzerRegistry and decorator for registering package analyzers, and refactored core exports for clarity. [1] [2]

Project and Dependency Management:

  • Updated project metadata in package.json and upgraded dependencies, including Salesforce libraries and dev tooling. [1] [2] [3] [4]
  • Added a README for the core package.

Development and Editor Configuration:

  • Added Prettier configuration and VSCode settings for improved formatting and SOQL syntax highlighting. [1] [2]

@nkskaare nkskaare merged commit fcc81bf into main Jan 25, 2026
0 of 6 checks passed
@nkskaare nkskaare deleted the feat-package-build branch January 25, 2026 20:03
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