Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency javascript-plugin-architecture-with-typescript-definitions to v4 #5

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ type Constructor<T> = new (...args: any[]) => T;

export namespace Octokit {
interface Options extends Base.Options {
/**
* GitHub API Version. Defaults to "api.github.com"
*/
version?: string;

/**
* GitHub's REST API base URL. Defaults to https://api.github.com
*/
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Base } from "javascript-plugin-architecture-with-typescript-definitions";
import { requestPlugin } from "./plugins/request/index.js";

export const Octokit = Base.plugin(requestPlugin).defaults({
export const Octokit = Base.withPlugins([requestPlugin]).withDefaults({
baseUrl: "https://api.github.com",
});
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": "github:octokit/octokit-next.js",
"dependencies": {
"javascript-plugin-architecture-with-typescript-definitions": "3.3.0",
"javascript-plugin-architecture-with-typescript-definitions": "4.0.0",
"node-fetch": "3.0.0-beta.10"
},
"types": "./index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test("octokit.request is a function", () => {
});

test("myOctokit.request is a function", () => {
const MyOctokit = Octokit.defaults({});
const MyOctokit = Octokit.withDefaults({});
const myOctokit = new MyOctokit();
assert.equal(typeof myOctokit.request, "function");
});
Expand Down