alexreardon / tiny-invariant

A tiny invariant function
MIT License
1.7k stars 48 forks source link

refactor: switch from yarn to npm #163

Closed pkerschbaum closed 1 year ago

pkerschbaum commented 1 year ago

Proposed Change

Switch from yarn classic to npm.

Reasons

Risks

IMHO none.

npm re-uses the information from yarn.lock when building package-lock.json, so when working as a maintainer on tiny-invariant, dependencies should still be exactly the same as before. I looked into a couple of dependencies to verify that.

And for package consumers the lock files don't play any role anyways.

Oh, and one more thing

I removed the build:flow script because that was broken anyways. It tried to copy a file src/tiny-invariant.js.flow to the dist folder, but the name of the flow file is src/tiny-invariant.flow.js (the .flow and .js suffix are switched).

alexreardon commented 1 year ago

Thanks heaps @pkerschbaum! I personally use yarn today for all my packages, so switching over to npm for this one only would be increased friction for me. Not sure which way to go with this PR.

Regardless of which way we go, it would be great to get this change in:

I removed the build:flow script because that was broken anyways. It tried to copy a file src/tiny-invariant.js.flow to the dist folder, but the name of the flow file is src/tiny-invariant.flow.js (the .flow and .js suffix are switched).

pkerschbaum commented 1 year ago

OK I see, then let's keep it as it is.
I will remove the build:flow script in another PR sometime.