Skip to content

Commit 367359f

Browse files
authored
Merge branch 'master' into from-docker-build-asset
2 parents 8922faf + a84b76a commit 367359f

File tree

2 files changed

+32
-34
lines changed

2 files changed

+32
-34
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ and instead only depend on having a working Docker install.
129129
### Step 1: Open Issue
130130

131131
If there isn't one already, open an issue describing what you intend to contribute. It's useful to communicate in
132-
advance, because sometimes, someone is already working in this space, so maybe it's worth collaborating with them
133-
instead of duplicating the efforts.
132+
advance because if someone is already working in this space, it may be worth collaborating with them
133+
instead of duplicating the effort.
134134

135135
### Step 2: Design (optional)
136136

137-
In some cases, it is useful to seek for feedback by iterating on a design document. This is useful
137+
In some cases, it is useful to seek feedback by iterating on a design document. This is useful
138138
when you plan a big change or feature, or you want advice on what would be the best path forward.
139139

140140
Sometimes, the GitHub issue is sufficient for such discussions, and can be sufficient to get
@@ -166,7 +166,7 @@ Work your magic. Here are some guidelines:
166166
* Every change requires a unit test
167167
* If you change APIs, make sure to update the module's README file
168168
* Try to maintain a single feature/bugfix per pull request. It's okay to introduce a little bit of housekeeping
169-
changes along the way, but try to avoid conflating multiple features. Eventually all these are going to go into a
169+
changes along the way, but try to avoid conflating multiple features. Eventually, all these are going to go into a
170170
single commit, so you can use that to frame your scope.
171171
* If your change introduces a new construct, take a look at the our
172172
[example Construct Library](packages/@aws-cdk/example-construct-library) for an explanation of the common patterns we use.
@@ -249,7 +249,7 @@ BREAKING CHANGE: Description of what broke and how to achieve this behavior now
249249

250250
### Step 5: Pull Request
251251

252-
* Push to a GitHub fork or to a branch (naming convention: `<user>/<feature-bug-name>`)
252+
* Push to a GitHub fork or to a branch (naming convention: `<user>/<feature-bug-name>`).
253253
* Submit a Pull Request on GitHub. A reviewer will later be assigned by the maintainers.
254254
* Please follow the PR checklist written below. We trust our contributors to self-check, and this helps that process!
255255
* Discuss review comments and iterate until you get at least one “Approve”. When iterating, push new commits to the
@@ -262,15 +262,15 @@ BREAKING CHANGE: Description of what broke and how to achieve this behavior now
262262

263263
### Step 6: Merge
264264

265-
* Make sure your PR builds successfully (we have CodeBuild setup to automatically build all PRs)
265+
* Make sure your PR builds successfully (we have CodeBuild setup to automatically build all PRs).
266266
* Once approved and tested, a maintainer will squash-merge to master and will use your PR title/description as the
267267
commit message.
268268

269269
## Tools
270270

271-
The CDK is a big project, and, at the moment, all of the CDK modules are mastered in a single monolithic repository
271+
The CDK is a big project, and at the moment, all of the CDK modules are mastered in a single monolithic repository
272272
(uses [lerna](https://github.com/lerna/lerna)). There are pros and cons to this approach, and it's especially valuable
273-
to maintain integrity in the early stage of the project where things constantly change across the stack. In the future
273+
to maintain integrity in the early stage of the project where things constantly change across the stack. In the future,
274274
we believe many of these modules will be extracted to their own repositories.
275275

276276
Another complexity is that the CDK is packaged using [jsii](https://github.com/aws/jsii) to multiple programming
@@ -328,7 +328,7 @@ They can also be executed independently of the build script. From the root of a
328328
yarn lint
329329
```
330330

331-
The following linters are used -
331+
The following linters are used:
332332

333333
- [eslint](#eslint)
334334
- [pkglint](#pkglint)
@@ -375,7 +375,7 @@ the [guidelines](./DESIGN_GUIDELINES.md).
375375
Here are a few useful commands:
376376

377377
* `yarn awslint` in every module will run __awslint__ for that module.
378-
* `yarn awslint list` prints all rules (details and rationale in the guidelines doc)
378+
* `yarn awslint list` prints all rules (details and rationale in the guidelines doc).
379379
* `scripts/foreach.sh yarn awslint` will start linting the entire repo, progressively. Rerun `scripts/foreach.sh` after fixing to continue.
380380
* `lerna run awslint --no-bail --stream 2> awslint.txt` will run __awslint__ in all modules and collect all results into awslint.txt
381381
* `lerna run awslint -- -i <RULE>` will run awslint throughout the repo and
@@ -391,7 +391,7 @@ examples are still accurate. Successfully building examples is also necessary to
391391
other supported languages (`C#`, `Java`, `Python`, ...).
392392

393393
> Note that examples may use libraries that are not part of the `dependencies` or `devDependencies` of the documented
394-
> package. For example `@aws-cdk/core` contains mainy examples that leverage libraries built *on top of it* (such as
394+
> package. For example, `@aws-cdk/core` contains many examples that leverage libraries built *on top of it* (such as
395395
> `@aws-cdk/aws-sns`). Such libraries must be built (using `yarn build`) before **jsii-rosetta** can verify that
396396
> examples are correct.
397397
@@ -426,7 +426,7 @@ Each module also has an npm script called `cfn2ts`:
426426
### scripts/foreach.sh
427427

428428
This wonderful tool allows you to execute a command for all modules in this repo
429-
in topological order, but has the incredible property of being stateful. this
429+
in topological order, but has the incredible property of being stateful. This
430430
means that if a command fails, you can fix the issue and resume from where you
431431
left off.
432432

@@ -437,7 +437,7 @@ $ scripts/foreach.sh COMMAND
437437
```
438438

439439
This will execute "COMMAND" for each module in the repo (cwd will be the directory of the module).
440-
if a task fails, it will stop, and then to resume, simply run `foreach.sh` again (with or without the same command).
440+
If a task fails, it will stop. To resume, simply run `foreach.sh` again (with or without the same command).
441441

442442
To reset the session (either when all tasks finished or if you wish to run a different session), run:
443443

@@ -452,11 +452,11 @@ $ cd packages/my-module
452452
$ ../scripts/foreach.sh --up COMMAND
453453
```
454454

455-
This will execute `COMMAND` against `my-module` and all it's deps (in a topological order of course).
455+
This will execute `COMMAND` against `my-module` and all its deps (in a topological order, of course).
456456

457457
### Jetbrains support (WebStorm/IntelliJ)
458458

459-
This project uses lerna and utilizes symlinks inside nested node_modules directories. You may encounter an issue during
459+
This project uses lerna and utilizes symlinks inside nested `node_modules` directories. You may encounter an issue during
460460
indexing where the IDE attempts to index these directories and keeps following links until the process runs out of
461461
available memory and crashes. To fix this, you can run ```node ./scripts/jetbrains-remove-node-modules.js``` to exclude
462462
these directories.
@@ -528,12 +528,12 @@ $ cd packages/@aws-cdk/aws-ec2
528528
$ ../../../scripts/buildup
529529
```
530530

531-
Note that `buildup` uses `foreach.sh`, which means it's resumable. If your build fails and you wish to resume, just run
531+
Note that `buildup` uses `foreach.sh`, which means it is resumable. If your build fails and you wish to resume, just run
532532
`buildup --resume`. If you wish to restart, run `buildup` again.
533533

534534
### Partial pack
535535

536-
Packing involves generating CDK code in the various target languages, and packaged up ready to be published to the
536+
Packing involves generating CDK code in the various target languages and packaging them up to be published to their
537537
respective package managers. Once in a while, these will need to be generated either to test the experience of a new
538538
feature, or reproduce a packaging failure.
539539

@@ -569,14 +569,14 @@ Code...
569569

570570
Now to test, you can either use `yarn test` or invoke nodeunit/jest directly:
571571

572-
Running nodeunit tests directly on a module
572+
Running nodeunit tests directly on a module:
573573
```console
574574
$ cd packages/@aws-cdk/aws-iam
575575
$ nodeunit test/test.*.js
576576
<BOOM>
577577
```
578578

579-
Running jest tests directly on a module
579+
Running jest tests directly on a module:
580580
```console
581581
$ cd packages/@aws-cdk/aws-iam
582582
$ jest test/*test.js
@@ -599,7 +599,7 @@ One can use the `postinstall` script to symlink this repo:
599599
```
600600

601601
This assumes this repo is a sibling of the target repo and will install the CDK as a linked dependency during
602-
__yarn install__.
602+
`yarn install`.
603603

604604
### Running integration tests in parallel
605605

@@ -713,7 +713,7 @@ can be used in these cases.
713713
#### Fixture Files
714714

715715
Examples typed in fenced code blocks (looking like `'''ts`, but then with backticks
716-
instead of regular quotes) will be automatically extrated, compiled and translated
716+
instead of regular quotes) will be automatically extracted, compiled and translated
717717
to other languages when the bindings are generated.
718718

719719
To successfully do that, they must be compilable. The easiest way to do that is using
@@ -765,14 +765,14 @@ In order to offer a consistent documentation style throughout the AWS CDK
765765
codebase, example code should follow the following recommendations (there may be
766766
cases where some of those do not apply - good judgement is to be applied):
767767

768-
- Types from the documented module should be **un-qualified**
768+
- Types from the documented module should be **un-qualified**:
769769

770770
```ts
771771
// An example in the @aws-cdk/core library, which defines Duration
772772
Duration.minutes(15);
773773
```
774774

775-
- Types from other modules should be **qualified**
775+
- Types from other modules should be **qualified**:
776776

777777
```ts
778778
// An example in the @aws-cdk/core library, using something from @aws-cdk/aws-s3
@@ -880,7 +880,7 @@ this branch belongs to.
880880
To reduce merge conflicts in automatic merges between version branches, the
881881
current version number is stored under `version.vNN.json` (where `NN` is
882882
`majorVersion`) and changelogs are stored under `CHANGELOG.NN.md` (for
883-
historical reasons, the changelog for 1.x is under `CHANGELOG.md`). When we
883+
historical reasons, the changelog for 1.x is under `CHANGELOG.md`). When we
884884
fork to a new release branch (e.g. `v2-main`), we will update `release.json` in
885885
this branch to reflect the new version line, and this information will be used
886886
to determine how releases are cut.
@@ -931,8 +931,7 @@ $ yarn build
931931
However, this will be time consuming. In this section we'll describe some common issues you may encounter and some more
932932
targeted commands you can run to resolve your issue.
933933

934-
* The compiler is throwing errors on files that I renamed/it's running old tests that I meant to remove/code coverage is
935-
low and I didn't change anything.
934+
#### The compiler is throwing errors on files that I renamed/it's running old tests that I meant to remove/code coverage is low and I didn't change anything.
936935

937936
If you switch to a branch in which `.ts` files got renamed or deleted, the generated `.js` and `.d.ts` files from the
938937
previous compilation run are still around and may in some cases still be picked up by the compiler or test runners.
@@ -943,27 +942,26 @@ Run the following to clear out stale build artifacts:
943942
$ scripts/clean-stale-files.sh
944943
```
945944

946-
* I added a dependency but it's not being picked up by the build
945+
#### I added a dependency but it's not being picked up by the build
947946

948947
You need to tell Lerna to update all dependencies:
949948

950949
```shell
951950
$ node_modules/.bin/lerna bootstrap
952951
```
953952

954-
* I added a dependency but it's not being picked up by a `watch` background compilation run.
953+
#### I added a dependency but it's not being picked up by a `watch` background compilation run.
955954

956955
No it's not. After re-bootstrapping you need to restart the watch command.
957956

958-
* I added a dependency but it's not being picked up by Visual Studio Code (I still get red underlines).
957+
#### I added a dependency but it's not being picked up by Visual Studio Code (I still get red underlines).
959958

960959
The TypeScript compiler that's running has cached your dependency tree. After re-bootstrapping,
961960
restart the TypeScript compiler.
962961

963962
Hit F1, type `> TypeScript: Restart TS Server`.
964963

965-
* I'm doing refactorings between packages and compile times are killing me/I need to switch between
966-
differently-verionsed branches a lot and rebuilds because of version errors are taking too long.
964+
#### I'm doing refactorings between packages and compile times are killing me/I need to switch between differently-verionsed branches a lot and rebuilds because of version errors are taking too long.
967965

968966
Our build steps for each package do a couple of things, such as generating code and generating JSII assemblies. If
969967
you've done a full build at least once to generate all source files, you can do a quicker TypeScript-only rebuild of the
@@ -996,7 +994,7 @@ $ CDK_TEST_BUILD=false lr test
996994
To debug your CDK application along with the CDK repository,
997995

998996
1. Clone the CDK repository locally and build the repository. See [Workflows](#workflows) section for the different build options.
999-
2. Build the CDK application using the appropriate npm script (typically, `yarn build`) and then run the `link-all.sh` script as so -
997+
2. Build the CDK application using the appropriate npm script (typically, `yarn build`) and then run the `link-all.sh` script as follows:
1000998

1001999
```
10021000
cd /path/to/cdk/app
@@ -1036,7 +1034,7 @@ To debug your CDK application along with the CDK repository,
10361034
}
10371035
```
10381036

1039-
*Go [here](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) for more about launch configurations.*
1037+
*NOTE: Go [here](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) for more about launch configurations.*
10401038

10411039
6. The debug view, should now have a launch configuration called 'Debug hello-cdk' and launching that will start the debugger.
10421040
7. Any time you modify the CDK app or any of the CDK modules, they need to be re-built and depending on the change the `link-all.sh` script from step#2, may need to be re-run. Only then, would VS code recognize the change and potentially the breakpoint.

packages/@aws-cdk/aws-docdb/lib/endpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class Endpoint {
4040
public readonly port: number;
4141

4242
/**
43-
* The combination of "HOSTNAME:PORT" for this endpoint
43+
* The combination of ``HOSTNAME:PORT`` for this endpoint.
4444
*/
4545
public readonly socketAddress: string;
4646

0 commit comments

Comments
 (0)