Closed andersk closed 3 years ago
@andersk thanks for contributing. I feel like your change won't have any breaking impact on the existing users so I think I'll make a major version.
I agree it’s non-breaking. But surely you mean minor or patch, not major?
I meant major, when I'n not sure I won't break things, I prefer spawn a major than take the risk to break other's build.
I’d prefer a minor release, if possible; it took a lot of time to propagate the last major release all the way through the dependency chain (ttf2woff2 → @vusion/webfonts-generator → webfonts-loader, and I’m still waiting for ttf2woff2 → fontmin → font-subset-loader2).
Here is the entire beautified diff to jssrc/ttf2woff2.js
, so you can see that the only change is to remove the handlers that abort on exceptions. (I compiled with exactly the same version of Emscripten to ensure that this diff would be small.) Removing an abort cannot break someone’s build.
@@ -60,12 +60,6 @@
if (typeof module !== 'undefined') {
module['exports'] = Module;
}
- process['on']('uncaughtException', function (ex) {
- if (!(ex instanceof ExitStatus)) {
- throw ex;
- }
- });
- process['on']('unhandledRejection', abort);
quit_ = function (status) {
process['exit'](status);
};
@@ -1695,11 +1689,6 @@
Module['getValue'] = getValue;
Module['writeArrayToMemory'] = writeArrayToMemory;
var calledRun;
-function ExitStatus(status) {
- this.name = 'ExitStatus';
- this.message = 'Program terminated with exit(' + status + ')';
- this.status = status;
-}
dependenciesFulfilled = function runCaller() {
if (!calledRun) run();
if (!calledRun) dependenciesFulfilled = runCaller;
Ok, so let's release a patch then and cross fingers :P.
When using ttf2woff2 as a library (e.g. inside webfonts-loader), this was previously catching promise rejections from other code that had nothing to do with ttf2woff2.
See https://github.com/emscripten-core/emscripten/issues/7855.
Proposed changes
-s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0
toemcc
arguments.Code quality
package.json
file. Beware to use the same format than for the author field for the entries so that you'll get a mention in theREADME.md
with a link to your website.License
To get your contribution merged, you must check the following.
Join
My NPM username: andersk