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

don't attempt to import growl in browser build #2938

Closed
wants to merge 1 commit into from
Closed

don't attempt to import growl in browser build #2938

wants to merge 1 commit into from

Conversation

ahamid
Copy link
Contributor

@ahamid ahamid commented Jul 28, 2017

Does growl work in the browser? I had to add this in order to perform es6 imports in a webpack build.

@jsf-clabot
Copy link

jsf-clabot commented Jul 28, 2017

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 89.017% when pulling d50fd05 on ahamid:no-browser-growl into 2408d90 on mochajs:master.

@ScottFreeCode
Copy link
Contributor

That's a good question -- if Growl doesn't work in browsers to begin with, we'll want to know for sake of determining how to handle the vulnerability fix too.

@ScottFreeCode
Copy link
Contributor

(P.S. Thanks for the PR! If we can confirm that Growl shouldn't even be used in the browser, this update looks good to me.)

@BuonOmo
Copy link

BuonOmo commented Aug 4, 2017

I had a project were I needed notifications in browser. I ended up setting growl to true and overriding mocha._growl. I can push here this override of _growl (that uses web notifications). What do you think about it?

Also by reading the code I could see that the best place to put this overriding is browser-entry.js, right?

@ahamid
Copy link
Contributor Author

ahamid commented Aug 4, 2017

@BuonOmo were you using webpack to package the js? My issue was that webpack was including the npm -sourced growl package automatically, it was not just a runtime configuration issue.

@BuonOmo
Copy link

BuonOmo commented Aug 4, 2017

@ahamid Yes I packaged the whole js with webpack, using the mocha-loader. I've even created a question on stack overflow about it to see if someone had encountered the same issue.

@ahamid
Copy link
Contributor Author

ahamid commented Aug 4, 2017

@BuonOmo interesting, i wasn't aware of mocha-loader, I will give that a shot, thanks

@BuonOmo
Copy link

BuonOmo commented Aug 4, 2017

It is not very well documented, I'd suggest you to read the code in order to see what it does. Anyway, for my previous question: may I implement notifications in browser for mocha ? (@ScottFreeCode)

@ScottFreeCode
Copy link
Contributor

Also by reading the code I could see that the best place to put this overriding is browser-entry.js , right?

Anyway, for my previous question: may I implement notifications in browser for mocha ?

You're certainly welcome to give it a try! I can't promise it will be evaluated promptly (we've already got a bit of a backlog of stuff to go through at the moment), but we'd be happy to at least look at it at some point and see what it's like, then decide what we want to do with it.

As for browser-entry.js, I don't happen to know of anywhere better to handle it in Mocha's codebase off the top of my head, though someone else on the team might.

On the other hand, it may be worth asking whether Growl would want browser integration like that (in which case we could just ensure Growl is usable in the browser and we'd get the functionality), provided we resolve the previously mentioned issue of supporting newer versions of Growl somehow.

@BuonOmo
Copy link

BuonOmo commented Aug 7, 2017

Ok thank I'll make a PR and reference it here. I don't think growl is supporting browser, but maybe we should name the option after notify instead of growl, this would go straight to the point and users can use it whether they are in browser or not without having to care about how the notification is done.

Anyway, let's discuss this in the according PR :)

@stale
Copy link

stale bot commented Dec 5, 2017

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label Dec 5, 2017
@ScottFreeCode ScottFreeCode added status: needs review a maintainer should (re-)review this pull request and removed stale this has been inactive for a while... labels Dec 6, 2017
@boneskull
Copy link
Member

I am pretty sure that #2962 preempts this.

@boneskull boneskull closed this Dec 9, 2017
@boneskull boneskull removed the status: needs review a maintainer should (re-)review this pull request label Dec 12, 2017
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.

None yet

6 participants