Giter VIP home page Giter VIP logo

github-version-checker's Introduction

github-version-checker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

github-version-checker's Issues

Gitlab Support

I plan to add Gitlab Support.

Todo's

  • Move Github code to separated package
  • Add abstractions
  • Gitlab REST API
  • Gitlab GraphQL API

Example Queries

REST

GET https://gitlab.com/api/v4/projects/13083/repository/tags?order_by=version&sort=desc

GraphQL

{
  project(fullPath: "gitlab-org/gitlab-foss") {
    releases(first: 1) {
      nodes {
        tagName
        upcomingRelease
        links {
          selfUrl
        }
      }
    }
  }
}

Broken down on Node.js version 9.x and below

Describe the bug
Broken down on Node.js version 9.x and below.

TypeError: "listener" argument must be a function
    at ClientRequest.once (events.js:340:11)
    at new ClientRequest (_http_client.js:174:10)
    at Object.request (http.js:39:10)
    at Object.request (https.js:245:15)
    at Object.get (https.js:249:21)
    at rest (/usr/lib/node_modules/homebridge-broadlink-rm-pro/node_modules/github-version-checker/lib/check.js:121:19)
    at module.exports (/usr/lib/node_modules/homebridge-broadlink-rm-pro/node_modules/github-version-checker/lib/check.js:164:5)
    at module.exports (/usr/lib/node_modules/homebridge-broadlink-rm-pro/node_modules/github-version-checker/lib/main.js:14:5)
    at checkForUpdates (/usr/lib/node_modules/homebridge-broadlink-rm-pro/test.js:12:3)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-broadlink-rm-pro/test.js:19:1)

To Reproduce
use Node.js 9.x

Expected behavior
don't throw error

Versions

Component Version
Node.JS 8.6.0
github-version-checker 2.2.0

Additional context

As discribed in the docs, Node.js v9.x don't support

https.get(url[, options][, callback])

let req = https.get(apiUrl, opts, handler);

Browser support

Is there a plan to support this package for browser too?
Seems to be working only for Node.js

ReferenceError: version is not defined

ReferenceError: version is not defined
at IncomingMessage.res.on (/usr/local/lib/node_modules/github-version-checker/lib/check.js:81:24)
at IncomingMessage.emit (events.js:198:15)
at endReadableNT (_stream_readable.js:1142:12)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
[6/14/2019, 6:08:54 PM] Got SIGTERM, shutting down Homebridge...

github-version-checker = "version": "2.1.1"
^CZarfs-Mac-mini:~ zarf$ node -v
v11.13.0

From debugging, found = true, but since version is defined as a let within the for scope, it is undefined outside causing the reference error.

I was able to fix this by defining version ahead of the for loop. Here is my diff

diff check.js.orig check.js
72a73

  let version;

74c75
< let version = json[i];

    version = json[I];

John Talbot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.