Socket
Socket
Sign inDemoInstall

universal-github-app-jwt

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-github-app-jwt - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

.github/workflows/release.yml

69

package.json
{
"name": "universal-github-app-jwt",
"type": "module",
"version": "2.0.0",
"exports": "./index.js",
"imports": {
"#get-token": {
"node": "./lib/get-token-node.js",
"default": "./lib/get-token.js"
}
},
"description": "Calculate GitHub App bearer tokens for Node & modern browsers",
"version": "1.1.0",
"license": "MIT",
"files": [
"dist-*/",
"bin/"
],
"pika": true,
"sideEffects": false,
"repository": "github:gr2m/universal-github-app-jwt",
"keywords": [

@@ -19,34 +21,31 @@ "github",

],
"homepage": "https://github.com/gr2m/universal-github-app-jwt#readme",
"bugs": {
"url": "https://github.com/gr2m/universal-github-app-jwt/issues"
"author": "Gregor Martynus (https://github.com/gr2m)",
"scripts": {
"test": "npm run test:code && npm run test:tsc && npm run test:tsd && npm run lint",
"test:code": "c8 --100 ava test/node.test.js",
"test:deno": "deno test test/deno.test.js",
"test:tsc": "tsc --allowJs --noEmit --esModuleInterop --skipLibCheck --lib es2020 index.js",
"test:tsd": "tsd",
"lint": "prettier --check '{src,test}/**/*' README.md package.json",
"lint:fix": "prettier --write '{src,test}/**/*' README.md package.json",
"coverage": "c8 report --reporter html",
"postcoverage": "open-cli coverage/index.html",
"build": "npm run build:default && npm run build:node",
"build:default": "esbuild index.js --bundle --outfile=dist/default.js --platform=browser --target=es2020 --format=esm",
"build:node": "esbuild index.js --bundle --outfile=dist/node.js --platform=node --target=es2020 --format=esm"
},
"repository": "https://github.com/gr2m/universal-github-app-jwt",
"license": "MIT",
"dependencies": {
"@types/jsonwebtoken": "^8.3.3",
"jsonwebtoken": "^8.5.1"
},
"devDependencies": {
"@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.1",
"@pika/plugin-bundle-web": "^0.9.1",
"@pika/plugin-ts-standard-pkg": "^0.9.1",
"@types/jest": "^25.1.0",
"@types/lolex": "^5.1.0",
"jest": "^25.1.0",
"lolex": "^6.0.0",
"playwright": "^1.0.1",
"prettier": "^2.0.0",
"rollup-plugin-json": "^4.0.0",
"semantic-release": "^17.0.0",
"serve-handler": "^6.1.1",
"ts-jest": "^26.0.0",
"typescript": "^3.6.2"
},
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"browser": "dist-web/index.bundled.js"
"ava": "^5.1.0",
"c8": "^7.12.0",
"esbuild": "^0.16.10",
"mockdate": "^3.0.5",
"open-cli": "^7.1.0",
"prettier": "^2.8.1",
"tsd": "^0.25.0",
"typescript": "^4.9.4"
}
}

@@ -5,5 +5,4 @@ # universal-github-app-jwt

[![@latest](https://img.shields.io/npm/v/universal-github-app-jwt.svg)](https://www.npmjs.com/package/universal-github-app-jwt)
![Build status](https://github.com/gr2m/universal-github-app-jwt/workflows/Test/badge.svg)
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-github-app-jwt.svg)](https://greenkeeper.io/)
[![@latest](https://img.shields.io/npm/vuniversal-github-app-jwt.svg)](https://www.npmjs.com/packageuniversal-github-app-jwt)
[![Build Status](https://github.com/gr2m/universal-github-app-jwt/workflows/Test/badge.svg)](https://github.com/gr2m/universal-github-app-jwt/actions?query=workflow%3ATest+branch%3Amaster)

@@ -43,8 +42,7 @@ ⚠ The private keys provide by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You can see the difference in the first line, `PKCS#1` format starts with `-----BEGIN RSA PRIVATE KEY-----` while `PKCS#8` starts with `-----BEGIN PRIVATE KEY-----`. You can convert one format to the other using `oppenssl`:

</th><td width=100%>
Load `universal-github-app-jwt` directly from [cdn.pika.dev](https://cdn.pika.dev)
Load <code>universal-github-app-jwt</code> directly from <a href="https://esm.sh">esm.sh</a>
```html
<script type="module">
import { githubAppJwt } from "https://cdn.pika.dev/universal-github-app-jwt";
import githubAppJwt from "https://esm.sh/universal-github-app-jwt";
</script>

@@ -61,7 +59,17 @@ ```

```js
const { githubAppJwt } = require("universal-github-app-jwt");
// or: import { githubAppJwt } from "universal-github-app-jwt";
import githubAppJwt from "universal-github-app-jwt";
```
</td></tr>
<tr><th>
Deno
</th><td>
Load <code>universal-github-app-jwt</code> directly from <a href="https://esm.sh">esm.sh</a>, including types.
```js
import githubAppJwt from "https://esm.sh/universal-github-app-jwt";
```
</td></tr>
</tbody>

@@ -71,8 +79,6 @@ </table>

```js
(async () => {
const { token, appId, expiration } = await githubAppJwt({
id: APP_ID,
privateKey: PRIVATE_KEY
});
})();
const { token, appId, expiration } = await githubAppJwt({
id: APP_ID,
privateKey: PRIVATE_KEY,
});
```

@@ -85,4 +91,4 @@

headers: {
authorization: `bearer ${token}`
}
authorization: `bearer ${token}`,
},
});

@@ -132,2 +138,13 @@ ```

</tr>
<tr>
<th>
<code>options.now</code>
</th>
<th>
<code>number</code>
</th>
<td>
An optional override for the current time in seconds since the UNIX epoch. Defaults to <code>Math.floor(Date.now() / 1000))</code>. This value can be overridden to account for a time skew between the local machine and the authentication server.
</td>
</tr>
</tbody>

@@ -134,0 +151,0 @@ </table>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc