-
Notifications
You must be signed in to change notification settings - Fork 10
refactor: updated and refactored for esm using latest npm libraries #11
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
base: main
Are you sure you want to change the base?
Conversation
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
index.js
Outdated
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
index.js
Outdated
// Dynamically import dohdec | ||
let dohdec; | ||
// eslint-disable-next-line unicorn/prefer-top-level-await | ||
import('dohdec').then((obj) => { | ||
dohdec = obj; | ||
import('dohdec').then((object) => { | ||
dohdec = object; | ||
}); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Agreed, we are CJS only here. Additionally I'm wondering why the staggering test benchmark differences. Doesn't seem accurate. What was the underlying package or change that brought the differences? |
Feel free to do what you want with it. I have no more use for it. I turned down paid assignments to play with this. And considering that my time invested, and sharing the work seemed to upset people here. I'm not interested in providing any more of my time.
That's an absolute dick comment. Are you trying to be productive with that attitude? Go wash your mouth. |
I'm not sure who @SukkaW is but we've banned them. Apologies that other users gave negative comments to your positive PR. My only question was what was the source do you think for the benchmark differences. 😄 |
Thank you @titanism . I think you did the right thing and everyone a favour. So, my time doing this was limited and I didn't upscale the amount of work I put in. I'm sharing the work as-is hoping it might save someone time. I don't mind if you wanna make some adjustments before adopting, it or just use bits and pieces. I see projects commonly moving towards ESM and I think libraries are future proof that way. But I agree they should be backwards compatible with CommonJS and that needs to be added to this PR. The tests were both carried out from my local machine. One for the PR and one for 1.6.0. I would recommend anyone to run their own tests, multiple times to get some kind of average. What's key here is the results are unique to the machine running it. The main reason I refactored this was due to the high amount of vulnerable and abandoned libraries it included. |
Leaving this library better than I found it.
Benchmark results BEFORE:
Benchmark results AFTER: