@neocompose/cli 0.84.0 → 0.84.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 +17 -0
- package/dist/neo-runtime.mjs +812 -514
- package/dist/test-worker.mjs +3485 -3337
- 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 +9 -0
- package/skills/neocompose-cli/references/neoscript.md +21 -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.2 -->
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -515,6 +515,15 @@ Do not default parameters of deferred functions, delegates, actions,
|
|
|
515
515
|
closures, or overrides. Enum defaults store the option id, so renaming the
|
|
516
516
|
option changes the emitted `.Option` spelling without a record change.
|
|
517
517
|
|
|
518
|
+
Editing a stored object's constructor arguments rebuilds it under the same
|
|
519
|
+
identity. Initializers that read that object, including collection projections,
|
|
520
|
+
wait for its replacement before evaluating its members.
|
|
521
|
+
|
|
522
|
+
Stored objects created with an implicit constructor may have required fields
|
|
523
|
+
settled in their object body. Keep that body when editing initializer behavior
|
|
524
|
+
or adding a parameterless constructor; an empty stored argument list does not
|
|
525
|
+
require inventing constructor arguments.
|
|
526
|
+
|
|
518
527
|
## Required constructors and settlement
|
|
519
528
|
|
|
520
529
|
Put one required constructor on the class header when the entire class body
|
|
@@ -24,6 +24,15 @@ Keep computed getters, setters, functions, dialogue logic, group logic, and
|
|
|
24
24
|
constructors inline in their owning `.neo` or `.neoflow` declaration. Do not
|
|
25
25
|
create `Scripts/<Class>/<Member>.neo` sidecars.
|
|
26
26
|
|
|
27
|
+
Explicit constructions such as `new MissingClass(5)` require a declared type,
|
|
28
|
+
including inside stored object initializers, constructor arguments, and collections.
|
|
29
|
+
The editor reports an unresolved class at its type name and refreshes the diagnostic
|
|
30
|
+
when the declaration changes. Contextual `new(...)` still uses the expected type.
|
|
31
|
+
|
|
32
|
+
If resolving a stored reference encounters an invalid initializer elsewhere,
|
|
33
|
+
the diagnostic points to that initializer's authored file and position. Fix the
|
|
34
|
+
reported initializer; a valid downstream `Reference(...)` is not the error site.
|
|
35
|
+
|
|
27
36
|
Declare a setter's value type explicitly with the canonical form
|
|
28
37
|
`set(int value) { ... }`. Project analysis, candidate materialization, and
|
|
29
38
|
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.
|
|
@@ -103,6 +112,18 @@ A generic receiver may call methods from its class or interface constraint,
|
|
|
103
112
|
including void calls used as statements. Generic arguments substitute through
|
|
104
113
|
the constraint; nullable receivers still require narrowing or null handling.
|
|
105
114
|
|
|
115
|
+
Runtime `is` tests on generic values check whether the bound can overlap the
|
|
116
|
+
tested type. A class bound need not implement an interface itself when a
|
|
117
|
+
subclass can implement it. A successful pattern binding exposes that interface's
|
|
118
|
+
members, including after `if (item.Data is not IReceiver receiver) continue;`.
|
|
119
|
+
Sealed classes without the interface and unrelated class bounds remain disjoint.
|
|
120
|
+
|
|
121
|
+
An interface guard also narrows the original receiver without a pattern binding.
|
|
122
|
+
After `if (item is not IReceiver) continue;`, `item` exposes both its declared
|
|
123
|
+
class members and `IReceiver` members. The same applies to guards that return,
|
|
124
|
+
throw, or break. Reassignment clears the proof, and paths that did not pass the
|
|
125
|
+
guard cannot use it.
|
|
126
|
+
|
|
106
127
|
Functions, natives and interface functions can declare their own type
|
|
107
128
|
parameters after the name, each with an optional constraint and default:
|
|
108
129
|
|