Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that there are many compatibile codes but they are useless nowadays since all browsers are supporting those features, no polyfill is required.
To further minimize the node, there should be a
md5-lite.min.js
output file if you still want to keep the polyfills in the original version. Also, I am doubt about the hmac necessity. It seems no use to have hmac so that this is not included in md5-lite as well.there are
full.config.js
andlite.config.js
insrc/config
such that whenuglifyjs
run the compression, it can remove the polyfill in the lite version and keep them in the full version.I have also updated the related testing such that the coverage report can reach 100%, by including the options for lite version.
To summary, lite version excludes md5.hmac and can run in all modern environments including Node 10+, Worker, Edge, Chrome, Firefox, Safari, except IE.
There are also some minor changes:
uglify-js
from 3.1.9 to 3.17.4compress
andbuild
, there arecompress-lite
(md5.lite.js) andbuild-bun
(use bun instead of node to build)dist-src
anddist-lite
to for the output file in pretty format (they can be deleted or moved to testing output)node_modules
script link in testing html pages to CDN linksWorkerGlobalScope
File Size Reduction