mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
cd771174b9
In recent conventional-changelog version updates, the underlying @conventional-changelog/git-client dropped support for the raw `grep` and `extendedRegexp` options, causing all monorepo commits to be included in the zone.js changelog. Additionally, without `tagPrefix: 'zone.js-'`, conventional-changelog treated monorepo release tags as release boundaries, generating changelog sections for every intermediate monorepo release. This change: - Configures `tagPrefix: 'zone.js-'` and filters commits by `scope === 'zone.js'` via `writerOpts.transform` in the gulp changelog task. - Fixes the PR creation link in the release script to use the cross-fork compare URL format on GitHub. - Fixes the release commit SHA lookup in `cutReleaseWorkflow`. - Updates zone.js release documentation.
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
module.exports = (gulp) => () => {
|
|
const tag = process.env.TAG;
|
|
const ptag = process.env.PREVIOUS_ZONE_TAG;
|
|
const conventionalChangelog = require('gulp-conventional-changelog');
|
|
// the tag of zone.js will start with `zone.js-`, such as `zone.js-0.10.0`
|
|
// we will remove the first 8 (zone.js-) chars to get the real version.
|
|
const version = tag.replace(/^zone\.js-/, '');
|
|
return gulp
|
|
.src('packages/zone.js/CHANGELOG.md')
|
|
.pipe(
|
|
conventionalChangelog(
|
|
{
|
|
preset: 'angular',
|
|
tagPrefix: 'zone.js-',
|
|
},
|
|
{linkCompare: true, previousTag: ptag, currentTag: tag, version: version},
|
|
{
|
|
from: ptag,
|
|
to: 'HEAD',
|
|
},
|
|
undefined,
|
|
{
|
|
transform: (commit) => {
|
|
if (commit.scope !== 'zone.js') return undefined;
|
|
return commit;
|
|
},
|
|
},
|
|
),
|
|
)
|
|
.pipe(gulp.dest('./packages/zone.js/'));
|
|
};
|