enablement-build-monorepo-version 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +10 -1
  2. package/package.json +4 -4
package/index.mjs CHANGED
@@ -117,6 +117,7 @@ async function main(options) {
117
117
  const current = {};
118
118
  const changeList = [];
119
119
  const scanlist = [];
120
+ const changedFolders = [];
120
121
 
121
122
  options.children.split(',').forEach((packageFolder)=>{
122
123
  scanlist.push(new Promise((resolve, reject) => {
@@ -179,6 +180,9 @@ async function main(options) {
179
180
  let safeName = results[i].value.name;
180
181
  safeName = safeName.replace(/-/g, '').replace(/_/g, '').replace(/\./g, '');
181
182
  if(results[i].value.changed) {
183
+ if(changedFolders.indexOf(packageFolder)<0) {
184
+ changedFolders.push(packageFolder);
185
+ }
182
186
  console.log(`##vso[task.setvariable variable=${safeName};isoutput=true;]${results[i].value.version}`);
183
187
  if(options.saveVersion) {
184
188
  scanlist.push(updateVersion(packageFolder,results[i].value.name,results[i].value.version));
@@ -233,6 +237,12 @@ async function main(options) {
233
237
  }));
234
238
  });
235
239
 
240
+ if(changedFolders.length>0) {
241
+ console.log(`FOLDERS CHANGED - ${JSON.stringify(changedFolders)}`);
242
+ changedFolders.map((packageFolder)=>{
243
+ console.log(`##vso[task.setvariable variable=${packageFolder};isoutput=true]true`);
244
+ });
245
+ }
236
246
  Promise.all(scanlist).then(()=>{
237
247
  if(options.changed) {
238
248
  console.log(`CHANGED - ${JSON.stringify(changeList)}`);
@@ -280,7 +290,6 @@ if (process.argv.length === 2) {
280
290
  if(argv[i].substring(0,2)==="--") {
281
291
  let name = argv[i].substring(2);
282
292
  if(options[name]!==undefined) {
283
- if(name==="children") argv[i+1]=argv[i+1].replace(/\s/g,',');
284
293
  options[name] = argv[i+1];
285
294
  i++;
286
295
  } else {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "enablement-build-monorepo-version",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "This detects changes in the children packages of a monorepo.",
5
5
  "type": "module",
6
6
  "module": "./index.mjs",
7
7
  "bin": "./index.mjs",
8
8
  "license": "MIT",
9
9
  "author": "Chris Doty",
10
- "scripts": {
11
- "start": "node index.mjs"
12
- },
13
10
  "dependencies": {
14
11
  "minimatch": "~5.1.2"
12
+ },
13
+ "scripts": {
14
+ "start": "node index.mjs"
15
15
  }
16
16
  }