From b21442dbb0ac2af9c6b504f96ff8826dab9235f6 Mon Sep 17 00:00:00 2001 From: soridalac Date: Mon, 2 Nov 2026 16:07:00 -0800 Subject: [PATCH 1/7] chore: update OSS compliance files --- CODEOWNERS | 2 ++ CONTRIBUTING.md | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 25 ++++--------------------- 3 files changed, 44 insertions(+), 21 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..61685219 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,38 @@ +## Contributing + +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. 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-functions` will be published to [npm](https://www.npmjs.com/package/@salesforce/plugin-functions). + +### 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). Refer to the [Salesforce CLI Plugin Developer Guide](https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/test-plugin.html) for testing details. + +## 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. diff --git a/README.md b/README.md index ef000d85..0b4009b0 100644 --- a/README.md +++ b/README.md @@ -34,23 +34,7 @@ Now you should be able to run functions commands, e.g. `sf generate project`, `s # 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. Create commit messages that adhere to the [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/). -8. 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. -9. Sign CLA (see [CLA](#cla) below). -10. 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 @@ -64,15 +48,14 @@ git clone git@github.com:salesforcecli/plugin-functions cd plugin-functions # Install the dependencies and compile -yarn install -yarn build +yarn && yarn build ``` -To use your plugin, run using the local `./bin/run` or `./bin/run.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/run env list +./bin/dev.js env list ``` # Update README.md From fb992870026e80af4827ca3b6c84794a410cc45e Mon Sep 17 00:00:00 2001 From: soridalac Date: Mon, 2 Nov 2026 17:19:36 -0800 Subject: [PATCH 2/7] chore: update OSS compliance files Co-Authored-By: Claude Opus 4.6 --- CONTRIBUTING.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 61685219..e9433969 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,7 @@ ## Contributing 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. 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-functions` will be published to [npm](https://www.npmjs.com/package/@salesforce/plugin-functions). @@ -31,8 +32,38 @@ Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. ## Testing -All changes must have associated tests. This plugin uses a combination of unit testing and NUTs (non-unit tests). Refer to the [Salesforce CLI Plugin Developer Guide](https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/test-plugin.html) for testing details. +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. + +## Local Development + +To run modified plugin commands locally, use `./bin/run.js` or `./bin/run.cmd` (Windows). Changes must be compiled with `yarn build` before they take effect. Use `yarn build --watch` to automatically recompile when files are saved. + +```bash +# Compile changes +yarn build + +# Run a command locally +./bin/run.js --help +``` + +To link the plugin to the Salesforce CLI for testing: + +```bash +sf plugins link . +sf plugins # verify +``` + +## 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 From 5e605fd7dcd5aff1ff7603800511f11eff712450 Mon Sep 17 00:00:00 2001 From: soridalac Date: Mon, 2 Nov 2026 17:43:46 -0800 Subject: [PATCH 3/7] chore: update OSS compliance files Co-Authored-By: Claude Opus 4.6 --- CONTRIBUTING.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9433969..a7ebd8a5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,20 @@ ## Contributing 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. +1. Fork this repository (external contributors) or branch off `main` (committers). +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-functions` will be published to [npm](https://www.npmjs.com/package/@salesforce/plugin-functions). +### 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](https://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 @@ -41,25 +50,6 @@ All changes must have associated tests. This plugin uses a combination of unit t Refer to the [Salesforce CLI Plugin Developer Guide](https://developer.salesforce.com/docs/platform/salesforce-cli-plugin/guide/debug-plugin.html) for debugging tips. -## Local Development - -To run modified plugin commands locally, use `./bin/run.js` or `./bin/run.cmd` (Windows). Changes must be compiled with `yarn build` before they take effect. Use `yarn build --watch` to automatically recompile when files are saved. - -```bash -# Compile changes -yarn build - -# Run a command locally -./bin/run.js --help -``` - -To link the plugin to the Salesforce CLI for testing: - -```bash -sf plugins link . -sf plugins # verify -``` - ## Useful Yarn Commands - `yarn build` — Compile the TypeScript source From 99f8ded863e667f3eb07992421bcb6bc0cfd6f32 Mon Sep 17 00:00:00 2001 From: soridalac Date: Tue, 3 Nov 2026 09:15:57 -0800 Subject: [PATCH 4/7] chore: update OSS compliance files Co-Authored-By: Claude Opus 4.6 --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7ebd8a5..7303cee0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,9 @@ ## 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. From 4247213f608c040f182ecde53d6888e65e223ea8 Mon Sep 17 00:00:00 2001 From: soridalac Date: Tue, 3 Nov 2026 10:37:03 -0800 Subject: [PATCH 5/7] chore: update OSS compliance files Co-Authored-By: Claude Opus 4.6 --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7303cee0..f4b060e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ ### 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](https://yarnpkg.com): `npm install --global yarn` +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 From 993f53a2e2fd381541b6d34db398dc78f2ce0771 Mon Sep 17 00:00:00 2001 From: Sorida <96142310+soridalac@users.noreply.github.com> Date: Tue, 3 Nov 2026 14:03:06 -0800 Subject: [PATCH 6/7] fix: Update testing instructions in CONTRIBUTING.md Removed integration testing instructions for NUTs from the CONTRIBUTING.md file. --- CONTRIBUTING.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4b060e3..0d70c6bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,10 +43,9 @@ Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. ## Testing -All changes must have associated tests. This plugin uses a combination of unit testing and NUTs (non-unit tests). +All changes must have associated 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 @@ -57,5 +56,4 @@ Refer to the [Salesforce CLI Plugin Developer Guide](https://developer.salesforc - `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 From ed97f1445da31e657559068962483620ab414c89 Mon Sep 17 00:00:00 2001 From: Sorida <96142310+soridalac@users.noreply.github.com> Date: Tue, 3 Nov 2026 14:04:03 -0800 Subject: [PATCH 7/7] fix: remove .js extension from local run command Updated command to run the plugin without the .js extension. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b4009b0..5c8f74d7 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ cd plugin-functions yarn && yarn build ``` -To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file. +To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file. ```bash # Run using local run file. -./bin/dev.js env list +./bin/dev env list ``` # Update README.md