This repository was archived by the owner on Dec 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-18
lines changed
Expand file tree Collapse file tree 2 files changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ const versionCheck = require('../lib/main');
22const options = {
33 repo : 'github-version-checker' ,
44 owner : 'axelrindle' ,
5- currentVersion : require ( '../package.json' ) . version ,
6- reduceTraffic : false
5+ currentVersion : require ( '../package.json' ) . version
76} ;
87
98versionCheck ( options )
Original file line number Diff line number Diff line change @@ -87,21 +87,12 @@ const rest = (options, callback) => {
8787 } ;
8888
8989 const apiUrl = `https://api.github.com/repos/${ options . owner } /${ options . repo } /releases` ;
90- let req ;
91- if ( options . reduceTraffic ) {
92- const opts = {
93- hostname : 'gvc-reduce-json.axelrindle.de' ,
94- path : '/?url=' + apiUrl
95- } ;
96- req = https . get ( opts , handler ) ;
97- } else {
98- const opts = {
99- headers : {
100- 'User-Agent' : `${ pkg . name } v${ pkg . version } `
101- }
102- } ;
103- req = https . get ( apiUrl , opts , handler ) ;
104- }
90+ const opts = {
91+ headers : {
92+ 'User-Agent' : `${ pkg . name } v${ pkg . version } `
93+ }
94+ } ;
95+ let req = https . get ( apiUrl , opts , handler ) ;
10596 req . on ( 'error' , err => {
10697 callback ( err , null ) ;
10798 } ) ;
@@ -119,7 +110,9 @@ const rest = (options, callback) => {
119110module . exports = ( options , callback ) => {
120111 // get options
121112 options . token = options . token || process . env . GITHUB_API_TOKEN || undefined ;
122- options . reduceTraffic = options . reduceTraffic !== undefined ? options . reduceTraffic : true ;
113+ if ( options . reduceTraffic ) {
114+ console . warn ( 'The "reduceTraffic" option is deprecated! Consider updating "github-version-checker" to a newer version.' ) ;
115+ }
123116
124117 // check if required options are defined
125118 if ( ! options . repo ) {
You can’t perform that action at this time.
0 commit comments