@@ -14,7 +14,7 @@ import GlobPatterns from "#core/glob/patterns";
1414import Locale from "#core/locale" ;
1515import SemanticVersion from "#core/semantic-version" ;
1616import Table from "#core/text/table" ;
17- import { confirm , objectIsEmpty , repeatAction , shellQuote } from "#core/utils" ;
17+ import { confirm , mergeObjects , objectIsEmpty , repeatAction , shellQuote } from "#core/utils" ;
1818import * as yaml from "#core/yaml" ;
1919import Git from "#lib/git" ;
2020import lintFile from "#lib/lint/file" ;
@@ -1422,30 +1422,24 @@ export default class Package {
14221422 }
14231423
14241424 if ( directories . size ) {
1425- const schedule = {
1426- "interval" : this . cliConfig . meta . dependabot . npm . interval ,
1427- } ;
1425+ const config = mergeObjects (
1426+ {
1427+ "package-ecosystem" : "npm" ,
1428+ "registries" : "*" ,
1429+ "directories" : [ ...directories ] . sort ( ) ,
1430+ } ,
1431+ this . cliConfig . meta . dependabot . npm . config
1432+ ) ;
14281433
1429- if ( schedule . interval === "cron" ) {
1430- schedule . cronjob = this . cliConfig . meta . dependabot . npm . cronjob ;
1434+ if ( config . schedule . day ) {
1435+ config . schedule . day = config . schedule . day ?. toLowerCase ( ) ;
14311436 }
1432- else {
1433- schedule . day = this . cliConfig . meta . dependabot . npm . day ?. toLowerCase ( ) ;
14341437
1435- if ( this . cliConfig . meta . dependabot . npm . time ) {
1436- schedule . time = new Locale ( ) . formatDate ( Temporal . PlainTime . from ( this . cliConfig . meta . dependabot . npm . time ) , "timeStyle:short" ) ;
1437- }
1438+ if ( config . schedule . time ) {
1439+ config . schedule . time = new Locale ( ) . formatDate ( Temporal . PlainTime . from ( config . schedule . time ) , "timeStyle:short" ) ;
14381440 }
14391441
1440- schedule . timezone = this . cliConfig . meta . dependabot . npm . timezone ;
1441-
1442- updates . set ( "npm" , {
1443- "package-ecosystem" : "npm" ,
1444- "registries" : "*" ,
1445- "directories" : [ ...directories ] . sort ( ) ,
1446- schedule,
1447- "open-pull-requests-limit" : this . cliConfig . meta . dependabot . npm [ "open-pull-requests-limit" ] ,
1448- } ) ;
1442+ updates . set ( "npm" , config ) ;
14491443
14501444 registries . set ( "npm.pkg.github.com" , {
14511445 "type" : "npm-registry" ,
0 commit comments