File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 984984 "keyStop" : 0 ,
985985 "step" : 0
986986 },
987+ "quit" : {
988+ "arity" : 1 ,
989+ "flags" : [
990+ " loading" ,
991+ " stale" ,
992+ " readonly"
993+ ],
994+ "keyStart" : 0 ,
995+ "keyStop" : 0 ,
996+ "step" : 0
997+ },
987998 "randomkey" : {
988999 "arity" : 1 ,
9891000 "flags" : [
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ var commands = require('./commands');
1010 * @var {string[]}
1111 * @public
1212 */
13- var commandsList = Object . keys ( commands ) ;
14- commandsList . push ( 'quit' ) ;
15- exports . list = commandsList ;
13+ exports . list = Object . keys ( commands ) ;
1614
1715/**
1816 * Check if the command has the flag
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ describe('redis-commands', function () {
3737 expect ( commands . hasFlag ( 'set' , 'fast' ) ) . to . eql ( false ) ;
3838 expect ( commands . hasFlag ( 'set' , 'readonly' ) ) . to . eql ( false ) ;
3939 expect ( commands . hasFlag ( 'select' , 'denyoom' ) ) . to . eql ( false ) ;
40+ expect ( commands . hasFlag ( 'quit' , 'denyoom' ) ) . to . eql ( false ) ;
4041 } ) ;
4142 } ) ;
4243
Original file line number Diff line number Diff line change @@ -24,6 +24,21 @@ redis.command(function (err, res) {
2424 return prev ;
2525 } , { } ) ;
2626
27+ // Future proof. Redis might implement this soon
28+ if ( ! commands . quit ) {
29+ commands . quit = {
30+ arity : 1 ,
31+ flags : [
32+ 'loading' ,
33+ 'stale' ,
34+ 'readonly'
35+ ] ,
36+ keyStart : 0 ,
37+ keyStop : 0 ,
38+ step : 0
39+ }
40+ }
41+
2742 // Use json-stable-stringify instead fo JSON.stringify
2843 // for easier diffing
2944 var content = stringify ( commands , { space : ' ' } ) ;
You can’t perform that action at this time.
0 commit comments