You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd love for you to contribute to our source code and to help make the Firebase JS SDK even better than it is today! Here are the guidelines we'd like you to follow:
3
+
We'd love for you to contribute to our source code and to help make the Firebase JS SDK even better
4
+
than it is today! Here are the guidelines we'd like you to follow:
4
5
5
6
-[Code of Conduct](#coc)
6
7
-[Question or Problem?](#question)
@@ -11,46 +12,60 @@ We'd love for you to contribute to our source code and to help make the Firebase
11
12
12
13
## <aname="coc"></a> Code of Conduct
13
14
14
-
As contributors and maintainers of the Firebase JS SDK project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
15
+
As contributors and maintainers of the Firebase JS SDK project, we pledge to respect everyone who
Communication through any of Firebase's channels (GitHub, StackOverflow, Google+, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
19
+
Communication through any of Firebase's channels (GitHub, StackOverflow, Google+, Twitter, etc.)
20
+
must be constructive and never resort to personal attacks, trolling, public or private harassment,
21
+
insults, or other unprofessional conduct.
17
22
18
-
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the project to do the same.
23
+
We promise to extend courtesy and respect to everyone involved in this project regardless of gender,
24
+
gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of
25
+
experience. We expect anyone contributing to the project to do the same.
19
26
20
-
If any member of the community violates this code of conduct, the maintainers of the Firebase JS SDK project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
27
+
If any member of the community violates this code of conduct, the maintainers of the Firebase JS SDK
28
+
project may take action, removing issues, comments, and PRs or blocking accounts as deemed
29
+
appropriate.
21
30
22
-
If you are subject to or witness unacceptable behavior, or have any other concerns, please drop us a line at [email protected].
31
+
If you are subject to or witness unacceptable behavior, or have any other concerns, please drop us a
If you have questions about how to use the Firebase JS SDK, please direct these to [StackOverflow][stackoverflow] and use the `firebase` and `javascript` tags. You can also use the [Firebase Google Group][firebase-google-group] or [Slack][slack] to contact members of the Firebase team for help.
36
+
If you have questions about how to use the Firebase JS SDK, please direct these to
37
+
[StackOverflow][stackoverflow] and use the `firebase` and `javascript` tags. You can also use the
38
+
[Firebase Google Group][firebase-google-group] or [Slack][slack] to contact members of the Firebase
39
+
team for help.
27
40
28
41
## <aname="issue"></a> Found an Issue?
29
42
30
-
If you find a bug in the source code, a mistake in the documentation, or some other issue, you can help us by submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request with a test demonstrating the bug and a fix!
43
+
If you find a bug in the source code, a mistake in the documentation, or some other issue, you can
44
+
help us by submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull
45
+
Request with a test demonstrating the bug and a fix!
31
46
32
47
See [below](#submit) for some guidelines.
33
48
34
49
## <aname="other-issue"></a> Production Issues
35
50
36
-
If you have a production issue, please [contact Firebase support][support] who will work with you to resolve the issue.
51
+
If you have a production issue, please [contact Firebase support][support] who will work with you to
52
+
resolve the issue.
37
53
38
54
## <aname="submit"></a> Submission Guidelines
39
55
40
56
### Submitting an Issue
41
57
42
-
Before you submit your issue, try searching [past issues][archive], [StackOverflow][stackoverflow], and the [Firebase Google Group][firebase-google-group] for issues similar to your own. You can help us to maximize the effort we spend fixing issues, and adding new features, by not reporting duplicate issues.
58
+
Before you submit your issue, try searching [past issues][archive], [StackOverflow][stackoverflow],
59
+
and the [Firebase Google Group][firebase-google-group] for issues similar to your own. You can help
60
+
us to maximize the effort we spend fixing issues, and adding new features, by not reporting
61
+
duplicate issues.
43
62
44
-
If your issue appears to be a bug, and hasn't been reported, open a new issue. Providing the following information will increase the chances of your issue being dealt with quickly:
45
-
46
-
***Description of the Issue** - if an error is being thrown a non-minified stack trace helps
47
-
***Motivation for or Use Case** - explain why this is a bug for you
48
-
***Related Issues** - has a similar issue been reported before?
49
-
***Environment Configuration** - is this a problem with Node.js, or only a specific browser? Is this only in a specific version of the SDK?
50
-
***Reproduce the Error** - provide a live example (like [JSBin][jsbin]), a Github repo, or an unambiguous set of steps
51
-
***Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
52
-
53
-
There is an issue template provided to help capture all of this information. Following the template will also help us to route your issue to the appropriate teams faster, helping us to better help you!
63
+
If you encounter an issue that appears to be a bug that has not been reported before, please
64
+
[open a new issue in the repo](https://github.com/firebase/firebase-js-sdk/issues/new/choose). When
65
+
filling out the new issue report form, be sure to include as much information as possible, such as
66
+
reproduction steps, the error message you received, and any screenshots or other relevant data. The
67
+
more context you can provide the better we will be able to understand the issue, route it to the
68
+
appropriate team, and provide you with the help you need.
54
69
55
70
Also as a great rule of thumb:
56
71
@@ -60,29 +75,49 @@ Also as a great rule of thumb:
60
75
61
76
#### Before you contribute
62
77
63
-
Before we can use your code, you must sign the [Google Individual Contributor License Agreement][google-cla] (CLA), which you can do online. The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things, for instance, that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. There is also a nifty CLA bot that will guide you through this process if you are going through it for the first time.
64
-
65
-
Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on. Some pull requests (large contributions, API additions/changes, etc) may be subject to additional internal review, we appreciate your patience as we fully validate your contribution.
78
+
Before we can use your code, you must sign the
79
+
[Google Individual Contributor License Agreement][google-cla] (CLA), which you can do online. The
80
+
CLA is necessary mainly because you own the copyright to your changes, even after your contribution
81
+
becomes part of our codebase, so we need your permission to use and distribute your code. We also
82
+
need to be sure of various other things, for instance, that you'll tell us if you know that your
83
+
code infringes on other people's patents. You don't have to sign the CLA until after you've
84
+
submitted your code for review and a member has approved it, but you must do it before we can put
85
+
your code into our codebase. There is also a nifty CLA bot that will guide you through this process
86
+
if you are going through it for the first time.
87
+
88
+
Before you start working on a larger contribution, you should get in touch with us first through the
89
+
issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front
90
+
makes it much easier to avoid frustration later on. Some pull requests (large contributions, API
91
+
additions/changes, etc) may be subject to additional internal review, we appreciate your patience as
92
+
we fully validate your contribution.
66
93
67
94
#### Pull Request Guidelines
68
95
69
-
* Search [GitHub](https://github.com/firebase/firebase-js-sdk/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
70
-
* Create an issue to discuss a change before submitting a PR. We'd hate to have to turn down your contributions because of something that could have been communicated early on.
71
-
*[Create a fork of the GitHub repo][fork-repo] to ensure that you can push your changes for us to review.
96
+
* Search [GitHub](https://github.com/firebase/firebase-js-sdk/pulls) for an open or closed Pull
97
+
Request that relates to your submission. You don't want to duplicate effort.
98
+
* Create an issue to discuss a change before submitting a PR. We'd hate to have to turn down your
99
+
contributions because of something that could have been communicated early on.
100
+
*[Create a fork of the GitHub repo][fork-repo] to ensure that you can push your changes for us to
101
+
review.
72
102
* Make your changes in a new git branch:
73
103
74
104
```shell
75
105
git checkout -b my-fix-branch master
76
106
```
77
107
78
-
* Create your patch, **including appropriate test cases**. Patches with tests are more likely to be merged.
79
-
* Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`, `.idea`). If your development setup automatically creates some of these files, please add them to the `.gitignore` at the root of the package (click [here][gitignore] to read more on how to add entries to the `.gitignore`).
108
+
* Create your change, **including appropriate test cases**. Changes with tests are more likely to be
109
+
merged.
110
+
* Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`,
111
+
`.idea`). If your development setup automatically creates some of these files, please add them to
112
+
the `.gitignore` at the root of the package (click [here][gitignore] to read more on how to add
113
+
entries to the `.gitignore`).
80
114
* Commit your changes
81
115
82
116
```shell
83
117
git commit -a
84
118
```
85
-
_Note: the optional commit `-a`command line option will automatically "add" and "rm" edited files._
119
+
_Note: the optional commit `-a`command line option will automatically "add" and "rm" edited
120
+
files._
86
121
87
122
* Test your changes locally to ensure everything is in good working order:
88
123
@@ -96,25 +131,40 @@ Before you start working on a larger contribution, you should get in touch with
96
131
git push origin my-fix-branch
97
132
```
98
133
99
-
* In GitHub, send a pull request to `firebase-js-sdk:master`.
100
-
* Add changeset. See [Adding changeset to PR](#adding-changeset-to-pr)
101
-
* All pull requests must be reviewed by a member of the Firebase JS SDK team, who will merge it when/if they feel it is good to go.
134
+
* In GitHub, create a pull request against the `firebase-js-sdk:master` branch.
135
+
* Add changeset. See [Adding changeset to PR](#adding-changeset-to-pr).
136
+
* All pull requests must be reviewed by a member of the Firebase JS SDK team, who will merge it
137
+
when/if they feel it is good to go.
102
138
103
139
That's it! Thank you for your contribution!
104
140
105
141
#### Adding changeset to PR
106
-
Every PR that would trigger a release should include a changeset file. To make
107
-
this process easy, a message will be sent to every PR with a link that you can
108
-
click to add changeset files in the Github UI directly.
The repository uses changesets to associate PR contributions with major and minor version releases
143
+
adn patch releases. If your change is a feature or a behavioral change (either of which should
144
+
correspond to a version bump) then you will need to generate a changeset in your PR to track the
145
+
change.
146
+
147
+
Start the changeset creation process by running the following command in the base directory of the
148
+
repository:
149
+
150
+
```shell
151
+
yarn changeset
152
+
```
110
153
111
-
#### What to include in the changset file
154
+
You will be asked to create a description (here's an
155
+
[example]((https://github.com/firebase/firebase-js-sdk/pull/3284#issuecomment-649718617)). You
156
+
should include the version bump for your package as well as the description for the change. Valid
157
+
version bump types are major, minor or patch, where:
112
158
113
-
You should include the version bump for your package as well as the description
114
-
for the change. Valid version bump types are `patch`, `minor` and `major`.
115
-
Please always include the `firebase` package with the same version bump type as
116
-
your package. This is to ensure that the version of the `firebase` package will
117
-
be bumped correctly. For example,
159
+
* a major version is an incompatible API change
160
+
* a minor version is a backwards compatible API change
161
+
* a patch version is a backwards compatible bug fix or any change that does not affect the API. A
162
+
refactor, for example.
163
+
164
+
Please always include the firebase package with the same version bump type as your package. This is
165
+
to ensure that the version of the firebase package will be bumped correctly,
166
+
167
+
For example,
118
168
119
169
```
120
170
---
@@ -125,6 +175,12 @@ be bumped correctly. For example,
125
175
This is a test.
126
176
```
127
177
178
+
You do not need to create a Changeset for the following changes:
179
+
180
+
* the addition or alteration of a test
181
+
* documentation updates
182
+
* updates to the repository’s CI
183
+
128
184
#### Multiple changeset files
129
185
130
186
If your PR touches multiple SDKs or addresses multiple issues that require
@@ -133,14 +189,31 @@ changeset files in the PR.
133
189
134
190
## <a name="docs"></a> Updating Documentation
135
191
136
-
Reference docs for the Firebase [JS SDK](https://firebase.google.com/docs/reference/js/) and [Node (client) SDK](https://firebase.google.com/docs/reference/node/) are generated by [Typedoc](https://typedoc.org/).
192
+
Reference docs for the Firebase [JS SDK](https://firebase.google.com/docs/reference/js/) and
193
+
[Node (client) SDK](https://firebase.google.com/docs/reference/node/) are generated by
194
+
[Typedoc](https://typedoc.org/).
195
+
196
+
Typedoc generates this documentation from the main
197
+
[firebase index.d.ts type definition file](packages/firebase/index.d.ts). Any updates to
198
+
documentation should be made in that file.
137
199
138
-
Typedoc generates this documentation from the main [firebase index.d.ts type definition file](packages/firebase/index.d.ts). Any updates to documentation should be made in that file.
200
+
If any pages are added or removed by your change (by adding or removing a class or interface), the
[node/toc.yaml](scripts/docgen/content-sources/node/toc.yaml) need to be modified to reflect this.
139
203
140
-
If any pages are added or removed by your change (by adding or removing a class or interface), the [js/toc.yaml](scripts/docgen/content-sources/js/toc.yaml) and/or [node/toc.yaml](scripts/docgen/content-sources/node/toc.yaml) need to be modified to reflect this.
204
+
# Formatting Code
205
+
A Formatting Check CI failure in your PR indicates that the code does not follow the repo's
206
+
formatting guidelines. In your local build environment, please run the code formatting tool locally
207
+
by executing the command `yarn format`. Once the code is formatted, commit the changes and push your
208
+
branch. The push should cause the CI to re-check your PR's changes.
141
209
142
210
### Generating Documentation HTML Files
143
211
212
+
If the Doc Change Check fails in your PR, it indicates that the documentation has not been generated
213
+
correctly for the changes. In your local build environment, please run `yarn docgen devsite` to
214
+
generate the documentation locally. Once the documentation has been generated, commit the changes
215
+
and push your branch. The push should cause the CI to re-check your PR's changes.
216
+
144
217
In order to generate the HTML documentation files locally, go to the root of this repo, and run:
145
218
146
219
```
@@ -164,9 +237,16 @@ yarn docgen:node
164
237
Files will be written to `scripts/docgen/html` - js docs will go into the `/js`
165
238
subdirectory and node docs into the `/node` subdirectory.
166
239
167
-
**NOTE:** These files are formatted to be inserted into Google's documentation site, which adds some styling and navigation, so the raw files will be missing navigation elements and may not look polished. However, it should be enough to preview the content.
240
+
**NOTE:** These files are formatted to be inserted into Google's documentation site, which adds some
241
+
styling and navigation, so the raw files will be missing navigation elements and may not look
242
+
polished. However, it should be enough to preview the content.
168
243
169
-
This process will generate warnings forfiles that are generated but not listedin the `toc.yaml`, or files that are in the `toc.yaml` but were not generated (which means something is missing in`index.d.ts`). If this happens during the JS documentation generation, it probably means either the `toc.yaml` or `index.d.ts` is incorrect. But in the Node process, some generated files not being found in`toc.yaml` are to be expected, since Node documentation is a subset of the full JS documentation.
244
+
This process will generate warnings forfiles that are generated but not listedin the `toc.yaml`,
245
+
or files that are in the `toc.yaml` but were not generated (which means something is missing in
246
+
`index.d.ts`). If this happens during the JS documentation generation, it probably means either the
247
+
`toc.yaml` or `index.d.ts` is incorrect. But in the Node process, some generated files not being
248
+
found in`toc.yaml` are to be expected, since Node documentation is a subset of the full JS
249
+
documentation.
170
250
171
251
Follow the [PR submission guidelines](#submit) above to submit any documentation changes.
0 commit comments