@octokit/auth-token
Advanced tools
Comparing version 4.0.0 to 5.0.0-beta.1
@@ -1,2 +0,2 @@ | ||
import { withAuthorizationPrefix } from "./with-authorization-prefix"; | ||
import { withAuthorizationPrefix } from "./with-authorization-prefix.js"; | ||
async function hook(token, request, route, parameters) { | ||
@@ -3,0 +3,0 @@ const endpoint = request.endpoint.merge( |
@@ -1,3 +0,3 @@ | ||
import { auth } from "./auth"; | ||
import { hook } from "./hook"; | ||
import { auth } from "./auth.js"; | ||
import { hook } from "./hook.js"; | ||
const createTokenAuth = function createTokenAuth2(token) { | ||
@@ -4,0 +4,0 @@ if (!token) { |
@@ -1,2 +0,2 @@ | ||
import type { Token, Authentication } from "./types"; | ||
import type { Token, Authentication } from "./types.js"; | ||
export declare function auth(token: Token): Promise<Authentication>; |
@@ -1,2 +0,2 @@ | ||
import type { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types"; | ||
import type { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types.js"; | ||
export declare function hook(token: Token, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise<AnyResponse>; |
@@ -1,2 +0,2 @@ | ||
import type { StrategyInterface, Token, Authentication } from "./types"; | ||
import type { StrategyInterface, Token, Authentication } from "./types.js"; | ||
export type Types = { | ||
@@ -3,0 +3,0 @@ StrategyOptions: Token; |
@@ -1,2 +0,2 @@ | ||
import * as OctokitTypes from "@octokit/types"; | ||
import type * as OctokitTypes from "@octokit/types"; | ||
export type AnyResponse = OctokitTypes.OctokitResponse<any>; | ||
@@ -3,0 +3,0 @@ export type StrategyInterface = OctokitTypes.StrategyInterface<[ |
@@ -6,3 +6,4 @@ { | ||
}, | ||
"version": "4.0.0", | ||
"type": "module", | ||
"version": "5.0.0-beta.1", | ||
"description": "GitHub API token authentication for browsers and Node.js", | ||
@@ -19,15 +20,15 @@ "repository": "github:octokit/auth-token.js", | ||
"devDependencies": { | ||
"@octokit/request": "^6.0.0", | ||
"@octokit/tsconfig": "^2.0.0", | ||
"@octokit/types": "^9.2.3", | ||
"@types/fetch-mock": "^7.3.1", | ||
"@octokit/request": "^9.0.0", | ||
"@octokit/tsconfig": "^3.0.0", | ||
"@octokit/types": "^12.0.0", | ||
"@types/fetch-mock": "^7.3.8", | ||
"@types/jest": "^29.0.0", | ||
"esbuild": "^0.18.0", | ||
"fetch-mock": "^9.0.0", | ||
"esbuild": "^0.20.0", | ||
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", | ||
"glob": "^10.2.6", | ||
"jest": "^29.0.0", | ||
"prettier": "2.8.8", | ||
"semantic-release": "^21.0.0", | ||
"ts-jest": "^29.0.0", | ||
"typescript": "^5.0.0" | ||
"prettier": "3.2.5", | ||
"semantic-release": "^23.0.0", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.3.0" | ||
}, | ||
@@ -41,7 +42,9 @@ "engines": { | ||
], | ||
"main": "dist-node/index.js", | ||
"browser": "dist-web/index.js", | ||
"types": "dist-types/index.d.ts", | ||
"module": "dist-src/index.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist-types/index.d.ts", | ||
"import": "./dist-bundle/index.js" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
@@ -36,7 +36,7 @@ # auth-token.js | ||
Load `@octokit/auth-token` directly from [cdn.skypack.dev](https://cdn.skypack.dev) | ||
Load `@octokit/auth-token` directly from [esm.sh](https://esm.sh) | ||
```html | ||
<script type="module"> | ||
import { createTokenAuth } from "https://cdn.skypack.dev/@octokit/auth-token"; | ||
import { createTokenAuth } from "https://esm.sh/@octokit/auth-token"; | ||
</script> | ||
@@ -53,4 +53,3 @@ ``` | ||
```js | ||
const { createTokenAuth } = require("@octokit/auth-token"); | ||
// or: import { createTokenAuth } from "@octokit/auth-token"; | ||
import { createTokenAuth } from "@octokit/auth-token"; | ||
``` | ||
@@ -178,3 +177,3 @@ | ||
request, | ||
"GET /authorizations" | ||
"GET /authorizations", | ||
); | ||
@@ -216,3 +215,3 @@ ``` | ||
console.log( | ||
`"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}` | ||
`"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}`, | ||
); | ||
@@ -237,3 +236,3 @@ } else { | ||
console.log( | ||
`"${token}" is an OAuth token, its app’s client_id is ${clientId}.` | ||
`"${token}" is an OAuth token, its app’s client_id is ${clientId}.`, | ||
); | ||
@@ -240,0 +239,0 @@ } else { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Yes
18834
14
156
2
285
1