Releases: dangmai/prettier-plugin-apex
v2.2.0
🚀 Minor version bump, major performance enhancement!
Prettier Apex 2.2.0 changes the default parser to native
for many platforms:
- Windows x64
- Linux x64
- macOS ARM64
- macOS x64
This switch brings major performance enhancement to the default setup (without further configuration). Furthermore, if you are using these platforms, you are no longer required to have a Java Runtime Engine installed. For other platforms, you still need JRE installed, because the native
parser will fallback to the old parser for those platforms.
If you have been using the native
parser (available since v2.1.4
), it is recommended that you remove the apexStandaloneParser
field from your Prettier config.
This version is backwards compatible with earlier versions' configurations.
If you are using VSCode, it is important to restart VSCode after you upgrade Prettier Apex to this version.
Full changelogs
- Native parsing is now the default parser for supported platforms, with fallback to Java parser for unsupported platforms.
- Support Apex AST Serializer native executable for macOS x64.
- Improve native executable performance by utilizing Profile-Guided Optimization.
- Improve parsing performance by directly serializing object references.
- Improve parsing performance by using one-pass Depth-First Search to enrich AST.
Breaking Changes
- Apex AST Serializer no longer supports outputting XML, or object references.
This reduces code paths that are not absolutely necessary for the operation of Prettier Apex,
leading to performance increases and binary size reduction.
This should not affect end users' experience with Prettier Apex,
but if you are using Apex AST Serializer directly,
the-i
and-f
flags have been removed. - The
install-apex-executables
command is removed,
since native executables are now distributed as optional dependencies to the main package.
v2.1.5
- Fix Windows application not being able to get output from parser when
DEBUG
environment variable is set (issue). - Improving parsing performance - thanks to @lukecotter for their contribution!
v2.1.4
If you are upgrading from Prettier Apex v1, please follow this guide to upgrade to v2.
Internal Changes
- Fix
install-apex-executables
script hanging unnecessarily (issue). - Prettier Apex should now throw an error with details when it fails to call Apex AST Serializer executable.
- NPM package tests are now run on multiple platforms to catch any platform-dependent regressions.
- Use relative path to binary files to avoid issues with special characters in Windows path.
v2.1.3
If you are upgrading from Prettier Apex v1, please follow this guide to upgrade to v2.
- Spawn Apex AST Serializer server process with shell turned on (missed in
v2.1.2
).
Thanks to @mwcm for their contribution!
v2.1.2
If you are upgrading from Prettier Apex v1, please follow this guide to upgrade to v2.
- Spawn Apex AST Serializer process with shell turned on. This is a workaround for new version of NodeJS that disallows calling
.bat
file without this option. See this blog post for more details (issue).
Thanks to @mwcm for their contribution!
Internal Changes
- Native executable location has been moved to be under the
vendor
directory.
This should not affect any usage of the library,
unless you are referencing this location from a custom script. - Our internal testing structure has changed.
Please follow CONTRIBUTING.md to set up your environment again.
v2.1.1
If you are upgrading from Prettier Apex v1, please follow this guide to upgrade to v2.
- Fix native executable not being generated with enough reflection metadata (issue).
v2.1.0
If you are upgrading from Prettier Apex v1, please follow this guide to upgrade to v2.
- Add support for Null Coalescing Expression (doc).
- Add experimental support for using native executables to speed up parsing Apex code. Follow the documentation to try it out, and please report any issues you encounter.
Internal Changes
- Use
pnpm
for internal dependency management instead ofyarn
. If you forked this repository before this change, make sure to follow CONTRIBUTING.md to set up your environment again. - This repository is now a monorepo (managed by nx), containing all packages related to this project. This change should not affect normal usage of the library, but if you are maintaining a fork of this library, please make sure to update your workflow accordingly.
- Our new Playground has been published, allowing users to try out Prettier Apex without installing anything.
- 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.1.0-rc.7
Pre-release version for v2.1.0
to test out native executable distribution
v2.0.1
v2.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.