Skip to content

Commit 5005c75

Browse files
committed
chore: contributing-information
1 parent ec639cb commit 5005c75

File tree

2 files changed

+197
-13
lines changed

2 files changed

+197
-13
lines changed

CONTRIBUTING.md

Lines changed: 184 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,195 @@
1-
# Contributing to Forgerock's Javascript SDK
1+
# Contribution Guidelines for Ping SDK for Javascript
22

3-
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
3+
Welcome! We are excited that you are interested in contributing to the Ping SDK for JavaScript. This document will guide you through the steps required to contribute to the project.
44

5-
The following is a set of guidelines for contributing to the Forgerock SDK and its packages, which are hosted in the [ForgeRock organization](https://github.com/forgerock) on GitHub.
5+
The following is a set of guidelines for contributing to the Ping SDK and its packages, which are hosted in the [ForgeRock organization](https://github.com/forgerock) on GitHub.
66

7-
### Git Flow
7+
# Setting Up Your Development Environment
88

9-
Fork the repo to your own github account. From there, you can add the ForgeRock repository as an upstream.
9+
Before you can contribute to the Ping SDK for Javascript, you'll need to set up your development environment. This section describes the prerequisites and steps needed to start using the project in your local machine.
1010

11-
`git remote add upstream [email protected]:ForgeRock/forgerock-javascript-sdk.git`
11+
## Prerequisites
12+
13+
- GitHub account.
14+
- Git installed.
15+
- (pnpm)[https://pnpm.io/installation]
16+
- Node 20
17+
- Setup an Advanced Identity Cloud tenant or PingAM instance, as described in the Documentation.
18+
19+
## Fork and Clone the Repository
20+
21+
Fork the repository to your own GitHub account by clicking the "Fork" button at the top-right of the repository page.
22+
23+
Clone your forked repository to your local machine:
24+
25+
git clone https://github.com/your-username/forgerock-javascript-sdk.git
26+
27+
- Navigate into the project folder:
28+
29+
- cd forgerock-javascript-sdk
30+
31+
- Build the project to make sure it works, `pnpm build`
32+
33+
### Commands in the repo
34+
35+
Most commands live within the local `project.json` of the package you are working in. You can use the project.json and the Nx vscode extension to run commands via the code lens.
36+
37+
Alternatively there are many ways to run commands, of which a few are to be listed below:
38+
`pnpm build` will run build on all projects
39+
`pnpm lint` will run lint on all projects
40+
`pnpm test` will run unit tests on all projects
41+
`pnpm e2e` will run e2e tests for all e2e apps
42+
43+
You can run commands with `nx` like so:
44+
`pnpm nx build <name in project.json>`
45+
46+
_examples_:
47+
48+
```
49+
`pnpm nx build javascript-sdk`
50+
`pnpm nx lint javascript-sdk`
51+
`pnpm nx test javascript-sdk`
52+
`pnpm nx e2e autoscript-suites`
53+
`pnpm nx serve autoscript-apps`
54+
```
55+
56+
## Understanding the Project Structure
57+
58+
The Ping SDK for Javascript is organized in a modular way. This section is designed to help you understand the layout of the project. We will break down each of the folders and what modules you will find there. Getting familiar with the project structure will make contributing easier and more efficient.
59+
60+
```
61+
e2e/
62+
autoscript-apps
63+
autoscript-suites
64+
mock-api
65+
mock-api-v2
66+
token-vault-app
67+
token-vault-interceptor
68+
token-vault-proxy
69+
token-vault-suites
70+
packages/
71+
javascript-sdk
72+
ping-protect
73+
token-vault
74+
75+
```
76+
77+
### Package overview
78+
79+
- _javascript-sdk_: This is the core module that powers the rest of the packages. OIDC/AIC Callback support/etc
80+
- _ping-protect_: This is the core package that allows a developer to interact with the Ping Protect signals api. This module will load the signals sdk for you, and provides a lightweight interface for interacting with the modules.
81+
- _token-vault_: A propreitary way of managing tokens for environments which require high security.
82+
83+
### E2E Overview
84+
85+
```
86+
- *autoscript-suites*: The e2e test location for writing modular and journey e2e's with the javascript-sdk or ping-protect.
87+
- *autoscript-apps*: A multi-page web application for loading javascript files which call through the journey you are testing programatically
88+
- *mock-api*: A backend server that serves mock data for the autoscript-apps. This is hard-coded data to mimic what the actual AIC Tenant will respond with
89+
- *mock-api-v2*: A new version of the mock api, development of this is moved over to the new Ping SDK repo.
90+
- *token-vault-app*: The application which sets up Token-Vault for testing
91+
- *token-vault-proxy*: The proxy application (required) for using token vault
92+
- *token-vault-suites*: The e2e test location for playwright tests.
93+
```
94+
95+
## Changesets
96+
97+
We use changesets for releasing our packages. you can add a changeset when needed (when a change should require a release) using `pnpm changeset`
98+
99+
fill out the TUI information and add this to your PR.
100+
101+
More information can be found on the [changesets docs](https://changesets-docs.vercel.app/en)
102+
103+
## Standards of Practice
104+
105+
We ask that all contributors to this project adhere to our engineering Standard for team culture, practices and code of conduct. We expect everyone to be respectful, inclusive, and collaborative. Any violations will be handled according to the project's guidelines.
106+
107+
For more details on our Standards of Practice, please refer to the [SDK Standards of Practice](https://github.com/ForgeRock/sdk-standards-of-practice) documentation.
12108

13109
## Here is a checklist of items to ensure your Pull Request is reviewed and ready to be merged:
14110

111+
This section covers how to create your changes, and submit them for review by Ping Identity engineers
112+
by using a Pull Request. A PR is a formal request to merge your changes from your forked repository into
113+
the main project. The following steps will guide you on creating a well-structured PR that
114+
facilitates efficient review and integration of your contributions.
115+
116+
### Create a New Branch
117+
118+
Always create a new branch to work on your changes. Avoid making changes directly on the `develop` or `master` branch.
119+
120+
```bash
121+
git checkout -b feature/my-new-feature
122+
```
123+
124+
### Release affecting changes
125+
126+
If the change you have made should be reflected in a release, be sure to add a changeset with `pnpm changeset`
127+
128+
### Commit Your Changes
129+
130+
Once you’ve made your changes, commit them with a clear and descriptive message. Note that our
131+
repository requires all commits to be signed. For more information on signing commits, please refer to
132+
the GitHub Docs
133+
134+
The commit message should follow this structure:
135+
136+
[Conventional Commit Conventions](https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary)
137+
138+
```
139+
[TYPE](scope?optional) Short description of the changes
140+
Types:
141+
142+
feat: A new feature
143+
fix: A bug fix
144+
docs: Documentation changes
145+
refactor: Code refactoring (no feature change)
146+
test: Adding or modifying tests
147+
chore: not a release affecting change.
148+
ci: ci related changes
149+
```
150+
151+
Example:
152+
153+
```
154+
git commit -S -m "feat: add login functionality"
155+
```
156+
157+
### Push Your Changes
158+
159+
After committing your changes, push them to your fork:
160+
161+
```
162+
git push origin feature/my-new-feature
163+
```
164+
165+
### Create a Pull Request
166+
167+
Go to your fork on GitHub.
168+
169+
Click on the "New Pull Request" button.
170+
171+
Select the base repository and base branch (usually develop), then select the branch you just pushed.
172+
173+
### Fill out the PR Template
174+
175+
Make sure to fill out the PR template provided. The template helps us better understand your change. Typically, a PR will require the following information:
176+
177+
Add a title and description for the PR. The description should include:
178+
179+
- What was changed and why.
180+
- Any related issues.
181+
- Any additional context if necessary, for example relevant screenshots or breaking changes.
182+
- Once everything looks good, submit the PR for review.
183+
184+
### PR Review and Feedback
185+
186+
Once the PR is submitted, the team will review it. Be prepared to:
187+
188+
- Address any feedback or requested changes.
189+
- Keep your branch up to date with the base branch by rebasing or merging.
190+
191+
### Definition of Done
192+
15193
- [ ] Please make all pull requests against `develop` branch.
16194
- [ ] Fill out the Pull Request template that appears when you open a PR.
17195
- [ ] Please ensure `pnpm run lint` reports no issues.

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ The Ping SDK for JavaScript enables you to quickly integrate Ping products into
1919

2020
Use the SDKs to leverage _[Intelligent Access](https://www.pingidentity.com/en/platform/capabilities/intelligent-access.html)_ to easily step through each stage of an authentication tree by using callbacks.
2121

22-
<!------------------------------------------------------------------------------------------------------------------------------------>
22+
<!------------------------------------------------------------------------------------------------------------------------------------>
23+
2324
<!-- REQUIREMENTS - Supported AM versions, API versions, any other requirements. -->
2425

2526
## Requirements
@@ -38,9 +39,11 @@ Use the SDKs to leverage _[Intelligent Access](https://www.pingidentity.com/en/p
3839
- Edge 44 (Legacy): requires one polyfill for TextEncoder, [`fast-text-encoding` is recommended](https://www.npmjs.com/package/fast-text-encoding)
3940

4041
- npm
42+
4143
- npm 7+ is required to use this project and the sample apps, since npm workspaces are used to install dependencies in sub-projects such as the sample apps
4244

4345
<!------------------------------------------------------------------------------------------------------------------------------------>
46+
4447
<!-- INSTALLATION -->
4548

4649
## Installation
@@ -49,6 +52,10 @@ Use the SDKs to leverage _[Intelligent Access](https://www.pingidentity.com/en/p
4952
npm install @forgerock/javascript-sdk
5053
```
5154

55+
## Contributing
56+
57+
Please see the [Contributing](./CONTRIBUTING.md) file linked here.
58+
5259
## Samples
5360

5461
ForgeRock provides these samples to help demonstrate SDK functionality/implementation. They are provided "as is" and are not official products of Ping Identity Corporation and are not officially supported.
@@ -64,6 +71,7 @@ To try out the Ping SDK for JavaScript please look at one of our samples:
6471
- [**Angular Todo - `samples/angular-todo`**](https://github.com/ForgeRock/sdk-sample-apps/blob/main/angular-todo/README.md)
6572

6673
<!------------------------------------------------------------------------------------------------------------------------------------>
74+
6775
<!-- DOCS - Link off to the AM-centric documentation at sdks.forgerock.com. -->
6876

6977
## Documentation
@@ -75,6 +83,7 @@ Documentation for the SDKs is provided at **<https://docs.pingidentity.com/sdks>
7583
- API Reference documentation
7684

7785
<!------------------------------------------------------------------------------------------------------------------------------------>
86+
7887
<!-- SUPPORT -->
7988

8089
## Support
@@ -95,13 +104,9 @@ The support portal shows all currently open support tickets and allows you to ra
95104
[Our version history can be viewed by visiting our CHANGELOG.md](https://github.com/ForgeRock/forgerock-javascript-sdk/blob/master/CHANGELOG.md).
96105

97106
<!------------------------------------------------------------------------------------------------------------------------------------>
98-
<!-- COLLABORATION -->
99-
100-
## Contributing
101-
102-
If you would like to contribute to this project you can fork the repository, clone it to your machine and get started.
103107

104108
<!------------------------------------------------------------------------------------------------------------------------------------>
109+
105110
<!-- LEGAL -->
106111

107112
## Disclaimer
@@ -112,6 +117,7 @@ If you would like to contribute to this project you can fork the repository, clo
112117
> Any action or suit relating to the use of the code may be brought only in the courts of a jurisdiction wherein Ping Identity Corporation resides or in which Ping Identity Corporation conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions.**
113118
114119
<!------------------------------------------------------------------------------------------------------------------------------------>
120+
115121
<!-- LICENSE - Links to the MIT LICENSE file in each repo. -->
116122

117123
## License
@@ -120,4 +126,4 @@ This project is licensed under the MIT License - see the [LICENSE](./packages/ja
120126

121127
---
122128

123-
&copy; Copyright 2020-2025 Ping Identity. All Rights Reserved
129+
© Copyright 2020-2025 Ping Identity. All Rights Reserved

0 commit comments

Comments
 (0)