MetaMask / jazzicon

Jazzy deterministic identicons for a more entertaining future
https://metamask.github.io/jazzicon/
ISC License
79 stars 22 forks source link

2.1.0 not published to npm #10

Open onetrickwolf opened 2 years ago

onetrickwolf commented 2 years ago

Hello was trying to resolve a yarn audit issue tied to this library. I see the fix was introduced in the latest commit but I don't think it was ever published to npm.

image

I am currently using this as a workaround in my package.json:

"@metamask/jazzicon": "github:metamask/jazzicon#d923914fda6a8795f74c2e66134f73cd72070667",
welldan97 commented 1 year ago

I'm seeing the same problem. Can anyone publish, please? @jmrossy, @whymarrh

John-Oldman-Wang commented 1 year ago

This library is easier to use. https://www.npmjs.com/package/@cfx-kit/wallet-avatar

lukaw3d commented 1 year ago

I tried to verify if generated colors after https://github.com/MetaMask/jazzicon/pull/6 are the same. They are not. I don't think 2.1.0 version should be published.

Here's a test of hueShift function with zero shift:

// @file test.js

// Since index.js does not export hueShift function just eval the code in current scope
const sourcecode = require('fs').readFileSync('./index.js', 'utf-8')
eval(sourcecode)

console.log('Preset colors\n' + colors.slice().join(','))

// Force random=0.5 => hueShift amount=0 => expect no change in colors
generator = { random: () => 0.5 }
console.log('0 hueShift colors\n' + hueShift(colors.slice(), generator).join(','))

run node test.js

mcmire commented 1 year ago

Sorry for the delayed response @lukaw3d, I will look into this soon.

Also sorry everyone else for the delay in releasing 2.1.0. This library is set up different from our other libraries so it's a lot more painful to release it. Hopefully we can get it synced soon.

jmrossy commented 1 year ago

Likewise, sorry if my PR #6 modified the colors slightly, that wasn't intentional. Thank you @lukaw3d for testing more closely and spotting the difference.

I do still think there's benefit to reducing the dependencies here. Would someone like to fix the hueshift method? If not, I may be able to find time to take another crack at this.

mcmire commented 4 months ago

Sorry for the delay in getting back to this issue. For the time being I have reverted the changes in #6 in a new PR, #24, so that we can create a new release and then re-implement that PR later.