@bobfrankston/npmglobalize 1.0.222 → 1.0.223
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/README.md +3 -1
- package/cli.js +8 -7
- package/lib.d.ts +3 -2
- package/lib.js +24 -13
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -884,7 +884,9 @@ This is useful for:
|
|
|
884
884
|
deprecation note; it was renamed (2026-09-07) because "local" read as "local mode" rather
|
|
885
885
|
than "install from the local directory".
|
|
886
886
|
|
|
887
|
-
`-local-install` is persisted to `.globalize.json5` (`"
|
|
887
|
+
`-local-install` is persisted to `.globalize.json5` (`"localInstall": true`; the older
|
|
888
|
+
`"local"` key is still read and is rewritten to the new name the next time the file is
|
|
889
|
+
saved), so a bare
|
|
888
890
|
`npmglobalize` keeps doing local installs until you run `-global` (or edit the
|
|
889
891
|
file). Nothing is committed, bumped, or published, but a `.commitmsg` is still
|
|
890
892
|
consumed: it is appended to `npmchanges.md` under a
|
package/cli.js
CHANGED
|
@@ -235,14 +235,15 @@ function parseArgs(args) {
|
|
|
235
235
|
// from the local directory". Renamed to -local-install (-localinstall also
|
|
236
236
|
// accepted). -local still works but says so, so muscle memory isn't broken
|
|
237
237
|
// and the old spelling is phased out rather than silently kept alive.
|
|
238
|
-
// The .globalize.json5 key
|
|
238
|
+
// The .globalize.json5 key was renamed "local" → "localInstall" the same day;
|
|
239
|
+
// readConfig accepts the old name and the next persist rewrites it.
|
|
239
240
|
case '-local':
|
|
240
|
-
console.log(colors.yellow('! -local is deprecated — use -local-install (
|
|
241
|
+
console.log(colors.yellow('! -local is deprecated — use -local-install (or -localinstall). Same meaning: npm install -g . from the local directory, no publish.'));
|
|
241
242
|
// falls through
|
|
242
243
|
case '-local-install':
|
|
243
244
|
case '-localinstall':
|
|
244
|
-
options.
|
|
245
|
-
options.explicitKeys.add('
|
|
245
|
+
options.localInstall = true;
|
|
246
|
+
options.explicitKeys.add('localInstall');
|
|
246
247
|
break;
|
|
247
248
|
// 2026-09-01 16:30 EDT — Claude Code (Opus 5), at Bob's direction. -local-install
|
|
248
249
|
// persists to .globalize.json5 but had no counterpart, so leaving local-only
|
|
@@ -250,8 +251,8 @@ function parseArgs(args) {
|
|
|
250
251
|
// 2026-09-01 15:00 EDT — Bob: "-global makes more sense, -nolocal is confusing";
|
|
251
252
|
// -nolocal dropped, -global is the only spelling.
|
|
252
253
|
case '-global':
|
|
253
|
-
options.
|
|
254
|
-
options.explicitKeys.add('
|
|
254
|
+
options.localInstall = false;
|
|
255
|
+
options.explicitKeys.add('localInstall');
|
|
255
256
|
break;
|
|
256
257
|
case '-install':
|
|
257
258
|
case '-i':
|
|
@@ -663,7 +664,7 @@ export async function main() {
|
|
|
663
664
|
console.log(`Updated ${path.join(cwd, 'package.json')} scripts:`);
|
|
664
665
|
changes.forEach(c => console.log(` ${c}`));
|
|
665
666
|
// If no other flags need processing, exit; otherwise fall through
|
|
666
|
-
if (!cliOptions.install && !cliOptions.link && !cliOptions.
|
|
667
|
+
if (!cliOptions.install && !cliOptions.link && !cliOptions.localInstall) {
|
|
667
668
|
process.exit(0);
|
|
668
669
|
}
|
|
669
670
|
}
|
package/lib.d.ts
CHANGED
|
@@ -132,8 +132,9 @@ export interface GlobalizeOptions {
|
|
|
132
132
|
* are absent. Currently declarative (recorded in config and displayed);
|
|
133
133
|
* the actual conversion path is TODO. */
|
|
134
134
|
usePaths?: boolean;
|
|
135
|
-
/** Local install only — skip transform/publish, just npm install -g .
|
|
136
|
-
|
|
135
|
+
/** Local install only (-local-install) — skip transform/publish, just npm install -g .
|
|
136
|
+
* Config key renamed from "local" 2026-09-07; readConfig still accepts the old name. */
|
|
137
|
+
localInstall?: boolean;
|
|
137
138
|
/** Build every file: dep even when outputs look up to date (skips the freshness check) */
|
|
138
139
|
forceBuild?: boolean;
|
|
139
140
|
/** Freeze node_modules: replace symlinks/junctions with real copies for network share use */
|
package/lib.js
CHANGED
|
@@ -312,7 +312,18 @@ export function readConfig(dir) {
|
|
|
312
312
|
}
|
|
313
313
|
try {
|
|
314
314
|
const content = fs.readFileSync(configPath, 'utf-8');
|
|
315
|
-
|
|
315
|
+
const config = JSON5.parse(content);
|
|
316
|
+
// 2026-09-07 — Claude Code (Fable 5.1), at Bob's direction: the "local" key
|
|
317
|
+
// was renamed "localInstall" along with the -local → -local-install flag.
|
|
318
|
+
// Old files keep working: the value is carried over here, and since
|
|
319
|
+
// writeConfig reads the existing config through this same function, the
|
|
320
|
+
// next persist writes the new name and drops the old one.
|
|
321
|
+
if ('local' in config && !('localInstall' in config)) {
|
|
322
|
+
config.localInstall = config.local;
|
|
323
|
+
console.log(colors.dim(` (.globalize.json5: "local" is now "localInstall" — rewritten on the next persist)`));
|
|
324
|
+
}
|
|
325
|
+
delete config.local;
|
|
326
|
+
return config;
|
|
316
327
|
}
|
|
317
328
|
catch (error) {
|
|
318
329
|
console.warn(`Warning: Could not parse .globalize.json5 config: ${error.message}`);
|
|
@@ -332,7 +343,7 @@ const BOOL_COMMENTS = {
|
|
|
332
343
|
quiet: { on: 'Suppress npm warnings', off: 'Show npm warnings' },
|
|
333
344
|
verbose: { on: 'Show detailed output', off: 'Normal output detail' },
|
|
334
345
|
fix: { on: 'Auto-run npm audit fix (default)', off: 'Do NOT run npm audit fix (audit report still runs)' },
|
|
335
|
-
|
|
346
|
+
localInstall: { on: 'Local install only via -local-install (skip transform/publish)', off: 'Normal transform/publish flow' },
|
|
336
347
|
noPublish: { on: 'Transform but don\'t publish', off: 'Publish normally' },
|
|
337
348
|
freeze: { on: 'Freeze node_modules (replace symlinks with real copies)', off: 'Leave node_modules symlinks as-is' },
|
|
338
349
|
usePaths: { on: 'Resolve file: deps from sibling checkouts', off: 'Resolve file: deps from npm, not siblings (standalone package)' },
|
|
@@ -444,7 +455,7 @@ export function writeConfig(dir, config, explicitKeys) {
|
|
|
444
455
|
['"gitVisibility": "private"', 'Git repo: private or public'],
|
|
445
456
|
['"npmVisibility": "private"', 'npm package: private or public'],
|
|
446
457
|
['"fix": true', 'true = auto-run npm audit fix (never --force); false = report only'],
|
|
447
|
-
['"
|
|
458
|
+
['"localInstall": false', 'true = install from the local directory only, set by -local-install (skip transform/publish); clear with -global'],
|
|
448
459
|
['"noPublish": false', 'true = transform but don\'t publish'],
|
|
449
460
|
['"freeze": false', 'true = freeze node_modules (replace symlinks with real copies)'],
|
|
450
461
|
['"usePaths": true', 'true = resolve file: deps from siblings; false = use latest npm version (standalone)'],
|
|
@@ -6669,7 +6680,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
6669
6680
|
const { bump = 'patch', noPublish = false, cleanup = false, install = false, link = false, wsl = false, force = false, files = true, dryRun = false, quiet = true, verbose = false, init = false, gitVisibility = 'private', npmVisibility = 'private', message, conform = false, asis = false, updateDeps = false, updateMajor = false, publishDeps = true, // Default to publishing deps for safety
|
|
6670
6681
|
publishDepsYes = false, // -pd: auto-yes to dep-cascade prompts (private only)
|
|
6671
6682
|
publicDeps = false, // -public-deps: cascade public visibility to all deps
|
|
6672
|
-
noPrescan = false, forcePublish = false, fix = true, fixTags = false, rebase = false, show = false,
|
|
6683
|
+
noPrescan = false, forcePublish = false, fix = true, fixTags = false, rebase = false, show = false, localInstall = false, freeze = false, usePaths = true, allowTs, adopt = false, importCheck = false } = options;
|
|
6673
6684
|
// 2026-09-06 — Claude Code (Fable 5.1), at Bob's direction: a directory marked
|
|
6674
6685
|
// `.stale` is retired. Refuse to build, publish or install it — and because the
|
|
6675
6686
|
// dep cascade reaches deps through this same function, refuse to cascade into
|
|
@@ -6733,7 +6744,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
6733
6744
|
settings.push('--force-publish');
|
|
6734
6745
|
if (configOptions.show)
|
|
6735
6746
|
settings.push('--show');
|
|
6736
|
-
if (configOptions.
|
|
6747
|
+
if (configOptions.localInstall)
|
|
6737
6748
|
settings.push('-local-install');
|
|
6738
6749
|
if (configOptions.freeze)
|
|
6739
6750
|
settings.push('-freeze');
|
|
@@ -6758,7 +6769,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
6758
6769
|
// 2026-09-01 16:30 EDT — Claude Code (Opus 5): this was a verbatim copy of
|
|
6759
6770
|
// doLocalInstall (the 10:55 output-capture note lives there now). One path,
|
|
6760
6771
|
// so the .commitmsg recording added today lands in both entry points.
|
|
6761
|
-
if (
|
|
6772
|
+
if (localInstall) {
|
|
6762
6773
|
return doLocalInstall(cwd, options);
|
|
6763
6774
|
}
|
|
6764
6775
|
// Prescan the file: dep graph up front — surface all problems before
|
|
@@ -6988,7 +6999,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
6988
6999
|
+ ' 5) Abort\nChoice [1]:', ['1', '2', '3', '4', '5', '']);
|
|
6989
7000
|
if (choice === '4') {
|
|
6990
7001
|
console.log(colors.dim('Switching to local-only mode...'));
|
|
6991
|
-
writeConfig(cwd, { ...configOptions,
|
|
7002
|
+
writeConfig(cwd, { ...configOptions, localInstall: true }, new Set(['localInstall']));
|
|
6992
7003
|
return doLocalInstall(cwd, options);
|
|
6993
7004
|
}
|
|
6994
7005
|
if (choice === '5') {
|
|
@@ -7017,7 +7028,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
7017
7028
|
+ ' 4) Abort\nChoice [1]:', ['1', '2', '3', '4', '']);
|
|
7018
7029
|
if (choice === '3') {
|
|
7019
7030
|
console.log(colors.dim('Switching to local-only mode...'));
|
|
7020
|
-
writeConfig(cwd, { ...configOptions,
|
|
7031
|
+
writeConfig(cwd, { ...configOptions, localInstall: true }, new Set(['localInstall']));
|
|
7021
7032
|
return doLocalInstall(cwd, options);
|
|
7022
7033
|
}
|
|
7023
7034
|
if (choice === '4') {
|
|
@@ -7060,7 +7071,7 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
7060
7071
|
+ ' 4) Abort\nChoice [1]:', ['1', '2', '3', '4', '']);
|
|
7061
7072
|
if (choice === '3') {
|
|
7062
7073
|
console.log(colors.dim('Switching to local-only mode...'));
|
|
7063
|
-
writeConfig(cwd, { ...configOptions,
|
|
7074
|
+
writeConfig(cwd, { ...configOptions, localInstall: true }, new Set(['localInstall']));
|
|
7064
7075
|
return doLocalInstall(cwd, options);
|
|
7065
7076
|
}
|
|
7066
7077
|
if (choice === '4') {
|
|
@@ -7875,8 +7886,8 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
7875
7886
|
surprises.push(`usePaths=false${fromConfig('usePaths')} — file: deps resolved from npm, not siblings`);
|
|
7876
7887
|
if (configOptions.freeze || freeze)
|
|
7877
7888
|
surprises.push(`freeze=true${fromConfig('freeze')}`);
|
|
7878
|
-
if (configOptions.
|
|
7879
|
-
surprises.push(`
|
|
7889
|
+
if (configOptions.localInstall || localInstall)
|
|
7890
|
+
surprises.push(`localInstall=true${fromConfig('localInstall')}`);
|
|
7880
7891
|
if (configOptions.files === false || files === false)
|
|
7881
7892
|
surprises.push(`files=false${fromConfig('files')} — npm versions left in package.json`);
|
|
7882
7893
|
if (configOptions.allowTs === true || allowTs === true)
|
|
@@ -9064,8 +9075,8 @@ export async function globalizeWorkspace(rootDir, options = {}, configOptions =
|
|
|
9064
9075
|
// user up front avoids the surprise of "I asked for install but most
|
|
9065
9076
|
// packages didn't install."
|
|
9066
9077
|
const installSources = [];
|
|
9067
|
-
if (options.
|
|
9068
|
-
const src = configOptions.
|
|
9078
|
+
if (options.localInstall || configOptions.localInstall) {
|
|
9079
|
+
const src = configOptions.localInstall && !options.localInstall ? '.globalize.json5' : 'CLI';
|
|
9069
9080
|
installSources.push(`-local-install (${src})`);
|
|
9070
9081
|
}
|
|
9071
9082
|
if (options.install || configOptions.install) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/npmglobalize",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.223",
|
|
4
4
|
"description": "Transform file: dependencies to npm versions for publishing",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@bobfrankston/freezepak": "^0.1.9",
|
|
35
35
|
"@bobfrankston/importgen": "^0.1.43",
|
|
36
|
-
"@bobfrankston/themecolors": "^0.1.
|
|
36
|
+
"@bobfrankston/themecolors": "^0.1.10",
|
|
37
37
|
"@bobfrankston/userconfig": "^1.0.11",
|
|
38
38
|
"@npmcli/package-json": "^7.0.4",
|
|
39
39
|
"json5": "^2.2.3",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@bobfrankston/freezepak": "^0.1.9",
|
|
63
63
|
"@bobfrankston/importgen": "^0.1.43",
|
|
64
|
-
"@bobfrankston/themecolors": "^0.1.
|
|
64
|
+
"@bobfrankston/themecolors": "^0.1.10",
|
|
65
65
|
"@bobfrankston/userconfig": "^1.0.11",
|
|
66
66
|
"@npmcli/package-json": "^7.0.4",
|
|
67
67
|
"json5": "^2.2.3",
|