-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3cd2777
Showing
18 changed files
with
390 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
release-management: salesforce/npm-release-management@4 | ||
|
||
workflows: | ||
version: 2 | ||
test-and-release: | ||
jobs: | ||
- release-management/validate-pr: | ||
filters: | ||
branches: | ||
ignore: main | ||
- release-management/test-package: | ||
matrix: | ||
parameters: | ||
os: | ||
- linux | ||
node_version: | ||
- latest | ||
- lts | ||
- maintenance | ||
- release-management/release-lerna-packages: | ||
github-release: true | ||
requires: | ||
- release-management/test-package | ||
filters: | ||
branches: | ||
only: main | ||
post-job-steps: | ||
- run: yarn ci-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"productTag": "a1aB00000004Bx8IAE", | ||
"defaultBuild": "offcore.tooling.52" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'monthly' | ||
labels: | ||
- 'dependencies' | ||
open-pull-requests-limit: 100 | ||
pull-request-branch-name: | ||
separator: '-' | ||
ignore: | ||
- dependency-name: 'typescript' | ||
- dependency-name: 'sinon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Slack pull request open notification | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Notify slack pr open | ||
env: | ||
WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} | ||
PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }} | ||
PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }} | ||
PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} | ||
PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }} | ||
PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }} | ||
PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} | ||
PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} | ||
PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }} | ||
PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }} | ||
uses: salesforcecli/pr-notification-action@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -- CLEAN | ||
|
||
# use yarn by default, so ignore npm | ||
package-lock.json | ||
|
||
# never checkin npm config | ||
.npmrc | ||
|
||
# debug logs | ||
npm-error.log | ||
yarn-error.log | ||
lerna-debug.log | ||
|
||
# compile source | ||
lib | ||
|
||
# test artifacts | ||
*xunit.xml | ||
*checkstyle.xml | ||
*unitcoverage | ||
.nyc_output | ||
coverage | ||
|
||
# generated docs | ||
docs | ||
|
||
# -- CLEAN ALL | ||
node_modules | ||
|
||
# -- | ||
# put files here you don't want cleaned with sf-clean | ||
|
||
# os specific files | ||
.DS_Store | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"require": "ts-node/register,source-map-support/register", | ||
"watch-extensions": "ts", | ||
"recursive": true, | ||
"reporter": "spec", | ||
"timeout": 5000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"nyc": { | ||
"extends": "@salesforce/dev-config/nyc" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docs/ | ||
packages/kit/vendor/lodash.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"@salesforce/prettier-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach", | ||
"port": 9229, | ||
"request": "attach", | ||
"skipFiles": ["<node_internals>/**"], | ||
"type": "pwa-node" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"npm.packageManager": "yarn", | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": ["/**/.sfdevrc.json"], | ||
"url": "./packages/dev-scripts/sfdevrc.schema.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
registry "https://registry.npmjs.org" | ||
save-exact false | ||
workspaces-experimental true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Salesforce Open Source Community Code of Conduct | ||
|
||
## About the Code of Conduct | ||
|
||
Equality is a core value at Salesforce. We believe a diverse and inclusive | ||
community fosters innovation and creativity, and are committed to building a | ||
culture where everyone feels included. | ||
|
||
Salesforce open-source projects are committed to providing a friendly, safe, and | ||
welcoming environment for all, regardless of gender identity and expression, | ||
sexual orientation, disability, physical appearance, body size, ethnicity, nationality, | ||
race, age, religion, level of experience, education, socioeconomic status, or | ||
other similar personal characteristics. | ||
|
||
The goal of this code of conduct is to specify a baseline standard of behavior so | ||
that people with different social values and communication styles can work | ||
together effectively, productively, and respectfully in our open source community. | ||
It also establishes a mechanism for reporting issues and resolving conflicts. | ||
|
||
All questions and reports of abusive, harassing, or otherwise unacceptable behavior | ||
in a Salesforce open-source project may be reported by contacting the Salesforce | ||
Open Source Conduct Committee at [email protected]. | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of gender | ||
identity and expression, sexual orientation, disability, physical appearance, | ||
body size, ethnicity, nationality, race, age, religion, level of experience, education, | ||
socioeconomic status, or other similar personal characteristics. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy toward other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Personal attacks, insulting/derogatory comments, or trolling | ||
- Public or private harassment | ||
- Publishing, or threatening to publish, others' private information—such as | ||
a physical or electronic address—without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
- Advocating for or encouraging any of the above behaviors | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned with this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project email | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the Salesforce Open Source Conduct Committee | ||
at [email protected]. All complaints will be reviewed and investigated | ||
and will result in a response that is deemed necessary and appropriate to the | ||
circumstances. The committee is obligated to maintain confidentiality with | ||
regard to the reporter of an incident. Further details of specific enforcement | ||
policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership and the Salesforce Open Source Conduct | ||
Committee. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home], | ||
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html. | ||
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc], | ||
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc]. | ||
|
||
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us]. | ||
|
||
[contributor-covenant-home]: https://www.contributor-covenant.org 'https://www.contributor-covenant.org/' | ||
[golang-coc]: https://golang.org/conduct | ||
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md | ||
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/ | ||
[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Contributing | ||
|
||
1. Familiarize yourself with the codebase and the [development](DEVELOPING.md) doc. | ||
1. 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. | ||
1. Fork this repository. | ||
1. Create a _topic_ branch in your fork based on the correct branch (usually the **main** branch, see [Branches section](#branches) below). Note, this step is recommended but technically not required if contributing using a fork. | ||
1. Edit the code in your fork. | ||
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 unit tests. | ||
1. Sign CLA (see [CLA](#cla) below) | ||
1. 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. | ||
|
||
## Branches | ||
|
||
- We work in branches off of `main`. | ||
- Our released (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` | ||
- see below for further merge instructions | ||
|
||
### Merging between branches | ||
|
||
- We try to limit merge commits as much as possible. | ||
|
||
- They are usually only ok when done by our release automation. | ||
|
||
- _Topic_ branches are: | ||
|
||
1. based on `main` and will be | ||
1. squash-merged into `main`. | ||
|
||
### Releasing | ||
|
||
- A new version of this library will be published upon merging PRs to `main`, with the version number increment based on commitizen. | ||
|
||
## Pull Requests | ||
|
||
- Develop features and bug fixes in _topic_ branches. | ||
- _Topic_ branches can live in forks (external contributors) or within this repository (committers). | ||
\*\* When creating _topic_ branches in this repository please prefix with `<developer-name>/`. | ||
|
||
### Merging Pull Requests | ||
|
||
- Pull request merging is restricted to squash & merge only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Developing | ||
|
||
## Pre-requisites | ||
|
||
1. We use the active NodeJS LTS. If you need to work with multiple versions of Node, you | ||
might consider using [nvm](https://github.com/creationix/nvm). | ||
1. This repository uses [yarn](https://yarnpkg.com/) to manage node dependencies. Please install yarn globally using `npm install --global yarn`. | ||
1. Tests are executed on the latest NodeJS as well as all active and maintained NodeJS LTS versions. | ||
|
||
## Structure | ||
|
||
### Packages | ||
|
||
The packages directory contains the different npm packages. | ||
|
||
## Typical workflow | ||
|
||
You would only do this once after you cloned the repository. | ||
|
||
1. Clone this repository from git. | ||
1. `cd` into `sfdx-dev-packages`. | ||
1. We develop using feature brances off `main` and release from the `main` branch. At | ||
this point, it should be set to `main` by default. If not, run `git checkout -t origin/main`. | ||
1. `yarn` to bring in all the top-level dependencies and bootstrap. | ||
1. Open the project in your editor of choice. | ||
|
||
## When you are ready to commit | ||
|
||
1. We enforce commit message format. We recommend using [commitizen](https://github.com/commitizen/cz-cli) by installing it with `yarn global add commitizen` then commit using `git cz` which will prompt you questions to format the commit message. | ||
1. Before commit and push, husky will run several hooks to ensure the message and that everything lints and compiles properly. | ||
|
||
## List of Useful commands | ||
|
||
_These commands assume that they are executed from the top-level directory. | ||
Internally, they delegate to `lerna` to call them on each npm module in the | ||
packages directory._ | ||
|
||
### `yarn bootstrap` | ||
|
||
This bootstraps the packages by issuing a `yarn install` on each package and | ||
also symlinking any package that are part of the packages folder. | ||
|
||
You would want do this as the first step after you have made changes in the | ||
modules. | ||
|
||
If you change the dependencies in your package.json, you will also need to run | ||
this command. | ||
|
||
### `yarn compile` | ||
|
||
This runs `yarn compile` on each of the package in packages. | ||
|
||
### `yarn clean` | ||
|
||
This run `yarn clean` on each of the package in packages. Running `yarn cleal-all` will also clean up the node_module directories. | ||
|
||
### `yarn test` | ||
|
||
This runs `yarn test` on each of the packages. | ||
|
||
### `yarn lint` | ||
|
||
This runs `yarn lint` on each of the packages. |
Oops, something went wrong.