@@ -276,6 +276,16 @@ gen_enforced_field(WorkspaceCwd, 'scripts.changelog:validate', CorrectChangelogV
276276 atom_concat('../../scripts/validate-changelog.sh ' , WorkspacePackageName , ExpectedPrefix ),
277277 \+ atom_concat(ExpectedPrefix , _ , ChangelogValidationCommand ).
278278
279+ % The "changelog:update" script for each published package must run a common
280+ % script with the name of the package as the first argument.
281+ gen_enforced_field (WorkspaceCwd , 'scripts.changelog:update' , CorrectChangelogUpdateCommand ) :-
282+ \+ workspace_field(WorkspaceCwd , 'private' , true ),
283+ workspace_field(WorkspaceCwd , 'scripts.changelog:update' , ChangelogUpdateCommand ),
284+ workspace_package_name(WorkspaceCwd , WorkspacePackageName ),
285+ atomic_list_concat(['../../scripts/update-changelog.sh ' , WorkspacePackageName , ' [...]' ], CorrectChangelogUpdateCommand ),
286+ atom_concat('../../scripts/update-changelog.sh ' , WorkspacePackageName , ExpectedPrefix ),
287+ \+ atom_concat(ExpectedPrefix , _ , ChangelogUpdateCommand ).
288+
279289% All non-root packages must have the same "test" script.
280290gen_enforced_field (WorkspaceCwd , 'scripts.test' , 'jest --reporters=jest-silent-reporter' ) :-
281291 WorkspaceCwd \= '.' .
0 commit comments