Skip to content

Commit

Permalink
Adopt release-it to help with changelog and release management
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemelia committed May 21, 2020
1 parent 086d655 commit 19c455f
Show file tree
Hide file tree
Showing 4 changed files with 2,732 additions and 238 deletions.
95 changes: 95 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
## v6.0.0-beta.0 (2020-04-29) (Pre-release)

#### (Octane-friendly!)

_This is the first beta of ember-keyboard 6.0.0!_

* [BREAKING] Now requires ember >= 3.8 and node >= 10.x
* [FEATURE] Add `on-keyboard` and `keyboard-shortcut` element modifiers and make `keyboard-press` component public and documented [\#111](https://github.com/adopted-ember-addons/ember-keyboard/pull/111) ([lukemelia](https://github.com/lukemelia)) - These names may be changed before final release of 6.0.

The best place for documentation on the new features is https://github.com/adopted-ember-addons/ember-keyboard/blob/master/tests/dummy/app/templates/usage.hbs -- our docs site will be updated when 6.0.0 final is released)

_Note: ember-keyboard has been moved to the adopted-ember-addons org. We're grateful to @briarsweetbriar for maintaining the project prior to this transition and for facilitating a smooth transition and ensuring this addon can continue to evolve with Ember._

## v5.0.0 (2019-11-19)

* Upgrades to ember-cli-babel 7.


## v4.0.0 (2018-09-05)

#### Support software keymaps

Big thanks to @NullVoxPopuli for [this PR](https://github.com/patience-tema-baron/ember-keyboard/pull/88). Now, `ember-keyboard` will respond to the key mapping, rather than the key itself. For instance, with a Dvorak key mapping, pressing 'k' will give a code of 'KeyV' and a key of 'k'. Now, `ember-keyboard` will treat a Dvorak 'KeyV' as a 'k'.

This may introduce a regression if you intended to map to the key themselves, rather than to their code. If that's the case, please take out an issue and we'll figure out a way to support that behavior as well.

## v3.0.0 (2018-01-16)

#### Remove jQuery and make touch/mouse events opt-in

This release has two potential breaking changes:

1. `jQuery`'s been removed! This means that responders will now receive vanilla events, instead of jQuery events. For instance, using jQuery's `isImmediatePropagationStopped` will no longer work:

```js
responder: Ember.on(keyDown('KeyA'), function(event) {
event.isImmediatePropagationStopped();
})
```

2. Mouse/touch events are now opt-in. You'll have to specify them in your `config/environment.js` file:

```js
emberKeyboard: {
listeners: ['keyUp', 'keyDown', 'keyPress', 'click', 'mouseDown', 'mouseUp', 'touchStart', 'touchEnd']
}
```

...

## v2.0.0 (2016-07-13)

#### Use `code` instead of `key`

This release switches to the more consistent [`code` property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code). For instance:

```
keyDown('KeyA', . . .)
keyDown('Digit1', . . .)
keyDown('Numpad1', . . .)
keyDown('Space', . . .)
```

## v1.1.0 (2016-04-23)

#### :bug: Bugs
* Add support for irregular IE key names

## v1.0.3 (2016-03-23)

#### :rocket: Enhancement
* Add a `keyPress` test helper

## v1.0.2 (2016-03-23)

## v1.0.1 (2016-03-22)

#### :house: Internal
* Update Ember CLI

## v1.0.0 (2016-03-22)

#### :rocket: Enhancement
* Add a `keyPress` listener to accompany `keyDown` and `keyUp`
* Add ability to specify which events `ember-keyboard` listens for in the app's `config/environment.js`

## v0.2.8 (2016-03-09)

#### :rocket: Enhancement
* Add test helpers

...

## v0.0.2 (2015-10-24)
* The beginning
67 changes: 67 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Release

Releases are mostly automated using
[release-it](https://github.com/release-it/release-it/) and
[lerna-changelog](https://github.com/lerna/lerna-changelog/).


## Preparation

Since the majority of the actual release process is automated, the primary
remaining task prior to releasing is confirming that all pull requests that
have been merged since the last release have been labeled with the appropriate
`lerna-changelog` labels and the titles have been updated to ensure they
represent something that would make sense to our users. Some great information
on why this is important can be found at
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
changelog/release notes.


## Release

Once the prep work is completed, the actual release is straight forward:

* First ensure that you have `release-it` installed globally, generally done by
using one of the following commands:

```
# using https://volta.sh
volta install release-it
# using Yarn
yarn global add release-it
# using npm
npm install --global release-it
```

* Second, ensure that you have installed your projects dependencies:

```
yarn install
```

* And last (but not least 😁) do your release. It requires a
[GitHub personal access token](https://github.com/settings/tokens) as
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
or other scopes are required.

```
export GITHUB_AUTH="f941e0..."
release-it
```

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you to to choose the version number after which
you will have the chance to hand tweak the changelog to be used (for the
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
pushing the tag and commits, etc.
31 changes: 26 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
},
"scripts": {
"build": "ember build --environment=production",
"deploy": "yarn ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -",
"ember": "node_modules/.bin/ember",
"ember:update": "node_modules/.bin/ember-cli-update",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"release": "release-it",
"start": "ember serve",
"test": "npm-run-all lint:js test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each",
"deploy": "yarn ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -",
"ember": "node_modules/.bin/ember",
"ember:update": "node_modules/.bin/ember-cli-update"
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
Expand Down Expand Up @@ -66,16 +67,36 @@
"markdown-code-highlighting": "^0.2.0",
"marked": "^1.1.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.1.0"
"qunit-dom": "^1.1.0",
"release-it": "^13.6.0",
"release-it-lerna-changelog": "^2.3.0"
},
"engines": {
"node": "10.* || >= 12"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"demoURL": "http://adopted-ember-addons.github.io/ember-keyboard/"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}
Loading

0 comments on commit 19c455f

Please sign in to comment.