@neocompose/cli 0.6.4 → 0.6.5

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.5] - 2026-07-21
4
+
5
+ ### Fixed
6
+
7
+ - Persist newly authored lookup, dialogue lookup, and enum defaults as ID arrays,
8
+ including single-select lookup overrides with no base snapshot.
9
+
3
10
  ## [0.6.4] - 2026-07-20
4
11
 
5
12
  ### Added
package/dist/neo.mjs CHANGED
@@ -17265,7 +17265,9 @@ function collectDeclarationSymbols(uri, document, declaration, symbols, diagnost
17265
17265
  symbols,
17266
17266
  diagnostics,
17267
17267
  void 0,
17268
- declaration.kind === "global" ? declaration.type.name : void 0
17268
+ declaration.kind === "global" ? declaration.type.name : void 0,
17269
+ void 0,
17270
+ declaration.docsText
17269
17271
  );
17270
17272
  if (declaration.kind === "enum") {
17271
17273
  for (const option of declaration.options) {
@@ -17277,7 +17279,11 @@ function collectDeclarationSymbols(uri, document, declaration, symbols, diagnost
17277
17279
  option.annotations,
17278
17280
  declaration.name,
17279
17281
  symbols,
17280
- diagnostics
17282
+ diagnostics,
17283
+ void 0,
17284
+ void 0,
17285
+ void 0,
17286
+ option.docsText
17281
17287
  );
17282
17288
  }
17283
17289
  return;
@@ -17312,7 +17318,8 @@ function collectDeclarationSymbols(uri, document, declaration, symbols, diagnost
17312
17318
  diagnostics,
17313
17319
  void 0,
17314
17320
  member.type.name,
17315
- member.kind === "function"
17321
+ member.kind === "function",
17322
+ member.docsText
17316
17323
  );
17317
17324
  if (member.kind === "function") {
17318
17325
  for (const parameter3 of member.parameters) {
@@ -17480,7 +17487,7 @@ function collectFlowSymbols(uri, content, ownerName, scopeRange, symbols, diagno
17480
17487
  }
17481
17488
  }
17482
17489
  }
17483
- function collectSymbol(uri, kind, name, range2, annotations, ownerName, symbols, diagnostics, scopeRange, detail, callable) {
17490
+ function collectSymbol(uri, kind, name, range2, annotations, ownerName, symbols, diagnostics, scopeRange, detail, callable, documentation) {
17484
17491
  if (RESERVED_NAMES3.has(name)) {
17485
17492
  diagnostics.push({
17486
17493
  uri,
@@ -17512,6 +17519,7 @@ function collectSymbol(uri, kind, name, range2, annotations, ownerName, symbols,
17512
17519
  ...scopeRange ? { scopeRange } : {},
17513
17520
  ...detail ? { detail } : {},
17514
17521
  ...callable ? { callable } : {},
17522
+ ...documentation ? { documentation } : {},
17515
17523
  location: { uri, range: range2 }
17516
17524
  });
17517
17525
  }
@@ -20269,14 +20277,17 @@ function activeNamedArgument(text, position) {
20269
20277
  function projectHover(analysis, document, position) {
20270
20278
  const resolved = projectSymbolAt(analysis, document, position);
20271
20279
  if (!resolved) return null;
20272
- const owner = resolved.symbol.ownerName ? ` on ${resolved.symbol.ownerName}` : "";
20280
+ const owner = resolved.symbol.ownerName ? ` on \`${resolved.symbol.ownerName}\`` : "";
20281
+ const documentation = resolved.symbol.documentation ? `
20282
+
20283
+ ${resolved.symbol.documentation}` : "";
20273
20284
  const id2 = resolved.symbol.id ? `
20274
20285
 
20275
20286
  ID: \`${resolved.symbol.id}\`` : "\n\nPending ID";
20276
20287
  const detail = resolved.symbol.detail ? `: \`${resolved.symbol.detail}\`` : "";
20277
20288
  return {
20278
20289
  range: resolved.token.range,
20279
- markdown: `**${resolved.symbol.kind}** \`${resolved.symbol.name}\`${detail}${owner}${id2}`
20290
+ markdown: `**${resolved.symbol.kind}** \`${resolved.symbol.name}\`${detail}${owner}${documentation}${id2}`
20280
20291
  };
20281
20292
  }
20282
20293
  function projectDefinition(analysis, document, position) {
@@ -27841,6 +27852,8 @@ function memberCommon(context, ownerClass, declaration, id2, owner, base) {
27841
27852
  }
27842
27853
  function lowerFieldMember(context, ownerClass, declaration, id2, commonInput, base) {
27843
27854
  const storedStatic = declaration.modifiers.includes("static");
27855
+ const settings = annotation(declaration.annotations, "settings");
27856
+ const storesSelectionArray = context.enumIdsByName.has(declaration.type.name) || declaration.type.name === "Dialogue" || Boolean(settings && argument(settings, "collection"));
27844
27857
  const common = {
27845
27858
  ...commonInput,
27846
27859
  // A stored static initializer authors the live value binding, never an
@@ -27852,10 +27865,10 @@ function lowerFieldMember(context, ownerClass, declaration, id2, commonInput, ba
27852
27865
  declaration.type,
27853
27866
  ownerClass,
27854
27867
  base,
27855
- id2
27868
+ id2,
27869
+ storesSelectionArray
27856
27870
  )
27857
27871
  };
27858
- const settings = annotation(declaration.annotations, "settings");
27859
27872
  const name = declaration.type.name;
27860
27873
  if (name === "bool" || name === "null") {
27861
27874
  return { ...common, kind: name };
@@ -28179,7 +28192,7 @@ function lowerType(context, type, ownerClass) {
28179
28192
  if (type.name === "object") return { kind: "unknown", nullable };
28180
28193
  throw new Error(`Unknown Neo type ${JSON.stringify(type.name)}.`);
28181
28194
  }
28182
- function lowerDefault(context, initializer, type, ownerClass, base, memberId) {
28195
+ function lowerDefault(context, initializer, type, ownerClass, base, memberId, storesSelectionArray) {
28183
28196
  if (initializer === null) {
28184
28197
  return base?.defaultValue && "serverValueId" in base.defaultValue ? base.defaultValue : null;
28185
28198
  }
@@ -28188,10 +28201,7 @@ function lowerDefault(context, initializer, type, ownerClass, base, memberId) {
28188
28201
  }
28189
28202
  const expression = parseExpression(initializer);
28190
28203
  let value = lowerExpressionValue(context, expression, type, ownerClass);
28191
- if (value !== null && context.enumIdsByName.has(type.name) && !Array.isArray(value)) {
28192
- value = [value];
28193
- }
28194
- if ((base?.kind === "lookup" || base?.kind === "dialogueLookup") && !Array.isArray(value)) {
28204
+ if (value !== null && storesSelectionArray && !Array.isArray(value)) {
28195
28205
  value = [value];
28196
28206
  }
28197
28207
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",