@octokit/core
Advanced tools
Comparing version 6.0.0-beta.3 to 6.0.0-beta.4
@@ -1,4 +0,4 @@ | ||
const VERSION = "6.0.0-beta.3"; | ||
const VERSION = "6.0.0-beta.4"; | ||
export { | ||
VERSION | ||
}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "6.0.0-beta.3"; | ||
export declare const VERSION = "6.0.0-beta.4"; |
{ | ||
"name": "@octokit/core", | ||
"version": "6.0.0-beta.3", | ||
"version": "6.0.0-beta.4", | ||
"publishConfig": { | ||
@@ -62,3 +62,3 @@ "access": "public" | ||
"types": "./dist-types/index.d.ts", | ||
"import": "./dist-bundle/index.js" | ||
"import": "./dist-src/index.js" | ||
} | ||
@@ -65,0 +65,0 @@ }, |
@@ -51,4 +51,3 @@ # core.js | ||
```js | ||
const { Octokit } = require("@octokit/core"); | ||
// or: import { Octokit } from "@octokit/core"; | ||
import { Octokit } from "@octokit/core"; | ||
``` | ||
@@ -346,4 +345,5 @@ | ||
```js | ||
import consoleLogLevel from "console-log-level"; | ||
const octokit = new Octokit({ | ||
log: require("console-log-level")({ level: "info" }), | ||
log: consoleLogLevel({ level: "info" }), | ||
}); | ||
@@ -391,6 +391,8 @@ ``` | ||
// index.js | ||
const { Octokit } = require("@octokit/core") | ||
import { Octokit } from "@octokit/core"; | ||
import myPlugin from "./lib/my-plugin.js"; | ||
import octokitPluginExample from "octokit-plugin-example"; | ||
const MyOctokit = Octokit.plugin( | ||
require("./lib/my-plugin"), | ||
require("octokit-plugin-example") | ||
myPlugin, | ||
octokitPluginExample | ||
); | ||
@@ -403,3 +405,3 @@ | ||
// lib/my-plugin.js | ||
module.exports = (octokit, options = { greeting: "Hello" }) => { | ||
const plugin = (octokit, options = { greeting: "Hello" }) => { | ||
// hook into the request lifecycle | ||
@@ -421,2 +423,3 @@ octokit.hook.wrap("request", async (request, options) => { | ||
}; | ||
export default plugin; | ||
``` | ||
@@ -429,7 +432,11 @@ | ||
```js | ||
const { Octokit } = require("@octokit/core"); | ||
import { Octokit } from "@octokit/core"; | ||
import { paginateRest } from "@octokit/plugin-paginate-rest"; | ||
import { throttling } from "@octokit/plugin-throttling"; | ||
import { retry } from "@octokit/plugin-retry"; | ||
import { createActionAuth } from "@octokit/auth-action"; | ||
const MyActionOctokit = Octokit.plugin( | ||
require("@octokit/plugin-paginate-rest").paginateRest, | ||
require("@octokit/plugin-throttling").throttling, | ||
require("@octokit/plugin-retry").retry, | ||
paginateRest, | ||
throttling, | ||
retry, | ||
).defaults({ | ||
@@ -444,3 +451,3 @@ throttle: { | ||
}, | ||
authStrategy: require("@octokit/auth-action").createActionAuth, | ||
authStrategy: createActionAuth, | ||
userAgent: `my-octokit-action/v1.2.3`, | ||
@@ -447,0 +454,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22539
456