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 576 Bytes 5 months ago Download File
node_modules.tar.gz 22.1 MB 5 months ago
yarn-1.3.2.tar.xz 68 MB 5 months ago
yarn-rpmlintrc 1.53 KB 5 months ago Download File
yarn.changes 2.78 KB 5 months ago Download File
yarn.spec 2.66 KB 5 months ago Download File

Comments for home:mssola (3)

Jordi Massaguer jordimassaguerpla wrote about 1 year ago

where do the node_modules come from?

Miquel Sabate Sola mssola wrote about 1 year 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.
Maximilian Meister m_meister wrote about 1 year 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.