Skip to content

Commit

Permalink
V5 (#27)
Browse files Browse the repository at this point in the history
* BREAKING CHANGE: Changed package to an ES module.
* BREAKING CHANGE: Require Node.js 12 or newer.
  • Loading branch information
cb1kenobi authored Feb 23, 2021
1 parent e488dca commit 6540296
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 5,030 deletions.
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

9 changes: 2 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
"node": true
},
"extends": "eslint:recommended",
"globals": {
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"modules": true
},
"ecmaVersion": "2021",
"sourceType": "module"
},
"plugins": [
Expand All @@ -21,7 +16,7 @@
],
"root": true,
"rules": {
"array-bracket-spacing": [ 'warn', 'always' ],
"array-bracket-spacing": [ "warn", "always" ],
"brace-style": [ 2, "1tbs", { "allowSingleLine": true } ],
"camelcase": "off",
"chai-expect/missing-assertion": "error",
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
._*
.DS_Store*
.nyc_output
/coverage
/dist
/docs
coverage
node_modules
npm-debug.log
yarn-error.log
7 changes: 1 addition & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
._*
.babelrc
.codeclimate.yml
.DS_Store
.eslintrc
.git*
.nyc_output
.travis.yml
appveyor.yml
coverage
docs
gulpfile.js
node_modules
npm-debug.log
yarn.lock
yarn-error.log
src
test
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "10"
- "12"
- "14"
os: linux
Expand All @@ -13,5 +12,3 @@ cache:
install: yarn
before_script: sh -c "git log | head -12"
script: yarn run coverage
after_success:
- coveralls < ./coverage/lcov.info
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v5.0.0 (Feb 23, 2021)

* BREAKING CHANGE: Changed package to a ES module.
* BREAKING CHANGE: Require Node.js 12 or newer.

# 4.1.2 (Feb 23, 2021)

* fix: Support nested linked emitters. ([#25](https://github.com/cb1kenobi/hook-emitter/issues/25))
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
[![NPM Downloads][downloads-image]][downloads-url]
[![Travis CI Build][travis-image]][travis-url]
[![Appveyor CI Build][appveyor-image]][appveyor-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Deps][david-image]][david-url]
[![Dev Deps][david-dev-image]][david-dev-url]

Promised-based chained event emitter with ability to create hooks around functions.

## Installation

npm install hook-emitter
npm i hook-emitter --save

## Examples

Expand Down Expand Up @@ -202,8 +201,6 @@ MIT
[travis-url]: https://travis-ci.org/cb1kenobi/hook-emitter
[appveyor-image]: https://ci.appveyor.com/api/projects/status/dt0q6xcmbydh2t4a?svg=true
[appveyor-url]: https://ci.appveyor.com/project/cb1kenobi/hook-emitter
[coveralls-image]: https://img.shields.io/coveralls/cb1kenobi/hook-emitter/master.svg
[coveralls-url]: https://coveralls.io/r/cb1kenobi/hook-emitter
[david-image]: https://img.shields.io/david/cb1kenobi/hook-emitter.svg
[david-url]: https://david-dm.org/cb1kenobi/hook-emitter
[david-dev-image]: https://img.shields.io/david/dev/cb1kenobi/hook-emitter.svg
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ environment:
# node.js
- nodejs_version: "14"
- nodejs_version: "12"
- nodejs_version: "10"

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
190 changes: 0 additions & 190 deletions gulpfile.js

This file was deleted.

43 changes: 10 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "hook-emitter",
"version": "4.1.2",
"version": "5.0.0",
"description": "Event emitter with support for asynchronous handlers and a sweet function hook mechanism.",
"main": "./dist/index.js",
"type": "module",
"exports": "./src/index.js",
"author": "Chris Barber <[email protected]> (https://github.com/cb1kenobi)",
"license": "MIT",
"keywords": [
Expand All @@ -18,50 +19,26 @@
"link"
],
"scripts": {
"build": "gulp build",
"coverage": "gulp coverage",
"docs": "gulp docs",
"prepare": "gulp build",
"test": "gulp test"
},
"dependencies": {
"source-map-support": "^0.5.19"
"coverage": "c8 npm run test",
"lint": "eslint src test",
"prepack": "npm run lint",
"test": "npm run lint && mocha test/**/test-*.js --reporter spec"
},
"devDependencies": {
"@babel/core": "^7.13.1",
"@babel/plugin-transform-modules-commonjs": "^7.13.0",
"@babel/register": "^7.13.0",
"ansi-colors": "^4.1.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"babel-plugin-istanbul": "^6.0.0",
"c8": "^7.6.0",
"chai": "^4.3.0",
"chai-as-promised": "^7.1.1",
"coveralls": "^3.1.0",
"esdoc": "^1.1.0",
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
"esdoc-standard-plugin": "^1.0.0",
"eslint": "^7.20.0",
"eslint-plugin-chai-expect": "^2.2.0",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-security": "^1.4.0",
"fancy-log": "^1.3.3",
"fs-extra": "^9.1.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-debug": "^4.0.0",
"gulp-eslint": "^6.0.0",
"gulp-load-plugins": "^2.0.6",
"gulp-plumber": "^1.2.1",
"gulp-sourcemaps": "^3.0.0",
"mocha": "^8.3.0",
"nyc": "^15.1.0"
"mocha": "^8.3.0"
},
"homepage": "https://github.com/cb1kenobi/hook-emitter",
"bugs": "https://github.com/cb1kenobi/hook-emitter/issues",
"repository": "https://github.com/cb1kenobi/hook-emitter",
"engines": {
"node": ">=8"
"node": ">=12"
}
}
5 changes: 0 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/* istanbul ignore if */
if (!Error.prepareStackTrace) {
require('source-map-support/register');
}

/**
* Emits events and hooks to synchronous and asynchronous listeners.
*/
Expand Down
5 changes: 1 addition & 4 deletions test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"console": false,
"describe": false,
"expect": false,
"it": false,
"spy": false,
"stub": false,
"sinon": false
"it": false
},
"rules": {
"no-debugger": "warn",
Expand Down
Loading

0 comments on commit 6540296

Please sign in to comment.