Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Update package.json #25

Merged
merged 1 commit into from
Sep 14, 2020
Merged

Update package.json #25

merged 1 commit into from
Sep 14, 2020

Conversation

bluelovers
Copy link
Contributor

No description provided.

@0x80
Copy link
Owner

0x80 commented Aug 5, 2020

@bluelovers Could you provide some sort of context and motivation for these changes?

@bluelovers
Copy link
Contributor Author

avoid dev only deps install on user side

@0x80
Copy link
Owner

0x80 commented Aug 5, 2020

How did you qualify them as dev dependencies?

@quinnturner
Copy link

@0x80 Generally, if there's not an explicit require('package-name') in any file in your src, it's a devDependency.

The exception is when one of your dependencies lists something as a peerDependency, which is not likely.

Introducing this PR will significantly reduce the size of user installs and reduce the risk of security issues moving forward on production builds (which only install dependencies, ignoring devDependencies).

For example, node-emoji is only used in your example. By adding it as a dependency, anything that installs your package will also download that even though you don't use it. Also, strip-bom is only used for Flow, which isn't used at runtime.

Also, it looks like you don't use leven at all. You should be able to remove that dependency entirely.

@0x80
Copy link
Owner

0x80 commented Sep 14, 2020

@quinnturner You're right and that was also my understanding but I was getting confused because some dependencies like invariant I would normally use in application code, but it turns out that is also a dependency that isn't used anymore.

I started this repo by copy-pasting files directly from yarn and then stripping the bits that were not relevant. But apparently I never carefully went over all dependencies.

I will merge this and then strip other unused deps. Thanks @bluelovers @quinnturner 👍

@0x80 0x80 merged commit 93dfd83 into 0x80:master Sep 14, 2020
@0x80
Copy link
Owner

0x80 commented Sep 14, 2020

I have released a new version. It contains this PR plus removal of several dependencies and updating the remaining minor versions. https://github.com/0x80/yurnalist/releases/tag/v2.1.0

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

Successfully merging this pull request may close these issues.

3 participants