Skip to content

Commit

Permalink
build(deps): bump @octokit/rest from 16.42.2 to 16.43.1 (#1471)
Browse files Browse the repository at this point in the history
* build(deps): bump @octokit/rest from 16.42.2 to 16.43.1

Bumps [@octokit/rest](https:/octokit/rest.js) from 16.42.2 to 16.43.1.
- [Release notes](https:/octokit/rest.js/releases)
- [Commits](octokit/rest.js@v16.42.2...v16.43.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Finish upgrading via bolt

* refactor(publisher-github): adapt to new TypeScript API for @octokit/rest

Co-authored-by: Mark Lee <[email protected]>
  • Loading branch information
dependabot-preview[bot] and malept authored Feb 6, 2020
1 parent de0459a commit 60c0f07
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"dependencies": {
"@electron/get": "^1.6.0",
"@octokit/rest": "^16.42.2",
"@octokit/rest": "^16.43.1",
"@types/which": "^1.3.2",
"aws-sdk": "^2.472.0",
"colors": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/publisher/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@electron-forge/async-ora": "6.0.0-beta.49",
"@electron-forge/publisher-base": "6.0.0-beta.49",
"@electron-forge/shared-types": "6.0.0-beta.49",
"@octokit/rest": "^16.42.2",
"@octokit/rest": "^16.43.1",
"fs-extra": "^8.1.0",
"lodash": "^4.17.15",
"mime-types": "^2.1.25"
Expand Down
4 changes: 2 additions & 2 deletions packages/publisher/github/src/Config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Options } from '@octokit/rest';
import { Octokit } from '@octokit/rest';

export interface GitHubRepository {
/**
Expand Down Expand Up @@ -30,7 +30,7 @@ export interface PublisherGitHubConfig {
* customize any of the options that module uses. This is particularly
* helpful for publishing to GitHub Enterprise servers.
*/
octokitOptions?: Options;
octokitOptions?: Octokit.Options;
/**
* Whether or not this release should be tagged as a prerelease
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/publisher/github/src/PublisherGithub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import mime from 'mime-types';
import path from 'path';

import { ForgeMakeResult } from '@electron-forge/shared-types';
import { ReposListReleasesResponseItem } from '@octokit/rest';
import { Octokit } from '@octokit/rest';
import GitHub from './util/github';
import { PublisherGitHubConfig } from './Config';

Expand Down Expand Up @@ -46,7 +46,7 @@ export default class PublisherGithub extends PublisherBase<PublisherGitHubConfig
const github = new GitHub(config.authToken, true, config.octokitOptions);

for (const releaseName of Object.keys(perReleaseArtifacts)) {
let release: ReposListReleasesResponseItem | undefined;
let release: Octokit.ReposListReleasesResponseItem | undefined;
const artifacts = perReleaseArtifacts[releaseName];

await asyncOra(`Searching for target release: ${releaseName}`, async () => {
Expand Down
8 changes: 4 additions & 4 deletions packages/publisher/github/src/util/github.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import GitHubAPI from '@octokit/rest';
import { Octokit } from '@octokit/rest';
import { merge } from 'lodash';

export default class GitHub {
private options: GitHubAPI.Options;
private options: Octokit.Options;

token?: string;

constructor(
authToken: string | undefined = undefined,
requireAuth: boolean = false,
options: GitHubAPI.Options = {},
options: Octokit.Options = {},
) {
this.options = merge(
options,
Expand All @@ -25,7 +25,7 @@ export default class GitHub {
}

getGitHub() {
const github = new GitHubAPI(this.options);
const github = new Octokit(this.options);
if (this.token) {
github.authenticate({
type: 'token',
Expand Down
4 changes: 3 additions & 1 deletion packages/publisher/github/test/github_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ describe('GitHub', () => {
}
};
GitHub = proxyquire.noCallThru().load('../src/util/github', {
'@octokit/rest': MockGitHub,
'@octokit/rest': {
Octokit: MockGitHub,
},
}).default;
});

Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -935,10 +935,10 @@
resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e"
integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==

"@octokit/plugin-rest-endpoint-methods@2.3.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.3.0.tgz#3281f2331b260c03e6713708b467429b6e88f647"
integrity sha512-TV2rmI8P1kYuXgOx/rkQCYLQye2XNW6Ybs8JS87OxYnTHzWEdhSbBBTuTpoUiLOoWzXqBbdB7qyEQfyQA5izGA==
"@octokit/plugin-rest-endpoint-methods@2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e"
integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==
dependencies:
"@octokit/types" "^2.0.1"
deprecation "^2.3.1"
Expand Down Expand Up @@ -966,15 +966,15 @@
once "^1.4.0"
universal-user-agent "^4.0.0"

"@octokit/rest@^16.42.2":
version "16.42.2"
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.42.2.tgz#fb233f46a4eaec313f885a64abcfbe16510d84f4"
integrity sha512-rYnQJFWU3CMOjB7AySSj6JVzr0LKZie5955CzVAGP2Z54PqkyBlmhF55ojDBNj1OM0bR8oVRiN87689f6uUatw==
"@octokit/rest@^16.43.1":
version "16.43.1"
resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.1.tgz#3b11e7d1b1ac2bbeeb23b08a17df0b20947eda6b"
integrity sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==
dependencies:
"@octokit/auth-token" "^2.4.0"
"@octokit/plugin-paginate-rest" "^1.1.1"
"@octokit/plugin-request-log" "^1.0.0"
"@octokit/plugin-rest-endpoint-methods" "2.3.0"
"@octokit/plugin-rest-endpoint-methods" "2.4.0"
"@octokit/request" "^5.2.0"
"@octokit/request-error" "^1.0.2"
atob-lite "^2.0.0"
Expand Down

0 comments on commit 60c0f07

Please sign in to comment.