Can't use nullish coalescing operator in newtab jsm code because it's built into unit tests with babel without support for that operator
Categories
(Firefox :: New Tab Page, task, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: Gijs, Assigned: Mardak)
References
Details
Attachments
(1 file)
X-ref bug 1635054.
This is extra bad because the eslint configuration uses babel as configured in the toplevel directory, which does have support - just like Firefox. So you get no errors from the linter, and although the build breaks, this doesn't fail the job on infra (bug 1635090) so we're just silently breaking things and not noticing. :-(
Ideally, both the newtab code and the toplevel code should be using the same babel config, and AIUI then this whole problem goes away.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
@Gjis – Can you update the severity of this issue? And, is this something you're interested in working on?
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Gavin Suntop [:gvn] (he/they) from comment #1)
@Gjis – Can you update the severity of this issue? And, is this something you're interested in working on?
I'm not very familiar with the babel set-up, so I don't think I'm the right person to work on this. Mark, do you have ideas about how to fix this? Maybe you could mentor it?
I'm also not sure about the severity. I mean, it doesn't affect users, right? So I guess N/A ? I've set it to that for now. Do you not have permissions to set it (that'd seem like a bug?) or were you just wanting to ask me for an opinion? :-)
Assignee | ||
Comment 3•5 years ago
|
||
Include babel plugins to allow unit testing of files using the operators.
Reverts "Bug 1635054 - stop using ?. operator in newtab download manager code, r=aryx"
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Thanks for picking this up Ed. The approach here looks good.
(fwiw I disagree with this being marked as a P5 as it is a developer workflow issue that has already caused extra work and might continue to do so as developers expect to be able to use the newer operators everywhere ESLint supports).
Updated•5 years ago
|
Comment 6•4 years ago
|
||
bugherder |
Description
•