UNPKG

5.11 kBMarkdownView Raw
1# Contributing Guidelines
2
3Thank you for your interest in contributing to our project. Whether it's a bug
4report, new feature, correction, or additional documentation, we greatly value
5feedback and contributions from our community.
6
7Please read through this document before submitting any issues or pull requests
8to ensure we have all the necessary information to effectively respond to your
9bug report or contribution.
10
11## Development
12
13To setup a development environment, you'll need
14[Node.js](https://nodejs.org/en/) and [yarn](https://yarnpkg.com/).
15
16Fresh full build:
17
181. Clone the repo
192. Run `yarn install`
203. Run `yarn build`
21
22You can also use these more granular scripts:
23
24- `yarn compile`: compile code to JavaScript
25- `yarn watch`: watch in the background and compile
26- `yarn test`: run all tests and linters
27- `yarn compat`: check that APIs do not introduce breaking changes
28- `yarn lint`: run eslint and API compatibility
29
30### Docker Build
31
32If you want to use docker to build, test and package your work use the following:
33
34```shell script
35docker build -t constructs .
36```
37
38### Using a local version of this library in a dependency
39
40If you're doing changes to this library,
41you often want to test them being used in a real dependency
42(for example, the [AWS CDK](https://github.com/aws/aws-cdk))
43to verify the changes work like expected.
44To make that easier,
45this repository includes a script in the `scripts`
46directory that overwrites the version of `constructs`
47in a dependency's `node_modules`
48with a symbolic link to the local version of `constructs`:
49
50```shell script
51cd my/project/that/uses/constructs/library
52/path/to/source/of/constructs/scripts/link.sh
53```
54
55## Reporting Bugs/Feature Requests
56
57We welcome you to use the GitHub issue tracker to report bugs or suggest
58features.
59
60When filing an issue, please check existing open, or recently closed, issues to
61make sure somebody else hasn't already reported the issue. Please try to include
62as much information as you can. Details like these are incredibly useful:
63
64* A reproducible test case or series of steps
65* The version of our code being used
66* Any modifications you've made relevant to the bug
67* Anything unusual about your environment or deployment
68
69## Contributing via Pull Requests
70
71Contributions via pull requests are much appreciated. Before sending us a pull
72request, please ensure that:
73
741. You are working against the latest source on the *master* branch.
752. You check existing open, and recently merged, pull requests to make sure
76 someone else hasn't addressed the problem already.
773. You open an issue to discuss any significant work - we would hate for your
78 time to be wasted.
79
80To send us a pull request, please:
81
821. Fork the repository.
832. Modify the source; please focus on the specific change you are contributing.
84 If you also reformat all the code, it will be hard for us to focus on your
85 change.
863. Ensure local tests pass.
874. Commit to your fork using clear commit messages.
885. Send us a pull request, answering any default questions in the pull request
89 interface.
906. Pay attention to any automated CI failures reported in the pull request, and
91 stay involved in the conversation.
92
93GitHub provides additional document on [forking a
94repository](https://help.github.com/articles/fork-a-repo/) and [creating a pull
95request](https://help.github.com/articles/creating-a-pull-request/).
96
97
98## Finding contributions to work on
99
100Looking at the existing issues is a great way to find something to contribute
101on. As our projects, by default, use the default GitHub issue labels
102(enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any
103'help wanted' issues is a great place to start.
104
105
106## Code of Conduct
107
108This project has adopted the [Amazon Open Source Code of
109Conduct](https://aws.github.io/code-of-conduct). For more information see the
110[Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
111opensource-codeofconduct@amazon.com with any additional questions or comments.
112
113## Security issue notifications
114
115If you discover a potential security issue in this project we ask that you
116notify AWS/Amazon Security via our [vulnerability reporting
117page](http://aws.amazon.com/security/vulnerability-reporting/). Please do
118**not** create a public github issue.
119
120## Releasing a New Version
121
122To release a new version, run `yarn bump` which will:"
123
124- Calculate the next version (minor/patch) based on [conventional
125 commits](https://www.conventionalcommits.org/en/v1.0.0/).
126- Update the [CHANGELOG](./CHANGELOG.md).
127- Create a git commit and tag.
128
129Then, execute:
130
131```shell
132git push --follow-tags origin master
133```
134
135Once the commit is pushed to master, the [release
136workflow](./.github/workflows/release.yml) will be triggered and the new version
137will be published to all package managers.
138
139## Licensing
140
141See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to
142confirm the licensing of your contribution.
143
144We may ask you to sign a [Contributor License Agreement
145(CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger
146changes.