1
1
#!/usr/bin/env node
2
- import conventionalChangelog from 'conventional-changelog' ;
3
2
import addStream from 'add-stream' ;
4
- import tempfile from 'tempfile' ;
5
- import path from 'node:path' ;
6
- import fs from 'node:fs' ;
7
3
import chalk from 'chalk' ;
4
+ import conventionalChangelog from 'conventional-changelog' ;
5
+ import fs from 'node:fs' ;
6
+ import path from 'node:path' ;
7
+ import tempfile from 'tempfile' ;
8
8
9
9
const PRESET = 'angular' ;
10
10
@@ -26,8 +26,10 @@ const PACKAGES = [
26
26
{ path : './packages/cli' } ,
27
27
{ path : './packages/components/react' } ,
28
28
{ path : './packages/runtime' } ,
29
+
29
30
// we do not include this one because it is not published
30
31
{ path : './packages/template' , excluded : true } ,
32
+
31
33
// the CHANGELOG of this one is the same as the one from the cli so it's also excluded from this list
32
34
{ path : './packages/create-tutorial' , sameAs : 'tutorialkit' } ,
33
35
] ;
@@ -78,15 +80,17 @@ async function processPackages() {
78
80
}
79
81
80
82
/**
81
- * Generate a changelog for the provided package. And aggregate the data
83
+ * Generate a changelog for the provided package and aggregate the data
82
84
* for the root changelog.
83
85
*
84
86
* @param {Package } pkg the package
85
87
*/
86
88
function generateChangelog ( pkg ) {
87
89
const options = {
88
90
preset : PRESET ,
89
- pkg : { path : pkg . path } ,
91
+ pkg : {
92
+ path : pkg . path ,
93
+ } ,
90
94
append : undefined ,
91
95
releaseCount : undefined ,
92
96
skipUnstable : undefined ,
@@ -103,8 +107,8 @@ function generateChangelog(pkg) {
103
107
path : pkg . gitPath ?? path . dirname ( pkg . path ) ,
104
108
} ;
105
109
106
- const changelogStream = conventionalChangelog ( options , context , gitRawCommitsOpts ) . on ( 'error' , ( err ) => {
107
- console . error ( err . stack ) ;
110
+ const changelogStream = conventionalChangelog ( options , context , gitRawCommitsOpts ) . on ( 'error' , ( error ) => {
111
+ console . error ( error . stack ) ;
108
112
process . exit ( 1 ) ;
109
113
} ) ;
110
114
0 commit comments