@@ -468,12 +468,13 @@ export async function deposit(session: ISession, opts: DepositOptions) {
468468
469469 let body : Element ;
470470 if ( depositType === 'journal' ) {
471- if ( ! journalTitle || ! journalDoi ) throw new Error ( 'Journal title and DOI are required' ) ;
471+ if ( ! journalTitle ) throw new Error ( 'Journal title is required' ) ;
472+ if ( ! journalDoi ) throw new Error ( 'Journal DOI is required' ) ;
472473 let journalIssue : JournalIssue | undefined ;
473474 console . log ( 'Deposit summary:' ) ;
474475 console . log ( ' Journal:' ) ;
475476 console . log ( ` Title: ${ journalTitle } ${ journalAbbr ? ` (${ journalAbbr } )` : '' } ` ) ;
476- if ( journalDoi ) console . log ( ` Doi: ${ journalDoi } ` ) ;
477+ console . log ( ` Doi: ${ journalDoi } ` ) ;
477478 if ( volumeNumber || issueNumber || issueDoi ) {
478479 if ( ! publicationDate ) {
479480 throw new Error ( `publication date is required for journal issue` ) ;
@@ -492,10 +493,17 @@ export async function deposit(session: ISession, opts: DepositOptions) {
492493 } ;
493494 }
494495 console . log ( ' Articles:' ) ;
496+ const journalDoiPrefix = journalDoi . split ( '/' ) [ 0 ] ;
495497 depositArticles . forEach ( ( { frontmatter } ) => {
496498 console . log (
497499 ` ${ frontmatter . doi } - ${ frontmatter . title ?. slice ( 0 , 30 ) } ${ ( frontmatter . title ?. length ?? 0 ) > 30 ? '...' : '' } ` ,
498500 ) ;
501+ const articleDoiPrefix = frontmatter . doi ?. split ( '/' ) [ 0 ] ;
502+ if ( journalDoiPrefix !== articleDoiPrefix ) {
503+ session . log . warn (
504+ ` Article DOI prefix ${ articleDoiPrefix } does not match Journal DOI prefix ${ journalDoiPrefix } ` ,
505+ ) ;
506+ }
499507 } ) ;
500508 body = journalXml (
501509 {
0 commit comments