@octokit/rest
22.0.1 · 31 Oct 2025MIT27.9M / weekRepositoryHomepagenpmAtom feed
16.43.2 is the newest release of 16.x.
In short
5 new
Release note
Features
Custom logging
This release adds 4 new methods
octokit.log.debug()octokit.log.info()octokit.log.warn()octokit.log.error()
They can be configured using the log client option. By default, octokit.log.debug() and octokit.log.info() are no-ops, while the other two call console.warn() and console.error() respectively.
This can be used for debugging. The simplest way is to set the log option to console
const octokit = require("@octokit/rest")({
log: console
})
console.request("/")This will log
request { method: "GET",
baseUrl: "https://api.github.com",
headers:
{ accept: "application/vnd.github.v3+json",
"user-agent":
"octokit.js/0.0.0-semantically-released Node.js/10.15.0 (macOS Mojave; x64)" },
request: {},
url: "/" }
GET / - 200 in 514msIf you like to support a configurable log level, we recommend using the console-log-level module
const octokit = require("@octokit/rest")({
log: require("console-log-level")({ level: "info" })
})
console.request("/")This will only log
GET / - 200 in 514ms
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.