list-github-dir-content
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -8,2 +8,3 @@ const fetch = require('node-fetch'); // Automatically excluded in browser bundles | ||
} | ||
function parseIdentifier(identifier) { | ||
@@ -28,2 +29,3 @@ const [repo, ref = 'HEAD'] = identifier.split('#'); | ||
} | ||
return files.concat(...await Promise.all(requests)); | ||
@@ -36,2 +38,6 @@ } | ||
async function viaTreesApi(identifier, dir, token) { | ||
if (!dir.endsWith('/')) { | ||
dir += '/'; | ||
} | ||
const files = []; | ||
@@ -45,2 +51,3 @@ const {repo, ref} = parseIdentifier(identifier); | ||
} | ||
files.truncated = contents.truncated; | ||
@@ -47,0 +54,0 @@ return files; |
{ | ||
"name": "list-github-dir-content", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "List all the files in a GitHub repo’s directory", | ||
"license": "MIT", | ||
"repository": "bfred-it/list-github-dir-content", | ||
"author": "Federico Brigante <github@bfred.it> (bfred.it)", | ||
"keywords": [ | ||
"github", | ||
"api", | ||
"contents", | ||
"api", | ||
"dir", | ||
"directory", | ||
"folder", | ||
"github", | ||
"listing" | ||
], | ||
"repository": "fregante/list-github-dir-content", | ||
"license": "MIT", | ||
"author": "Federico Brigante <opensource@bfred.it> (bfred.it)", | ||
"files": [ | ||
@@ -21,14 +21,8 @@ "index.js", | ||
], | ||
"scripts": { | ||
"test": "xo", | ||
"manual-test": "node tests.js" | ||
}, | ||
"devDependencies": { | ||
"xo": "*" | ||
}, | ||
"browser": { | ||
"node-fetch": "./browser-fetch" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "^1.7.3" | ||
"scripts": { | ||
"manual-test": "node tests.js", | ||
"test": "xo" | ||
}, | ||
@@ -39,3 +33,9 @@ "xo": { | ||
] | ||
}, | ||
"dependencies": { | ||
"node-fetch": "^1.7.3" | ||
}, | ||
"devDependencies": { | ||
"xo": "*" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# list-github-dir-content [![Build Status](https://travis-ci.org/bfred-it/list-github-dir-content.svg?branch=master)](https://travis-ci.org/bfred-it/list-github-dir-content) | ||
# list-github-dir-content [![Build Status](https://travis-ci.org/fregante/list-github-dir-content.svg?branch=master)](https://travis-ci.org/fregante/list-github-dir-content) | ||
@@ -75,3 +75,3 @@ > List all the files in a GitHub repo’s directory | ||
MIT © [Federico Brigante](http://twitter.com/bfred_it) | ||
MIT © [Federico Brigante](https://bfred.it) | ||
Sorry, the diff of this file is not supported yet
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
6210
49