@bobfrankston/npmglobalize 1.0.86 → 1.0.88
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/lib.js +11 -10
- package/package.json +1 -1
package/lib.js
CHANGED
|
@@ -1308,7 +1308,15 @@ export async function initGit(cwd, visibility, dryRun) {
|
|
|
1308
1308
|
console.log(` [dry-run] Would run: gh repo create ${repoName} --${visibility} --source=. --push`);
|
|
1309
1309
|
return true;
|
|
1310
1310
|
}
|
|
1311
|
-
//
|
|
1311
|
+
// Ensure .gitignore exists and includes node_modules
|
|
1312
|
+
ensureGitignore(cwd);
|
|
1313
|
+
// Ensure .npmignore exists with recommended patterns
|
|
1314
|
+
ensureNpmignore(cwd);
|
|
1315
|
+
// Ensure .gitattributes exists for LF line endings
|
|
1316
|
+
ensureGitattributes(cwd);
|
|
1317
|
+
// git init
|
|
1318
|
+
runCommandOrThrow('git', ['init'], { cwd });
|
|
1319
|
+
// Check for dubious ownership (git init succeeds but subsequent commands fail)
|
|
1312
1320
|
const ownerCheck = spawnSync('git', ['rev-parse', '--git-dir'], {
|
|
1313
1321
|
encoding: 'utf-8',
|
|
1314
1322
|
stdio: 'pipe',
|
|
@@ -1329,14 +1337,6 @@ export async function initGit(cwd, visibility, dryRun) {
|
|
|
1329
1337
|
throw new Error('Failed to fix git safe.directory. Run manually: git config --global --add safe.directory \'*\'');
|
|
1330
1338
|
}
|
|
1331
1339
|
}
|
|
1332
|
-
// Ensure .gitignore exists and includes node_modules
|
|
1333
|
-
ensureGitignore(cwd);
|
|
1334
|
-
// Ensure .npmignore exists with recommended patterns
|
|
1335
|
-
ensureNpmignore(cwd);
|
|
1336
|
-
// Ensure .gitattributes exists for LF line endings
|
|
1337
|
-
ensureGitattributes(cwd);
|
|
1338
|
-
// git init
|
|
1339
|
-
runCommandOrThrow('git', ['init'], { cwd });
|
|
1340
1340
|
// Configure git for LF line endings (per programming.md)
|
|
1341
1341
|
runCommandOrThrow('git', ['config', 'core.autocrlf', 'false'], { cwd });
|
|
1342
1342
|
runCommandOrThrow('git', ['config', 'core.eol', 'lf'], { cwd });
|
|
@@ -2035,7 +2035,8 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
2035
2035
|
updateDeps,
|
|
2036
2036
|
updateMajor,
|
|
2037
2037
|
fix,
|
|
2038
|
-
conform // Propagate conform to dependencies
|
|
2038
|
+
conform, // Propagate conform to dependencies
|
|
2039
|
+
publishDeps // Propagate so transitive deps also get published
|
|
2039
2040
|
});
|
|
2040
2041
|
if (!depSuccess) {
|
|
2041
2042
|
console.error(colors.red(`Failed to publish ${name}`));
|