Packages

@octokit/rest

22.0.1 · 31 Oct 2025MIT27.9M / weekRepositoryHomepagenpmAtom feed

Your version

16.12.0

21 Jan 2019Where it was published

16.43.2 is the newest release of 16.x.

In short

1 new

Release note

Features

  • userAgent, previews and request options

In preparation for v17, instead of

const octokit = new Octokit({
  headers: {
    accept: 'application/vnd.github.jean-grey-preview+json,application/vnd.github.symmetra-preview+json',
    'user-agent': 'octokit/rest.js v1.2.3' // v1.2.3 will be current version
  },
  timeout: 0,
  agent: undefined
})

the new options will be

const octokit = new Octokit({
  userAgent: 'myapp v1.2.3',
  previews: [
    'jean-grey-preview',
    'symmetra-preview'
  ],
  request: {
    timeout: 0,
    agent: undefined
  }
})

The old options will continue to work, but will be deprecated. The baseUrl option will remain the same.

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.