Skip to content
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

refactor: switch from yarn to npm #163

Closed

Conversation

pkerschbaum
Copy link
Contributor

@pkerschbaum pkerschbaum commented Nov 14, 2022

Proposed Change

Switch from yarn classic to npm.

Reasons

  • contributors do not have to install yarn
  • npm@8 feels faster than yarn
  • yarn classic does not have any advantage over npm, at least for such a simple project
  • I am currently working on a "library consumption" test suite for tiny-invariant with the goal to verify that the library can be consumed in different JS/TS projects. This will involve publishing the package to Verdaccio, and just using npm makes this stuff a little bit easier :)

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

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
Copy link
Contributor Author

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants