octokit / request.js Goto Github PK
View Code? Open in Web Editor NEWSend parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node
License: MIT License
Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node
License: MIT License
compare test from @octokit/rest
v16
const stringToArrayBuffer = require("string-to-arraybuffer");
const { getInstance } = require("../util");
require("../mocha-node-setup");
describe("api.github.com", () => {
let octokit;
beforeEach(() => {
return getInstance("release-assets", {
auth: "token 0000000000000000000000000000000000000001"
}).then(instance => {
octokit = instance;
});
});
it("octokit.request with Buffer data", () => {
return octokit.repos
.getReleaseByTag({
owner: "octokit-fixture-org",
repo: "release-assets",
tag: "v1.0.0"
})
.then(result => {
return octokit.request({
method: "POST",
url: result.data.upload_url,
headers: {
"content-type": "text/plain"
},
data: Buffer.from("Hello, world!\n"),
name: "test-upload.txt",
label: "test"
});
});
});
it("octokit.repos.uploadReleaseAsset as ArrayBuffer", () => {
return octokit.repos
.getReleaseByTag({
owner: "octokit-fixture-org",
repo: "release-assets",
tag: "v1.0.0"
})
.then(result => {
return octokit.request({
method: "POST",
url: result.data.upload_url,
headers: {
"content-type": "text/plain"
},
data: stringToArrayBuffer("Hello, world!\n"),
name: "test-upload.txt",
label: "test"
});
});
});
});
This is part of https://github.com/octokit/rest.js/issues/1546
After upgrading semantic-release/github, our dry run of our npm build started to fail with this stack trace
npx semantic-release
[11:02:00 AM] [semantic-release] › ℹ Running semantic-release version 15.13.12
[11:02:00 AM] [semantic-release] › ✖ An error occurred while running semantic-release: TypeError: oldEndpoint.defaults is not a function
at withDefaults (../node_modules/@octokit/request/lib/with-defaults.js:6:32)
at Object. (../node_modules/@octokit/request/index.js:8:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (../node_modules/@octokit/rest/lib/constructor.js:3:18)
TypeError: oldEndpoint.defaults is not a function
at withDefaults (../node_modules/@octokit/request/lib/with-defaults.js:6:32)
at Object. (../node_modules/@octokit/request/index.js:8:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (../node_modules/@octokit/rest/lib/constructor.js:3:18)%
I think this may actually be an issue with octokit/request - so I decided to create an issue here.
It looks like in @octokit/request/lib/index.js
withDefaults is expecting oldEndpoint.defaults to exist, but upon inspecting the object myself, I noticed defaults
is actually a level deeper - oldEndpoint.endpoint.defaults
. By updating @octokit/request/index.js line 1 to add .endpoint at the end of the line, in my node-modules resolved the error. const endpoint = require('@octokit/endpoint').endpoint
.. But this is not a good workaround when it comes to publishing the project in the CI
@octokit/[email protected] and @octokit/[email protected] were installed as dependencies of semantic-release/github. If a different version should be used by semantic-release/github, I could open an issue there too.
12.0.6
to 12.0.7
.This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
4.29.0
to 4.29.1
.This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
__esModule
flag when modules are concatenated, but without usage informationThe new version differs by 14 commits.
6934b98
4.29.1
960f396
Merge pull request #8686 from MarkPollmann/patch-1
8627743
Merge pull request #8678 from bhavya9107/patch-1
915c32d
docs(README): remove to from link
9737a3b
Update README.md
f654a49
docs(README):Update index
c957338
docs(README): newline after index
09cf713
docs(README): add index
07d4d85
Merge pull request #8676 from hulkish/fix-side-effects-example
2209b8a
rebuild examples
780c17e
fix side-effects example
2fe0ba5
Normalize backslash on windows
a0eab48
Merge pull request #8667 from webpack/bugfix/esModule-flag
42007e8
fixes #8666
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
follow up for #45
4.2.2
to 4.3.0
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/endpoint is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
accept
and user-agent
header are always set for Defaults
type (9bfa534)accept
and user-agent
header are always set for Defaults
type (460151c).merge()
usage (de378f0)There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
This project looks great! 😍
Is the plan for this project to replace some / all of @octokit/rest
? 🙇
12.6.9
to 12.7.0
.This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
The method signature should be hook (request, options) {}
, not hook (options, request) {}
🤦♂🤕
This is the signature we have in @octokit/rest
for octokit.hook.wrap('request', hook)
1.0.2
to 1.0.3
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/request-error is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
follow up for https://github.com/octokit/rest.js/issues/1226
request('GET /repos/:owner/:repo/readme', {
owner,
repo,
mediaType: {
format: 'raw',
previews: ['shadow-cat', 'symmetra']
}
})
Would send preview headers together with the raw format
1.18.0
to 1.18.1
.This version is covered by your current version range and after updating it in your project the build failed.
prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
15.13.32
to 15.14.0
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
envi-ci
values to plugins context (a8c747d)The new version differs by 2 commits.
a8c747d
feat: pass envi-ci
values to plugins context
fc70726
chore: add Mockserver generated file to gitignore
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
It’s currently used in @octokit/rest
and some other plugins. Requiring internal files is no longer possible since the pika build, and I planned to create a @octokit/http-error
package anyway for some time now
2.0.0
to 2.1.0
.This version is covered by your current version range and after updating it in your project the build failed.
deprecation is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 15 commits.
15c0d6d
ci(workflow): trying to make semantic-release work
c84c023
ci(workflow): trying to make semantic-release work
8f26a5e
ci(workflow): trying to make semantic-release work
96d825e
ci(workflow): trying to make semantic-release work
da24ba0
ci(workflow): fix syntax
c7e70ba
ci(workflow): fix syntax
57d6ff1
ci(workflow): trying to make semantic-release work
67b66a0
docs(README): install for Node & Browser
8af1c09
ci: adapt workflow for pika setup
af1c945
test: adapt tests
b6f77b3
build(gitignore): node_modules, pkg
33ee5d1
feat: module export & support for https://www.pika.dev/cdn
25bf7ba
build(package): lock file
79e58d0
build(package): pika pack setup
fdeb2e8
build(deps): bump js-yaml from 3.12.2 to 3.13.1
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
I've been recently experiencing 502 server errors from GitHub while using this library. I'm planning to add some retry logic on my application code, but would this make sense as part of this library instead?
I am sorry to be asking this here, but I have not been able to run the codes in the README. I sought help on SO too but I am afraid nothing came of it.
I have the following html file (sans the api token) -
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<script type="module">
import { request } from "https://cdn.pika.dev/@octokit/request";
</script>
<script>
const octokitRequest = require('@octokit/request');
myAsyncMethod()
async function myAsyncMethod () {
const result = await request("GET /users/:user/repos", {
headers: {
authorization: "token <your token>"
},
user: "armsp"
});
console.log(`${result.data.length} repos found.`);
}
</script>
</body>
This is the error I get -
require.min.js:1 Uncaught Error: Module name "@octokit/request" has not been loaded yet for context: _. Use require([])
https://requirejs.org/docs/errors.html#notloaded
at makeError (require.min.js:1)
at Object.s [as require] (require.min.js:1)
at requirejs (require.min.js:1)
at github-api-test.html:11
github-api-test.html:1 Uncaught SyntaxError: The requested module '/universal-user-agent/^4.0.0/es2019/universal-user-agent.js' does not provide an export named 'default'
I tried to download the js file itself and include it in script tag the usual way, but I don't see any request.js
file in src
folder, all are .ts
files. I don't know how to make sense of it.
Any help would be appreciated.
17.0.2
to 17.0.3
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
getGitAuthUrl
(e7bede1)The new version differs by 6 commits.
e7bede1
fix: pass a branch name to getGitAuthUrl
8426b42
chore(package): update tempy to version 0.4.0
804fc2a
docs(Troubleshooting): release not found in prereleases branch (e.g. beta
) after rebase on master
) (#1444)
389e331
chore(package): update got to version 10.5.2
a93c96f
revert: fix: allow plugins to set environment variables to be used by other plugins
68f7e92
fix: allow plugins to set environment variables to be used by other plugins
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Compare to test from @octokit/rest
v16.
it("timeout", () => {
nock("https://request-errors-test.com")
.get("/")
.delay(2000)
.reply(200, {});
const octokit = new Octokit({
baseUrl: "https://request-errors-test.com",
request: {
timeout: 100
}
});
return octokit
.request("/")
.then(() => {
throw new Error("should not resolve");
})
.catch(error => {
expect(error.name).to.equal("HttpError");
expect(error.status).to.equal(500);
expect(error.message).to.match(/timeout/);
});
});
This is part of https://github.com/octokit/rest.js/issues/1546
7.3.8
to 7.3.9
.This version is covered by your current version range and after updating it in your project the build failed.
fetch-mock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
2378427
Abort error (#440)
6b1e78a
lint
25a019c
Merge branch 'master' of https://github.com/scinos/fetch-mock into abort-erro
81e011d
Fixes #416
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
master
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
semantic-release cannot push the version tag to the branch master
on the remote Git repository with URL https://x-access-token:[secure]@github.com/octokit/request.js.git
.
This can be caused by:
Good luck with your project ✨
Your semantic-release bot 📦🚀
This file https://github.com/octokit/request.js/blob/master/lib/fetch.js requires node-fetch
, but it is not listed as a dependency in package.json
is there a param to set the reponse encoding?
☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io
9.3.0
to 9.3.1
.This version is covered by your current version range and after updating it in your project the build failed.
fetch-mock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 7 commits.
d22e983
linked to cheatsheet EVERYWHERE
1d2557d
Merge pull request #524 from wheresrhys/cheatsheet
1dfc6c2
completed cheatsheet
7efa6c5
cheatsheet formatting
438c835
refined set up/teardown section of cheatsheet
6a2d449
midway through writing cheatsheet content
633cf3e
improve documentation for when to use a named matcher
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Is it possible to get the download URL for an artifact?
The docs here suggest that the 302 redirect URL will be returned from a call like this:
let response = await octokit.request('GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}', {
owner: 'octocat',
repo: 'hello-world',
artifact_id: 42,
archive_format: 'archive_format'
})
When I am trying that (as well as octokit.actions.downloadArtifact
, as per these docs), it seems that the 302 redirect is followed, making my response
look like so:
{
status: 200,
url: 'https://pipelines.actions...', // <-- this is the correct, signed URL, that I want
headers: { ... },
data: ArrayBuffer(23750288) // <-- Downloads the artifact into `data`. I don't want it to do this
}
I want to just get that url, without downloading the response into that data
ArrayBuffer
.
Is that possible? I've tried adding request: { redirect: 'manual'}
as an option, but that didn't seem to do it.
3.2.1
to 3.2.2
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/endpoint is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 4 commits.
7794d15
fix: options.mediaType.format + options.mediaType.previews + accept header
fcf4d5a
test: options.mediaType.format + options.mediaType.previews + accept header
1a4972b
lib: don’t alter options.headers
in endpoint.parse()
da4d4e6
test: don’t alter options.headers
in endpoint.parse()
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
ref: https://github.com/octokit/rest.js/issues/1167. This was fixed in @octokit/endpoint
v3.1.1 which folks might not get automatically if they have a previous install.
7.5.0
to 7.5.1
.This version is covered by your current version range and after updating it in your project the build failed.
fetch-mock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 2 commits.
e50ffe3
Merge pull request #453 from birtles/fixCaptureStackTrace
22f1ee0
Check for Error.captureStackTrace before using it
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Some endpoints like (GET /repos/:owner/:repo/assignees/:assignee, used to check if a user can be assigned for an issue) returns 404
code as a valid response to the query.
Should Octokit throw an error for such responses?
follow up for #71
Right now, the request
function passed to request.hook(request, options)
is the fetch wrapper. It does not have the .endpoint
and .defaults
keys.
A fix would could look like this
- return endpointOptions.request.hook((options: Defaults) => {
- return fetchWrapper(endpoint.parse(options));
- }, endpointOptions);
+ const request = (options, route) => {
+ return fetchWrapper(endpoint.parse(endpoint.merge(options, route)));
+ };
+
+ Object.assign(request, {
+ endpoint,
+ defaults: withDefaults.bind(null, endpoint)
+ });
+
+ return endpointOptions.request.hook(request, endpointOptions);
Hello,
using @octokit/request v5.4.5
I am requesting the github interface in order to obtain the list of private projects of an organization using the request library. I have the correct right set for the installation and got an installation token calling:
await session.request(
'POST /app/installations/:installation_id/access_tokens',
{
headers: {
authorization: `token ${ appToken }`,
},
installation_id: installationId,
permissions: {
organization_projects: 'write',
}
},
);
Everything seems to go well...
core_1 | {
core_1 | token: 'v1.b4b574f9ae835800ab6326a96525e034a8d697c3',
core_1 | expires_at: '2020-07-14T13:45:57Z',
core_1 | permissions: { organization_projects: 'write' },
core_1 | repository_selection: 'selected'
core_1 | },
but then calling
await session.request(
'GET /app/orgs/:org/projects',
{
headers: {
authorization: `token ${ installToken }`,
},
org,
},
);
I have the following error:
core_1 | InstallationAccess ERROR RequestError [HttpError]: Not Found
core_1 | at /node/app/node_modules/@octokit/request/dist-node/index.js:66:23
core_1 | at processTicksAndRejections (internal/process/task_queues.js:97:5)
core_1 | at async getInstallationAuthentication (/node/app/node_modules/@octokit/auth-app/dist-node/index.js:148:7)
core_1 | at async hook (/node/app/node_modules/@octokit/auth-app/dist-node/index.js:280:7)
[...]
core_1 | status: 404,
core_1 | headers: {
core_1 | 'access-control-allow-origin': '*',
core_1 | 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
core_1 | connection: 'close',
core_1 | 'content-encoding': 'gzip',
core_1 | 'content-security-policy': "default-src 'none'",
core_1 | 'content-type': 'application/json; charset=utf-8',
core_1 | date: 'Tue, 14 Jul 2020 15:23:07 GMT',
core_1 | 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
core_1 | server: 'GitHub.com',
core_1 | status: '404 Not Found',
core_1 | 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
core_1 | 'transfer-encoding': 'chunked',
core_1 | vary: 'Accept-Encoding, Accept, X-Requested-With',
core_1 | 'x-content-type-options': 'nosniff',
core_1 | 'x-frame-options': 'deny',
core_1 | 'x-github-media-type': 'github.inertia-preview; format=json, github.machine-man-preview; format=json',
core_1 | 'x-github-request-id': '93C2:5190:6DD240:EFF5EE:5F0DCDDB',
core_1 | 'x-xss-protection': '1; mode=block'
core_1 | },
core_1 | request: {
core_1 | method: 'POST',
core_1 | url: 'https://api.github.com/app/installations//access_tokens',
core_1 | headers: {
core_1 | accept: 'application/vnd.github.inertia-preview+json,application/vnd.github.machine-man-preview+json',
core_1 | 'user-agent': '[REDACTED] octokit-rest.js/18.0.0 octokit-core.js/3.1.0 Node.js/12.18.1 (Linux 5.3; x64)',
core_1 | authorization: 'bearer [REDACTED]',
core_1 | 'content-type': 'application/json; charset=utf-8'
core_1 | },
core_1 | body: '{}',
core_1 | request: { hook: [Function: bound bound register] }
core_1 | },
core_1 | documentation_url: 'https://developer.github.com/v3'
core_1 | }
My understanding is a default hook is triggered to obtain another installation authentication but has no information for the installation_id and therefore fails.
I do not understand this behavior. Am I missing something? Should I have configured a specific hook before being able to access the endpoint ? Thank you for your help @gr2m
PS the session object is the result of:
new Octokit({
authStrategy: createAppAuth,
auth: {
id: process.env.GITHUB_APP_ID,
privateKey: pemKey,
},
userAgent: 'blabla',
baseUrl: 'https://api.github.com',
previews: ['inertia', 'machine-man'],
});
4.26.1
to 4.27.0
.This version is covered by your current version range and after updating it in your project the build failed.
webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
getResolve
method to create their own resolver function with custom optionsexport * from
The new version differs by 12 commits.
f47bf8b
4.27.0
a67ffcd
Merge pull request #8452 from webpack/feature/resolveWithOptions
96f625c
Merge pull request #8457 from webpack/bugfix/rebuild-provided-exports
56feccc
convert test case to normal function for node.js 6 support
2f4296e
fix a bug which causes incorrect providedExports for cached modules
f944002
Merge pull request #8451 from webpack/bugfix/split-chunks
162da1c
add getResolve method to loader context
3b46b48
enforce doesn't affect minSize for maxSize
72a8a1f
Merge pull request #8440 from Connormiha/oprimize-chunk-can-be-integrated
537d3e4
Cache hasRunstime in chunk
e3e8a68
Merge pull request #8405 from xiaoxiaojx/fix-function-plugin-apply
70b9a1b
fix parameter missing when plugin type is a funtion
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Instead of running all tests, make separate tests which only test the basics, as jest is not compatible with Cypress
follow up #45
This test was originally in octokit/rest.js
:
https://github.com/octokit/rest.js/blob/8f081956a14ec19ce3543efa3d9838d743f51ac9/test/unit/upload-asset-test.js
const octokit = new Octokit();
nock("https://upload.test", {
reqheaders: {
"content-type": "text/plain"
}
})
.post("/repos/octocat/hello-world/releases/123/assets", function(data) {
return fs.readFileSync(__filename, "utf8") === data;
})
.query({
name: "package.json"
})
.reply(200, { ok: true });
return octokit.repos.uploadReleaseAsset({
baseUrl: "https://upload.test",
headers: {
"content-type": "text/plain"
},
owner: "octocat",
repo: "hello-world",
release_id: 123,
data: fs.createReadStream(__filename),
name: "package.json"
});
2.0.3
to 2.1.0
.This version is covered by your current version range and after updating it in your project the build failed.
universal-user-agent is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 7 commits.
f75c2e9
feat: add typescript definition
8369bd9
chore(package): update lockfile package-lock.json
4c2d814
chore(package): update nyc to version 14.0.0
ac643b4
chore(package): update lockfile package-lock.json
3a49d56
chore(package): update mocha to version 6.0.0
7d33425
chore(package): update lockfile package-lock.json
5613aa4
chore(package): update sinon to version 7.2.4
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
12.12.5
to 12.12.6
.This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
This will fix https://github.com/octokit/rest.js/issues/1246
☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io
2.10.0
to 2.11.0
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/types is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 1 commits.
17acf10
feat: Add optional defaults type parameter to EndpointInterface & RequestInterface, pass on option types from .defaults(options)
(#48)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Just trying to run any request at all in node, for example:
const octokitRequest = require('@octokit/request');
const result = await octokitRequest('GET /jdunk');
(as per the README documentation)
...yields the following error:
const result = await octokitRequest('GET /jdunk');
^^^^^
SyntaxError: await is only valid in async function
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
3.2.1
to 3.2.2
.This version is covered by your current version range and after updating it in your project the build failed.
webpack-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 88 commits.
f81762c
chore: v.3.2.2
bed0c80
Merge pull request #744 from webpack/fix/737-and-739
c95ea35
chore: :D
11a3c15
chore: :)
af46c7e
chore: :)
4e67e7f
chore: :)
ab4c3a2
chore: :)
099e43d
chore: :)
18a6f53
chore: :)
ca46c8b
chore: :)
053195a
chore: remove ci opt
b21d2ce
chore: remove ci opt
1d84d27
chore: remove ci opt
cc11736
chore: remove ci opt
861d543
chore: remove ci opt
There are 88 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Node-fetch vulnerability - as described here:
https://app.snyk.io/vuln/SNYK-JS-NODEFETCH-674311
Suggestion - upgrade to 2.6.1
Following this fix - need to update octokit/rest API as well
3.1.2
to 3.1.3
.This version is covered by your current version range and after updating it in your project the build failed.
cypress is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
13.1.0
to 13.2.0
.This version is covered by your current version range and after updating it in your project the build failed.
nyc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 17 commits.
29e6f5e
chore(release): 13.2.0
e95856c
chore: Update dependencies. (#978)
921d386
fix: Create directory for merge destination. (#979)
df2730d
feat: Option Plugins (#948)
35cd49a
feat: document the fact that cacheDir is configurable (#968)
ff834aa
feat: avoid hardcoded HOME for spawn-wrap working dir (#957)
35710b1
build: move windows tests to travis (#961)
93cb5c1
tests: coverage for temp-dir changes (#964)
d566efe
test: stop using LAZY_LOAD_COUNT (#960)
f23d474
chore: update stale bot config with feedback (#958)
62d7fb8
chore: slight tweak to position of test
28b6d09
fix: missing command temp-directory (#928)
40afc5f
fix: nyc processing files not covered by include when all
is enabled. (#914)
ba22a26
docs(readme): Update to reflect .nycrc.json support (#934)
2dbb82d
chore: enable probot-stale
There are 17 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
6.0.2
to 6.1.0
.This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
options
parameter (@plroebuck).jsonc
extension (@sstephant)These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:
this.skip()
in "before each" hooks (@juergba)--allow-uncaught
for uncaught exceptions thrown inside hooks (@givanse)and some regressions:
Suite
cloning by copying root
property (@fatso83)The new version differs by 28 commits.
f4fc95a
Release v6.1.0
bd29dbd
update CHANGELOG for v6.1.0 [ci skip]
aaf2b72
Use cwd-relative pathname to load config file (#3829)
b079d24
upgrade deps as per npm audit fix; closes #3854
e87c689
Deprecate this.skip() for "after all" hooks (#3719)
81cfa90
Copy Suite property "root" when cloning; closes #3847 (#3848)
8aa2fc4
Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
586bf78
Update JS-YAML to address security issue (#3845)
d1024a3
Update doc examples "tests.html" (#3811)
1d570e0
Delete "/docs/example/chai.js"
ade8b90
runner.js: "self.test" undefined in Browser (#3835)
0098147
Replace findup-sync with find-up for faster startup (#3830)
d5ba121
Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
a3089ad
update package-lock
75430ec
Upgrade yargs-parser dependency to avoid loading 2 copies of yargs
There are 28 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
15.12.3
to 15.12.4
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
branch
parameter from push
function (ffe1062)The new version differs by 1 commits.
ffe1062
fix: remove unnecessary branch
parameter from push
function
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Add an option that allows users to pass their own fetch-compatible method to be used for the actual request.
This is great for testing, e.g. with fetch-mock. And some environments such a Electron or React Native might want to use their own native request methods
Fairly novice question, I know, but I've got a list of Repos whose description I'd like to fetch. Currently, I'm reading each one separately, however this takes time. I'm just wondering if / how I could do a batch request to get a list of all repositories I ask for.
Thanks
octokit.request('POST https://github.com/login/oauth/access_token', {
client_id: 'xxx',
client_secret: 'xxx',
code: 'xxx'
});
but got:
{ HttpError
at response.text.then.message (/usr/src/app/node_modules/@octokit/request/dist-node/index.js:66:23)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HttpError',
status: 406,
headers:
{ 'cache-control': 'no-cache',
connection: 'close',
'content-security-policy':
'default-src \'none\'; base-uri \'self\'; block-all-mixed-content; connect-src \'self\' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com wss://live.github.com; font-src github.githubassets.com; form-action \'self\' github.com gist.github.com; frame-ancestors \'none\'; frame-src render.githubusercontent.com; img-src \'self\' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src \'self\'; media-src \'none\'; script-src github.githubassets.com; style-src \'unsafe-inline\' github.githubassets.com',
'content-type': 'text/html',
date: 'Mon, 05 Aug 2019 09:45:17 GMT',
'expect-ct':
'max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'set-cookie':
'has_recent_activity=1; path=/; expires=Mon, 05 Aug 2019 10:45:17 -0000, ignored_unsupported_browser_notice=false; path=/',
status: '406 Not Acceptable',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'X-PJAX',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-request-id': 'D9D4:CE13:12F09C0:1D5FA50:5D47FAAD',
'x-request-id': '238cdf6e-28ac-4d06-8a9f-00ff204ceedc',
'x-xss-protection': '1; mode=block' },
request:
{ method: 'POST',
url: 'https://github.com/login/oauth/access_token',
headers:
{ accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit.js/16.28.7 Node.js/10.16.0 (Linux 4.9; x64)',
'content-type': 'application/json; charset=utf-8' },
body:
'{"client_id":"xxx","client_secret":"xxx","code":"xxx"}',
request: { hook: [Function: bound bound register] } } }
Not sure what I am doing wrong
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.