@neocompose/cli 0.76.2 → 0.76.3
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 +19 -0
- package/dist/neo.mjs +1067 -413
- package/dist/test-worker.mjs +1368 -906
- 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 +16 -1
- package/skills/neocompose-cli/references/neoscript.md +20 -1
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.76.
|
|
132
|
+
<!-- reviewed-through-cli: 0.76.3 -->
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -202,12 +202,27 @@ List getter.
|
|
|
202
202
|
Use `.EnumCase` only when context fixes one enum type; otherwise write
|
|
203
203
|
`EnumType.Case`. Constructor parameters supply this context for positional
|
|
204
204
|
and named arguments, including substituted generic parameter types. Defaults
|
|
205
|
-
and settings must be statically analyzable.
|
|
205
|
+
and settings must be statically analyzable. An integer is not an enum option.
|
|
206
|
+
Instance fields, static fields, and local value definitions report incompatible
|
|
207
|
+
enum initializers at the authored expression before value lowering. Extracting
|
|
208
|
+
a list or dictionary into a local preserves element validation. Errors point
|
|
209
|
+
to the entry in the local definition, including missing `.Option` or
|
|
210
|
+
`EnumType.Option` dictionary keys.
|
|
206
211
|
|
|
207
212
|
An explicit construction must be assignable to its receiving type. For example,
|
|
208
213
|
`List<Base>` accepts `new Derived()` when `Derived` inherits `Base`, but rejects
|
|
209
214
|
an unrelated class at `new`. Generic arguments must also be compatible.
|
|
210
215
|
|
|
216
|
+
Primary-constructor parameters can initialize generic collection fields directly:
|
|
217
|
+
|
|
218
|
+
```neo
|
|
219
|
+
class Box<T>(List<T> value) {
|
|
220
|
+
public List<T> Value = value;
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The same rule applies to `Dictionary<string, T>` and nested collections.
|
|
225
|
+
|
|
211
226
|
## Member and relation rules
|
|
212
227
|
|
|
213
228
|
Infer member kind and optionality from its type and nullability. Treat the
|
|
@@ -124,6 +124,25 @@ Inline `NeoDelegate` lambdas may be returned, stored, or assigned to a typed
|
|
|
124
124
|
local such as `NeoDelegate<int, int> twice = (x) => x * 2;`, and may read
|
|
125
125
|
surrounding locals and parameters. Those values are captured when the lambda is
|
|
126
126
|
created, so later changes to the outer binding do not alter the closure.
|
|
127
|
+
Any non-null delegate expression can be called directly, including
|
|
128
|
+
`callbacks[0](value)`, `(condition ? first : second)()`, and `Factory.Make()()`.
|
|
129
|
+
Force-unwrap a nullable delegate before calling it, as in `callbacks["key"]!()`.
|
|
130
|
+
Void delegates can only be called as statements.
|
|
131
|
+
Instance delegate field defaults are compiled against their declared signature.
|
|
132
|
+
Each instance binds defaults that read `this` to itself; invalid lambda bodies
|
|
133
|
+
are reported at the declaration by status, editor validation, and preparation.
|
|
134
|
+
Static delegate fields use static class scope: they can read static members
|
|
135
|
+
without an instance owner, and cannot access `this` or instance members.
|
|
136
|
+
Other static fields can call them in their initializers, as in
|
|
137
|
+
`public static int First = Helper.Run();`. Outside a lambda body, a field
|
|
138
|
+
initializer qualifies the members it reads; a bare `Run()` or `Number` there is
|
|
139
|
+
an unknown name.
|
|
140
|
+
Collection type arguments in constructions, such as `new Box<List<int>>([1, 2])`,
|
|
141
|
+
work even when no field declares that collection type. Preparation includes the
|
|
142
|
+
needed type descriptors; spec-only types remain in the test candidate.
|
|
143
|
+
Generic primary constructors also accept stored collection arguments, such as
|
|
144
|
+
`public static Box<List<int>> Value = new([1, 2]);`. Stored replay uses the closed
|
|
145
|
+
parameter type to preserve collection references.
|
|
127
146
|
Typed locals also accept generic class types such as `Box<int> box = new(1);`.
|
|
128
147
|
Explicit lambda parameter annotations accept the same type grammar as
|
|
129
148
|
declarations, including `decimal`, generic parameters, collections, arrays, and
|
|
@@ -550,7 +569,7 @@ locally, like push. If another commit lands while it runs, the run is refused:
|
|
|
550
569
|
run it again. `neo loc` writes work the same way: a write refused because
|
|
551
570
|
another commit landed is run again.
|
|
552
571
|
|
|
553
|
-
VS Code rename follows override families and class constructors, resolves contextual enum options such as `.Success`, renames a constructor parameter's named arguments (`new Item(count: 1)`) in bodies, initializers, specs, and base clauses, and keeps local-variable renames scoped to their declaration. Assigned IDs are not required for these refactorings.
|
|
572
|
+
VS Code rename follows override families and class constructors, resolves contextual enum options such as `.Success`, renames a constructor parameter's named arguments (`new Item(count: 1)`) in bodies, initializers, specs, and base clauses, and keeps local-variable renames scoped to their declaration. Assigned IDs are not required for these refactorings. Inferred locals initialized with conditional expressions retain their common branch type for member completion, navigation, and rename. Typed delegate calls retain their return type too. Lambda returns use the delegate signature for target-typed constructors and enum argument suggestions. Member completion also follows optional access and null-forgiving receivers, including dictionary lookups.
|
|
554
573
|
|
|
555
574
|
## Member change listeners
|
|
556
575
|
|