@@ -61,15 +61,6 @@ const checkPackageMd5 = (runSettings) => {
61
61
}
62
62
63
63
if ( typeof runSettings . npm_dependencies === 'object' ) {
64
- if ( ! ( "cypress" in runSettings . npm_dependencies ) ) {
65
- logger . warn ( "Missing cypress not found in npm_dependencies" ) ;
66
- if ( "cypress_version" in runSettings && ! runSettings . cypress_version . toString ( ) . match ( Constants . LATEST_VERSION_SYNTAX_REGEX ) ) {
67
- runSettings . npm_dependencies . cypress = runSettings . cypress_version ;
68
- } else {
69
- runSettings . npm_dependencies . cypress = "latest" ;
70
- }
71
- logger . warn ( `Adding cypress version ${ runSettings . npm_dependencies . cypress } in npm_dependencies` ) ;
72
- }
73
64
Object . assign ( packageJSON , {
74
65
devDependencies : utils . sortJsonKeys ( runSettings . npm_dependencies ) ,
75
66
} ) ;
@@ -95,6 +86,18 @@ const checkUploadedMd5 = (bsConfig, args, instrumentBlocks) => {
95
86
zipUrlPresent : false ,
96
87
packageUrlPresent : false ,
97
88
} ;
89
+ const runSettings = bsConfig . run_settings ;
90
+ if ( typeof runSettings . npm_dependencies === 'object' ) {
91
+ if ( ! ( "cypress" in runSettings . npm_dependencies ) ) {
92
+ logger . warn ( "Missing cypress not found in npm_dependencies" ) ;
93
+ if ( "cypress_version" in runSettings && ! runSettings . cypress_version . toString ( ) . match ( Constants . LATEST_VERSION_SYNTAX_REGEX ) ) {
94
+ runSettings . npm_dependencies . cypress = runSettings . cypress_version ;
95
+ } else {
96
+ runSettings . npm_dependencies . cypress = "latest" ;
97
+ }
98
+ logger . warn ( `Adding cypress version ${ runSettings . npm_dependencies . cypress } in npm_dependencies` ) ;
99
+ }
100
+ }
98
101
if ( args [ "force-upload" ] ) {
99
102
logger . debug ( "force-upload set to true. Uploading tests and npm packages." ) ;
100
103
return resolve ( obj ) ;
0 commit comments