@staff0rd/assist 0.122.0 → 0.123.0

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 CHANGED
@@ -112,6 +112,7 @@ After installation, the `assist` command will be available globally. You can als
112
112
  - `assist status-line` - Format Claude Code status line from JSON stdin
113
113
  - `assist dotnet inspect [sln]` - Run JetBrains inspections on changed .cs files to find dead code
114
114
  - `assist dotnet inspect [sln] --ref <ref>` - Inspect .cs files changed in a specific commit (default: HEAD)
115
+ - `assist dotnet inspect [sln] --base <ref>` - Inspect all .cs files changed since diverging from a base ref (e.g. `--base main` for a full PR)
115
116
  - `assist dotnet inspect [sln] --swea` - Enable solution-wide error analysis (slower but more thorough)
116
117
  - `assist dotnet check-locks` - Check if build output files are locked by a debugger
117
118
  - `assist dotnet deps <csproj>` - Show .csproj project dependency tree and solution membership
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.122.0",
9
+ version: "0.123.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -4819,8 +4819,15 @@ function findSolution() {
4819
4819
 
4820
4820
  // src/commands/dotnet/getChangedCsFiles.ts
4821
4821
  import { execSync as execSync20 } from "child_process";
4822
- function getChangedCsFiles(ref) {
4823
- const cmd = ref ? `git diff --name-only ${ref}~1 ${ref}` : "git diff --name-only HEAD";
4822
+ function getChangedCsFiles(ref, base) {
4823
+ let cmd;
4824
+ if (base) {
4825
+ cmd = `git diff --name-only ${base}...HEAD`;
4826
+ } else if (ref) {
4827
+ cmd = `git diff --name-only ${ref}~1 ${ref}`;
4828
+ } else {
4829
+ cmd = "git diff --name-only HEAD";
4830
+ }
4824
4831
  const output = execSync20(cmd, { encoding: "utf-8" }).trim();
4825
4832
  if (output === "") return [];
4826
4833
  return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
@@ -4908,7 +4915,7 @@ async function inspect(sln, options2) {
4908
4915
  const resolved = resolveSolution(sln);
4909
4916
  checkBuildLocks();
4910
4917
  assertJbInstalled();
4911
- const changedFiles = getChangedCsFiles(options2.ref);
4918
+ const changedFiles = getChangedCsFiles(options2.ref, options2.base);
4912
4919
  if (changedFiles.length === 0) {
4913
4920
  console.log(chalk55.green("No changed .cs files found"));
4914
4921
  return;
@@ -4932,7 +4939,10 @@ function registerDotnet(program2) {
4932
4939
  const cmd = program2.command("dotnet").description(".NET project utilities");
4933
4940
  cmd.command("inspect").description(
4934
4941
  "Run JetBrains inspections on changed .cs files to find dead code"
4935
- ).argument("[sln]", "Path to a .sln file (auto-detected if omitted)").option("--ref <ref>", "Git commit to inspect (default: working copy)").option("--all", "Show all issues, not just dead code").option("--swea", "Enable solution-wide error analysis").action(inspect);
4942
+ ).argument("[sln]", "Path to a .sln file (auto-detected if omitted)").option("--ref <ref>", "Git commit to inspect (default: working copy)").option(
4943
+ "--base <ref>",
4944
+ "Compare against a base ref using merge-base (e.g. main); inspects all PR changes"
4945
+ ).option("--all", "Show all issues, not just dead code").option("--swea", "Enable solution-wide error analysis").action(inspect);
4936
4946
  cmd.command("check-locks").description("Check if build output files are locked by a debugger").action(checkBuildLocksCommand);
4937
4947
  cmd.command("deps").description("Show .csproj project dependency tree and solution membership").argument("<csproj>", "Path to a .csproj file").option("--json", "Output as JSON").action(deps);
4938
4948
  cmd.command("in-sln").description("Check whether a .csproj is referenced by any .sln file").argument("<csproj>", "Path to a .csproj file").action(inSln);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.122.0",
3
+ "version": "0.123.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {