Salesforce CLI v43 Release Notes

Here are the new and changed features in recent updates of the Salesforce CLI and the salesforcedx plug-in.

Run 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 salesforcedx plug-in.

Run sfdx update to update both the CLI and the salesforcedx plug-in to the latest available version.

Note: As a beta feature, Second-Generation Packaging is a preview and isn't part of the "Services" under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn't guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It's offered as is and isn't supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for second-generation packaging in the Packaging 2 Beta group in the Trailblazer Community.

Click here for the v42 release notes.

43.16.0 (September 13, 2018)

43.15.0 (September 6, 2018)

43.14.0 (August 30, 2018)

43.13.0 (August 23, 2018)

43.12.0 (August 16, 2018)

43.11.0 (August 9, 2018)

43.10.0 (August 2, 2018)

43.9.0 (July 26, 2018)

43.8.0 (July 19, 2018)

43.7.0 (July 12, 2018)

"dependencies": [
   {
       "package": "0Hoxxx",
       "versionNumber": "1.1.0.3"
   }
],

43.6.0 (July 5, 2018)

43.5.1 (July 2, 2018)

43.5.0 (June 28, 2018)

43.4.0 (June 21, 2018)

43.3.0 (June 14, 2018)

43.2.9 (June 9, 2018)

Welcome to the first release of the Salesforce CLI v43 in Summer '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.

New Commands

plugins:generate Use the Salesforce Plugin Generator to build plug-ins for the Salesforce CLI. The generated sfdx plug-in and command are built on top of the oclif cli framework. See https://github.com/forcedotcom/sfdx-plugin-generate for more information.

force:apex:log:get Use this command to fetch the specified debug log or given number of most recent logs from your default scratch org.

force:apex:log:tail Use this command to turn on debug logging and output logs in the terminal. You can also pipe debug logs to a file.

Changed Commands

force:package Commands Replace force:package2 Commands We are streamlining all second-generation packaging commands and adding several new parameters that make creating packages easier and more intuitive. You can continue to use the force:package2 commands until they are deprecated in Winter '19. The force:package1 commands, which you use to create first-generation package versions, are unchanged. See Salesforce Release Notes for details.

force:source Commands Source status tracking is now available for Lightning Experience themes.

New Parameters

force:package:install -r | --noprompt This flag allows Remote Site Settings and Content Security Policy websites to send or receive data without confirmation.

Changed Parameters

force:apex:test:run -c | --codecoverage To improve performance, we calculate and retrieve code coverage results for force:apex:test:run only when you supply the -c | --codecoverage flag.

sfdx force:apex:test:run --resultsformat human The output now includes 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.

force:package2:version:create --buildinstance We removed this parameter because it is for internal use only and was unintentionally exposed.

Installation and Configuration Changes

v6 Linux Tarballs' Root Directories Are Versioned

The new v6 Linux installer tarballs' root directories are versioned and change with every release. To keep the directory name consistent (especially important for CI use cases):

  1. Get one of these tarballs:
    wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
    
    wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-386.tar.xz
    
  2. Create an sfdx folder:
    mkdir sfdx
    
  3. Extract the files for your tarball version:
    tar xJf sfdx-linux-amd64.tar.xz -C sfdx --strip-components
    
    tar xJf sfdx-linux-386.tar.xz -C sfdx --strip-components 1
    
  4. Run ./sfdx/install.

Windows 10 Subsystem for Linux

We no longer support installing the Salesforce CLI on the Windows 10 Subsystem for Linux. The Salesforce CLI works best within the native Windows command prompt (cmd.exe) and the Microsoft Powershell.

Windows Installer Updates

When you install the Salesforce CLI on Windows, we no longer install Git. Salesforce CLI no longer depends on Git.

Salesforce Plugin Generator (Beta)

We released the Salesforce Plugin Generator (Beta) that you can use to build plug-ins for the Salesforce CLI. The generated sfdx plug-in and command are built on top of the Open CLI Framework. See Salesforce Plugin Generator for more information.

Plug-in Development Support

To support plug-in development, we added a plugins section to the sfdx-project.json file. In this section, add configuration values and settings for your plug-in.

"plugins": {
  "yourPluginName": {
    "timeOutValue": "2"
  }

Here's an example of the code you use to access the properties:

import { Project, SfdxProjectJson } from '@salesforce/core'

const project: Project = await Project.resolve(process.cwd());
const sfdxProject: SfdxProjectJson = await project.retrieveSfdxProjectJson();
const pluginSettings: any = sfdxProject.get('plugins');
this.ux.log('timeOutValue: ${pluginSettings.yourPluginName.timeOutValue}');

Improved Connection Types for Generated Plug-ins

For existing generated plug-ins, if you decide to update to the latest @salesforce/command library, update your tsconfig.json file.

  1. Run this command in your generated plug-in:
    yarn add --dev @types/jsforce
    
  2. Remove these lines from tsconfig.json:
    "baseUrl": "./",
      "paths" : {
    "*" : ["./node_modules/@salesforce/core/typings/*"]
    }