@bobfrankston/npmglobalize 1.0.49 → 1.0.50

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/lib.js +24 -10
  2. package/package.json +1 -1
package/lib.js CHANGED
@@ -1254,31 +1254,45 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
1254
1254
  if (!cleanup && !asis) {
1255
1255
  const checkResult = checkIgnoreFiles(cwd, { conform, asis, verbose });
1256
1256
  if (checkResult.needsUpdate) {
1257
- console.log(colors.yellow('\nIgnore file recommendations:'));
1257
+ console.log(colors.yellow('\nRecommended additions to ignore files:'));
1258
+ // Group changes by file for more compact display
1259
+ const gitignoreChanges = [];
1260
+ const npmignoreChanges = [];
1258
1261
  for (const change of checkResult.changes) {
1259
- console.log(colors.yellow(change));
1262
+ if (change.includes('.gitignore')) {
1263
+ gitignoreChanges.push(change.replace(' .gitignore missing: ', '').trim());
1264
+ }
1265
+ else if (change.includes('.npmignore')) {
1266
+ npmignoreChanges.push(change.replace(' .npmignore missing: ', '').trim());
1267
+ }
1268
+ }
1269
+ if (gitignoreChanges.length > 0) {
1270
+ console.log(colors.yellow(' .gitignore: ') + gitignoreChanges.join(', '));
1271
+ }
1272
+ if (npmignoreChanges.length > 0) {
1273
+ console.log(colors.yellow(' .npmignore: ') + npmignoreChanges.join(', '));
1260
1274
  }
1261
1275
  console.log('');
1262
1276
  if (conform) {
1263
- console.log('Updating ignore files (--conform)...');
1277
+ console.log('Applying changes (--conform)...');
1264
1278
  conformIgnoreFiles(cwd);
1265
1279
  console.log('');
1266
1280
  }
1267
1281
  else {
1268
- console.log('What would you like to do?');
1269
- console.log(' ' + colors.green('conform') + ' - Apply these changes now');
1270
- console.log(' ' + colors.yellow('asis') + ' - Skip checks and continue as-is');
1271
- console.log(' ' + colors.red('abort') + ' - Stop and exit');
1282
+ console.log('Options:');
1283
+ console.log(' ' + colors.green('ok') + ' - Apply these changes now');
1284
+ console.log(' ' + colors.yellow('asis') + ' - Skip and continue as-is');
1285
+ console.log(' ' + colors.red('abort') + ' - Stop and exit');
1272
1286
  console.log('');
1273
- const choice = await promptChoice('Your choice [conform/asis/abort]:', ['conform', 'asis', 'abort']);
1274
- if (choice === 'conform') {
1287
+ const choice = await promptChoice('Your choice [ok/asis/abort]:', ['ok', 'asis', 'abort']);
1288
+ if (choice === 'ok') {
1275
1289
  console.log('Applying changes...');
1276
1290
  conformIgnoreFiles(cwd);
1277
1291
  console.log(colors.green('✓ Ignore files updated'));
1278
1292
  console.log('');
1279
1293
  }
1280
1294
  else if (choice === 'asis') {
1281
- console.log(colors.yellow('Continuing with existing ignore files...'));
1295
+ console.log(colors.yellow('Continuing as-is...'));
1282
1296
  console.log('');
1283
1297
  }
1284
1298
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/npmglobalize",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "description": "Transform file: dependencies to npm versions for publishing",
5
5
  "main": "index.js",
6
6
  "type": "module",