axelrindle / github-version-checker Goto Github PK
View Code? Open in Web Editor NEW๐ Simple version checker working with GitHub releases and the GitHub API.
Home Page: https://axelrindle.github.io/github-version-checker/
License: MIT License
๐ Simple version checker working with GitHub releases and the GitHub API.
Home Page: https://axelrindle.github.io/github-version-checker/
License: MIT License
I plan to add Gitlab Support.
GET https://gitlab.com/api/v4/projects/13083/repository/tags?order_by=version&sort=desc
{
project(fullPath: "gitlab-org/gitlab-foss") {
releases(first: 1) {
nodes {
tagName
upcomingRelease
links {
selfUrl
}
}
}
}
}
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])
github-version-checker/lib/check.js
Line 119 in 32e0177
Is there a plan to support this package for browser too?
Seems to be working only for Node.js
First off thanks for this little module.
Wanted to know why the complete release JSON is being pulled rather than just using the 'latest' URI? Is it because it doesn't include the prereleases?
ie. /repos/:owner/:repo/releases/latest
https://developer.github.com/v3/repos/releases/#get-the-latest-release
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;
version = json[I];
John Talbot
Using a single gulpfile.js
for one task should be enough.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.