forged-cli 0.4.1 → 0.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forged-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "A complete dev environment toolkit — shell, workflows, and project scaffolding in one install.",
5
5
  "keywords": [
6
6
  "cli",
@@ -122,6 +122,13 @@ export async function scanCommand(cwd = process.cwd(), opts = {}) {
122
122
 
123
123
  // 1. Parse package.json
124
124
  const { deps, scripts, error, name: pkgName, version: pkgVersion } = checkPackageJson(cwd);
125
+
126
+ // Not a Node project: nothing to scan. Return before writing the scan
127
+ // cache, so the dotfiles badge keeps the last real result.
128
+ if (!existsSync(join(cwd, 'package.json'))) {
129
+ console.log(`${yellow}ℹ No package.json here — not a Node project, nothing to scan.${reset}\n`);
130
+ return null;
131
+ }
125
132
  if (error) findings.errors.push({ message: error });
126
133
 
127
134
  // 2. Dangerous scripts