Skip to content

Commit

Permalink
chore: upgrade Mitt to 2.1 (#6287)
Browse files Browse the repository at this point in the history
Fixes #6285.
  • Loading branch information
jackfranklin committed Jul 29, 2020
1 parent 21552f8 commit 713e990
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 47 deletions.
2 changes: 1 addition & 1 deletion vendor/README.md
Expand Up @@ -7,7 +7,7 @@ Therefore we put all common dependencies into this directory, `vendor`. This mea
The process for updating a vendored dependency is:

1. `npm install {DEP NAME HERE}`
2. `cp -r node_modules/DEP vendor/DEP`
2. `cp -r node_modules/DEP vendor`
3. Update `eslintrc.js` to forbid importing DEP directly (see the `Mitt` rule already defined in there).
4. Use the new DEP, and run `npm run tsc` to check everything compiles successfully.
5. If the dep ships as compiled JS, you may need to disable TypeScript checking the file. Add an entry to the `excludes` property of the TSConfig files in `vendor`. (again, see the entry that's already there for Mitt as an example). Don't forget to update both the ESM and CJS config files.
8 changes: 8 additions & 0 deletions vendor/mitt/README.md
Expand Up @@ -69,6 +69,9 @@ emitter.on('*', (type, e) => console.log(type, e) )
// fire an event
emitter.emit('foo', { a: 'b' })

// clearing all events
emitter.all.clear()

// working with handler references:
function onFoo() {}
emitter.on('foo', onFoo) // listen
Expand Down Expand Up @@ -99,6 +102,7 @@ const emitter: mitt.Emitter = mitt();
#### Table of Contents

- [mitt](#mitt)
- [all](#all)
- [on](#on)
- [Parameters](#parameters)
- [off](#off)
Expand All @@ -112,6 +116,10 @@ Mitt: Tiny (~200b) functional event emitter / pubsub.

Returns **Mitt**

### all

A Map of event names to registered handler functions.

### on

Register an event handler for the given type.
Expand Down
2 changes: 1 addition & 1 deletion vendor/mitt/dist/mitt.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/mitt/dist/mitt.es.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/mitt/dist/mitt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/mitt/dist/mitt.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/mitt/dist/mitt.modern.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 713e990

Please sign in to comment.