This commit is contained in:
eric sciple 2020-01-24 12:20:19 -05:00
parent beb1329f9f
commit 2b95e76931
7736 changed files with 1874747 additions and 51184 deletions

View file

@ -23,6 +23,7 @@ the passed options and sends the request using [fetch](https://developer.mozilla
- [REST API example](#rest-api-example)
- [GraphQL example](#graphql-example)
- [Alternative: pass `method` & `url` as part of options](#alternative-pass-method--url-as-part-of-options)
- [Authentication](#authentication)
- [request()](#request)
- [`request.defaults()`](#requestdefaults)
- [`request.endpoint`](#requestendpoint)
@ -42,13 +43,17 @@ request("POST /repos/:owner/:repo/issues/:number/labels", {
mediaType: {
previews: ["symmetra"]
},
owner: "ocotkit",
owner: "octokit",
repo: "request.js",
number: 1,
labels: ["🐛 bug"]
});
```
👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped)
😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js).
👍 Sensible defaults
- `baseUrl`: `https://api.github.com`
@ -59,8 +64,6 @@ request("POST /repos/:owner/:repo/issues/:number/labels", {
🧐 Simple to debug: Sets `error.request` to request options causing the error (with redacted credentials).
👶 Small bundle size (\<5kb minified + gzipped)
## Usage
<table>
@ -110,6 +113,8 @@ console.log(`${result.data.length} repos found.`);
### GraphQL example
For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme)
```js
const result = await request("POST /graphql", {
headers: {
@ -144,6 +149,45 @@ const result = await request({
});
```
## Authentication
The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/).
```js
const requestWithAuth = request.defaults({
headers: {
authorization: "token 0000000000000000000000000000000000000001"
}
});
const result = await request("GET /user");
```
For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js).
```js
const { createAppAuth } = require("@octokit/auth-app");
const auth = createAppAuth({
id: process.env.APP_ID,
privateKey: process.env.PRIVATE_KEY,
installationId: 123
});
const requestWithAuth = request.defaults({
request: {
hook: auth.hook
},
mediaType: {
previews: ["machine-man"]
}
});
const { data: app } = await requestWithAuth("GET /app");
const { data: app } = await requestWithAuth("POST /repos/:owner/:repo/issues", {
owner: "octocat",
repo: "hello-world",
title: "Hello from the engine room"
});
```
## request()
`request(route, options)` or `request(options)`.
@ -425,10 +469,10 @@ const options = request.endpoint("GET /orgs/:org/repos", {
All of the [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) API can be used:
- [`ocotkitRequest.endpoint()`](#endpoint)
- [`ocotkitRequest.endpoint.defaults()`](#endpointdefaults)
- [`ocotkitRequest.endpoint.merge()`](#endpointdefaults)
- [`ocotkitRequest.endpoint.parse()`](#endpointmerge)
- [`octokitRequest.endpoint()`](#endpoint)
- [`octokitRequest.endpoint.defaults()`](#endpointdefaults)
- [`octokitRequest.endpoint.merge()`](#endpointdefaults)
- [`octokitRequest.endpoint.parse()`](#endpointmerge)
## Special cases

View file

@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var endpoint = require('@octokit/endpoint');
var getUserAgent = _interopDefault(require('universal-user-agent'));
var universalUserAgent = require('universal-user-agent');
var isPlainObject = _interopDefault(require('is-plain-object'));
var nodeFetch = _interopDefault(require('node-fetch'));
var requestError = require('@octokit/request-error');
const VERSION = "0.0.0-development";
const VERSION = "5.3.1";
function getBufferResponse(response) {
return response.arrayBuffer();
@ -69,7 +69,11 @@ function fetchWrapper(requestOptions) {
});
try {
Object.assign(error, JSON.parse(error.message));
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors; // Assumption `errors` would always be in Array Fotmat
error.message = error.message + ": " + errors.map(JSON.stringify).join(", ");
} catch (e) {// ignore, see octokit/rest.js#684
}
@ -136,8 +140,9 @@ function withDefaults(oldEndpoint, newDefaults) {
const request = withDefaults(endpoint.endpoint, {
headers: {
"user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}`
"user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`
}
});
exports.request = request;
//# sourceMappingURL=index.js.map

1
node_modules/@octokit/request/dist-node/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -51,7 +51,12 @@ export default function fetchWrapper(requestOptions) {
request: requestOptions
});
try {
Object.assign(error, JSON.parse(error.message));
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors;
// Assumption `errors` would always be in Array Fotmat
error.message =
error.message + ": " + errors.map(JSON.stringify).join(", ");
}
catch (e) {
// ignore, see octokit/rest.js#684

View file

@ -1,5 +1,5 @@
import { endpoint } from "@octokit/endpoint";
import getUserAgent from "universal-user-agent";
import { getUserAgent } from "universal-user-agent";
import { VERSION } from "./version";
import withDefaults from "./with-defaults";
export const request = withDefaults(endpoint, {

View file

View file

@ -1 +1 @@
export const VERSION = "0.0.0-development";
export const VERSION = "5.3.1";

View file

@ -1,5 +1,5 @@
import { endpoint } from "./types";
export default function fetchWrapper(requestOptions: ReturnType<endpoint> & {
import { EndpointInterface } from "@octokit/types";
export default function fetchWrapper(requestOptions: ReturnType<EndpointInterface> & {
redirect?: string;
}): Promise<{
status: number;

View file

@ -1 +1 @@
export declare const request: import("./types").request;
export declare const request: import("@octokit/types").RequestInterface;

View file

@ -1,152 +0,0 @@
/// <reference types="node" />
import { Agent } from "http";
import { endpoint } from "@octokit/endpoint";
export interface request {
/**
* Sends a request based on endpoint options
*
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
*/
<T = any>(options: Endpoint): Promise<OctokitResponse<T>>;
/**
* Sends a request based on endpoint options
*
* @param {string} route Request method + URL. Example: `'GET /orgs/:org'`
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
*/
<T = any>(route: Route, parameters?: Parameters): Promise<OctokitResponse<T>>;
/**
* Returns a new `endpoint` with updated route and parameters
*/
defaults: (newDefaults: Parameters) => request;
/**
* Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint}
*/
endpoint: typeof endpoint;
}
export declare type endpoint = typeof endpoint;
/**
* Request method + URL. Example: `'GET /orgs/:org'`
*/
export declare type Route = string;
/**
* Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar`
*/
export declare type Url = string;
/**
* Request method
*/
export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
/**
* Endpoint parameters
*/
export declare type Parameters = {
/**
* Base URL to be used when a relative URL is passed, such as `/orgs/:org`.
* If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request
* will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/:org`.
*/
baseUrl?: string;
/**
* HTTP headers. Use lowercase keys.
*/
headers?: RequestHeaders;
/**
* Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide}
*/
mediaType?: {
/**
* `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint
*/
format?: string;
/**
* Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix.
* Example for single preview: `['squirrel-girl']`.
* Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`.
*/
previews?: string[];
};
/**
* Pass custom meta information for the request. The `request` object will be returned as is.
*/
request?: OctokitRequestOptions;
/**
* Any additional parameter will be passed as follows
* 1. URL parameter if `':parameter'` or `{parameter}` is part of `url`
* 2. Query parameter if `method` is `'GET'` or `'HEAD'`
* 3. Request body if `parameter` is `'data'`
* 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'`
*/
[parameter: string]: any;
};
export declare type Endpoint = Parameters & {
method: Method;
url: Url;
};
export declare type Defaults = Parameters & {
method: Method;
baseUrl: string;
headers: RequestHeaders & {
accept: string;
"user-agent": string;
};
mediaType: {
format: string;
previews: string[];
};
};
export declare type OctokitResponse<T> = {
headers: ResponseHeaders;
/**
* http response code
*/
status: number;
/**
* URL of response after all redirects
*/
url: string;
/**
* This is the data you would see in https://developer.Octokit.com/v3/
*/
data: T;
};
export declare type AnyResponse = OctokitResponse<any>;
export declare type RequestHeaders = {
/**
* Avoid setting `accept`, use `mediaFormat.{format|previews}` instead.
*/
accept?: string;
/**
* Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678`
*/
authorization?: string;
/**
* `user-agent` is set do a default and can be overwritten as needed.
*/
"user-agent"?: string;
[header: string]: string | number | undefined;
};
export declare type ResponseHeaders = {
[header: string]: string;
};
export declare type Fetch = any;
export declare type Signal = any;
export declare type OctokitRequestOptions = {
/**
* Node only. Useful for custom proxy, certificate, or dns lookup.
*/
agent?: Agent;
/**
* Custom replacement for built-in fetch method. Useful for testing or request hooks.
*/
fetch?: Fetch;
/**
* Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
*/
signal?: Signal;
/**
* Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead.
*/
timeout?: number;
[option: string]: any;
};

View file

@ -1 +1 @@
export declare const VERSION = "0.0.0-development";
export declare const VERSION = "5.3.1";

View file

@ -1,2 +1,2 @@
import { request, endpoint, Parameters } from "./types";
export default function withDefaults(oldEndpoint: endpoint, newDefaults: Parameters): request;
import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types";
export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface;

View file

@ -1,10 +1,10 @@
import { endpoint } from '@octokit/endpoint';
import getUserAgent from 'universal-user-agent';
import { getUserAgent } from 'universal-user-agent';
import isPlainObject from 'is-plain-object';
import nodeFetch from 'node-fetch';
import { RequestError } from '@octokit/request-error';
const VERSION = "0.0.0-development";
const VERSION = "5.3.1";
function getBufferResponse(response) {
return response.arrayBuffer();
@ -59,7 +59,12 @@ function fetchWrapper(requestOptions) {
request: requestOptions
});
try {
Object.assign(error, JSON.parse(error.message));
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors;
// Assumption `errors` would always be in Array Fotmat
error.message =
error.message + ": " + errors.map(JSON.stringify).join(", ");
}
catch (e) {
// ignore, see octokit/rest.js#684
@ -124,3 +129,4 @@ const request = withDefaults(endpoint, {
});
export { request };
//# sourceMappingURL=index.js.map

1
node_modules/@octokit/request/dist-web/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,35 +0,0 @@
language: node_js
cache: npm
# Trigger a push build on master and greenkeeper branches + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
- /^greenkeeper.*$/
stages:
- test
- name: release
if: branch = master AND type IN (push)
jobs:
include:
- stage: test
node_js: 12
script: npm run test
- node_js: 8
script: npm run test
- node_js: 10
env: Node 10 & coverage upload
script:
- npm run test
- npm run coverage:upload
- node_js: lts/*
env: browser tests
script: npm run test:browser
- stage: release
node_js: lts/*
env: semantic-release
script: npm run semantic-release

View file

@ -4,13 +4,13 @@
[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent)
[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent)
[![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent)
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/)
```js
const getUserAgent = require('universal-user-agent')
const userAgent = getUserAgent()
const { getUserAgent } = require("universal-user-agent");
// or import { getUserAgent } from "universal-user-agent";
const userAgent = getUserAgent();
// userAgent will look like this
// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0"
// in node: Node.js/v8.9.4 (macOS High Sierra; x64)

View file

@ -1,6 +0,0 @@
module.exports = getUserAgentBrowser
function getUserAgentBrowser () {
/* global navigator */
return navigator.userAgent
}

View file

@ -1,4 +0,0 @@
{
"integrationFolder": "test",
"video": false
}

View file

@ -0,0 +1,22 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var osName = _interopDefault(require('os-name'));
function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
throw error;
}
}
exports.getUserAgent = getUserAgent;
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows <version undetectable>\";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"}

View file

@ -0,0 +1,3 @@
export function getUserAgent() {
return navigator.userAgent;
}

View file

@ -0,0 +1 @@
export { getUserAgent } from "./node";

View file

@ -0,0 +1,12 @@
import osName from "os-name";
export function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
}
catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
throw error;
}
}

View file

@ -0,0 +1 @@
export declare function getUserAgent(): string;

View file

@ -0,0 +1 @@
export { getUserAgent } from "./node";

View file

@ -0,0 +1 @@
export declare function getUserAgent(): string;

View file

@ -0,0 +1,6 @@
function getUserAgent() {
return navigator.userAgent;
}
export { getUserAgent };
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"}

View file

@ -1 +0,0 @@
export default function getUserAgentNode(): string;

View file

@ -1,15 +0,0 @@
module.exports = getUserAgentNode
const osName = require('os-name')
function getUserAgentNode () {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return 'Windows <version undetectable>'
}
throw error
}
}

View file

@ -1,82 +1,65 @@
{
"_from": "universal-user-agent@^3.0.0",
"_id": "universal-user-agent@3.0.0",
"_from": "universal-user-agent@^4.0.0",
"_id": "universal-user-agent@4.0.0",
"_inBundle": false,
"_integrity": "sha512-T3siHThqoj5X0benA5H0qcDnrKGXzU8TKoX15x/tQHw1hQBvIEBHjxQ2klizYsqBOO/Q+WuxoQUihadeeqDnoA==",
"_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==",
"_location": "/@octokit/request/universal-user-agent",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "universal-user-agent@^3.0.0",
"raw": "universal-user-agent@^4.0.0",
"name": "universal-user-agent",
"escapedName": "universal-user-agent",
"rawSpec": "^3.0.0",
"rawSpec": "^4.0.0",
"saveSpec": null,
"fetchSpec": "^3.0.0"
"fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/@octokit/request"
],
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-3.0.0.tgz",
"_shasum": "4cc88d68097bffd7ac42e3b7c903e7481424b4b9",
"_spec": "universal-user-agent@^3.0.0",
"_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\request",
"author": {
"name": "Gregor Martynus",
"url": "https://github.com/gr2m"
},
"browser": "browser.js",
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
"_shasum": "27da2ec87e32769619f68a14996465ea1cb9df16",
"_spec": "universal-user-agent@^4.0.0",
"_where": "/Users/eric/repos/actions/setup-node/node_modules/@octokit/request",
"bugs": {
"url": "https://github.com/gr2m/universal-user-agent/issues"
},
"bundleDependencies": false,
"dependencies": {
"os-name": "^3.0.0"
"os-name": "^3.1.0"
},
"deprecated": false,
"description": "Get a user agent string in both browser and node",
"devDependencies": {
"chai": "^4.1.2",
"coveralls": "^3.0.2",
"cypress": "^3.1.0",
"mocha": "^6.0.0",
"nyc": "^14.0.0",
"proxyquire": "^2.1.0",
"@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.6.0",
"@pika/plugin-ts-standard-pkg": "^0.6.0",
"@types/jest": "^24.0.18",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"semantic-release": "^15.9.15",
"sinon": "^7.2.4",
"sinon-chai": "^3.2.0",
"standard": "^13.0.1",
"test": "^0.6.0",
"travis-deploy-once": "^5.0.7"
"ts-jest": "^24.0.2",
"typescript": "^3.6.2"
},
"files": [
"dist-*/",
"bin/"
],
"homepage": "https://github.com/gr2m/universal-user-agent#readme",
"keywords": [],
"license": "ISC",
"main": "index.js",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "universal-user-agent",
"pika": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gr2m/universal-user-agent.git"
},
"scripts": {
"coverage": "nyc report --reporter=html && open coverage/index.html",
"coverage:upload": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
"semantic-release": "semantic-release",
"test": "nyc mocha \"test/*-test.js\"",
"test:browser": "cypress run --browser chrome",
"travis-deploy-once": "travis-deploy-once"
},
"standard": {
"globals": [
"describe",
"it",
"beforeEach",
"afterEach",
"expect"
]
},
"types": "index.d.ts",
"version": "3.0.0"
"sideEffects": false,
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"version": "4.0.0"
}

View file

@ -1,57 +0,0 @@
// make tests run in both Node & Express
if (!global.cy) {
const chai = require('chai')
const sinon = require('sinon')
const sinonChai = require('sinon-chai')
chai.use(sinonChai)
global.expect = chai.expect
let sandbox
beforeEach(() => {
sandbox = sinon.createSandbox()
global.cy = {
stub: function () {
return sandbox.stub.apply(sandbox, arguments)
},
log () {
console.log.apply(console, arguments)
}
}
})
afterEach(() => {
sandbox.restore()
})
}
const getUserAgent = require('..')
describe('smoke', () => {
it('works', () => {
expect(getUserAgent()).to.be.a('string')
expect(getUserAgent().length).to.be.above(10)
})
if (!process.browser) { // test on node only
const proxyquire = require('proxyquire').noCallThru()
it('works around wmic error on Windows (#5)', () => {
const getUserAgent = proxyquire('..', {
'os-name': () => {
throw new Error('Command failed: wmic os get Caption')
}
})
expect(getUserAgent()).to.equal('Windows <version undetectable>')
})
it('does not swallow unexpected errors', () => {
const getUserAgent = proxyquire('..', {
'os-name': () => {
throw new Error('oops')
}
})
expect(getUserAgent).to.throw('oops')
})
}
})

View file

@ -1,8 +1,8 @@
{
"_from": "@octokit/request@^5.0.0",
"_id": "@octokit/request@5.0.2",
"_id": "@octokit/request@5.3.1",
"_inBundle": false,
"_integrity": "sha512-z1BQr43g4kOL4ZrIVBMHwi68Yg9VbkRUyuAgqCp1rU3vbYa69+2gIld/+gHclw15bJWQnhqqyEb7h5a5EqgZ0A==",
"_integrity": "sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg==",
"_location": "/@octokit/request",
"_phantomChildren": {
"os-name": "3.1.0"
@ -22,39 +22,44 @@
"/@octokit/graphql",
"/@octokit/rest"
],
"_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.0.2.tgz",
"_shasum": "59a920451f24811c016ddc507adcc41aafb2dca5",
"_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.1.tgz",
"_shasum": "3a1ace45e6f88b1be4749c5da963b3a3b4a2f120",
"_spec": "@octokit/request@^5.0.0",
"_where": "C:\\Users\\Administrator\\Documents\\setup-node\\node_modules\\@octokit\\graphql",
"_where": "/Users/eric/repos/actions/setup-node/node_modules/@octokit/graphql",
"bugs": {
"url": "https://github.com/octokit/request.js/issues"
},
"bundleDependencies": false,
"deno": "dist-web/index.js",
"dependencies": {
"@octokit/endpoint": "^5.1.0",
"@octokit/endpoint": "^5.5.0",
"@octokit/request-error": "^1.0.1",
"@octokit/types": "^2.0.0",
"deprecation": "^2.0.0",
"is-plain-object": "^3.0.0",
"node-fetch": "^2.3.0",
"once": "^1.4.0",
"universal-user-agent": "^3.0.0"
"universal-user-agent": "^4.0.0"
},
"deprecated": false,
"description": "Send parameterized requests to GitHubs APIs with sensible defaults in browsers and Node",
"devDependencies": {
"@pika/pack": "^0.4.0",
"@pika/plugin-build-node": "^0.5.1",
"@pika/plugin-build-web": "^0.5.1",
"@pika/plugin-ts-standard-pkg": "^0.5.1",
"@octokit/auth-app": "^2.1.2",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.7.0",
"@pika/plugin-build-web": "^0.7.0",
"@pika/plugin-ts-standard-pkg": "^0.7.0",
"@types/fetch-mock": "^7.2.4",
"@types/jest": "^24.0.12",
"@types/lolex": "^3.1.1",
"@types/node": "^12.0.3",
"@types/node-fetch": "^2.3.3",
"@types/once": "^1.4.0",
"fetch-mock": "^7.2.0",
"jest": "^24.7.1",
"lolex": "^5.0.0",
"prettier": "^1.17.0",
"semantic-release": "^15.10.5",
"semantic-release": "^15.13.27",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^24.0.2",
"typescript": "^3.4.5"
@ -72,7 +77,6 @@
],
"license": "MIT",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"name": "@octokit/request",
"pika": true,
"publishConfig": {
@ -85,5 +89,5 @@
"sideEffects": false,
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"version": "5.0.2"
"version": "5.3.1"
}