Releases: IlyaMatsuev/prettier-plugin-apex
Releases · IlyaMatsuev/prettier-plugin-apex
v3.0.0
Please follow this guide to upgrade Prettier Apex to this new major version.
Dependency Changes
- Support Prettier v3 (issue). You cannot use this version with Prettier v2, please plan your upgrade accordingly.
- Drop support for NodeJS < 18.11.0.
Internal Changes
- Prettier Apex is now distributed as an ECMAScript Module. This shouldn't affect normal usage of the library, but if you are importing code from Prettier Apex you may need to change your code to adapt.
- Allow user to customize the secret used to shut down the parsing server.
- Allow user to specify the protocol (HTTP/HTTPS) that the parsing server uses.
v2.3.0
v2.2.0
Formatting Changes
- Add a new option
apexForceCurly
that allows to force curly brackets for if-else and loop blocks issue. - Enhance the
apexFormatAnnotations
option by merging it with theapexAnnotationsArgsSpacing
option. TheapexAnnotationsArgsSpacing
option is not available separately anymore. IfapexFormatAnnotation
option is enabled it would also format annotation arguments to lower came case issue. - Make the
apexFormatStandardTypes
option less powerful, removing the ability to correct chained methods calls. Now, the option will only work for types in declarations. This was made to increase reliability and make the output more predictable since it was possible that the variable name would be misinterpreted and printed uppercase, for example. - Allow an extra line break in the beginning of the class/interface declaration issue.
- Change the formatting behaviour for
apexFormatInlineComments
. It's now a choice option. Check out how it can be used in the changelog examples issue.
v2.1.1
Internal Changes
- Fix the issue with the package installation that was caused by
husky
.
2.1.0
Internal Changes
start-apex-server
takes optional-c
flag, which will be passed on toapex-ast-serializer
as a comma-delimited list of allowed origins that will be added to the CORS headers returned by the parsing server.start-apex-server
pipes internal logs to console, so that errors can be caught more quickly by users.
Formatting Changes
- Fix an issue with the
apexSortModifiers
option which removes a method modifier if there is an own-line comment between annotation and method (issue). - Fix an issue with the
apexExplicitAccessModifier
option when all trigger variables are treated as fields, adding non neededprivate
keyword (issue). - Fix an issue with the
apexExplicitAccessModifier
option when thewebservice
method gets an access modifier (issue). - Fix an issue with the
apexExplicitAccessModifier
option when the method parameters getprivate
modifier (issue). - Update the
apexFormatAnnotations
option to convert thetestmethod
method modifier to the@IsTest
annotation (issue). - Change the formatting of
webservice
andtestmethod
modifiers to be always printed in lowercase instead ofwebService
andtestMethod
.