@neocompose/cli 0.36.6 → 0.36.7

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
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.36.7] - 2026-08-20
4
+
5
+ ### Fixed
6
+
7
+ - Keep braces and parentheses written inside string literals from changing the
8
+ extracted block getter/setter boundary. Project compilation, CLI checks, and
9
+ editor diagnostics now compile the complete authored accessor body.
10
+
3
11
  ## [0.36.6] - 2026-08-20
4
12
 
5
13
  ### Fixed
package/dist/neo.mjs CHANGED
@@ -25236,29 +25236,31 @@ function findProjectSourceAccessorBody(source, keyword, containingRange) {
25236
25236
  const body = source.slice(bodyStart, bodyEnd);
25237
25237
  const local = new SourceText(body);
25238
25238
  const tokens = lex2(body);
25239
- if (tokens[0]?.text === "=>") {
25239
+ if (isToken(tokens[0], "op", "=>")) {
25240
25240
  if (keyword !== "get") return null;
25241
25241
  return expressionAccessor(source, full, local, tokens, bodyStart, 1);
25242
25242
  }
25243
25243
  let depth = 0;
25244
25244
  for (let index = 0; index < tokens.length; index++) {
25245
25245
  const token = tokens[index];
25246
- if (token.text === "{") {
25246
+ if (isToken(token, "punct", "{")) {
25247
25247
  depth++;
25248
25248
  continue;
25249
25249
  }
25250
- if (token.text === "}") {
25250
+ if (isToken(token, "punct", "}")) {
25251
25251
  depth--;
25252
25252
  continue;
25253
25253
  }
25254
- if (depth !== 1 || token.text !== keyword) continue;
25254
+ if (depth !== 1 || token.kind !== "ident" && token.kind !== "keyword" || token.text !== keyword) {
25255
+ continue;
25256
+ }
25255
25257
  let openIndex = index + 1;
25256
- if (tokens[openIndex]?.text === "(") {
25258
+ if (isToken(tokens[openIndex], "punct", "(")) {
25257
25259
  let parameterDepth = 1;
25258
25260
  for (let cursor = openIndex + 1; cursor < tokens.length; cursor++) {
25259
25261
  const candidate = tokens[cursor];
25260
- if (candidate.text === "(") parameterDepth++;
25261
- if (candidate.text === ")") parameterDepth--;
25262
+ if (isToken(candidate, "punct", "(")) parameterDepth++;
25263
+ if (isToken(candidate, "punct", ")")) parameterDepth--;
25262
25264
  if (parameterDepth !== 0) continue;
25263
25265
  openIndex = cursor + 1;
25264
25266
  break;
@@ -25266,7 +25268,7 @@ function findProjectSourceAccessorBody(source, keyword, containingRange) {
25266
25268
  if (parameterDepth !== 0) return null;
25267
25269
  }
25268
25270
  const open = tokens[openIndex];
25269
- if (open?.text === "=>") {
25271
+ if (isToken(open, "op", "=>")) {
25270
25272
  return expressionAccessor(
25271
25273
  source,
25272
25274
  full,
@@ -25276,12 +25278,12 @@ function findProjectSourceAccessorBody(source, keyword, containingRange) {
25276
25278
  openIndex + 1
25277
25279
  );
25278
25280
  }
25279
- if (open?.text !== "{") return null;
25281
+ if (open === void 0 || !isToken(open, "punct", "{")) return null;
25280
25282
  let accessorDepth = 1;
25281
25283
  for (let cursor = openIndex + 1; cursor < tokens.length; cursor++) {
25282
25284
  const candidate = tokens[cursor];
25283
- if (candidate.text === "{") accessorDepth++;
25284
- if (candidate.text === "}") accessorDepth--;
25285
+ if (isToken(candidate, "punct", "{")) accessorDepth++;
25286
+ if (isToken(candidate, "punct", "}")) accessorDepth--;
25285
25287
  if (accessorDepth !== 0) continue;
25286
25288
  const start = bodyStart + sourceOffset2(local, open.pos) + 1;
25287
25289
  const end = bodyStart + sourceOffset2(local, candidate.pos);
@@ -25295,6 +25297,9 @@ function findProjectSourceAccessorBody(source, keyword, containingRange) {
25295
25297
  }
25296
25298
  return null;
25297
25299
  }
25300
+ function isToken(token, kind, text) {
25301
+ return token?.kind === kind && token.text === text;
25302
+ }
25298
25303
  function expressionAccessor(source, full, local, tokens, bodyStart, firstIndex) {
25299
25304
  const first = tokens[firstIndex];
25300
25305
  if (!first) return null;
@@ -114152,7 +114157,7 @@ var init_registry2 = __esm({
114152
114157
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
114153
114158
  formatVersion: 3,
114154
114159
  contractVersion: "3.14",
114155
- cliVersion: "0.36.6",
114160
+ cliVersion: "0.36.7",
114156
114161
  projectFileUploadBatchSize: 32,
114157
114162
  documentRecords: {
114158
114163
  member: {
@@ -120754,7 +120759,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
120754
120759
  async function main() {
120755
120760
  const args = parseArgs(process.argv.slice(2));
120756
120761
  if (args.command === "--version") {
120757
- console.log("0.36.6");
120762
+ console.log("0.36.7");
120758
120763
  return;
120759
120764
  }
120760
120765
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.36.6",
3
+ "version": "0.36.7",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ description: >-
9
9
  `@neocompose/cli` or `node cli/bin/neo.mjs` in the neo-compose repository.
10
10
  ---
11
11
 
12
- <!-- reviewed-through-cli: 0.36.6 -->
12
+ <!-- reviewed-through-cli: 0.36.7 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -83,7 +83,7 @@ wrappers.
83
83
  The marker near the top of `SKILL.md` must exactly match the package version:
84
84
 
85
85
  ```html
86
- <!-- reviewed-through-cli: 0.36.6 -->
86
+ <!-- reviewed-through-cli: 0.36.7 -->
87
87
  ```
88
88
 
89
89
  The quoted version above is checked too, so this instruction cannot go stale