### Added

- Modern and lite builds generated from the same source.
- support ESM.
- Set up GitHub release action / provenance

### Fixed
- Fix uploading coverage to coveralls
- fix recognize environment is node when use browserfs
This commit is contained in:
Yi-Cyuan Chen
2026-07-20 10:19:42 +08:00
parent 6f25176e1e
commit b02f0d93f3
37 changed files with 10048 additions and 1073 deletions
+21
View File
@@ -30,6 +30,23 @@ function runWindowTest() {
unset();
}
function runBrowserWithProcessPolyfillTest() {
var Module = require('module');
var originalRequire = Module.prototype.require;
window = global;
Module.prototype.require = function (id) {
if (id === 'crypto' || id === 'buffer') {
throw new Error('Node.js module loaded in browser environment');
}
return originalRequire.apply(this, arguments);
};
try {
runCommonJsTest();
} finally {
Module.prototype.require = originalRequire;
}
}
// Node.js env
BUFFER = true;
runCommonJsTest();
@@ -38,8 +55,12 @@ runCommonJsTest();
JS_MD5_NO_BUFFER_FROM = true
runCommonJsTest();
// browser env with a Node.js process polyfill
runBrowserWithProcessPolyfillTest();
// Webpack browser env
JS_MD5_NO_NODE_JS = true;
window = global;
runCommonJsTest();
// browser env