Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yarn

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yarn - npm Package Compare versions

Comparing version 0.1.3 to 0.15.1

bin/node-gyp-bin/node-gyp

151

package.json
{
"author": "Sam Holmes (http://github.com/samholmes)",
"name": "yarn",
"description": "A simple asynchronous routing pattern.",
"version": "0.1.3",
"version": "0.15.1",
"license": "BSD-2-Clause",
"preferGlobal": true,
"dependencies": {
"babel-plugin-transform-inline-imports-commonjs": "^1.0.0",
"babel-runtime": "^6.0.0",
"bytes": "^2.4.0",
"camelcase": "^3.0.0",
"chalk": "^1.1.1",
"cmd-shim": "^2.0.1",
"commander": "^2.9.0",
"death": "^1.0.0",
"debug": "^2.2.0",
"defaults": "^1.0.3",
"diff": "^2.2.1",
"github": "2.5.1",
"ini": "^1.3.4",
"invariant": "^2.2.0",
"is-builtin-module": "^1.0.0",
"leven": "^2.0.0",
"loud-rejection": "^1.2.0",
"minimatch": "^3.0.3",
"mkdirp": "^0.5.1",
"node-emoji": "^1.0.4",
"node-gyp": "^3.2.1",
"object-path": "^0.11.2",
"proper-lockfile": "^1.1.3",
"read": "^1.0.7",
"repeating": "^2.0.0",
"request": "^2.75.0",
"request-capture-har": "^1.1.4",
"rimraf": "^2.5.0",
"roadrunner": "^1.0.6",
"semver": "^5.1.0",
"strip-bom": "^2.0.0",
"tar": "^2.2.1",
"tar-stream": "^1.5.2",
"user-home": "^2.0.0",
"validate-npm-package-license": "^3.0.1"
},
"devDependencies": {
"babel-core": "^6.17.0",
"babel-eslint": "^6.1.2",
"babel-jest": "^14.0.0",
"babel-loader": "^6.2.5",
"babel-plugin-transform-es2015-typeof-symbol": "^6.8.0",
"babel-plugin-transform-runtime": "^6.4.3",
"babel-preset-es2015": "^6.3.13",
"babel-preset-es2015-node4": "^2.1.0",
"babel-preset-node5": "^10.2.0",
"babel-preset-stage-0": "^6.0.0",
"babylon": "^6.5.0",
"eslint": "^3.3.1",
"eslint-config-fb-strict": "^14.1.3",
"eslint-config-fbjs": "^1.0.0",
"eslint-config-kittens": "^2.0.1",
"eslint-plugin-babel": "^3.3.0",
"eslint-plugin-flow-vars": "^0.4.0",
"eslint-plugin-flowtype": "^2.15.0",
"eslint-plugin-no-async-without-await": "^1.0.0",
"eslint-plugin-yarn-internal": "file:scripts/eslint-rules",
"flow-bin": "0.33.0",
"gulp": "^3.9.0",
"gulp-babel": "^6.0.0",
"gulp-newer": "^1.0.0",
"gulp-plumber": "^1.0.1",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"jest": "^16.0.1",
"json-loader": "^0.5.4",
"mock-stdin": "^0.3.0",
"temp": "^0.8.3",
"webpack": "^2.1.0-beta.25"
},
"repository": {
"type": "git",
"url": "https://github.com/samholmes/yarn"
"url": "git://github.com/yarnpkg/yarn.git"
},
"main": "yarn.js",
"dependencies": {},
"devDependencies": {},
"optionalDependencies": {},
"engines": {
"node": "*"
"bin": {
"yarn": "./bin/yarn.js"
},
"scripts": {
"test": "npm run lint && npm run test-only",
"test-ci": "npm run build && npm run test-only",
"check-lockfile": "./scripts/check-lockfile.sh",
"build": "gulp build",
"watch": "gulp watch",
"test-only": "jest --coverage --verbose",
"lint": "eslint . && flow check",
"release-branch": "./scripts/release-branch.sh",
"build-dist": "./scripts/build-dist.sh",
"build-chocolatey": "powershell ./scripts/build-chocolatey.ps1",
"build-win-installer": "scripts\\build-windows-installer.bat"
},
"eslintConfig": {
"extends": "eslint-config-fb-strict",
"env": {
"jest": true
},
"plugins": [
"flowtype",
"no-async-without-await",
"yarn-internal"
],
"rules": {
"yarn-internal/warn-language": 2,
"max-len": [
2,
120
],
"prefer-arrow-callback": 0,
"babel/arrow-parens": [
2,
"always"
],
"flowtype/require-valid-file-annotation": [
2,
"always"
],
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/require-return-type": [
2,
"always",
{
"excludeArrowFunctions": true
}
],
"no-async-without-await/no-async-without-await": 2
}
},
"jest": {
"timers": "fake",
"testEnvironment": "node",
"modulePathIgnorePatterns": [
"__tests__/fixtures/"
],
"testPathIgnorePatterns": [
"__tests__/(fixtures|__mocks__)/",
"updates/",
"/_(temp|mock|install).js$"
]
}
}

109

README.md

@@ -1,89 +0,52 @@

# yarn
<p align="center">
<a href="https://yarnpkg.com/">
<img alt="Yarn" src="https://github.com/yarnpkg/assets/blob/master/yarn-kitten-full.png?raw=true" width="546">
</a>
</p>
Yarn is a simple asynchronous routing pattern that makes it easy to write asynchrounous code in linear fashion.
<p align="center">
Fast, reliable, and secure dependency management.
</p>
If you like my work, buy me a Red Bull or Macbook Air or something. xP
<p align="center">
<a href="https://travis-ci.org/yarnpkg/yarn"><img alt="Travis Status" src="https://travis-ci.com/yarnpkg/yarn.svg?token=DxqWAqRqs3zWAF8EhBHy"></a>
<a href="https://circleci.com/gh/yarnpkg/yarn"><img alt="Circle Status" src="https://circleci.com/gh/yarnpkg/yarn.svg?style=svg&circle-token=5f0a78473b0f440afb218bf2b82323cc6b3cb43f"></a>
<a href="https://ci.appveyor.com/project/yarnpkg/yarn/branch/master"><img alt="Appveyor Status" src="https://ci.appveyor.com/api/projects/status/rhcdj4980ccy7su3/branch/master?svg=true"></a>
</p>
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SJCCMHKZLMSX2&lc=US&item_name=yarn&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
**Bitcoin Address:** 1ADbZY8XBJsqjPMGrEHf9C9QeNvrBmhL3K
---
# Setup
**Fast:** Yarn caches every package it downloads so it never needs to again. It also parallelizes operations to maximize resource utilization so install times are faster than ever.
To set up yarn on your Node.js server use npm.
**Reliable:** Using a detailed, but concise, lockfile format, and a deterministic algorithm for installs, Yarn is able to guarantee that an install that worked on one system will work exactly the same way on any other system.
npm install yarn
**Secure:** Yarn uses checksums to verify the integrity of every installed package before its code is executed.
If you want to use yarn on the client-side (browser), just include yarn.js into your page.
## Features
<script type='text/javascript' src='yarn.js'></script>
* Offline Mode: If you've installed a package before, you can install it again without any internet connection.
* Deterministic: The same dependencies will be installed the same exact way across every machine regardless of install order.
* Network Performance: Yarn efficiently queues up requests and avoids request waterfalls in order to maximize network utilization.
* Multiple Registries: Install any package from either npm or Bower and keep your package workflow the same.
* Network Resilience: A single request failing won't cause an install to fail. Requests are retried upon failure.
* Flat Mode: Resolve mismatching versions of dependencies to a single version to avoid creating duplicates.
* More emojis. 🐈
# Using yarn
## Installing Yarn
Using yarn is simple. First, you have to do is require the yarn function (if you're using it client-side, this isn't necessary).
Read the [Installation Guide](https://yarnpkg.com/en/docs/install) on our website for detailed instructions on how to install Yarn on your operating system.
var yarn = require('yarn');
## Contributing to Yarn
Then, you can call yarn and pass it an initial function, and then chain sets of functions after.
Contributions are always welcome, no matter how large or small. Before contributing,
please read the [code of conduct](CODE_OF_CONDUCT.md).
yarn
(function(){
this(0)();
})
(function(){
},
function(){
});
See [Contributing](CONTRIBUTING.md).
In the initial function (the first one), `this` is a function which returns one of next functions in the next set of functions. For example, `this(0)` would return the first function, and `this(1)` would return the second function. Every function in the series has a `this` function which returns one of the functions in the next set.
## Prior art
yarn
(function(){
this(Math.round(Math.random()))();
})
(function(){
this(0)();
},
function(){
this(1)();
})
(function(){
console.log('made it to the first of final set');
},
function(){
console.log('made it to the second of final set');
});
Yarn wouldn't exist if it wasn't for excellent prior art. Yarn has been inspired by the following projects:
Here is an example of how you could use yarn with asynchronous callbacks.
yarn
(function(){
doSomethingAsynchronous(this());
})
(function(err){
// this(0) returns error function, and this(1) returns success function
if (err)
this(0)();
else
this(1)();
})
(function error(){
alert('Aww...');
},
function success()
alert('Yay!!!');
});
function doSomethingAsynchronous(callback) {
setTimeout(function(){
if (Math.round(Math.random()) == 0)
callback(true);
else
callback(false);
}, 1000);
}
Another thing to note is that `this()` (called with no index passed) is synonymous to `this(0)`.
to be conitnued...possibly
- [Bundler](https://github.com/bundler/bundler)
- [Cargo](https://github.com/rust-lang/cargo)
- [npm](https://github.com/npm/npm)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc