@neocompose/cli 0.72.1 → 0.72.4
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 +15 -0
- package/dist/neo.mjs +463 -233
- package/dist/test-worker.mjs +138 -131
- 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 +7 -1
- package/skills/neocompose-cli/references/neoscript.md +11 -1
- package/skills/neocompose-cli/references/values-identities-and-references.md +7 -1
package/package.json
CHANGED
|
@@ -118,7 +118,7 @@ wrappers.
|
|
|
118
118
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
119
119
|
|
|
120
120
|
```html
|
|
121
|
-
<!-- reviewed-through-cli: 0.72.
|
|
121
|
+
<!-- reviewed-through-cli: 0.72.4 -->
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -176,7 +176,13 @@ indexes only on the original List member. Overrides inherit its indexes, and
|
|
|
176
176
|
List getter.
|
|
177
177
|
|
|
178
178
|
Use `.EnumCase` only when context fixes one enum type; otherwise write
|
|
179
|
-
`EnumType.Case`.
|
|
179
|
+
`EnumType.Case`. Constructor parameters supply this context for positional
|
|
180
|
+
and named arguments, including substituted generic parameter types. Defaults
|
|
181
|
+
and settings must be statically analyzable.
|
|
182
|
+
|
|
183
|
+
An explicit construction must be assignable to its receiving type. For example,
|
|
184
|
+
`List<Base>` accepts `new Derived()` when `Derived` inherits `Base`, but rejects
|
|
185
|
+
an unrelated class at `new`. Generic arguments must also be compatible.
|
|
180
186
|
|
|
181
187
|
## Member and relation rules
|
|
182
188
|
|
|
@@ -99,6 +99,10 @@ this.Items.Insert(0, item);
|
|
|
99
99
|
this.Items.Remove(item);
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
+
A generic receiver may call methods from its class or interface constraint,
|
|
103
|
+
including void calls used as statements. Generic arguments substitute through
|
|
104
|
+
the constraint; nullable receivers still require narrowing or null handling.
|
|
105
|
+
|
|
102
106
|
Prefer `--json` for automation.
|
|
103
107
|
|
|
104
108
|
`neo script check --all` reconstructs the prospective project entirely from
|
|
@@ -174,7 +178,13 @@ or narrowing guard before the next access.
|
|
|
174
178
|
Inside an instance body, `Member` and `this.Member` share null and type-check
|
|
175
179
|
narrowing. A local or parameter named `Member` shadows the implicit member;
|
|
176
180
|
`this.Member` still names the instance field. Reassigning a narrowed path to a
|
|
177
|
-
nullable value clears its non-null fact.
|
|
181
|
+
nullable value clears its non-null fact and facts about its descendants. Writes to
|
|
182
|
+
unrelated members preserve existing guards, including inside loops. Earlier
|
|
183
|
+
conditions being false also narrow receivers in later `else if` conditions.
|
|
184
|
+
|
|
185
|
+
A nullable value coalesced with a non-null fallback produces a non-null result,
|
|
186
|
+
including in constructor arguments: `new Sprite(item.Sprite ?? SpriteInfo.Empty)`.
|
|
187
|
+
A nullable fallback keeps the result nullable when the left operand can be null.
|
|
178
188
|
|
|
179
189
|
Treat lookup-return values with the same nullable narrowing rules.
|
|
180
190
|
|
|
@@ -57,7 +57,10 @@ keys as quoted IDs when their option has been deleted.
|
|
|
57
57
|
|
|
58
58
|
## Identity rules
|
|
59
59
|
|
|
60
|
-
Preserve every existing ID through rename, reorder, and file moves.
|
|
60
|
+
Preserve every existing ID through rename, reorder, and file moves. Renaming a
|
|
61
|
+
schema member while keeping its ID preserves its owned value graph. Update
|
|
62
|
+
initializer keys to the new name and retain existing child IDs, including when
|
|
63
|
+
editing those children in the same change. A copy
|
|
61
64
|
must get a new ID. A stored nested class value may keep its UUID-v4 when moved
|
|
62
65
|
to an empty, compatible class field on another existing parent. Remove its
|
|
63
66
|
old owning declaration in the same push. Both fields must declare the same
|
|
@@ -84,6 +87,9 @@ This names the initializer row. It does not create a stored global. The inline
|
|
|
84
87
|
`Quest HardAsStone = @id("...") new Quest();` spelling is also accepted, and
|
|
85
88
|
formatting moves its ID above the declaration. Do not put an ID in both places.
|
|
86
89
|
|
|
90
|
+
A local initializer such as `Delivery DeliveryRow = new()` retains `Delivery`
|
|
91
|
+
when consumed by a base-class member. Aliases retain that same concrete type.
|
|
92
|
+
|
|
87
93
|
Nested class/list rows remain independently addressable and keep inline IDs:
|
|
88
94
|
|
|
89
95
|
```neo
|