Incubator-superset: [SIP-14] remove dependency on "Yarn" package in favor of `npm`

Created on 29 Oct 2018  路  5Comments  路  Source: apache/incubator-superset

Motivation

Simplify the build pipeline, and standardize our build process. There was a time where npm was slow, and builds were not deterministic, that is not the case anymore. npm has long regained trust in the community and using yarn makes our builds more complex, less standard, and our dependency tree larger.

More information here https://iamturns.com/yarn-vs-npm-2018/, searching for npm vs yarn 2018 will return similar articles making the same points.

Proposed Change

Remove the dependency on the yarn package, solely rely on npm and close-to-npm packages in our Javascript build pipeline.

New or Changed Public Interfaces

N/A

New dependencies

Describe any NPM/PyPI packages that are required. Are they actively maintained? What are their licenses?
N/A

Rejected Alternatives

yarn

#SIP

Most helpful comment

BTW this does not represent much work, probably just a simple small PR. I just wanted to make sure that we have consensus on this before proceeding.

All 5 comments

is it easy to achieve reproducible builds via npm ?
i.e. I know yarn has lock files, would be great if we can also add some docs on how to achieve reproducible builds via npm as part of this SIP.

Reproducible/deterministic builds have been fixed in NPM since version 5 now uses a lockfile as well. npm is also faster than yarn in many cases now. From the research I've done, the motivations we had originally for using yarn have fully eroded a while back.

BTW this does not represent much work, probably just a simple small PR. I just wanted to make sure that we have consensus on this before proceeding.

For the record, yarn has one great feature that I don't think npm has: resolutions.

There is though a package to handle this use case with npm, see this SO answer.

Personally I'm fine with the npm alternative here, plus we do not currently use resolutions in yarn. Sending a PR

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kalimuthu123 picture kalimuthu123  路  3Comments

XiaodiKong picture XiaodiKong  路  3Comments

amien90 picture amien90  路  3Comments

dinhhuydh picture dinhhuydh  路  3Comments

tmccartan picture tmccartan  路  3Comments