@neocompose/cli 0.36.1 → 0.36.2

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.36.2] - 2026-08-19
4
+
5
+ ### Fixed
6
+
7
+ - Report invalid ordinary member initializers at their authored file and token
8
+ in the CLI and editor. C# numeric suffixes such as `0f` now explain that the
9
+ suffix should be removed instead of surfacing as `<project>:1:1` with an EOF
10
+ parser error.
11
+ - Accept `null` as the literal default of a nullable `NeoDelegate`, preventing
12
+ valid pending delegate members from failing prospective project,
13
+ initializer-materialization, and animation validation.
14
+
3
15
  ## [0.36.1] - 2026-08-19
4
16
 
5
17
  ### Fixed
package/dist/neo.mjs CHANGED
@@ -22973,7 +22973,15 @@ function validateDeclaration(uri, declaration, documentKind, environment, diagno
22973
22973
  scope.set(member.name, semanticType(member.type));
22974
22974
  }
22975
22975
  for (const member of declaration.members) {
22976
- validateMember(uri, member, documentKind, scope, environment, diagnostics);
22976
+ validateMember(
22977
+ uri,
22978
+ member,
22979
+ declaration.name,
22980
+ documentKind,
22981
+ scope,
22982
+ environment,
22983
+ diagnostics
22984
+ );
22977
22985
  }
22978
22986
  if (declaration.kind === "class") {
22979
22987
  validateRetiredParameterReads(uri, declaration, scope, diagnostics);
@@ -23243,7 +23251,7 @@ function slotPosition(start, pos) {
23243
23251
  }
23244
23252
  return { line: start.line + pos.line - 1, character: pos.column - 1 };
23245
23253
  }
23246
- function validateMember(uri, member, documentKind, ownerScope, environment, diagnostics) {
23254
+ function validateMember(uri, member, ownerName, documentKind, ownerScope, environment, diagnostics) {
23247
23255
  const memberType2 = semanticType(member.type);
23248
23256
  validateAnnotations(
23249
23257
  uri,
@@ -23285,7 +23293,11 @@ function validateMember(uri, member, documentKind, ownerScope, environment, diag
23285
23293
  environment,
23286
23294
  member.initializer.range,
23287
23295
  diagnostics,
23288
- anchorOf(member.initializer)
23296
+ anchorOf(member.initializer),
23297
+ {
23298
+ code: "invalid-project-member-initializer",
23299
+ label: `Member '${ownerName}.${member.name}' initializer`
23300
+ }
23289
23301
  );
23290
23302
  }
23291
23303
  if (documentKind === "flow" && member.flowInitializer?.body?.kind === "block") {
@@ -23789,7 +23801,7 @@ function settingsClassFields(name) {
23789
23801
  function anchorOf(source) {
23790
23802
  return { text: source.text, start: source.range.start };
23791
23803
  }
23792
- function validateExpressionText(uri, text, expected, scope, environment, range2, diagnostics, anchor) {
23804
+ function validateExpressionText(uri, text, expected, scope, environment, range2, diagnostics, anchor, syntaxDiagnostic) {
23793
23805
  try {
23794
23806
  validateExpression(
23795
23807
  parseExpression(text),
@@ -23803,8 +23815,38 @@ function validateExpressionText(uri, text, expected, scope, environment, range2,
23803
23815
  );
23804
23816
  } catch (error) {
23805
23817
  if (!(error instanceof CompileError)) throw error;
23818
+ if (syntaxDiagnostic !== void 0) {
23819
+ const errorRange = anchor === void 0 ? range2 : anchorSpan(
23820
+ anchor,
23821
+ { line: error.line, column: error.column },
23822
+ anchorOffset(anchor, error) < text.length ? 1 : 0
23823
+ );
23824
+ pushDiagnostic(
23825
+ diagnostics,
23826
+ uri,
23827
+ errorRange,
23828
+ syntaxDiagnostic.code,
23829
+ memberInitializerSyntaxMessage(syntaxDiagnostic.label, text, error)
23830
+ );
23831
+ return;
23832
+ }
23806
23833
  }
23807
23834
  }
23835
+ function memberInitializerSyntaxMessage(label, text, error) {
23836
+ const anchor = {
23837
+ text,
23838
+ start: { line: 0, character: 0 }
23839
+ };
23840
+ const offset = anchorOffset(anchor, error);
23841
+ const suffix = text[offset];
23842
+ const previous = text[offset - 1];
23843
+ const next = text[offset + 1];
23844
+ if (suffix !== void 0 && previous !== void 0 && /[fFdDmM]/u.test(suffix) && /[0-9]/u.test(previous) && (next === void 0 || !/[A-Za-z0-9_]/u.test(next))) {
23845
+ return `${label} uses unsupported C# numeric suffix '${suffix}'. NeoScript numeric literals do not use suffixes; remove '${suffix}'.`;
23846
+ }
23847
+ const detail = error.message.replace(/^\d+:\d+:\s*/u, "");
23848
+ return `${label} could not be parsed: ${detail}`;
23849
+ }
23808
23850
  function validateFunctionBody(uri, text, returnType, scope, environment, range2, diagnostics) {
23809
23851
  try {
23810
23852
  const source = stripOuterBraces2(text);
@@ -44538,6 +44580,7 @@ function isMemberDelegateBase(value) {
44538
44580
  if (defaultValue === void 0 || defaultValue === null) return true;
44539
44581
  if (!isMemberValueBase(defaultValue)) return false;
44540
44582
  if (isInitValueContent(defaultValue)) return true;
44583
+ if (defaultValue.value === null) return v.required === false;
44541
44584
  return isNSDelegateValue(defaultValue.value);
44542
44585
  }
44543
44586
  function nsActionListenerIdentity(listener) {
@@ -113831,7 +113874,7 @@ var init_registry2 = __esm({
113831
113874
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
113832
113875
  formatVersion: 3,
113833
113876
  contractVersion: "3.14",
113834
- cliVersion: "0.36.1",
113877
+ cliVersion: "0.36.2",
113835
113878
  projectFileUploadBatchSize: 32,
113836
113879
  documentRecords: {
113837
113880
  member: {
@@ -120433,7 +120476,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
120433
120476
  async function main() {
120434
120477
  const args = parseArgs(process.argv.slice(2));
120435
120478
  if (args.command === "--version") {
120436
- console.log("0.36.1");
120479
+ console.log("0.36.2");
120437
120480
  return;
120438
120481
  }
120439
120482
  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.1",
3
+ "version": "0.36.2",
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.1 -->
12
+ <!-- reviewed-through-cli: 0.36.2 -->
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.1 -->
86
+ <!-- reviewed-through-cli: 0.36.2 -->
87
87
  ```
88
88
 
89
89
  The quoted version above is checked too, so this instruction cannot go stale
@@ -154,6 +154,10 @@ components must be numeric literals. When a computed list or dictionary entry
154
154
  carries an authored `@id`, parenthesize the expression — `@id("row")
155
155
  (A.B / A.C)` — so the annotation names the row rather than its left operand.
156
156
 
157
+ Numeric literals do not use C# suffixes: write `0` or `0.5`, not `0f` or
158
+ `0.5f`. The declared/contextual type determines whether a literal is stored as
159
+ an int, float, or decimal.
160
+
157
161
  A direct field or property read is computed too, whether it is local,
158
162
  qualified static, or reached through a stable root path. For example,
159
163
  `protected int Slots = FeatureFlags.StartInventorySize;` evaluates the current