File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2906,7 +2906,7 @@ describe('index', () => {
29062906 ) . to . eql ( s `${ cwd } /staging-dir` ) ;
29072907 expect (
29082908 rokuDeploy . getOptions ( { stagingFolderPath : 'staging-folder-path' } ) . stagingFolderPath
2909- ) . to . be . undefined ;
2909+ ) . to . eql ( s ` ${ cwd } /staging-folder-path` ) ;
29102910 } ) ;
29112911
29122912 it ( 'supports deprecated retainStagingFolder option' , ( ) => {
@@ -2921,7 +2921,7 @@ describe('index', () => {
29212921 ) . to . be . false ;
29222922 expect (
29232923 rokuDeploy . getOptions ( { retainStagingFolder : true , retainStagingDir : false } ) . retainStagingFolder
2924- ) . to . be . undefined ;
2924+ ) . to . be . false ;
29252925 } ) ;
29262926
29272927 it ( 'calling with no parameters works' , ( ) => {
Original file line number Diff line number Diff line change @@ -863,10 +863,10 @@ export class RokuDeploy {
863863 finalOptions . rootDir = path . resolve ( process . cwd ( ) , finalOptions . rootDir ) ;
864864 finalOptions . outDir = path . resolve ( process . cwd ( ) , finalOptions . outDir ) ;
865865 finalOptions . retainStagingDir = ( finalOptions . retainStagingDir !== undefined ) ? finalOptions . retainStagingDir : finalOptions . retainStagingFolder ;
866- delete finalOptions . retainStagingFolder ;
866+ //sync the new option with the old one (for back-compat)
867+ finalOptions . retainStagingFolder = finalOptions . retainStagingDir ;
867868
868869 let stagingDir = finalOptions . stagingDir || finalOptions . stagingFolderPath ;
869- delete finalOptions . stagingFolderPath ;
870870
871871 //stagingDir
872872 if ( stagingDir ) {
@@ -877,6 +877,8 @@ export class RokuDeploy {
877877 util . standardizePath ( `${ finalOptions . outDir } /.roku-deploy-staging` )
878878 ) ;
879879 }
880+ //sync the new option with the old one (for back-compat)
881+ finalOptions . stagingFolderPath = finalOptions . stagingDir ;
880882
881883 return finalOptions ;
882884 }
You can’t perform that action at this time.
0 commit comments