package.json declares "browser": "./dist/diff.js", but dist/ is not there:
it is built by `yarn build` (rollup + uglify) and only ships in the npm
tarball. Debian's orig comes from the GitHub archive, and Files-Excluded
lists only images, so the field points at nothing.
Node and bundlers that follow "exports" are fine; browser-resolve, which
browserify uses, prefers "browser" and gives up:
$ echo 'module.exports = require("sinon/lib/sinon.js")' > /tmp/e.js
$ NODE_PATH=/usr/share/nodejs browserify /tmp/e.js > /dev/null
Error: Can't walk dependency graph: Cannot find module 'diff' from
'/usr/share/nodejs/sinon/lib/sinon/spy-formatters.js'
node-sinon depends on diff ^8.0.4 and that file requires it, so anything that
browserifies sinon fails at build time.
Either build dist/ in debian/rules, or drop the browser/unpkg fields, which
only mean something in the npm artifact.
Thanks,
Emfox Zhou