Skip to content

Commit

Permalink
Merge pull request #279 from adobe/ccc
Browse files Browse the repository at this point in the history
Conventional Commits & Changelogs
  • Loading branch information
jianliao authored Sep 19, 2019
2 parents 0ee67d5 + a26ec48 commit 8163b0b
Show file tree
Hide file tree
Showing 48 changed files with 10,958 additions and 9,602 deletions.
64 changes: 20 additions & 44 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ We love pull requests from everyone.

The following are a set of guidelines to follow when contributing to this project.

## Code Of Conduct
## Code of conduct

This project adheres to the Adobe [code of conduct](CODE_OF_CONDUCT.md). By participating,
you are expected to uphold this code. Please report unacceptable behavior to
[[email protected]](mailto:[email protected]).

## Have A Question?
## Have a question?

Start by filing an issue. The existing committers on this project work to reach
consensus around project direction and issue solutions within issue threads
(when appropriate).

### Security Issues
### Security issues

Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).

## Contributor License Agreement
## Contributor license agreement

All third-party contributions to this project must be accompanied by a signed contributor
license agreement. This gives Adobe permission to redistribute your contributions
as part of the project. [Sign our CLA](http://opensource.adobe.com/cla.html). You
only need to submit an Adobe CLA one time, so if you have submitted one previously,
you are good to go!

## Code Reviews
## Submitting a contribution

All submissions should come in the form of pull requests and need to be reviewed
by project committers.
Expand All @@ -47,16 +47,22 @@ git push -u origin my-awesome-new-feature
git remote add upstream [email protected]:adobe/spectrum-css.git
```

Install dependencies (`npm ci` won't work unless you're inside the Adobe network):
Install [yarn](https://yarnpkg.com/en/docs/install):

```
npm install
brew install yarn || curl -o- -L https://yarnpkg.com/install.sh | bash
```

Make sure the [gulp-cli](https://github.com/gulpjs/gulp-cli) is installed globally:

```
npm install -g gulp-cli
yarn global add gulp-cli
```

Install dependencies:

```
yarn install
```

Build the project, open a livereloading browser window, and watch for changes:
Expand All @@ -65,41 +71,11 @@ Build the project, open a livereloading browser window, and watch for changes:
gulp dev
```

Commit changes, referencing the relevant issue number (if any):

```
git commit -m "Cool stuff, closes #250, fixes #252"
```

Consider starting the commit message with an applicable emoji:

* :art: `:art:` when improving the format/structure of the code
* :zap: `:zap:` when improving performance
* :non-potable_water: `:non-potable_water:` when plugging memory leaks
* :memo: `:memo:` when writing docs
* :ambulance: `:ambulance:` a critical hotfix.
* :sparkles: `:sparkles:` when introducing new features
* :bookmark: `:bookmark:` when releasing / version tags
* :rocket: `:rocket:` when deploying stuff
* :penguin: `:penguin:` when fixing something on Android
* :apple: `:apple:` when fixing something on iOS
* :checkered_flag: `:checkered_flag:` when fixing something on Windows
* :bug: `:bug:` when fixing a bug
* :fire: `:fire:` when removing code or files
* :green_heart: `:green_heart:` when fixing the CI build
* :white_check_mark: `:white_check_mark:` when adding tests
* :lock: `:lock:` when dealing with security
* :arrow_up: `:arrow_up:` when upgrading dependencies
* :arrow_down: `:arrow_down:` when downgrading dependencies
* :shirt: `:shirt:` when removing linter warnings
* :hammer: `:hammer:` when doing heavy refactoring
* :heavy_minus_sign: `:heavy_minus_sign:` when removing a dependency.
* :heavy_plus_sign: `:heavy_plus_sign:` when adding a dependency.
* :wrench: `:wrench:` when changing configuration files.
* :globe_with_meridians: `:globe_with_meridians:` when dealing with internationalization and localization.
* :pencil2: `:pencil2:` when fixing typos.
* :hankey: `:hankey:` when writing bad code that needs to be improved.
* :package: `:package:` when updating compiled files or packages.
Commit changes with a [conventional commit message](https://www.conventionalcommits.org), making sure to correctly use `feat:`, `fix:`, and `BREAKING CHANGE` accordingly, and referencing the relevant issue number (if any):

```
git commit -m "fix: calendar rendering issue in Safari, fixes #252"
```

Make sure your branch is up to date with the original repo:

Expand All @@ -120,6 +96,6 @@ At this point you're waiting on us. We do our best to keep on top of all the pul

Some things that will increase the chance that your pull request is accepted:

- Write a [good commit message](http://chris.beams.io/posts/git-commit/).
- Write a good pull request description, include screenshots, and test your changes across all evergreen browsers (and IE 11, sadly)
- Make sure the PR merges cleanly with the latest master.
- Describe your feature/bugfix and why it's needed/important in the pull request description.
44 changes: 19 additions & 25 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
<!--- Provide a general summary of your changes in the Title above -->
<!-- Summarize your changes in the Title field -->

## Description
<!--- Describe your changes in detail -->
<!--
Note: Before sending a pull request, make sure there's an issue for what you're changing
- Search for issues: https://github.com/adobe/spectrum-css/issues
- If there's no issue, file it: https://github.com/adobe/spectrum-css/issues/new/choose
-->
<!-- Describe what you changed and link to the relevant issue(s) (e.g., #000) -->

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
## How and where has this been tested?

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
- How this was tested: <!-- Using steps in issue #000 -->
- Browser(s) and OS(s) this was tested with: <!-- Chrome 75.0.3770.142 on Win 10 -->

## Screenshots (if appropriate):
## Screenshots
<!-- If applicable, add screenshots to show what you changed -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
## To-do list
<!-- Put an "x" to indicate you've done each of the following -->
- [ ] If my change impacts other components, I have tested to make sure they don't break.
- [ ] If my change impacts documentation, I have updated the documentation accordingly.
- [ ] I have read the [CONTRIBUTING document](/.github/CONTRIBUTING.md).
<!-- If this pull request isn't ready, add any remaning tasks here -->
- [ ] This pull request is ready to merge.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ language: node_js
node_js:
- "node"
install:
- npm install
- yarn
before_script:
- npm install -g gulp-cli
- yarn global add gulp-cli
script:
# This script should be the first that runs to reduce the risk of
# executing a script from a compromised NPM package.
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-optional true
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,24 @@ gulp dev

## Releasing

Releasing is handled by Lerna. When any component or its dependencies change, Lerna will queue that component (and all of its dependents) up for a release. Additionally, if any component included by a bundle changes, the bundle will be queued up for a release.
### Releasing individual components

Releasing individual components is handled by Lerna. When any component or its dependencies change, Lerna will queue that component (and all of its dependents) up for a release.

To release everything that has changed, simply run:

```
npm run release
```

After you enter version numbers for all changed components and bundles, Lerna and npm scripts will handle the rest, including deployed documentation sites.
Version numbers are automatically determined, changelogs generated, and packages published.

### Releasing bundles

Bundles are released with a separate command, intended to be ran after individual components are released. To release bundles, simply run:

```
npm run release-bundles
```

Version numbers for dependencies and then bundle itself will be updated automatically, a changelog generated, the package published, and the documentation site deployed.
17 changes: 10 additions & 7 deletions bundles/spectrum-css-compat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@ If breaking changes are made to any components included in `package.json`, that

## Release process

1. Update any version numbers for updated components in `package.json`. Generally, version ranges will do this for you.

2. Run the bootstrap script in the root of the project:
1. Run the release script in the root of the project to release individual components:

```
npm run bootstrap
npm run release
```

3. Run the release script in the root of the project:
2. Run the release script. Version numbers will be updated automatically, the package will be published, and the documentation site will be deployed.

To release all bundles:
```
npm run release
npm run release-bundles
```

4. Choose the appropriate version for each package according to semver. The rest of the release process will happen automatically, with github pages and npm packages being published accordingly.
To release only this bundle:
```
cd bundles/spectrum-css-compat
npm run release
```

## CLI

Expand Down
2 changes: 1 addition & 1 deletion bundles/spectrum-css-compat/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@spectrum-css/bundle-builder');
module.exports = require('../../tools/bundle-builder');
10 changes: 4 additions & 6 deletions bundles/spectrum-css-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"build": "gulp build",
"prepack": "gulp prePack",
"postpublish": "gulp postPublish",
"publishpages": "gulp ghPages"
"publishpages": "gulp ghPages",
"release": "gulp release"
},
"repository": {
"type": "git",
Expand All @@ -20,11 +21,9 @@
"bugs": {
"url": "https://github.com/adobe/spectrum-css/issues"
},
"optionalDependencies": {
"@spectrum/spectrum-icons": "^2.3.0"
},
"homepage": "https://opensource.adobe.com/spectrum-css/",
"license": "Apache-2.0",
"devDependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.0.0-beta.6",
"@spectrum-css/accordion": "^2.0.0-alpha.6",
"@spectrum-css/actionbar": "^2.0.0-alpha.6",
"@spectrum-css/actionmenu": "^2.0.0-alpha.6",
Expand All @@ -35,7 +34,6 @@
"@spectrum-css/banner": "^2.0.0-alpha.5",
"@spectrum-css/barloader": "^2.0.0-alpha.5",
"@spectrum-css/breadcrumb": "^2.0.0-alpha.6",
"@spectrum-css/bundle-builder": "^1.0.0-alpha.4",
"@spectrum-css/button": "^2.0.0-alpha.6",
"@spectrum-css/buttongroup": "^2.0.0-alpha.6",
"@spectrum-css/calendar": "^2.0.0-alpha.6",
Expand Down
26 changes: 12 additions & 14 deletions bundles/spectrum-css/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @adobe/spectrum-css@latest
# @spectrum-css/spectrum-css@latest
> Bundle package
This package builds a bundle package containing the latest versions of all Spectrum CSS components.
Expand All @@ -13,27 +13,25 @@ If breaking changes are made to any components, this package's major version num

## Release process

1. Add any newly created components to `package.json` with the version of `*`.

2. Run the bootstrap script in the root of the project:
1. Run the release script in the root of the project to release individual components:

```
npm run bootstrap
npm run release
```

3. Run the release script in the root of the project:
2. Run the release script. Version numbers will be updated automatically, the package will be published, and the documentation site will be deployed.

To release all bundles:
```
npm run release
npm run release-bundles
```

4. Choose the appropriate version for each package according to semver. The rest of the release process will happen automatically, with github pages and npm packages being published accordingly.
To release only this bundle:
```
cd bundles/spectrum-css
npm run release
```

## CLI

The following tasks are available:

* `gulp clean` - Clean everything
* `gulp build` - Build documentation and copy build output into the `dist/` folder
* `gulp dev` - Perform a build, start a server, and watch `bundle-builder` for changes
* `gulp watch` - If a build as already been performed, start a server and watch `bundle-builder` for changes
See [`bundle-builder` CLI](/tools/bundle-builder#cli).
2 changes: 1 addition & 1 deletion bundles/spectrum-css/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@spectrum-css/bundle-builder');
module.exports = require('../../tools/bundle-builder');
10 changes: 4 additions & 6 deletions bundles/spectrum-css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"build": "gulp build",
"prepack": "gulp prePack",
"postpublish": "gulp postPublish",
"publishpages": "gulp ghPages"
"publishpages": "gulp ghPages",
"release": "gulp release"
},
"repository": {
"type": "git",
Expand All @@ -20,11 +21,9 @@
"bugs": {
"url": "https://github.com/adobe/spectrum-css/issues"
},
"optionalDependencies": {
"@spectrum/spectrum-icons": "^2.3.0"
},
"homepage": "https://opensource.adobe.com/spectrum-css/",
"license": "Apache-2.0",
"devDependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.0.0-beta.6",
"@spectrum-css/accordion": "^2.0.0-alpha.6",
"@spectrum-css/actionbar": "^2.0.0-alpha.6",
"@spectrum-css/actionmenu": "^2.0.0-alpha.6",
Expand All @@ -35,7 +34,6 @@
"@spectrum-css/banner": "^2.0.0-alpha.5",
"@spectrum-css/barloader": "^2.0.0-alpha.5",
"@spectrum-css/breadcrumb": "^2.0.0-alpha.6",
"@spectrum-css/bundle-builder": "^1.0.0-alpha.4",
"@spectrum-css/button": "^2.0.0-alpha.6",
"@spectrum-css/buttongroup": "^2.0.0-alpha.6",
"@spectrum-css/calendar": "^2.0.0-alpha.6",
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
Loading

0 comments on commit 8163b0b

Please sign in to comment.