From 22da58bee70226514b94c2da3607c00510051fda Mon Sep 17 00:00:00 2001 From: soridalac Date: Tue, 3 Nov 2026 11:25:11 -0800 Subject: [PATCH 1/2] chore: update OSS compliance files --- CODEOWNERS | 2 ++ CONTRIBUTING.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 25 ++++---------------- 3 files changed, 68 insertions(+), 20 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CODEOWNERS b/CODEOWNERS index 0ded67ad..37df2687 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,3 +3,5 @@ # Comment line immediately above ownership line is reserved for related other information. Please be careful while editing. #ECCN:Open Source +#GUSINFO:Platform CLI,Platform CLI +* @salesforcecli/cli diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..9197bb74 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +## Contributing + +1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md). +1. Please create a new issue [here](https://github.com/forcedotcom/cli/issues) before starting any work so that we can also offer suggestions or let you know if there is already an effort in progress. +1. Fork this repository (external contributors) or branch off `main` (committers). +1. [Build the plugin locally](README.md#build). +1. Create a topic branch based on `main`. This is recommended but not required if contributing using a fork. +1. Edit the code in your fork/branch. +1. 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 associated tests. +1. Sign the Salesforce [CLA](#cla). +1. The CLI team will review your pull request and provide feedback. +1. Once merged, a new release of `@salesforce/plugin-user` will be published to [npm](https://www.npmjs.com/package/@salesforce/plugin-user). + +### One-Time Setup + +1. Install [Node.js](https://nodejs.org). Use the version specified in the `engines` field of package.json. If you work with multiple Node versions, consider using [nvm](https://github.com/nvm-sh/nvm). +1. Install [Yarn v1](https://classic.yarnpkg.com): `npm install --global yarn` +1. Configure [git commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). + +### CLA + +External contributors are required to sign a Contributor License +Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. + +## Branches + +- We work in branches off of `main`. +- Our release (aka. _production_) branch is `main`. +- Our work happens in _topic_ branches (feature and/or bug-fix). + - Feature as well as bug-fix branches are based on `main` + - Branches _should_ be kept up-to-date using `rebase` + +## Pull Requests + +- Develop features and bug fixes in _topic_ branches off main, or forks. +- _Topic_ branches can live in forks (external contributors) or within this repository (internal contributors). + - When creating _topic_ branches in this repository please prefix with `/`. For example: `mb/refactor-tests`. +- Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) to drive semver versioning. Examples: + - `chore: my chore message` --> No release + - `fix: my fix message` --> Patch release + - `feat: my feat message` --> Minor release +- PRs will be reviewed and merged by the CLI team. + +## Testing + +All changes must have associated tests. This plugin uses a combination of unit testing and NUTs (non-unit tests). + +- Run unit tests with `yarn test`. Tests use the mocha framework and are located in the `test` directory with the naming pattern `.test.ts`. +- Run integration tests (NUTs) with `yarn test:nuts`. NUTs use the [cli-plugins-testkit](https://github.com/salesforcecli/cli-plugins-testkit) framework and run against the default devhub in your environment. + +## Debugging + +Refer to the [Salesforce CLI Plugin Developer Guide](https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/debug-plugin.html) for debugging tips. + +## Useful Yarn Commands + +- `yarn build` — Compile the TypeScript source +- `yarn build --watch` — Recompile automatically on file changes +- `yarn test` — Run unit tests +- `yarn test:nuts` — Run integration tests (NUTs) +- `yarn lint` — Run the linter diff --git a/README.md b/README.md index 746db5c9..719d63ae 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ We always recommend using the latest version of these commands bundled with the ## Install ```bash -sfdx plugins:install user@x.y.z +sfdx plugins install user@x.y.z ``` ## Issues @@ -20,22 +20,7 @@ Please report any issues at https://github.com/forcedotcom/cli/issues ## Contributing -1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md) -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](#build) -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](#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. - -### CLA - -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. +If you're interested in contributing, take a look at the [CONTRIBUTING](CONTRIBUTING.md) guide. ### Build @@ -50,18 +35,18 @@ yarn install yarn build ``` -To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file. +To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file. ```bash # Run using local run file. -./bin/dev user +./bin/dev.js user ``` 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. ```bash # Link your plugin to the sfdx cli -sfdx plugins:link . +sfdx plugins link . # To verify sfdx plugins ``` From bad7833406c9f95093857bbadf6212e3a9511894 Mon Sep 17 00:00:00 2001 From: soridalac Date: Tue, 3 Nov 2026 12:21:13 -0800 Subject: [PATCH 2/2] chore: fix README sfdx references, sfdxcli link, and yarn install Co-Authored-By: Claude Opus 4.6 --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 719d63ae..4799475f 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ Commands to interact with Users and Permission Sets in a scratch org -This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm). +This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/salesforcecli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm). We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed. ## Install ```bash -sfdx plugins install user@x.y.z +sf plugins install user@x.y.z ``` ## Issues @@ -31,8 +31,7 @@ To build the plugin locally, make sure to have yarn installed and run the follow git clone git@github.com:salesforcecli/plugin-user # Install the dependencies and compile -yarn install -yarn build +yarn && yarn build ``` To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file. @@ -45,10 +44,10 @@ To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file. 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. ```bash -# Link your plugin to the sfdx cli -sfdx plugins link . +# Link your plugin to the sf cli +sf plugins link . # To verify -sfdx plugins +sf plugins ``` ### Test