Salesforce CLI: New and Changed Commands
These commands were added in a weekly patch of CLI v48.
We introduced three new commands to offer you Lightning Web Components test functionality.
- Creates a Lightning Web Components test with boilerplate code inside.
- Invokes Lightning Web Components Jest unit tests.
- Installs Jest unit testings tools for Lightning Web Components.
We introduced a new topic (cmdt) and five new commands in this topic for managing custom metadata types.
- Creates a custom metadata type in the current project.
- Generates a custom metadata field based on the provided field type.
- Generates a custom metadata type and all its records for the provided sObject.
- Creates a record for a given custom metadata type in the current project.
- Creates custom metadata type records from a comma-separated values (CSV) file.
This command was changed in a weekly patch of CLI v48.
- We added a package.json file to the standard and Analytics Salesforce DX templates. To create these templates, run force:project:create --template=standard or force:project:create --template=analytics. Use the package.json file to work with lightning web components.
These commands, which were previously marked as deprecated, were removed from salesforcedx v49. Use sfdx commands instead, which produces similar output.
This parameter was added to a weekly patch of CLI v48.
- force:org:list --skipconnectionstatus
- Removes the Connected Status column from the org list output to improve performance of the command.
This parameter was added to the CLI pre-release v49.
- force:package:create --orgdependent (beta)
- For unlocked packages only, allows the package to depend on unpackaged metadata in the installation org.
JSON Output for All Commands
JSON output for all commands is now sent to stdout by default. This behavior is equivalent to setting the SFDX_JSON_TO_STDOUT environment variable to true. If you currently rely on parsing errors from stderr when using the --json parameter, either update your tools and scripts to instead use stdout or set SFDX_JSON_TO_STDOUT to false. CLI commands usually send more warnings and errors to stderr even when you set --json.