Skip to content

Commit 7ce14bd

Browse files
committed
chore: minor formatting
1 parent 2da64ae commit 7ce14bd

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

scripts/changelog.mjs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env node
2-
import conventionalChangelog from 'conventional-changelog';
32
import addStream from 'add-stream';
4-
import tempfile from 'tempfile';
5-
import path from 'node:path';
6-
import fs from 'node:fs';
73
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';
88

99
const PRESET = 'angular';
1010

@@ -26,8 +26,10 @@ const PACKAGES = [
2626
{ path: './packages/cli' },
2727
{ path: './packages/components/react' },
2828
{ path: './packages/runtime' },
29+
2930
// we do not include this one because it is not published
3031
{ path: './packages/template', excluded: true },
32+
3133
// the CHANGELOG of this one is the same as the one from the cli so it's also excluded from this list
3234
{ path: './packages/create-tutorial', sameAs: 'tutorialkit' },
3335
];
@@ -78,15 +80,17 @@ async function processPackages() {
7880
}
7981

8082
/**
81-
* Generate a changelog for the provided package. And aggregate the data
83+
* Generate a changelog for the provided package and aggregate the data
8284
* for the root changelog.
8385
*
8486
* @param {Package} pkg the package
8587
*/
8688
function generateChangelog(pkg) {
8789
const options = {
8890
preset: PRESET,
89-
pkg: { path: pkg.path },
91+
pkg: {
92+
path: pkg.path,
93+
},
9094
append: undefined,
9195
releaseCount: undefined,
9296
skipUnstable: undefined,
@@ -103,8 +107,8 @@ function generateChangelog(pkg) {
103107
path: pkg.gitPath ?? path.dirname(pkg.path),
104108
};
105109

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);
108112
process.exit(1);
109113
});
110114

0 commit comments

Comments
 (0)