Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the seed-random dependency #1949

Closed
poppinlp opened this issue Aug 27, 2020 · 4 comments
Closed

Replace the seed-random dependency #1949

poppinlp opened this issue Aug 27, 2020 · 4 comments

Comments

@poppinlp
Copy link
Contributor

poppinlp commented Aug 27, 2020

Hi. Thanks for the nice tool.

I've used this in my work. But recently, I found that one of the dependencies of this lib makes some troubles for me. That's seed-random.

I've opened an issue here to describe the detail. To say it simply is that it depends on the whole global object from user and does some operations from that. But it could throw errors since we don't know what exists in user's global env.

And mathjs use it inside straight forward which may cause a crash by just import mathjs without doing anything.

I've mocked a module to bypass this problem. But seems that lib is not maintained for a long time. So, I come here for just a reminder. You could choose another RNG lib to avoid this risk if you like. :)

@poppinlp poppinlp changed the title Do you mind replace the seed-random lib? The risk about the dependency seed-random Aug 27, 2020
@josdejong
Copy link
Owner

josdejong commented Aug 27, 2020

I'm fine with replacing the library with a different one if needed. Do you have an alternative in mind?

@poppinlp
Copy link
Contributor Author

poppinlp commented Aug 28, 2020

Thanks. Glad to hear that. :)

Actually I'm not familiar with the RNG algorithm. So, I'm not pretty sure about the alternative.
Maybe this one? Looks like it has many more stars and thinks about both browser and nodejs and looks like it's still maintained.

You could evaluate it since you may know the algorithm better than me. And sure, there are others in the github search result.

@josdejong
Copy link
Owner

Sounds good to me to see if we can use https://github.com/davidbau/seedrandom instead.

Anyone interested in trying this out?

@josdejong josdejong changed the title The risk about the dependency seed-random Replace the seed-random dependency Aug 29, 2020
@poppinlp poppinlp closed this as completed Sep 8, 2020
@josdejong
Copy link
Owner

This fix is published now in v8.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants