Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade Mitt to 2.1 #6287

Merged
merged 1 commit into from Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.