@bobfrankston/npmglobalize 1.0.43 → 1.0.45
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.
- package/cli.js +7 -3
- package/lib.js +11 -2
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -6,6 +6,7 @@ import { globalize, readConfig } from './lib.js';
|
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { fileURLToPath } from 'url';
|
|
9
|
+
import { styleText } from 'util';
|
|
9
10
|
import JSON5 from 'json5';
|
|
10
11
|
// Check if JS files are up-to-date with TS files
|
|
11
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -14,9 +15,12 @@ const libJsPath = path.join(__dirname, 'lib.js');
|
|
|
14
15
|
if (fs.existsSync(libTsPath) && fs.existsSync(libJsPath)) {
|
|
15
16
|
const tsStat = fs.statSync(libTsPath);
|
|
16
17
|
const jsStat = fs.statSync(libJsPath);
|
|
17
|
-
if (jsStat.mtime < tsStat.mtime) {
|
|
18
|
-
console.error('\n
|
|
19
|
-
console.error('
|
|
18
|
+
if (jsStat.mtime < tsStat.mtime && !process.argv.includes('--force')) {
|
|
19
|
+
console.error('\n' + styleText('red', '❌ Build check failed:'));
|
|
20
|
+
console.error(styleText('red', ' lib.js is outdated (older than lib.ts)'));
|
|
21
|
+
console.error('\n' + styleText('yellow', ' Please run: tsc'));
|
|
22
|
+
console.error(styleText('yellow', ' Or use --force to skip this check') + '\n');
|
|
23
|
+
process.exit(1);
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
function printHelp() {
|
package/lib.js
CHANGED
|
@@ -1440,9 +1440,18 @@ export async function globalize(cwd, options = {}) {
|
|
|
1440
1440
|
pkg.private = true;
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
+
else if (npmVisibility === 'public') {
|
|
1444
|
+
// Explicit public - inform user
|
|
1445
|
+
console.log(`Will publish '${pkg.name}' to PUBLIC npm registry.`);
|
|
1446
|
+
}
|
|
1443
1447
|
else {
|
|
1444
|
-
//
|
|
1445
|
-
|
|
1448
|
+
// No explicit setting - check current state
|
|
1449
|
+
if (pkg.private) {
|
|
1450
|
+
console.log(`Package is marked PRIVATE - will not publish to npm.`);
|
|
1451
|
+
}
|
|
1452
|
+
else {
|
|
1453
|
+
console.log(`Will publish '${pkg.name}' to PUBLIC npm registry.`);
|
|
1454
|
+
}
|
|
1446
1455
|
}
|
|
1447
1456
|
// Update existing npm dependencies if requested
|
|
1448
1457
|
if (updateDeps) {
|