random-js icon indicating copy to clipboard operation
random-js copied to clipboard

Bring random-js back up to speed with newer webpack and node

Open rawr51919 opened this issue 2 years ago • 6 comments

All dependencies have been updated to their latest versions, linter errors have been fixed, build errors in webpack 5+ have been fixed, there are many things that have changed (even the author's credit got updated to her correct name, she is Summer now). One unfortunate side effect of the updates is that ES3 support is dropped. @ckknight please let me know if there are any more things you want me to do before this gets merged, I'm sure I got everything covered.

Things left to do in this PR:

  • [ ] Add support for automatic dependency updates and automerging now and in the future using Dependabot (@ckknight will need to do some work on her end to enable this)
  • [ ] Add support for React Native and include '.js' in imports (fixing #45, #40 and #35)
  • [x] Add min and max commands (fixing #42)
  • [ ] Add support for automatically choosing the best engine for platform being used (fixing #43)
  • [ ] Add documentation on using this library without Node and with Webpack 5+ (fixing #69 (nice), and #59)
  • [ ] Better documentation on making custom engines that interface with this library (fixing #68 and potentially paving the way for fixing #19)
  • [ ] (ties into the above, secondary objective) Build a xorgens-4096 PRNG for this engine (fixing #19)
  • [ ] Documentation on how to replicate Math.random() using this engine (fixing #38)
  • [ ] Better documentation on why randomInt() is biased (fixing #13 using info from https://github.com/ckknight/random-js/issues/13#issuecomment-143953826 and helping better explain why a library like this one is necessary)
  • [ ] Fix all warnings in npm test (secondary objective yet will be a lot cleaner when tests are run)
  • [ ] Add documentation about random-js-no-node and link to it somewhere in the README
  • [x] Fix minor typos and documentation errors contained in various PRs (PRs #64 (courtesy of @aaby242abhay), #55 (courtesy of @MohammadXroid), #33 (courtesy of @pgerlach), and #22 (courtesy of @kennynaoh))

Fixes #69 Fixes #68 Fixes #64 Closes #63 Closes #62 Closes #61 Closes #60 Fixes #59 Closes #58 Closes #57 Closes #56 Fixes #55 Closes #54 Closes #53 Closes #52 Closes #50 Closes #49 Closes #48 Closes #46 Closes #45 Fixes #43 Fixes #42 Fixes #40 Closes #39 Fixes #38 Fixes #35 Fixes #33 Fixes #22 Fixes #13

rawr51919 avatar Sep 12 '23 18:09 rawr51919

Oh wow, thanks for this!

ES3 support is dropped

I'm really not sure if I care in 2023

the author's credit got updated to her correct name

You're a gem 💎


I'll take a further look this weekend and hopefully merge this in, as long as it doesn't introduce any unexpected breakages.

A large part of me wants to revamp the entire package, or split it into multiple pieces, or some other mechanism to make sure it's as easy as possible to tree-shake.

The best approach for that is probably to spruce it up while keeping it the same (read: this PR), then make decisions from there.

ckknight avatar Sep 15 '23 22:09 ckknight

About the only thing left would be to implement #64, #55, #33, and #22, then all of random-js will be up to speed entirely

Will also be fixing #59, #40, #35, and #13 as a result of this PR, there is a bunch of warnings in 'npm test' I can't seem to figure out yet everything passes otherwise

rawr51919 avatar Sep 16 '23 14:09 rawr51919

Oh wow, thanks for this!

ES3 support is dropped

I'm really not sure if I care in 2023

the author's credit got updated to her correct name

You're a gem 💎

I'll take a further look this weekend and hopefully merge this in, as long as it doesn't introduce any unexpected breakages.

A large part of me wants to revamp the entire package, or split it into multiple pieces, or some other mechanism to make sure it's as easy as possible to tree-shake.

The best approach for that is probably to spruce it up while keeping it the same (read: this PR), then make decisions from there.

This would likely become a sufficient base for version 3.0 Also, have Dependabot automatically merge dependency updates if the tests pass with the new dependency through either itself or GitHub Actions so the repo doesn't get clogged with dependency update PRs (issue created at #66) Also the builds should get swapped to GitHub Actions as Travis CI is no longer a truly free build service (issue created at #67)

rawr51919 avatar Sep 16 '23 14:09 rawr51919

OK, I answered #38 and will try to close it with the merging of this PR once it's all finished

rawr51919 avatar Sep 19 '23 10:09 rawr51919

@ckknight I'm getting back onto this PR, was kinda hard to think about where to start without putting up a todo list of everything that needs done before it's ready for merge

rawr51919 avatar Sep 19 '23 18:09 rawr51919

Made sense to convert this to a draft, college work has gotten in the way, I'll be back to work on this hopefully soon

rawr51919 avatar Jan 23 '24 13:01 rawr51919