Comparing version 0.1.3 to 0.15.1
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¤cy_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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
1217800
239
26253
0
35
32
2
80
2
53
55
6
+ Addedbabel-plugin-transform-inline-imports-commonjs@^1.0.0
+ Addedbabel-runtime@^6.0.0
+ Addedbytes@^2.4.0
+ Addedcamelcase@^3.0.0
+ Addedchalk@^1.1.1
+ Addedcmd-shim@^2.0.1
+ Addedcommander@^2.9.0
+ Addeddeath@^1.0.0
+ Addeddebug@^2.2.0
+ Addeddefaults@^1.0.3
+ Addeddiff@^2.2.1
+ Addedgithub@2.5.1
+ Addedini@^1.3.4
+ Addedinvariant@^2.2.0
+ Addedis-builtin-module@^1.0.0
+ Addedleven@^2.0.0
+ Addedloud-rejection@^1.2.0
+ Addedminimatch@^3.0.3
+ Addedmkdirp@^0.5.1
+ Addednode-emoji@^1.0.4
+ Addednode-gyp@^3.2.1
+ Addedobject-path@^0.11.2
+ Addedproper-lockfile@^1.1.3
+ Addedread@^1.0.7
+ Addedrepeating@^2.0.0
+ Addedrequest@^2.75.0
+ Addedrequest-capture-har@^1.1.4
+ Addedrimraf@^2.5.0
+ Addedroadrunner@^1.0.6
+ Addedsemver@^5.1.0
+ Addedstrip-bom@^2.0.0
+ Addedtar@^2.2.1
+ Addedtar-stream@^1.5.2
+ Addeduser-home@^2.0.0
+ Addedabbrev@1.1.1(transitive)
+ Addedagent-base@2.1.1(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedarray-find-index@1.0.2(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbabel-plugin-transform-inline-imports-commonjs@1.2.0(transitive)
+ Addedbabel-plugin-transform-strict-mode@6.24.1(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedbl@1.2.3(transitive)
+ Addedblock-stream@0.0.9(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedbuiltin-modules@1.1.1(transitive)
+ Addedbytes@2.5.0(transitive)
+ Addedcamelcase@3.0.0(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedclone@1.0.4(transitive)
+ Addedcmd-shim@2.1.0(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedcore-util-is@1.0.21.0.3(transitive)
+ Addedcurrently-unhandled@0.4.1(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddeath@1.1.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddefaults@1.0.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddiff@2.2.3(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addederr-code@1.1.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfollow-redirects@0.0.7(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfstream@1.0.12(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedgithub@2.5.1(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedhttps-proxy-agent@1.0.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedis-builtin-module@1.0.0(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedleven@2.1.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedloud-rejection@1.6.0(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addednode-emoji@1.11.0(transitive)
+ Addednode-gyp@3.8.0(transitive)
+ Addednopt@3.0.6(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedobject-path@0.11.8(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedproper-lockfile@1.2.0(transitive)
+ Addedpsl@1.9.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedread@1.0.7(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedrequest-capture-har@1.2.2(transitive)
+ Addedretry@0.10.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedroadrunner@1.1.0(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsemver@5.0.35.3.05.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.20(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedstream-consume@0.1.1(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-bom@2.0.0(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedtar@2.2.2(transitive)
+ Addedtar-stream@1.6.2(transitive)
+ Addedto-buffer@1.1.1(transitive)
+ Addedto-fast-properties@1.0.3(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduser-home@2.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedverror@1.10.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)