Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
},
"dependencies": {
"@drizzle-team/brocli": "^0.12.0",
"@scatool/analyzer-core": "0.1.0-alpha.0",
"@scatool/analyzer-plugin-go": "0.1.0-alpha.0",
"@scatool/analyzer-plugin-gradle": "0.1.0-alpha.0",
"@scatool/analyzer-plugin-javascript": "0.1.0-alpha.0",
"@scatool/analyzer-plugin-maven": "0.1.0-alpha.0",
"@scatool/analyzer-core": "0.1.0-alpha.2",
"@scatool/analyzer-plugin-go": "0.1.0-alpha.2",
"@scatool/analyzer-plugin-gradle": "0.1.0-alpha.2",
"@scatool/analyzer-plugin-javascript": "0.1.0-alpha.2",
"@scatool/analyzer-plugin-maven": "0.1.0-alpha.2",
Comment on lines +29 to +33

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

pnpm view `@scatool/analyzer-core`@0.1.0-alpha.2 peerDependencies
pnpm view `@scatool/analyzer-plugin-javascript`@0.1.0-alpha.2 peerDependencies
pnpm list typescript --filter ./packages/cli

Repository: scatool/cli

Length of output: 835


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== packages/cli/package.json ==\n'
sed -n '1,120p' packages/cli/package.json

printf '\n== pnpm-lock.yaml: TypeScript entries ==\n'
rg -n '^(\s*)typescript@|version: .*typescript|typescript:' pnpm-lock.yaml

printf '\n== pnpm-lock.yaml: packages/cli section ==\n'
rg -n 'packages/cli|typescript' pnpm-lock.yaml -A3 -B3

Repository: scatool/cli

Length of output: 16722


Resolve the TypeScript peer mismatch in packages/cli/package.json.
typescript is pinned to ^6.0.3, but the @scatool/analyzer-* packages still declare typescript peers of ^5 / ^5.9.3. Either align the CLI to a supported 5.x release or widen those peer ranges if 6.x is intended.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/package.json` around lines 29 - 33, Resolve the TypeScript peer
mismatch in packages/cli/package.json by either changing the CLI’s typescript
dependency from ^6.0.3 to a supported 5.x release matching the
`@scatool/analyzer-`* peer ranges, or updating those analyzer package peer ranges
if TypeScript 6 support is intentional; ensure all declared versions are
compatible.

"@scatool/sdk": "workspace:*"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/revisions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function createOptions(options: { codebase?: boolean } = {}) {
"Path to analyze with Exscalibur before uploading. Mutually exclusive with --file and --upload-id.",
),
ignore: string("ignore").desc(
"Comma-separated glob patterns to ignore during Exscalibur analysis.",
"Comma-separated glob patterns to ignore for all Exscalibur extractors.",
),
extractorOptionsJson: string("extractor-options-json").desc(
"JSON object with Exscalibur options keyed by extractor name.",
Expand Down
27 changes: 8 additions & 19 deletions packages/cli/src/exscalibur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,21 @@ export async function extractSbom(

for (const extractor of EXTRACTORS) {
try {
results.push(await extractor.extract(codebasePath, extractorOptions(extractor, options)));
results.push(
await extractor.extract(
codebasePath,
options.extractorOptions?.[extractor.name],
options.ignore ? { ignore: options.ignore } : undefined,
),
);
} catch (err) {
results.push({
packages: [],
subprojects: [],
relationships: [],
issues: [
{
code: "extractor-failed",
message: `${extractor.name} extractor failed: ${
err instanceof Error ? err.message : String(err)
}`,
Expand All @@ -49,21 +56,3 @@ export async function extractSbom(

return mergeResults(results);
}

function extractorOptions(
extractor: Extractor,
options: ExtractSbomOptions,
): Record<string, unknown> {
const specific = options.extractorOptions?.[extractor.name] ?? {};
if (!options.ignore || options.ignore.length === 0 || !extractor.optionsSchema) {
return specific;
}

const defaults = extractor.optionsSchema.parse({}) as Record<string, unknown>;
const defaultIgnore = Array.isArray(defaults.ignore) ? defaults.ignore : [];
const specificIgnore = Array.isArray(specific.ignore) ? specific.ignore : [];
return {
...specific,
ignore: [...defaultIgnore, ...specificIgnore, ...options.ignore],
};
}
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.