Skip to content

Commit

Permalink
npm Packages: Ignore private packages when updating CHANGELOG files (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo authored Jan 12, 2021
1 parent fabab6e commit cf48125
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/plugin/commands/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,18 @@ async function updatePackages(
const changelogFiles = await glob(
path.resolve( gitWorkingDirectoryPath, 'packages/*/CHANGELOG.md' )
);
const changelogFilesPublicPackages = changelogFiles.filter(
( changelogPath ) => {
const pkg = require( path.join(
path.dirname( changelogPath ),
'package.json'
) );
return pkg.private !== true;
}
);

const processedPackages = await Promise.all(
changelogFiles.map( async ( changelogPath ) => {
changelogFilesPublicPackages.map( async ( changelogPath ) => {
const fileStream = fs.createReadStream( changelogPath );

const rl = readline.createInterface( {
Expand Down

0 comments on commit cf48125

Please sign in to comment.