Conversation
also update closure for mid-month release
| .pipe(replace(/^\s\smodule\.exports = \w+;$/gm, ';')) | ||
| .pipe(replace(/^\s\sself\.(\w+) = \1;$/gm, ';')) | ||
|
|
||
| // Remove node-specific code from file-namer so it can be included in report. |
There was a problem hiding this comment.
kind of dumb to do such a custom solution for just this file, but since this is the only file that's completely intended to live in both node and the browser (all the other renderer files are only used in node for testing), I went with it. If/when we have more files that need to live in both worlds we can add a more general solution.
| * @param {string} name Name of the event. | ||
| * @param {!Node=} target DOM node to fire the event on. | ||
| * @param {Object<{detail: Object<string, *>}>=} detail Custom data to include. | ||
| * @param {*=} detail Custom data to include. |
There was a problem hiding this comment.
hehe, that's what it really is! https://dom.spec.whatwg.org/#dictdef-customeventinit
dictionary CustomEventInit : EventInit {
any detail = null;
};| .pipe(replace(/^\s\sself\.(\w+) = \1;$/gm, ';')) | ||
|
|
||
| // Remove node-specific code from file-namer so it can be included in report. | ||
| .pipe(replace(/^\s\smodule\.exports = {\w+};$/gm, ';')) |
There was a problem hiding this comment.
happens to not match the module.exports line in the renderer files:
module.exports = ReportRenderer;but yah this seems to be the right solution.
There was a problem hiding this comment.
that should be caught by the existing.pipe(replace(/^\s\smodule\.exports = \w+;$/gm, ';')) above.
I also turned module.exports to write-only, so anything that ends up tricking the regexes will fail the compile :)
There was a problem hiding this comment.
write-only
by which I obviously mean read-only
also update closure for mid-month release
@paulirish this will hopefully make #2099 a bit smoother