@neocompose/cli 0.61.4 → 0.62.0
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 +16 -0
- package/dist/neo.mjs +950 -351
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/declarations-and-construction.md +6 -0
- package/skills/neocompose-cli/references/neoscript.md +9 -1
package/package.json
CHANGED
|
@@ -110,7 +110,7 @@ wrappers.
|
|
|
110
110
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<!-- reviewed-through-cli: 0.
|
|
113
|
+
<!-- reviewed-through-cli: 0.62.0 -->
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -59,6 +59,12 @@ Use ordinary `public`, `protected`, `private`, `static`, `virtual`, `abstract`,
|
|
|
59
59
|
`sealed`, and `override` semantics. A sealed class is an instantiable leaf:
|
|
60
60
|
it may extend another class but cannot be extended, cannot also be abstract,
|
|
61
61
|
and can only be sealed while it has no subclasses. Interfaces are non-generic.
|
|
62
|
+
A read-only override may narrow a class or interface contract to an assignable
|
|
63
|
+
class or derived interface, including a non-null value for a nullable contract.
|
|
64
|
+
Generated Unity C# keeps the inherited property type for Mono compatibility;
|
|
65
|
+
NeoScript sees the narrowed type. Stored implementations of an abstract getter
|
|
66
|
+
remain get-only in generated C#.
|
|
67
|
+
|
|
62
68
|
Do not put `@id` on inferred list/dictionary type entries or on derived
|
|
63
69
|
structural descriptors.
|
|
64
70
|
|
|
@@ -23,7 +23,7 @@ create `Scripts/<Class>/<Member>.neo` sidecars.
|
|
|
23
23
|
|
|
24
24
|
Declare a setter's value type explicitly with the canonical form
|
|
25
25
|
`set(int value) { ... }`. Project analysis, candidate materialization, and
|
|
26
|
-
focused script commands all use the same accessor extraction.
|
|
26
|
+
focused script commands all use the same accessor extraction. A property can have at most one getter and one setter. Concrete setters need a body (an empty body is a valid no-op); typed setters must use the property type and the parameter name `value`. Abstract and interface properties declare bodyless accessor contracts.
|
|
27
27
|
|
|
28
28
|
A body whose whole point is one expression may be written as an expression
|
|
29
29
|
body, `=> expr;`. It is pure sugar for the block form — same compiled
|
|
@@ -60,6 +60,12 @@ preserves the form you authored for members it did not otherwise rewrite, so
|
|
|
60
60
|
choosing longhand for a one-line getter is stable; a fresh `neo pull` writes
|
|
61
61
|
the canonical shorthand.
|
|
62
62
|
|
|
63
|
+
Properties require a getter implementation. A bodyless `{ get; }` contract
|
|
64
|
+
requires `abstract` on the member, even inside an abstract class, for example
|
|
65
|
+
`public abstract int Count { get; }`. For stored data, declare a field such as
|
|
66
|
+
`public int Count = 0;`. VSCode and the CLI diagnose a missing getter body at
|
|
67
|
+
the property name. Interface property contracts remain bodyless.
|
|
68
|
+
|
|
63
69
|
Declare a bodyless NeoScript contract with `abstract`, for example
|
|
64
70
|
`public abstract bool Equals(Item other);`. Reserve `native` for host-provided
|
|
65
71
|
functions; concrete NeoScript overrides inherit the abstract signature.
|
|
@@ -417,3 +423,5 @@ intent; do not assume an action body is writable merely because it compiled.
|
|
|
417
423
|
locally, like push. If another commit lands while it runs, the run is refused:
|
|
418
424
|
run it again. `neo loc` writes work the same way: a write refused because
|
|
419
425
|
another commit landed is run again.
|
|
426
|
+
|
|
427
|
+
VS Code rename follows override families and class constructors, resolves contextual enum options such as `.Success`, and keeps local-variable renames scoped to their declaration. Assigned IDs are not required for these refactorings.
|