@neocompose/cli 0.84.2 → 0.84.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 +27 -0
- package/dist/neo-runtime.mjs +798 -324
- package/dist/test-worker.mjs +330 -96
- 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/commands-and-sync.md +3 -0
- package/skills/neocompose-cli/references/declarations-and-construction.md +4 -0
- package/skills/neocompose-cli/references/neoscript.md +14 -3
- package/skills/neocompose-cli/references/values-identities-and-references.md +27 -0
package/package.json
CHANGED
|
@@ -129,7 +129,7 @@ wrappers.
|
|
|
129
129
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
130
130
|
|
|
131
131
|
```html
|
|
132
|
-
<!-- reviewed-through-cli: 0.84.
|
|
132
|
+
<!-- reviewed-through-cli: 0.84.4 -->
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -335,6 +335,9 @@ Generated animation clip targets and reference lookup factories retain construct
|
|
|
335
335
|
generic arguments, including supported forwarded bindings. Clip getters use the
|
|
336
336
|
declared target type when the owner is a derived class. Export reports an error
|
|
337
337
|
when a clip target does not match the owner or one of its constructed base types.
|
|
338
|
+
Inherited collection interface getters preserve supported detached temporaries.
|
|
339
|
+
Constructed entries such as `Frame<T>` use the interface's generic argument
|
|
340
|
+
family for both their collection type and value converters.
|
|
338
341
|
New instances that reuse existing member-localized text retain its shared ID
|
|
339
342
|
and translations in the export.
|
|
340
343
|
|
|
@@ -425,6 +425,10 @@ value-level target metadata.
|
|
|
425
425
|
|
|
426
426
|
## Computed initializers and declared constructors
|
|
427
427
|
|
|
428
|
+
Inherited member initializers read parameters from the constructor that declared
|
|
429
|
+
them, including when export materialization clones their bodies. A storage-only
|
|
430
|
+
override keeps that original constructor scope.
|
|
431
|
+
|
|
428
432
|
Use an expression initializer when a member default must be evaluated during
|
|
429
433
|
construction rather than stored as a closed literal. It is replayed for omitted
|
|
430
434
|
members in push, web, and SDK contexts. A stored override remains pinned until
|
|
@@ -224,7 +224,8 @@ unconstrained generic `T` compares by value.
|
|
|
224
224
|
Calling `Equals(other)` on a non-null generic value dynamically uses the
|
|
225
225
|
runtime Class's one-argument `Equals` Function or NSFunction when it returns
|
|
226
226
|
`bool`, including the effective override. Values without that member fall back
|
|
227
|
-
to value equality.
|
|
227
|
+
to value equality. For local sets, that fallback compares their current entries
|
|
228
|
+
in insertion order, regardless of prior reads or mutations.
|
|
228
229
|
|
|
229
230
|
Object initializers are available in method bodies and `.spec.neo` tests:
|
|
230
231
|
|
|
@@ -387,6 +388,11 @@ may be null. The receiver stays unchanged.
|
|
|
387
388
|
return "banana".Replace("a", "o"); // "bonono"
|
|
388
389
|
```
|
|
389
390
|
|
|
391
|
+
Integer inputs assigned to `float` round to float32. This also applies to
|
|
392
|
+
function arguments and returns, collection entries, and `List.Repeat` with a
|
|
393
|
+
float entry type. `Contains` and `IndexOf` on float collections also convert
|
|
394
|
+
integer search arguments. Nullable assignments preserve `null`.
|
|
395
|
+
|
|
390
396
|
## Collection builtins
|
|
391
397
|
|
|
392
398
|
Lists expose their size as either `items.Count` or `items.Count()`. Use
|
|
@@ -399,8 +405,9 @@ Use `Any()` or `Any((item) => predicate)` to check for a match, and
|
|
|
399
405
|
`All((item) => predicate)` to check every entry. Both short-circuit; an empty
|
|
400
406
|
collection has `Any() == false` and `All(...) == true`.
|
|
401
407
|
|
|
402
|
-
`Last`, `LastOrDefault`, `Single`, and `SingleOrDefault` accept zero arguments
|
|
403
|
-
or one predicate. `Last`
|
|
408
|
+
`First`, `FirstOrDefault`, `Last`, `LastOrDefault`, `Single`, and `SingleOrDefault` accept zero arguments
|
|
409
|
+
or one predicate. `First` and `Last` throw when no entry matches. Enum sets
|
|
410
|
+
return enum values, including when a predicate selects the entry. `Single` throws unless
|
|
404
411
|
exactly one matches; `SingleOrDefault` still throws for multiple matches.
|
|
405
412
|
The `OrDefault` forms return nullable entries and use `null` for no match.
|
|
406
413
|
|
|
@@ -711,3 +718,7 @@ and may appear in any order. Use the existing nested positional override for a
|
|
|
711
718
|
virtual owner; changing its listeners alone must not add a value override.
|
|
712
719
|
Omitting a field inherits its listeners. An empty array suppresses inherited
|
|
713
720
|
listeners and disappears when there is no inherited wiring to suppress.
|
|
721
|
+
|
|
722
|
+
Decimal collection membership compares numeric values: `1.0` and `1.00` are
|
|
723
|
+
equal for `ToSet`, `Contains`, `IndexOf`, `Add`, and `Remove`. Decimal scale
|
|
724
|
+
is retained for display; string entries such as `"1.0"` and `"1.00"` stay distinct.
|
|
@@ -190,6 +190,13 @@ EligibleIngredients = root.Assets.Crafting.FurnaceRecipes
|
|
|
190
190
|
.ToSet()
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
+
`Box<Reference<Item>>` keeps its reference storage type through push and pull,
|
|
194
|
+
including explicit `new Box<Reference<Item>>()` calls. Its `Item` targets stay
|
|
195
|
+
shared; reading a class reference still produces the class value. A derived
|
|
196
|
+
construction in a base-typed slot retains reference bindings forwarded through
|
|
197
|
+
the inheritance chain, such as `Base<Reference<Item>>` holding
|
|
198
|
+
`new Derived<Reference<Item>>()`.
|
|
199
|
+
|
|
193
200
|
Writing `Reference(recipe.Ingredient)` inside the callback is also valid.
|
|
194
201
|
`Reference(value)` preserves an evaluated class value and its identity; it does
|
|
195
202
|
not clone it or turn it into a separate wrapper object. An optional generic
|
|
@@ -254,6 +261,17 @@ and declarations created in the same push. Preparation materializes the target
|
|
|
254
261
|
collection and its required ancestor rows together, preserving the virtual
|
|
255
262
|
identities. No preliminary push or manual value ID is needed.
|
|
256
263
|
|
|
264
|
+
An object Root.neo writes is init-built when its class has an `init` block. A
|
|
265
|
+
declaration binding may name a member inside it, and the push stores that
|
|
266
|
+
member's row so the binding has a target. A reference an `init` block or
|
|
267
|
+
constructor captures, such as `new Rule(Reference(this.Weather))`, stores its
|
|
268
|
+
target's ID and keeps the target's row. Status refuses two forms, because their
|
|
269
|
+
target has no row to check until the push stores it: a value row's reference to
|
|
270
|
+
a member of an init-built object (bind it from a declaration instead), and a
|
|
271
|
+
binding to a class or list an `init` block builds. A project an older CLI pushed
|
|
272
|
+
with such a captured reference stored it without its target; push once to
|
|
273
|
+
repair it.
|
|
274
|
+
|
|
257
275
|
## Defaults and localization
|
|
258
276
|
|
|
259
277
|
A class member whose default constructs its declared type emits a contextual
|
|
@@ -265,6 +283,10 @@ that instance. Leaving the emitted construction unchanged creates no redundant
|
|
|
265
283
|
value rows. A nullable member with no default remains bare; an explicit null
|
|
266
284
|
default emits `= null`.
|
|
267
285
|
|
|
286
|
+
Changing a construction to another overload or shared argument rebuilds the
|
|
287
|
+
instance even when the argument values compare equal. Owned inline arguments
|
|
288
|
+
still compare by contents; unchanged shared arguments keep their identities.
|
|
289
|
+
|
|
268
290
|
Spelling an unchanged child default, such as `FPS = 8`, stays a no-op after
|
|
269
291
|
push even when sibling fields own stored rows. Adding a different child default
|
|
270
292
|
preserves those siblings' row identities; it does not transfer their ownership.
|
|
@@ -388,3 +410,8 @@ is an error; remove the declaration to request deletion.
|
|
|
388
410
|
New schema getters referenced by NeoFlow interpolation need no `@id`. Export and
|
|
389
411
|
`neo dev` assign the same identity to the declaration and its references, including
|
|
390
412
|
inherited getters. Repeated exports and the next push reuse the export identity ledger.
|
|
413
|
+
|
|
414
|
+
Dictionary string keys are data. An entry named `"Id"` reads its value through
|
|
415
|
+
`dictionary["Id"]`; class `.Id` continues to return the class instance identity.
|
|
416
|
+
|
|
417
|
+
You can remove a constructor and replace every call to it in the same edit. Push prepares the new calls together with the schema change and removes argument rows owned by the old constructions.
|