LogoopenSUSE Build Service > Projects
Sign Up | Log In

Fast, reliable, and secure dependency management for JavaScript.

Yarn is a package manager for your code. It allows you to use and share code with other developers from around the world. Yarn does this quickly, securely, and reliably so you don’t ever have to worry.

Yarn allows you to use other developers’ solutions to different problems, making it easier for you to develop your software. If you have problems, you can report issues or contribute back, and when the problem is fixed, you can use Yarn to keep it all up to date.

Code is shared through something called a package (sometimes referred to as a module). A package contains all the code being shared as well as a package.json file which describes the package.

Source Files

Filename Size Changed Actions
_service 578 Bytes Download File
node_modules.tar.gz 31.3 MB
yarn-1.13.0.tar.xz 69.5 MB
yarn-rpmlintrc 1.63 KB Download File
yarn.changes 3.47 KB Download File
yarn.spec 2.66 KB Download File

Comments for home:mssola (3)

jordimassaguerpla wrote about 2 years ago

where do the node_modules come from?

mssola wrote about 2 years ago

It's a bit of a chicken-egg problem, but it comes from running "yarn install" in the yarn repository. Doing that will give you a reproduceable "node_modules" directory (because there is a yarn.lock file, which is similar to Gemfile.lock) that then I've compressed as a tarball. So yeah, sadly, for any updates we will have to manually call yarn install and re-upload the node_modules tarball.

Sadly we'd have to do the same in Portus everytime we update the yarn.lock file, because potentially a "yarn install" can download dependencies from internet, which is something that is not doable in OBS. So we either start packaging all JS packages needed, which would be not desirable at all (there's hundreds of JS packages to be packaged as RPMs then) or we include node_modules manually. Note two things though:

  1. In Portus the new portus:assets:compile rake task will check that the yarn.lock and the node_modules directory are legit, so if some dependency has been broken the build will fail.
  2. We could potentially generate this node_modules tarball in Travis CI, when submitting the package on a green build.
m_meister wrote about 2 years ago

yeah unfortunately building the node_modules locally is the only solution right now.

nevertheless having sth like yarn is probably a good step forward in getting nodejs apps built in the furure. at least we have a clear structured file of tracking dependencies, which could even be used when building some tooling around the whole nodejs packaging in obs.

Login required, please login or signup in order to comment