Skip to content

Commit b8a27ab

Browse files
committed
feat: configurations
0 parents  commit b8a27ab

18 files changed

+390
-0
lines changed

.circleci/config.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2.1
2+
3+
orbs:
4+
release-management: salesforce/npm-release-management@4
5+
6+
workflows:
7+
version: 2
8+
test-and-release:
9+
jobs:
10+
- release-management/validate-pr:
11+
filters:
12+
branches:
13+
ignore: main
14+
- release-management/test-package:
15+
matrix:
16+
parameters:
17+
os:
18+
- linux
19+
node_version:
20+
- latest
21+
- lts
22+
- maintenance
23+
- release-management/release-lerna-packages:
24+
github-release: true
25+
requires:
26+
- release-management/test-package
27+
filters:
28+
branches:
29+
only: main
30+
post-job-steps:
31+
- run: yarn ci-docs

.git2gus/config.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"productTag": "a1aB00000004Bx8IAE",
3+
"defaultBuild": "offcore.tooling.52"
4+
}

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'monthly'
7+
labels:
8+
- 'dependencies'
9+
open-pull-requests-limit: 100
10+
pull-request-branch-name:
11+
separator: '-'
12+
ignore:
13+
- dependency-name: 'typescript'
14+
- dependency-name: 'sinon'
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Slack pull request open notification
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify slack pr open
12+
env:
13+
WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }}
14+
PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }}
15+
PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }}
16+
PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }}
17+
PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }}
18+
PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }}
19+
PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }}
20+
PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }}
21+
PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }}
22+
PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }}
23+
uses: salesforcecli/pr-notification-action@main

.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# -- CLEAN
2+
3+
# use yarn by default, so ignore npm
4+
package-lock.json
5+
6+
# never checkin npm config
7+
.npmrc
8+
9+
# debug logs
10+
npm-error.log
11+
yarn-error.log
12+
lerna-debug.log
13+
14+
# compile source
15+
lib
16+
17+
# test artifacts
18+
*xunit.xml
19+
*checkstyle.xml
20+
*unitcoverage
21+
.nyc_output
22+
coverage
23+
24+
# generated docs
25+
docs
26+
27+
# -- CLEAN ALL
28+
node_modules
29+
30+
# --
31+
# put files here you don't want cleaned with sf-clean
32+
33+
# os specific files
34+
.DS_Store
35+
.idea

.mocharc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"require": "ts-node/register,source-map-support/register",
3+
"watch-extensions": "ts",
4+
"recursive": true,
5+
"reporter": "spec",
6+
"timeout": 5000
7+
}

.nycrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"nyc": {
3+
"extends": "@salesforce/dev-config/nyc"
4+
}
5+
}

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docs/
2+
packages/kit/vendor/lodash.js

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@salesforce/prettier-config"

.vscode/launch.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Attach",
9+
"port": 9229,
10+
"request": "attach",
11+
"skipFiles": ["<node_internals>/**"],
12+
"type": "pwa-node"
13+
}
14+
]
15+
}

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"npm.packageManager": "yarn",
4+
"json.schemas": [
5+
{
6+
"fileMatch": ["/**/.sfdevrc.json"],
7+
"url": "./packages/dev-scripts/sfdevrc.schema.json"
8+
}
9+
]
10+
}

.yarnrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
registry "https://registry.npmjs.org"
2+
save-exact false
3+
workspaces-experimental true

CODE_OF_CONDUCT.md

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Salesforce Open Source Community Code of Conduct
2+
3+
## About the Code of Conduct
4+
5+
Equality is a core value at Salesforce. We believe a diverse and inclusive
6+
community fosters innovation and creativity, and are committed to building a
7+
culture where everyone feels included.
8+
9+
Salesforce open-source projects are committed to providing a friendly, safe, and
10+
welcoming environment for all, regardless of gender identity and expression,
11+
sexual orientation, disability, physical appearance, body size, ethnicity, nationality,
12+
race, age, religion, level of experience, education, socioeconomic status, or
13+
other similar personal characteristics.
14+
15+
The goal of this code of conduct is to specify a baseline standard of behavior so
16+
that people with different social values and communication styles can work
17+
together effectively, productively, and respectfully in our open source community.
18+
It also establishes a mechanism for reporting issues and resolving conflicts.
19+
20+
All questions and reports of abusive, harassing, or otherwise unacceptable behavior
21+
in a Salesforce open-source project may be reported by contacting the Salesforce
22+
Open Source Conduct Committee at ossconduct@salesforce.com.
23+
24+
## Our Pledge
25+
26+
In the interest of fostering an open and welcoming environment, we as
27+
contributors and maintainers pledge to making participation in our project and
28+
our community a harassment-free experience for everyone, regardless of gender
29+
identity and expression, sexual orientation, disability, physical appearance,
30+
body size, ethnicity, nationality, race, age, religion, level of experience, education,
31+
socioeconomic status, or other similar personal characteristics.
32+
33+
## Our Standards
34+
35+
Examples of behavior that contributes to creating a positive environment
36+
include:
37+
38+
- Using welcoming and inclusive language
39+
- Being respectful of differing viewpoints and experiences
40+
- Gracefully accepting constructive criticism
41+
- Focusing on what is best for the community
42+
- Showing empathy toward other community members
43+
44+
Examples of unacceptable behavior by participants include:
45+
46+
- The use of sexualized language or imagery and unwelcome sexual attention or
47+
advances
48+
- Personal attacks, insulting/derogatory comments, or trolling
49+
- Public or private harassment
50+
- Publishing, or threatening to publish, others' private information—such as
51+
a physical or electronic address—without explicit permission
52+
- Other conduct which could reasonably be considered inappropriate in a
53+
professional setting
54+
- Advocating for or encouraging any of the above behaviors
55+
56+
## Our Responsibilities
57+
58+
Project maintainers are responsible for clarifying the standards of acceptable
59+
behavior and are expected to take appropriate and fair corrective action in
60+
response to any instances of unacceptable behavior.
61+
62+
Project maintainers have the right and responsibility to remove, edit, or
63+
reject comments, commits, code, wiki edits, issues, and other contributions
64+
that are not aligned with this Code of Conduct, or to ban temporarily or
65+
permanently any contributor for other behaviors that they deem inappropriate,
66+
threatening, offensive, or harmful.
67+
68+
## Scope
69+
70+
This Code of Conduct applies both within project spaces and in public spaces
71+
when an individual is representing the project or its community. Examples of
72+
representing a project or community include using an official project email
73+
address, posting via an official social media account, or acting as an appointed
74+
representative at an online or offline event. Representation of a project may be
75+
further defined and clarified by project maintainers.
76+
77+
## Enforcement
78+
79+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
80+
reported by contacting the Salesforce Open Source Conduct Committee
81+
at ossconduct@salesforce.com. All complaints will be reviewed and investigated
82+
and will result in a response that is deemed necessary and appropriate to the
83+
circumstances. The committee is obligated to maintain confidentiality with
84+
regard to the reporter of an incident. Further details of specific enforcement
85+
policies may be posted separately.
86+
87+
Project maintainers who do not follow or enforce the Code of Conduct in good
88+
faith may face temporary or permanent repercussions as determined by other
89+
members of the project's leadership and the Salesforce Open Source Conduct
90+
Committee.
91+
92+
## Attribution
93+
94+
This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home],
95+
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.
96+
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc],
97+
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc].
98+
99+
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us].
100+
101+
[contributor-covenant-home]: https://www.contributor-covenant.org 'https://www.contributor-covenant.org/'
102+
[golang-coc]: https://golang.org/conduct
103+
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
104+
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/
105+
[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/

CONTRIBUTING.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing
2+
3+
1. Familiarize yourself with the codebase and the [development](DEVELOPING.md) doc.
4+
1. Create a new issue before starting your project so that we can keep track of
5+
what you are trying to add/fix. That way, we can also offer suggestions or
6+
let you know if there is already an effort in progress.
7+
1. Fork this repository.
8+
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.
9+
1. Edit the code in your fork.
10+
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.
11+
1. Sign CLA (see [CLA](#cla) below)
12+
1. Send us a pull request when you are done. We'll review your code, suggest any
13+
needed changes, and merge it in.
14+
15+
## CLA
16+
17+
External contributors will be required to sign a Contributor's License
18+
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
19+
20+
## Branches
21+
22+
- We work in branches off of `main`.
23+
- Our released (aka. _production_) branch is `main`.
24+
- Our work happens in _topic_ branches (feature and/or bug-fix).
25+
- feature as well as bug-fix branches are based on `main`
26+
- branches _should_ be kept up-to-date using `rebase`
27+
- see below for further merge instructions
28+
29+
### Merging between branches
30+
31+
- We try to limit merge commits as much as possible.
32+
33+
- They are usually only ok when done by our release automation.
34+
35+
- _Topic_ branches are:
36+
37+
1. based on `main` and will be
38+
1. squash-merged into `main`.
39+
40+
### Releasing
41+
42+
- A new version of this library will be published upon merging PRs to `main`, with the version number increment based on commitizen.
43+
44+
## Pull Requests
45+
46+
- Develop features and bug fixes in _topic_ branches.
47+
- _Topic_ branches can live in forks (external contributors) or within this repository (committers).
48+
\*\* When creating _topic_ branches in this repository please prefix with `<developer-name>/`.
49+
50+
### Merging Pull Requests
51+
52+
- Pull request merging is restricted to squash & merge only.

DEVELOPING.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Developing
2+
3+
## Pre-requisites
4+
5+
1. We use the active NodeJS LTS. If you need to work with multiple versions of Node, you
6+
might consider using [nvm](https://github.com/creationix/nvm).
7+
1. This repository uses [yarn](https://yarnpkg.com/) to manage node dependencies. Please install yarn globally using `npm install --global yarn`.
8+
1. Tests are executed on the latest NodeJS as well as all active and maintained NodeJS LTS versions.
9+
10+
## Structure
11+
12+
### Packages
13+
14+
The packages directory contains the different npm packages.
15+
16+
## Typical workflow
17+
18+
You would only do this once after you cloned the repository.
19+
20+
1. Clone this repository from git.
21+
1. `cd` into `sfdx-dev-packages`.
22+
1. We develop using feature brances off `main` and release from the `main` branch. At
23+
this point, it should be set to `main` by default. If not, run `git checkout -t origin/main`.
24+
1. `yarn` to bring in all the top-level dependencies and bootstrap.
25+
1. Open the project in your editor of choice.
26+
27+
## When you are ready to commit
28+
29+
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.
30+
1. Before commit and push, husky will run several hooks to ensure the message and that everything lints and compiles properly.
31+
32+
## List of Useful commands
33+
34+
_These commands assume that they are executed from the top-level directory.
35+
Internally, they delegate to `lerna` to call them on each npm module in the
36+
packages directory._
37+
38+
### `yarn bootstrap`
39+
40+
This bootstraps the packages by issuing a `yarn install` on each package and
41+
also symlinking any package that are part of the packages folder.
42+
43+
You would want do this as the first step after you have made changes in the
44+
modules.
45+
46+
If you change the dependencies in your package.json, you will also need to run
47+
this command.
48+
49+
### `yarn compile`
50+
51+
This runs `yarn compile` on each of the package in packages.
52+
53+
### `yarn clean`
54+
55+
This run `yarn clean` on each of the package in packages. Running `yarn cleal-all` will also clean up the node_module directories.
56+
57+
### `yarn test`
58+
59+
This runs `yarn test` on each of the packages.
60+
61+
### `yarn lint`
62+
63+
This runs `yarn lint` on each of the packages.

0 commit comments

Comments
 (0)