Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@octokit/app

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/app - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

4

index.js
module.exports = App
const getCache = require('./lib/get-cache')
const getInstallationAccesToken = require('./lib/get-installation-access-token')
const getInstallationAccessToken = require('./lib/get-installation-access-token')
const getSignedJsonWebToken = require('./lib/get-signed-json-web-token')

@@ -15,3 +15,3 @@

getSignedJsonWebToken: getSignedJsonWebToken.bind(null, state),
getInstallationAccesToken: getInstallationAccesToken.bind(null, state)
getInstallationAccessToken: getInstallationAccessToken.bind(null, state)
}

@@ -18,0 +18,0 @@

@@ -1,2 +0,2 @@

module.exports = getInstallationAccesToken
module.exports = getInstallationAccessToken

@@ -8,3 +8,3 @@ const request = require('@octokit/request')

// https://developer.github.com/v3/apps/#create-a-new-installation-token
function getInstallationAccesToken (state, { installationId }) {
function getInstallationAccessToken (state, { installationId }) {
const token = state.cache.get(installationId)

@@ -11,0 +11,0 @@ if (token) {

@@ -6,3 +6,3 @@ {

},
"version": "1.1.0",
"version": "2.0.0",
"description": "GitHub Apps toolset for Node.js",

@@ -9,0 +9,0 @@ "main": "index.js",

@@ -53,3 +53,3 @@ # app.js

const app = new App({ id: APP_ID, privateKey: PRIVATE_KEY })
const installationAccessToken = await app.getInstallationAccesToken({ installationId })
const installationAccessToken = await app.getInstallationAccessToken({ installationId })

@@ -56,0 +56,0 @@ // https://developer.github.com/v3/issues/#create-an-issue

@@ -73,3 +73,3 @@ /* global describe, beforeEach, it */

return app.getInstallationAccesToken({ installationId: 123 })
return app.getInstallationAccessToken({ installationId: 123 })
.then(token => {

@@ -87,7 +87,7 @@ expect(token).to.equal('foo')

return app.getInstallationAccesToken({ installationId: 123 })
return app.getInstallationAccessToken({ installationId: 123 })
.then(token => {
expect(token).to.equal('foo')
return app.getInstallationAccesToken({ installationId: 123 })
return app.getInstallationAccessToken({ installationId: 123 })
})

@@ -110,7 +110,7 @@ .then(token => {

return app.getInstallationAccesToken({ installationId: 123 })
return app.getInstallationAccessToken({ installationId: 123 })
.then(token => {
expect(token).to.equal('foo')
return app.getInstallationAccesToken({ installationId: 456 })
return app.getInstallationAccessToken({ installationId: 456 })
})

@@ -134,3 +134,3 @@ .then(token => {

return app.getInstallationAccesToken({ installationId: 123 })
return app.getInstallationAccessToken({ installationId: 123 })
.then(token => {

@@ -145,3 +145,3 @@ expect(token).to.equal('foo')

.then(() => {
return app.getInstallationAccesToken({ installationId: 123 })
return app.getInstallationAccessToken({ installationId: 123 })
})

@@ -171,3 +171,3 @@ .then(token => {

return appWithCustomCache.getInstallationAccesToken({ installationId: 123 })
return appWithCustomCache.getInstallationAccessToken({ installationId: 123 })
.then(token => {

@@ -174,0 +174,0 @@ expect(options.cache.get.callCount).to.equal(1)

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