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

list-github-dir-content

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

list-github-dir-content - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -27,5 +27,2 @@ const fetch = require('node-fetch'); // Automatically excluded in browser bundles

const contents = await response.json();
if (contents.truncated) {
return viaContentsApi(repo, dir, token);
}
for (const item of contents.tree) {

@@ -36,2 +33,3 @@ if (item.type === 'blob' && item.path.startsWith(dir)) {

}
files.truncated = contents.truncated;
return files;

@@ -38,0 +36,0 @@ }

{
"name": "list-github-dir-content",
"version": "1.0.0",
"version": "1.0.1",
"description": "List all the files in a GitHub repo’s directory",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -25,2 +25,7 @@ # 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)

// ['src/file.js', 'src/styles/main.css', ...]
// listContent.viaTreesApi also adds a `truncated` property
if (filesArray.truncated) {
// Perhaps try with viaContentsApi?
}
```

@@ -40,3 +45,3 @@

Notice: they're both the same and `viaTreesApi` may **also** try to use `viaContentsApi` if the repo has more files than required.
**Notice:** while they work differently, they have the same output if no limit was reached.

@@ -46,3 +51,3 @@ Known issues:

- `viaContentsApi` is limited to 1000 files _per directory_
- `viaTreesApi` is limited to an unknown amount of files _per repo_
- `viaTreesApi` is limited to around 60,000 files _per repo_

@@ -49,0 +54,0 @@

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