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

fix(main): correctly import EventEmitter #2814

Merged
merged 3 commits into from
Mar 16, 2018
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Mar 15, 2018

Summary

fixes #2730 (see that issue for context)

Result

Now you can have InstantSearch as a dependency in a rollup UMD build

fixes #2730

I was bumping in this too now
@Haroenv Haroenv requested review from bobylito and iam4x March 15, 2018 10:59
@algobot
Copy link
Contributor

algobot commented Mar 15, 2018

Deploy preview for algolia-instantsearch ready!

Built with commit c48e80f

https://deploy-preview-2814--algolia-instantsearch.netlify.com

@Haroenv
Copy link
Contributor Author

Haroenv commented Mar 15, 2018

The commonjs and es module version still have "import from events" in their code, which is good. The source is what jest uses to build, and it's acting as if it's node, so taking the version of events in node, and thus having or not having the domain: null key (this is why the second commit failed). The UMD build always had module.exports = EventEmitter and EventEmitter.EventEmitter = EventEmitter in the code, nothing changes here, since we go from "importing EventEmitter.EventEmitter" to "importing EventEmitter". Webpack has allowed "destructuring" of commonJS imports, but rollup doesn't allow that, since the module.exports is just EventEmitter.

@Haroenv
Copy link
Contributor Author

Haroenv commented Mar 15, 2018

(latest test fails because Revert is not a valid pattern for commitlint, but the actual tests still pass, as initially seen)

Copy link
Contributor

@bobylito bobylito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bobylito bobylito merged commit 8fa3649 into develop Mar 16, 2018
@bobylito bobylito deleted the fix/eventemitter-import branch March 16, 2018 09:15
@Haroenv
Copy link
Contributor Author

Haroenv commented Mar 16, 2018

yay

bobylito pushed a commit that referenced this pull request Mar 28, 2018
<a name=2.6.1></a>
## [2.6.1](v2.6.0...v2.6.1) (2018-03-28)

### Bug Fixes

* **connectBreadcrumb:** allow unmounting ([#2815](#2815)) ([c6c353a](c6c353a))
* **connectBreadcrumb:** update typo in property type items ([#2782](#2782)) ([79ebd66](79ebd66))
* **docgen:** pass the relatedTypes to the struct mixin in connectors layout ([#2780](#2780)) ([f7f8b05](f7f8b05))
* **GeoSearch:** update typo in property type cssClasses ([#2781](#2781)) ([419c2ab](419c2ab))
* **main:** correctly import EventEmitter ([#2814](#2814)) ([8fa3649](8fa3649)), closes [#2730](#2730)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InstantSearch imports EventEmitter incorrectly
3 participants