
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
github-basic
Advanced tools
Basic https interface to GitHub. Intended so it's easy to code using the official documentation. It also includes helpers for streaming paged results, and doing all the necessary actions to automatically submit pull requests.
npm install github-basic
var github = require('github-basic');
var client = github({version: 3});
Create a new GitHub client with a set of options:
{version: 3})'<my oauth token>' or {username: 'my user', password: 'my password'} to authenticate your requests'memory', 'file' or a custom cacheMake an API request and parse the response as JSON. For get, head and delete requests, the query will be added as a query string to the end of the url. For other methods, it will be used as a body. You can optionally specify that parts of the query should instead be used as part of the url by adding :qs-name segments to the url. e.g.
client.get('/users/:user/gists', {user: 'ForbesLindesay'});
If the request is part of a paged request, you can use res.getNext(), res.getPrev(), res.getLast() and res.getFirst() to request other pages. Note that not all of these methods will always exist (e.g. ther eis no res.getNext() if you already have the last page).
Make an API request and return the response as a Buffer. For get, head and delete requests, the query will be added as a query string to the end of the url. For other methods, it will be used as a body. You can optionally specify that parts of the query should instead be used as part of the url by adding :qs-name segments to the url. e.g.
client.getBuffer('/users/:user/gists', {user: 'ForbesLindesay'});
Sometimes the easiest way to handle GitHub's paginated results is to treat them as a stream. This method isn't (currently) clever enough to do streaming JSON parsing of the response, but it will keep requesting more pages as needed and it works properly with back pressure so as to not request more pages than are needed:
var github = require('github-basic')
var Stringifier = require('newline-json').Stringifier
var client = github({version: 3})
//stream all of ForbesLindesay's repos
client.getStream('/users/:user/repos', {user: 'ForbesLindesay'})
.pipe(new Stringifier())
.pipe(process.stdout)
Returns true if :user/:repo exists, and false if requesting the repo url returns an error.
Forks the repo github.com/:user/:repo to the authenticated user and waits until the fork operation completes. To fork to an organization, just pass an organization string in the options object.
N.B. forking will currently appear successful even if the target repo already exists.
Creates a new branch in github.com/:user/:repo using from as the source branch and to as the new branch name.
Commits a set of changes to github.com/:user/:repo. It only supports updating text files.
commit:
An object with:
| property | type | default | description |
|---|---|---|---|
| branch | String | 'master' | The branch to commit to |
| message | String | required | The commit message |
| updates | Array<FileUpdate> | required | The actual changes to make |
FileUpdate:
An object with:
| property | type | default | description |
|---|---|---|---|
| path | String | required | The file path within the repo (e.g. test/index.js) |
| content | String | required | The new content of the file |
| mode | String | '100644' | The mode to commit the file with (you probably don't want to change this) |
| type | String | 'blob' | The type of entry to create (you probably don't want to change this) |
options:
An (optonal) object with:
| property | type | default | description |
|---|---|---|---|
| force | Boolean | false | Will force push the change if set to true. You almost certainly don't want to do this. |
Creates a pull request from from to to.
from:
An object with:
| property | type | default | description |
|---|---|---|---|
| user | String | required | The source user |
| repo | String | required | The source repository |
| branch | String | 'master' | The source branch |
to:
An object with:
| property | type | default | description |
|---|---|---|---|
| user | String | required | The destination user |
| repo | String | required | The destination repository |
| branch | String | 'master' | The destination branch |
message:
Either:
| property | type | default | description |
|---|---|---|---|
| title | String | required | The title of the pull request |
| body | String | '' | The body of the pull request |
or:
| property | type | default | description |
|---|---|---|---|
| issue | Number | required | An issue number to convert into a pull request |
var github = require('github-basic')
var client = github({version: 3})
//get all 'ForbesLindesay's gists in the last year
var since = new Date()
since.setUTCFullYear(since.getUTCFullYear() - 1)
// using callbacks
client.get('/users/:user/gists', {user: 'ForbesLindesay', since: since}, function (err, res) {
if (err) throw err;
console.dir(res)
})
// or
client.get('/users/ForbesLindesay/gists', {since: since}, function (err, res) {
if (err) throw err;
console.dir(res)
})
// using promises
client.get('/users/:user/gists', {user: 'ForbesLindesay', since: since}).done(function (res) {
console.dir(res)
})
//or
client.get( '/users/ForbesLindesay/gists', {since: since}).done(function (res) {
console.dir(res)
})
// getting raw github data
client.getBuffer('https://raw.githubusercontent.com/:owner/:repo/master/README.md', {
owner: 'ForbesLindesay',
repo: 'github-basic'
}).done(function (res) {
process.stdout.write(res)
})
MIT
FAQs
Basic https interface to GitHub
The npm package github-basic receives a total of 520 weekly downloads. As such, github-basic popularity was classified as not popular.
We found that github-basic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.