Skip to content

Commit

Permalink
fix: typo in deprecation warnings (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoski authored and gr2m committed Jun 17, 2019
1 parent b7dbd6e commit a96f5d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/parse-client-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ function parseOptions (options, log, hook) {
}

if (options.timeout) {
deprecateOptionsTimeout(log, new Deprecation('[@octokit/rest] new Octokit({timout}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/rest.js#client-options'))
deprecateOptionsTimeout(log, new Deprecation('[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request'))
clientDefaults.request.timeout = options.timeout
}

if (options.agent) {
deprecateOptionsAgent(log, new Deprecation('[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/rest.js#client-options'))
deprecateOptionsAgent(log, new Deprecation('[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request'))
clientDefaults.request.agent = options.agent
}

if (options.headers) {
deprecateOptionsHeaders(log, new Deprecation('[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/rest.js#client-options'))
deprecateOptionsHeaders(log, new Deprecation('[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request'))
}

const userAgentOption = clientDefaults.headers['user-agent']
Expand Down

0 comments on commit a96f5d6

Please sign in to comment.