squad-kit 0.6.0 → 0.6.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.1] — 2026-04-26
11
+
12
+ ### Bug fixes
13
+
14
+ - Azure DevOps console tracker search was failing on first load and on text
15
+ search with HTTP 400. WIQL queries now require the team project (`@project`)
16
+ in the WHERE clause; HTTP 400 responses include a clearer hint about
17
+ org/project or WIQL scoping.
18
+
10
19
  ## [0.6.0] — 2026-04-29
11
20
 
12
21
  ### Why this release
package/dist/cli.js CHANGED
@@ -1250,13 +1250,13 @@ var AzureDevOpsClient = class {
1250
1250
  const limit = Math.min(50, Math.max(1, opts?.limit ?? 25));
1251
1251
  const q = query.trim();
1252
1252
  let wiql;
1253
- if (/^\d+$/.test(q)) {
1254
- wiql = `SELECT [System.Id] FROM WorkItems WHERE [System.Id] = ${q}`;
1255
- } else if (q.length === 0) {
1256
- wiql = "SELECT [System.Id] FROM WorkItems ORDER BY [System.ChangedDate] DESC";
1253
+ if (q.length === 0) {
1254
+ wiql = "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project ORDER BY [System.ChangedDate] DESC";
1255
+ } else if (/^\d+$/.test(q)) {
1256
+ wiql = `SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project AND [System.Id] = ${q}`;
1257
1257
  } else {
1258
1258
  const esc = q.replace(/'/g, "''");
1259
- wiql = `SELECT [System.Id] FROM WorkItems WHERE [System.Title] CONTAINS STRING '${esc}' ORDER BY [System.ChangedDate] DESC`;
1259
+ wiql = `SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project AND [System.Title] CONTAINS '${esc}' ORDER BY [System.ChangedDate] DESC`;
1260
1260
  }
1261
1261
  const wiqlUrl = `${this.baseUrl}/wiql?api-version=${this.apiVersion}`;
1262
1262
  let wiqlRes;
@@ -1350,6 +1350,13 @@ var AzureDevOpsClient = class {
1350
1350
  status
1351
1351
  );
1352
1352
  }
1353
+ if (status === 400) {
1354
+ return new TrackerError(
1355
+ id === "search" ? `Azure DevOps rejected the search query (HTTP 400). This usually means the WIQL is not scoped to a team project, or the configured organization/project (${this.cfg.organization}/${this.cfg.project}) is wrong.` : `Azure DevOps rejected the request (HTTP 400).`,
1356
+ "other",
1357
+ status
1358
+ );
1359
+ }
1353
1360
  if (status === 429) {
1354
1361
  return new TrackerError(`Azure DevOps rate limit hit (HTTP 429). Wait a minute and retry.`, "rate-limited", status);
1355
1362
  }