-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add yarn source #232
Merged
Merged
Add yarn source #232
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Great to see the yarn source to be added. I tested it locally and ran into different problems. E.g. the problem which occurred several consecutive times with different JSONs after running
Even though '{"type":"inspect","data":{"name":"ecc-jsbn","description":"ECC JS code based on JSBN","dist-tags":{"latest":"0.2.0"},"versions":["0.0.1","0.1.1","0.1.2","0.2.0"],"maintainers":[{"name":"quartzjer","email":"jeremie@jabber.org"},{"name":"rynomad","email":"nomad.ry@gmail.com"}],"time":{"modified":"2018-07-29T17:44:40.282Z","created":"2014-03-06T05:48:33.314Z","0.0.1":"2014-03-06T05:48:34.662Z","0.1.1":"2015-11-23T14:19:09.579Z","0.1.2":"2018-07-29T15:54:20.855Z","0.2.0":"2018-07-29T17:44:40.282Z"},"readmeFilename":"README.md","homepage":"https://github.com/quartzjer/ecc-jsbn","keywords":["jsbn","ecc","browserify"],"repository":{"type":"git","url":"git+https://github.com/quartzjer/ecc-jsbn.git"},"author":{"name":"Jeremie Miller","email":"jeremie@jabber.org","url":"http://jeremie.com/"},"bugs":{"url":"https://github.com/quartzjer/ecc-jsbn/issues"},"license":"MIT","users":{"mojaray2k":true},"version":"0.1.1","main":"index.js","dependencies":{"jsbn":"~0.1.0"},"gitHead":"d35a360352496721030da645e8054f07efc22487","scripts":{},"dist":{"shasum":"0fc73a9ed5f0d53c38193398523ef7e543777505","tarball":"https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"},"directories":{}}}' is parsed well when doing separately: $ irb
2.5.5 :001 > require 'json'
=> true
2.5.5 :002 > JSON.parse '{"type":"inspect","data":{"name":"ecc-jsbn","description":"ECC JS code based on JSBN","dist-tags":{"latest":"0.2.0"},"versions":["0.0.1","0.1.1","0.1.2","0.2.0"],"maintainers":[{"name":"quartzjer","email":"jeremie@jabber.org"},{"name":"rynomad","email":"nomad.ry@gmail.com"}],"time":{"modified":"2018-07-29T17:44:40.282Z","created":"2014-03-06T05:48:33.314Z","0.0.1":"2014-03-06T05:48:34.662Z","0.1.1":"2015-11-23T14:19:09.579Z","0.1.2":"2018-07-29T15:54:20.855Z","0.2.0":"2018-07-29T17:44:40.282Z"},"readmeFilename":"README.md","homepage":"https://github.com/quartzjer/ecc-jsbn","keywords":["jsbn","ecc","browserify"],"repository":{"type":"git","url":"git+https://github.com/quartzjer/ecc-jsbn.git"},"author":{"name":"Jeremie Miller","email":"jeremie@jabber.org","url":"http://jeremie.com/"},"bugs":{"url":"https://github.com/quartzjer/ecc-jsbn/issues"},"license":"MIT","users":{"mojaray2k":true},"version":"0.1.1","main":"index.js","dependencies":{"jsbn":"~0.1.0"},"gitHead":"d35a360352496721030da645e8054f07efc22487","scripts":{},"dist":{"shasum":"0fc73a9ed5f0d53c38193398523ef7e543777505","tarball":"https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"},"directories":{}}}'
=> {"type"=>"inspect", "data"=>{"name"=>"ecc-jsbn", "description"=>"ECC JS code based on JSBN", "dist-tags"=>{"latest"=>"0.2.0"}, "versions"=>["0.0.1", "0.1.1", "0.1.2", "0.2.0"], "maintainers"=>[{"name"=>"quartzjer", "email"=>"jeremie@jabber.org"}, {"name"=>"rynomad", "email"=>"nomad.ry@gmail.com"}], "time"=>{"modified"=>"2018-07-29T17:44:40.282Z", "created"=>"2014-03-06T05:48:33.314Z", "0.0.1"=>"2014-03-06T05:48:34.662Z", "0.1.1"=>"2015-11-23T14:19:09.579Z", "0.1.2"=>"2018-07-29T15:54:20.855Z", "0.2.0"=>"2018-07-29T17:44:40.282Z"}, "readmeFilename"=>"README.md", "homepage"=>"https://github.com/quartzjer/ecc-jsbn", "keywords"=>["jsbn", "ecc", "browserify"], "repository"=>{"type"=>"git", "url"=>"git+https://github.com/quartzjer/ecc-jsbn.git"}, "author"=>{"name"=>"Jeremie Miller", "email"=>"jeremie@jabber.org", "url"=>"http://jeremie.com/"}, "bugs"=>{"url"=>"https://github.com/quartzjer/ecc-jsbn/issues"}, "license"=>"MIT", "users"=>{"mojaray2k"=>true}, "version"=>"0.1.1", "main"=>"index.js", "dependencies"=>{"jsbn"=>"~0.1.0"}, "gitHead"=>"d35a360352496721030da645e8054f07efc22487", "scripts"=>{}, "dist"=>{"shasum"=>"0fc73a9ed5f0d53c38193398523ef7e543777505", "tarball"=>"https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"}, "directories"=>{}}}
2.5.5 :003 > _["data"]
=> {"name"=>"ecc-jsbn", "description"=>"ECC JS code based on JSBN", "dist-tags"=>{"latest"=>"0.2.0"}, "versions"=>["0.0.1", "0.1.1", "0.1.2", "0.2.0"], "maintainers"=>[{"name"=>"quartzjer", "email"=>"jeremie@jabber.org"}, {"name"=>"rynomad", "email"=>"nomad.ry@gmail.com"}], "time"=>{"modified"=>"2018-07-29T17:44:40.282Z", "created"=>"2014-03-06T05:48:33.314Z", "0.0.1"=>"2014-03-06T05:48:34.662Z", "0.1.1"=>"2015-11-23T14:19:09.579Z", "0.1.2"=>"2018-07-29T15:54:20.855Z", "0.2.0"=>"2018-07-29T17:44:40.282Z"}, "readmeFilename"=>"README.md", "homepage"=>"https://github.com/quartzjer/ecc-jsbn", "keywords"=>["jsbn", "ecc", "browserify"], "repository"=>{"type"=>"git", "url"=>"git+https://github.com/quartzjer/ecc-jsbn.git"}, "author"=>{"name"=>"Jeremie Miller", "email"=>"jeremie@jabber.org", "url"=>"http://jeremie.com/"}, "bugs"=>{"url"=>"https://github.com/quartzjer/ecc-jsbn/issues"}, "license"=>"MIT", "users"=>{"mojaray2k"=>true}, "version"=>"0.1.1", "main"=>"index.js", "dependencies"=>{"jsbn"=>"~0.1.0"}, "gitHead"=>"d35a360352496721030da645e8054f07efc22487", "scripts"=>{}, "dist"=>{"shasum"=>"0fc73a9ed5f0d53c38193398523ef7e543777505", "tarball"=>"https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"}, "directories"=>{}} Same with other JSONs, e.g. JSON::ParserError: 765: unexpected token at '{"type":"inspect","data":{"name":"oauth-sign","description":"OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.","dist-tags":{"latest":"0.9.0"},"versions":["0.2.0","0.3.0","0.4.0","0.5.0","0.6.0","0.7.0","0.8.0","0.8.1","0.8.2","0.9.0"],"maintainers":[{"name":"mikeal","email":"mikeal.rogers@gmail.com"},{"name":"nylen","email":"jnylen@gmail.com"},{"name":"simov","email":"simeonvelichkov@gmail.com"}],"time":{"modified":"2018-08-02T18:04:01.221Z","created":"2013-03-01T20:23:20.098Z","0.2.0":"2013-03-01T20:23:20.779Z","0.3.0":"2013-04-22T05:12:37.269Z","0.4.0":"2013-09-23T22:58:47.722Z","0.5.0":"2014-10-13T15:50:26.714Z","0.6.0":"2015-01-04T01:30:55.552Z","0.7.0":"2015-03-21T20:51:35.145Z","0.8.0":"2015-05-28T10:43:18.008Z","0.8.1":"2016-01-31T07:18:27.473Z","0.8.2":"2016-05-04T21:13:21.752Z","0.9.0":"2018-08-02T18:03:51.602Z"},"author":{"name":"Mikeal Rogers","email":"mikeal.rogers@gmail.com","url":"http://www.futurealoof.com"},"repository":{"url":"git+https://github.com/mikeal/oauth-sign.git"},"homepage":"https://github.com/mikeal/oauth-sign#readme","bugs":{"url":"https://github.com/mikeal/oauth-sign/issues"},"readmeFilename":"README.md","license":"Apache-2.0","users":{"mojaray2k":true,"wheelo":true,"yorusi":true,"willwolffmyren":true},"version":"0.9.0","main":"index.js","files":["index.js"],"dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"scripts":{"test":"node test.js"},"gitHead":"18a2513da6ba7a2c0cd8179170d7c296c7625137","dist":{"integrity":"sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==","shasum":"47a7b016baa68b5fa0ecf3dee08a85c679ac6455","tarball":"https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz","fileCount":4,"unpackedSize":13805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY0eHCRA9TVsSAnZWagAAjUEQAIzrYuPpA5aQBQzEmivM\nmcseCarSrww/LRygkxzZjdoqlGOJtbWhIrZbwDhkRwe8jZ9tNxlikODsEpCN\nSHgNNlP4+vLRQTtzBbLRs9gNn+xFqKD5gLR6+6onSjjImykdqXmetAZqILFI\ncH66JIOBUkRFJcd31vMox78v/RJjeikg3rv/DLguuD5/7dvszzSfLEkA3aQr\nXq3PQUZoPFHzEhrv2FD2C4+9AsIL2BkSI57Gq19Q0HHGMvQ5qUIvRqlhDiDX\nVC1Ru74solr0yV2LKP/NSyCtL1AqBVq9Buzb85PRdZMcZ3Ir1ExflgfRon2h\n5Oxlo+ZfWe8cnCiMOOTxN6RBRDte8sK+somrg+9ZzTpK4/tGTHrNsm3dLze6\nQ3WVSizWpZJlgfmjD5RYrRvgNfKi+idAqgGL39W+1YNzQCvF7w9KFbhAMnn0\n4JEH/IrJlWHYoNP196ZQeonRLnJE4pl2IaBPEB7PGMCSm3HX0x291YnxI3ma\nyUxY12l09S9Xl54P8sFwa5UZsbvNxOICeEhzw7X8bGLCHqtXowlWCTo8qIUw\nAtRz84Iz8+6kXwxwf+SY+A365buiNHHJVD/AST6lmUQPbEQHGZUSERrZiHJj\n/xqtQEmQ9YjuWIDA34Py3Kl96wcAh8um8OISlZyZnBjx9ijiloBVucVM2pxX\n45tC\r\n=aokP\r\n-----END PGP SIGNATURE-----\r\n"},"directories":{}}}' |
@krzysztof-pawlik-gat thanks for the feedback! I'll open a PR to address everything 🙇 |
This was referenced Dec 30, 2019
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #31
This adds a yarn source that finds dependency information using a combination of
yarn list --json
andyarn info --json
. Theyarn info
calls are parallelized to cut down on the runtime hit of calling the command on each dependency. Paths are constructed by looking forshadow: false
children fromyarn list
output - these indicate that a dependency is nested and are found at<parent>/node_modules/<child>
.Otherwise it's very similar to the npm source, which I copied and modified to get to the current yarn source.
I've included the same configuration setting to pick up non-production dependencies that was added to #231. In testing, I found issues with this in versions <= 1.2.0 so it may not be dependable for older versions of yarn.
I've added CI actions for yarn@ 1.4.0 and latest versions, to test the minimum version installable with
npm install -g yarn
that supportsyarn list --production
along with the latest version./cc @krzysztof-pawlik-gat FYI from your input on #31 and #170