Skip to content

Commit

Permalink
Merge branch 'release-4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Sep 23, 2019
2 parents 2b9c2d0 + 6369167 commit a8275c4
Show file tree
Hide file tree
Showing 72 changed files with 6,029 additions and 5,238 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
test/assets
workspace/
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@dadi",
"rules": {
"require-atomic-updates": "off"
}
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

* @jimlambie @eduardoboucas @adamkdean @abovedave
* @eduardoboucas
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage/
test/assets
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@dadi/prettier-config"
7 changes: 6 additions & 1 deletion .snyk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.12.0
version: v1.13.5
ignore: {}
# patches apply the minimum changes required to fix a vulnerability
patch:
Expand All @@ -17,3 +17,8 @@ patch:
patched: '2018-06-19T09:38:39.334Z'
- images > node-gyp > request > hawk > cryptiles > boom > hoek:
patched: '2018-06-19T09:38:39.334Z'
SNYK-JS-LODASH-450202:
- snyk > snyk-mvn-plugin > lodash:
patched: '2019-07-10T00:32:06.056Z'
- snyk > snyk-php-plugin > @snyk/composer-lockfile-parser > lodash:
patched: '2019-07-10T00:32:06.056Z'
239 changes: 127 additions & 112 deletions CHANGELOG.md

Large diffs are not rendered by default.

159 changes: 84 additions & 75 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ We'd love for you to contribute to our source code and to make DADI CDN even bet

Here are the guidelines we'd like you to follow:

- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Git Commit Guidelines](#commit)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Git Commit Guidelines](#commit)

## <a name="question"></a> Got a Question or Problem?

Expand All @@ -21,75 +21,80 @@ If the documentation doesn't answer your problem please feel free to email the
DADI team directly on: [email protected]

## <a name="issue"></a> Found an Issue?

If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an issue to our [GitHub Repository][github]. But we'd love it if you
submitted a Pull Request with a fix instead!

**Please see the Submission Guidelines below**.

## <a name="feature"></a> Want a Feature?

You can request a new feature by submitting an issue to our [GitHub][issues] issue tracker.
If you would like to implement a new feature then consider what kind of change it is:

* **Major Changes** that you wish to contribute to the project should be added as
a Feature Request in the [GitHub][issues] issue tracker. This will get the conversation
started.
* **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a Pull Request.
- **Major Changes** that you wish to contribute to the project should be added as
a Feature Request in the [GitHub][issues] issue tracker. This will get the conversation
started.
- **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a Pull Request.

## <a name="submit"></a> Submission Guidelines

### Submitting an Issue

Before you submit your issue [search the archive][issues], maybe your question was already answered.

If your issue appears to be a bug, and hasn't been reported, open a new issue.
Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues. Providing the following information will increase the
features, by not reporting duplicate issues. Providing the following information will increase the
chances of your issue being dealt with quickly:

* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
* **Motivation for or Use Case** - explain why this is a bug for you
* **DADI CDN Version**
* **Operating System**
* **Steps to Reproduce** - provide a set of steps to follow to reproduce the error.
* **Related Issues** - has a similar issue been reported before?
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
- **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
- **Motivation for or Use Case** - explain why this is a bug for you
- **DADI CDN Version**
- **Operating System**
- **Steps to Reproduce** - provide a set of steps to follow to reproduce the error.
- **Related Issues** - has a similar issue been reported before?
- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (e.g. a line of code or a commit)

### Submitting a Pull Request

Before you submit your pull request consider the following guidelines:

* Search [GitHub][pulls] for an open or closed Pull Request
- Search [GitHub][pulls] for an open or closed Pull Request
that relates to your submission. You don't want to duplicate effort.
* Fork the original repository and clone your fork ([see this GitHub article](https://help.github.com/articles/fork-a-repo/)).
* Add the original repository as an upstream remote: `git remote add upstream https://github.com/dadi/cdn.git`

* Make your changes in a new git branch. Name your branch using the format `topic/branch_name`.
Use `fix` for fixes and `feature` for features:

```shell
git checkout -b fix/my-fix-branch master
```
```shell
git checkout -b feature/my-new-feature-branch master
```

* Create your patch, **including appropriate test cases**.
* Follow our [Coding Rules](#rules).
* Run the full test suite using `npm test` and ensure that all tests pass.
* Commit your changes using a descriptive commit message that follows our
- Fork the original repository and clone your fork ([see this GitHub article](https://help.github.com/articles/fork-a-repo/)).
- Add the original repository as an upstream remote: `git remote add upstream https://github.com/dadi/cdn.git`

- Make your changes in a new git branch. Name your branch using the format `topic/branch_name`.
Use `fix` for fixes and `feature` for features:

```shell
git checkout -b fix/my-fix-branch master
```

```shell
git checkout -b feature/my-new-feature-branch master
```

- Create your patch, **including appropriate test cases**.
- Follow our [Coding Rules](#rules).
- Run the full test suite using `npm test` and ensure that all tests pass.
- Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit-message-format) and passes our commit message presubmit hook. Adherence to the [commit message conventions](#commit-message-format) is required because release notes are automatically generated from these messages.
* Push your branch to GitHub:
- Push your branch to GitHub:

```shell
git push origin fix/my-fix-branch
```

* In GitHub, send a pull request to `dadi/cdn:master`.
* If we suggest changes then:
* Make the required updates.
* Re-run the full test suite to ensure tests are still passing.
* Commit your changes to your branch (e.g. `fix/my-fix-branch`).
* Push the changes to GitHub (this will update your Pull Request).
- In GitHub, send a pull request to `dadi/cdn:master`.
- If we suggest changes then:
- Make the required updates.
- Re-run the full test suite to ensure tests are still passing.
- Commit your changes to your branch (e.g. `fix/my-fix-branch`).
- Push the changes to GitHub (this will update your Pull Request).

If the pull request gets too outdated we may ask you to rebase and force push to update the pull request:

Expand All @@ -98,50 +103,51 @@ git rebase master -i
git push origin fix/my-fix-branch -f
```

*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.*
_WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits._

* Documentation! Please add relevant documentation to the pull request. If this is a new feature then
please document it fully within the pull request. If you're making changes to an existing feature, please
give us a link to the existing [documentation][docs] along with your documentation changes. If you need
an example of excellent pull request documentation, have a look at the [effort put in here](https://github.com/dadi/api/pull/27).
- Documentation! Please add relevant documentation to the pull request. If this is a new feature then
please document it fully within the pull request. If you're making changes to an existing feature, please
give us a link to the existing [documentation][docs] along with your documentation changes. If you need
an example of excellent pull request documentation, have a look at the [effort put in here](https://github.com/dadi/api/pull/27).

> That's it! Thank you for your contribution!
#### After your pull request is merged

After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:

* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:

```shell
git push origin --delete my-fix-branch
```

* Check out the master branch:
- Check out the master branch:

```shell
git checkout master -f
```

* Delete the local branch:
- Delete the local branch:

```shell
git branch -D my-fix-branch
```

* Update your master with the latest upstream version:
- Update your master with the latest upstream version:

```shell
git pull --ff upstream master
```

## <a name="rules"></a> Coding Rules

To ensure consistency throughout the source code, keep these rules in mind as you are working:

* Please use **two-space indentation**, as used in Node.JS itself.
* All features or bug fixes **must be tested** by one or more tests. Browse the [test
suite][tests] for examples.
* All public API methods **must be documented** with [JSDoc](http://usejsdoc.org/).
- Please use **two-space indentation**, as used in Node.JS itself.
- All features or bug fixes **must be tested** by one or more tests. Browse the [test
suite][tests] for examples.
- All public API methods **must be documented** with [JSDoc](http://usejsdoc.org/).

## <a name="commit"></a> Git Commit Guidelines

Expand All @@ -153,7 +159,7 @@ Please don't include more than one change in each patch. If your commit message

### Commit Message Format

We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. We also use the git commit messages to **generate the change log**.
We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. We also use the git commit messages to **generate the change log**.

The commit message format validation can be initialised by running `npm run init` from the root of the repository. This will add a symlink at `.git/hooks/commit-msg` which will be run every time you commit.

Expand All @@ -163,7 +169,7 @@ Any line of the commit message cannot be longer 100 characters. This allows the

#### Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type** and a **subject**:
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type** and a **subject**:

```
type: subject
Expand All @@ -175,46 +181,49 @@ Close #yyy
Ref #zzz
```

* Use `Fix #xxx` when the commit fixes an open issue.
* Use `Close #xxx` when the commit closes an open pull request.
* Use `Ref #xxx` when referencing an issue or pull request that is already closed or should remain open. Examples include partial fixes and commits that add a test but not a fix.
- Use `Fix #xxx` when the commit fixes an open issue.
- Use `Close #xxx` when the commit closes an open pull request.
- Use `Ref #xxx` when referencing an issue or pull request that is already closed or should remain open. Examples include partial fixes and commits that add a test but not a fix.

### Reverting
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

### Type

Must be one of the following:

* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation

### Subject

The subject contains a succinct description of the change:

* use the imperative, present tense: "fix" not "fixed" nor "fixes"
* don't capitalize first letter
* no dot (.) at the end
- use the imperative, present tense: "fix" not "fixed" nor "fixes"
- don't capitalize first letter
- no dot (.) at the end

### Body

Just as in the **subject**, write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug". This convention matches up with commit messages generated by commands like `git merge` and `git revert`.

The body should include the motivation for the change and contrast this with previous behavior.

### Footer

The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.


[github]: https://github.com/dadi/cdn
[issues]: https://github.com/dadi/cdn/issues
[pulls]: https://github.com/dadi/cdn/pulls
[tests]: https://github.com/dadi/cdn/tree/master/test
[docs]: https://github.com/dadi/cdn/tree/docs/

Loading

0 comments on commit a8275c4

Please sign in to comment.