Files
monorepo-dep-checker/bin/dep-check.js
Claude ce37f7990b Fix workspace peer-dep, strict-mode, and workspace-range bugs
- checkMissingDependencies: stop flagging workspace-protocol peer
  dependencies as missing from the main app; the redundant OR clause
  bypassed the workspace exclusion filter.
- updateDependencies: strict mode now leaves pinned (non-range)
  versions untouched instead of force-updating them, matching the
  documented behavior.
- getSemverVersion: strip leftover range operators (^, ~, etc.) from
  workspace:-prefixed versions so workspace:^x.y.z and workspace:~x.y.z
  resolve correctly instead of being treated as invalid.
- Remove unreachable duplicate JSON-building branch in displayResults.
- bin/dep-check.js: exit with a non-zero status on unhandled errors
  instead of silently exiting 0.
- index.ts: replace the fragile file-URL string slicing used to detect
  direct execution with a proper pathToFileURL comparison.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQedTpSTfxtbYUYo3gdT7v
2026-09-23 22:05:58 +00:00

18 lines
560 B
JavaScript

#!/usr/bin/env node
import { createRequire } from 'module';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { pathToFileURL } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(import.meta.url);
// Convert the file path to a proper file:// URL
const modulePath = pathToFileURL(join(__dirname, '../dist/index.js')).href;
const { default: run } = await import(modulePath);
run().catch((error) => {
console.error(error);
process.exit(1);
});