Last 12 weeks · 0 commits
4 of 6 standards met
Dear Sindre, I'm aware that you haven't touched this package in years. Nevertheless it is a transitive dependency of Ava via concordance. Therefore I want to bring to your attention that https://github.com/blueimp/JavaScript-MD5 was archived in 2021. If you ever feel to bump this repository (e.g. updating the Node version required?) I would like to kindly ask you to replace the dependency. Keep up the good work!
In version 4.0.0, the import for crypto was changed from: to: See here. I am surprised that it is not imported as: The nodes docs (https://nodejs.org/api/crypto.html#crypto_class_hash) show this way for importing: There may be a good reason for importing I don't know - I am a frontend dev, not using node.js very often. I don't even know what really does and why it can be used in this way. It _seems_ to explicitly declare to import the crypto module from node though. Anyway, I ran into a problem that seems to stem from this way of importing: My app uses gatsby. Gatsby recently changed from webpack v4 to webpack v5. When updating md5-hex from 3.0.1 to 4.0.0 I get this error when building the app: After some searching I found that md5-hex causes this (I had no idea what dependency called node:crypto). Then I found that webpack had polyfilled for node until version 4, no more in version 5 (https://stackoverflow.com/a/67335037/712005). So I manually changed the webpack config in my app to polyfill for crypto by doing: And adding in gatsby-node.js: Unfortunately this does not solve the issue. I still get: when building the app. I even tried: But that does not work either. Could it be that prevents polyfilling for crypto? Or is it simply that the instead of way of importing is not recognized by webpack? If so that should be an issue for md5-hex as it says on the readme: _Works in the browser too, when used with a bundler like Webpack, Rollup, Browserify_. But probably I am just missing something obvious.
Repository: sindresorhus/md5-hex. Description: Create a MD5 hash with hex encoding Stars: 46, Forks: 11. Primary language: JavaScript. Languages: JavaScript (73.5%), TypeScript (26.5%). License: MIT. Latest release: v5.0.0 (2y ago). Open PRs: 0, open issues: 1. Last activity: 2y ago. Community health: 85%. Top contributors: sindresorhus, kevva, adityapatadia, BendingBender, jamestalmage, Richienb, ntwb.