Plugin designed to handle all tasks related to signing, releasing, and testing npm packages.
Releases
The following steps are automated for package releases
$3
This plugin will not bump your package version for you. Use https://github.com/salesforcecli/github-workflows?tab=readme-ov-file#githubrelease and conventional commit tags to manage that.
It used to.
$3
After determining the next version, the plugin builds the package using yarn build. This means that you must have a build script included in the package.json
$3
If you pass the --sign (-s) flag into the release command, then the plugin will sign the package and verify that the signature exists in S3.
$3
Once the package has been built and signed it will be published to npm. The command will not exit until the new version is found on the npm registry.
Please report any issues at https://github.com/forcedotcom/cli/issues
Contributing
1. Please read our Code of Conduct 2. Create a new issue before starting your project so that we can keep track of what you are trying to add/fix. That way, we can also offer suggestions or let you know if there is already an effort in progress. 3. Fork this repository. 4. Build the plugin locally 5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork. 6. Edit the code in your fork. 7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests. 8. Sign CLA (see CLA below). 9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
$3
External contributors will be required to sign a Contributor's License Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
$3
To build the plugin locally, make sure to have yarn installed and run the following commands:
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
FLAGS -c, --current= Current CLI version to compare against. Defaults to the version on the CLI in the current directory. -p, --plugin=... List of plugins to check for breaking changes. -r, --previous= Previous CLI version to compare against. Defaults to the last published version.
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
FLAGS -d, --dry-run Run all checks, but do not merge PR --owner= (required) Github owner (org), example: salesforcecli --pull-number= (required) Github pull request number to merge --repo= (required) Github repo, example: sfdx-cli --verbose Show additional debug output
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
FLAGS -c, --release-channel= (required) the channel intended for this release, examples: nightly, latest-rc, latest, dev, beta, etc... -d, --start-from-npm-dist-tag= the npm dist-tag to start the release from, examples: nightly, latest-rc -g, --start-from-github-ref= a Github ref to start the release from, examples: main, 7.144.0, f476e8e --build-only only build the release, do not git add/commit/push --empty create an empty release PR for pushing changes to later (version will still be bumped) --[no-]jit bump the versions of the packages listed in the jitPlugins (just-in-time) section --label=... add one or more labels to the Github PR --only=... only bump the version of the packages passed in, uses latest if version is not provided --patch bump the release as a patch of an existing version, not a new minor version --[no-]pinned-deps bump the versions of the packages listed in the pinnedDependencies section --pr-base-branch= base branch to create the PR against; if not specified, the build determines the branch for you --[no-]resolutions bump the versions of packages listed in the resolutions section
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION builds a new release from a designated starting point and optionally creates PR in Github
builds a new release from a designated starting point and optionally creates PR in Github
(required) the cli to pull information for -m, --markdown format the output in markdown -s, --since= the version number of the previous release. Defaults to the latest-rc version on npm
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION pull all relevant information for writing release notes. Requires the GH_TOKEN to be set in the environment.
pull all relevant information for writing release notes. Requires the GH_TOKEN to be set in the environment.
EXAMPLES $ sfdx cli releasenotes --cli sf
$ sfdx cli releasenotes --cli sfdx
$ sfdx cli releasenotes --cli sf --since 1.0.0
$ sfdx cli releasenotes --cli sfdx --since 7.19.0
$ sfdx cli releasenotes --cli sf > changes.txt
$ sfdx cli releasenotes --cli sf --markdown > changes.md
FLAGS -d, --dryrun only show what would be removed from node_modules -t, --types remove all types (.d.ts) files from node_modules --verbose show all files paths being removed
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION remove unnecessary files from node_modules
... (required) the channel you want to inspect (for achives, latest and latest-rc are translated to stable and stable-rc. And vice-versa for npm) -d, --dependencies=... glob pattern of dependencies you want to see the version of -l, --locations=
... (required) the location you want to inspect -s, --salesforce show versions of salesforce owned dependencies --ignore-missing skip missing archives. Useful when supporting new architectures in oclif
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION inspect the CLI version across all install paths
FLAGS -d, --dryrun only show what would happen if you consolidated dependabot PRs -m, --max-version-bump=
(required) [default: minor] the maximum version bump you want to be included -o, --owner= the organization that the repository belongs to. This defaults to the owner specified in the package.json -r, --repo= the repository you want to consolidate PRs on. This defaults to the repository specified in the package.json -s, --skip-ci add [skip ci] to the merge commit title --merge-method=
[default: merge] merge method to use
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION automatically merge one green, mergeable PR up to the specified maximum bump type
automatically merge one green, mergeable PR up to the specified maximum bump type
FLAGS -o, --gus= (required) Username/alias of your GUS org connection --github-token= (required) [env: GITHUB_TOKEN] Github token--store this in the environment as GITHUB_TOKEN
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
FLAGS -d, --dryrun If true, will not make any changes to the package.json -t, --tag= [default: latest] The name of the tag you want, e.g. 'latest-rc', or 'latest'
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION lock a list of dependencies to a target tag or default to 'latest', place these entries in 'pinnedDependencies' entry in the package.json
lock a list of dependencies to a target tag or default to 'latest', place these entries in 'pinnedDependencies' entry in the package.json
FLAGS -a, --npmaccess= [default: public] access level to use when publishing to npm -d, --dryrun If true, will not commit changes to repo or push any tags -s, --sign If true, then the package will be signed and the signature will be uploaded to S3 -t, --npmtag= [default: latest] tag to use when publishing to npm --githubtag= given a github tag, release the version specified in the package.json as is. Useful when you've already done a release and only need npm publish features --[no-]install run yarn install and build on repository --prerelease= determine the next version as -.0 if version is not manually set --[no-]verify verify npm registry has new version after publish and digital signature
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
FLAGS -x, --extended Show extra columns. --columns= Only show provided columns (comma-separated). --csv Output is csv format. --filter= Filter property by partial string matching, ex: name=foo. --no-header Hide table header from output. --no-truncate Do not truncate output to fit screen. --output=
Output in a more machine friendly format. --sort= Property to sort by (prepend '-' for descending).
GLOBAL FLAGS --flags-dir= Import flag values from a directory. --json Format output as json.
DESCRIPTION list repositories owned and supported by Salesforce CLI For more information on the list of repositories, visit https://github.com/salesforcecli/status.
list repositories owned and supported by Salesforce CLI For more information on the list of repositories, visit https://github.com/salesforcecli/status.
EXAMPLES $ sfdx repositories --columns=url --filter='Name=sfdx-core' --no-header | xargs open