musubix2 0.5.65 → 0.5.66

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.
@@ -1 +1 @@
1
- {"generator":"musubix2","version":"0.5.65","timestamp":"2026-07-10T21:25:23.611Z"}
1
+ {"generator":"musubix2","version":"0.5.66","timestamp":"2026-07-10T21:37:23.547Z"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0",
3
- "generatedAt": "2026-07-10T21:25:23.642Z",
3
+ "generatedAt": "2026-07-10T21:37:23.583Z",
4
4
  "entries": [
5
5
  {
6
6
  "platform": "copilot",
package/dist/cli.js CHANGED
@@ -8951,7 +8951,7 @@ function blankNonCode(code, hashComments) {
8951
8951
  i = j;
8952
8952
  continue;
8953
8953
  }
8954
- if (c === '"' || c === "'" || c === "`") {
8954
+ if (c === '"' || c === "'") {
8955
8955
  const q = c;
8956
8956
  let j = i + 1;
8957
8957
  while (j < n && code[j] !== q) {
@@ -8964,6 +8964,35 @@ function blankNonCode(code, hashComments) {
8964
8964
  i = j + 1;
8965
8965
  continue;
8966
8966
  }
8967
+ if (c === "`") {
8968
+ let j = i + 1;
8969
+ let litStart = j;
8970
+ while (j < n && code[j] !== "`") {
8971
+ if (code[j] === "\\") {
8972
+ j += 2;
8973
+ continue;
8974
+ }
8975
+ if (code[j] === "$" && code[j + 1] === "{") {
8976
+ blank(litStart, j);
8977
+ j += 2;
8978
+ let depth = 1;
8979
+ while (j < n && depth > 0) {
8980
+ if (code[j] === "{") {
8981
+ depth++;
8982
+ } else if (code[j] === "}") {
8983
+ depth--;
8984
+ }
8985
+ j++;
8986
+ }
8987
+ litStart = j;
8988
+ continue;
8989
+ }
8990
+ j++;
8991
+ }
8992
+ blank(litStart, Math.min(j, n));
8993
+ i = j + 1;
8994
+ continue;
8995
+ }
8967
8996
  i++;
8968
8997
  }
8969
8998
  return out.join("");
@@ -9370,13 +9399,14 @@ var init_dist5 = __esm({
9370
9399
  /\bf['"]/.test(rhs) || // f-string
9371
9400
  /['"]\s*%\s*[\w([]/.test(rhs) || // "…" % x
9372
9401
  /['"]\s*\+\s*[$\w]|[$\w.\])]\s*\+\s*['"]/.test(rhs) || // string + var / var + string
9402
+ /`[^`]*\$\{/.test(rhs) || // JS/TS template literal: `… ${x} …`
9373
9403
  /['"]\s*\.\s*\$\w/.test(rhs);
9374
9404
  }
9375
9405
  analyze(code, filePath) {
9376
9406
  const hashComments = /\.(py|rb|sh|php|pl|yaml|yml|r)$/i.test(filePath);
9377
9407
  const lines = blankNonCode(code, hashComments).split("\n");
9378
9408
  const orig = code.split("\n");
9379
- const assignRe = /^\s*(\$?[A-Za-z_]\w*)\s*=(?!=)\s*(.+)$/;
9409
+ const assignRe = /^\s*(?:(?:const|let|var)\s+)?(\$?[A-Za-z_]\w*)\s*(?::[^=]+)?=(?!=)\s*(.+)$/;
9380
9410
  const tainted = /* @__PURE__ */ new Map();
9381
9411
  for (let pass = 0; pass < 4; pass++) {
9382
9412
  let changed = false;
package/dist/index.js CHANGED
@@ -8951,7 +8951,7 @@ function blankNonCode(code, hashComments) {
8951
8951
  i = j;
8952
8952
  continue;
8953
8953
  }
8954
- if (c === '"' || c === "'" || c === "`") {
8954
+ if (c === '"' || c === "'") {
8955
8955
  const q = c;
8956
8956
  let j = i + 1;
8957
8957
  while (j < n && code[j] !== q) {
@@ -8964,6 +8964,35 @@ function blankNonCode(code, hashComments) {
8964
8964
  i = j + 1;
8965
8965
  continue;
8966
8966
  }
8967
+ if (c === "`") {
8968
+ let j = i + 1;
8969
+ let litStart = j;
8970
+ while (j < n && code[j] !== "`") {
8971
+ if (code[j] === "\\") {
8972
+ j += 2;
8973
+ continue;
8974
+ }
8975
+ if (code[j] === "$" && code[j + 1] === "{") {
8976
+ blank(litStart, j);
8977
+ j += 2;
8978
+ let depth = 1;
8979
+ while (j < n && depth > 0) {
8980
+ if (code[j] === "{") {
8981
+ depth++;
8982
+ } else if (code[j] === "}") {
8983
+ depth--;
8984
+ }
8985
+ j++;
8986
+ }
8987
+ litStart = j;
8988
+ continue;
8989
+ }
8990
+ j++;
8991
+ }
8992
+ blank(litStart, Math.min(j, n));
8993
+ i = j + 1;
8994
+ continue;
8995
+ }
8967
8996
  i++;
8968
8997
  }
8969
8998
  return out.join("");
@@ -9370,13 +9399,14 @@ var init_dist5 = __esm({
9370
9399
  /\bf['"]/.test(rhs) || // f-string
9371
9400
  /['"]\s*%\s*[\w([]/.test(rhs) || // "…" % x
9372
9401
  /['"]\s*\+\s*[$\w]|[$\w.\])]\s*\+\s*['"]/.test(rhs) || // string + var / var + string
9402
+ /`[^`]*\$\{/.test(rhs) || // JS/TS template literal: `… ${x} …`
9373
9403
  /['"]\s*\.\s*\$\w/.test(rhs);
9374
9404
  }
9375
9405
  analyze(code, filePath) {
9376
9406
  const hashComments = /\.(py|rb|sh|php|pl|yaml|yml|r)$/i.test(filePath);
9377
9407
  const lines = blankNonCode(code, hashComments).split("\n");
9378
9408
  const orig = code.split("\n");
9379
- const assignRe = /^\s*(\$?[A-Za-z_]\w*)\s*=(?!=)\s*(.+)$/;
9409
+ const assignRe = /^\s*(?:(?:const|let|var)\s+)?(\$?[A-Za-z_]\w*)\s*(?::[^=]+)?=(?!=)\s*(.+)$/;
9380
9410
  const tainted = /* @__PURE__ */ new Map();
9381
9411
  for (let pass = 0; pass < 4; pass++) {
9382
9412
  let changed = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musubix2",
3
- "version": "0.5.65",
3
+ "version": "0.5.66",
4
4
  "description": "MUSUBIX2 — Specification Driven Development System",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",