Skip to content

reduce npm dependency exposure #459

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

Open
6 tasks
jgresham opened this issue Dec 14, 2023 · 5 comments
Open
6 tasks

reduce npm dependency exposure #459

jgresham opened this issue Dec 14, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jgresham
Copy link
Member

jgresham commented Dec 14, 2023

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 jgresham added enhancement New feature or request good first issue Good for newcomers labels Dec 14, 2023
@adanimasuk
Copy link

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

@jgresham
Copy link
Member Author

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.

@adanimasuk
Copy link

Sure, I will post it here before making PR

@adanimasuk
Copy link

adanimasuk commented Feb 27, 2025

@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
Copy link

I have send a PR over here #689

We can continue there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants