Here are the new and changed features in recent updates of the Salesforce CLI and the
sfdx version to display the version of the Salesforce CLI installed on your computer. Run
sfdx plugins --core to display the version of the installed
sfdx update to update both the CLI and the
salesforcedx plug-in to the latest available version.
Click here for the v41 release notes.
force:apex:log:getcommand to fetch the specified log or given number of most recent logs from your default scratch org.
force:apex:log:tailcommand to turn on debug logging and output logs in the terminal. You can also pipe debug logs to a file.
force:user:password:generateto specify the required org preference.
force:package2:version:create. We unintentionally exposed this internal parameter.
force:source:push, both the folder and its corresponding metadata file (
-meta.xml) are deleted.
force:apex:log:getnow properly returns the debug log.
force:org:openwith an access token.
sfdx force:apex:test:run --resultsformat humanincludes a new section:
=== Failures. This section includes stack traces for failed tests. In Salesforce Extensions for VS Code, these stack traces are active links to lines of your code.
--waitparameter, but previously this option wasn't displayed in the command's
--helpoutput. The parameter now shows up in the help.
force:apex:test:runcommand times out.
.forceignorefile is now respected consistently. We received a report that Windows users were having issues with this file in the Trailblazer Community.
Path must be a stringerrors, even when your project's filepaths contain forward slashes.
@sign from appearing in the
sfdx force:auth:web:login -i ...and specified a
Cannot start the OAuth redirect server on port Error. This issue was caused by a capitalization mis-match in our code. In your
sfdx-project.jsonfile, the correct capitalization—
oauthLocalPort—is now respected.
force:apex:test:runfrom honoring the
--synchronousflag when you provided a
--testsparameter. You can now use these parameters together to synchronously run individual Apex test methods from a single class.
.forceignorefile referenced all files in a subdirectory using
**for some metadata types. Previously, including these references in your
.forceignorefile caused errors such as
Unable to load Lightning Component Source for js://c.hello_world: Invalid suffix: test.and
In field: tab - no CustomTab named hello_world was found.
Welcome to the first release of the Salesforce CLI v42 in Spring ’18. We have several new commands and parameters, as well as some changes to existing commands and parameters. Read all about it in the Salesforce Release Notes. Here's what's changed.
Creates skeleton Apex trigger source files.
Logs you out of orgs that you previously authorized.
Updates a second-generation package.
Generates a sample
.forceignore file in your new project.
Runs individual methods of Apex test classes.
Runs tests from a single Apex class synchronously.
Executes with Tooling API.
The instance where the package version is created—for example, NA50.
Creates the package with no namespace.
No prompt to confirm setting the package version as released.
--perfloglevel (no short name)
Gets data on API performance metrics from the server.
Changed from being optional to required.
The salesforcedx plug-in is bundled with the CLI.
When you install the CLI, you also get the plug-in. To check the version of the installed core salesforcedx plug-in, use the --core parameter:
sfdx plugins --core
SFDX_DISABLE_ENCRYPTION environment variable is no longer supported.
The variable was deprecated in the previous release.