nice-node icon indicating copy to clipboard operation
nice-node copied to clipboard

reduce npm dependency exposure

Open jgresham opened this issue 2 years ago • 5 comments

Feature details

We have some low-effort npm dependencies that we can simply copy source code from their single index.js file and include it under our src/ and npm remove the dependency. Additionally, these deps are not changing or updating frequently.

  • [ ] Put the dependency in a single file
  • [ ] Verify that the license of the dependency allows for this
  • [ ] Include a link to the code in a comment at the top of a file and the dep's license

See https://github.com/NiceNode/nice-node/blob/main/src/main/util/escapePath.js as an example of this

Some example deps to do this for:

  • [ ] await-sleep
  • [ ] i18next-cli-language-detector
  • [ ] gha apple codesign certs

jgresham avatar Dec 14 '23 15:12 jgresham

Hi, @jgresham. Can you please assign it to me?

adanimasuk avatar Feb 24 '25 18:02 adanimasuk

done @adanimasuk . thanks!

If you don't mind listing here some of the deps that you're planning on removing beforehand, I could double check them before you do the work.

jgresham avatar Feb 25 '25 16:02 jgresham

Sure, I will post it here before making PR

adanimasuk avatar Feb 26 '25 14:02 adanimasuk

@jgresham

  1. i18next-cli-language-detector
  2. await-sleep
  3. du
  4. tiny-typed-emitter
  5. i18next-browser-languagedetector

I was thinking of these 5.

you also mentioned

gha apple codesign certs

I can't find the package, which one is it?

adanimasuk avatar Feb 27 '25 15:02 adanimasuk

I have send a PR over here https://github.com/NiceNode/nice-node/pull/689

We can continue there

adanimasuk avatar Feb 27 '25 18:02 adanimasuk