@neocompose/cli 0.48.0 → 0.48.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.48.2] - 2026-09-10
|
|
4
|
+
|
|
5
|
+
- Emit class member defaults with contextual `new()` when they construct the declared type, while keeping an explicit concrete type for subclass defaults.
|
|
6
|
+
|
|
7
|
+
## [0.48.1] - 2026-09-10
|
|
8
|
+
|
|
9
|
+
- Emit empty class member defaults as `new Type()` even when their backing value row is virtual. Required members now read as initialized, and adding a `new() { ... }` override preserves sparse storage.
|
|
10
|
+
|
|
3
11
|
## [0.48.0] - 2026-09-10
|
|
4
12
|
|
|
5
13
|
- Preserve current declaration and managed asset paths through pull, force, and reset, including files moved since the previous synchronization.
|
package/dist/neo.mjs
CHANGED
|
@@ -113612,7 +113612,7 @@ function rowBackedDefaultBody(member, isPulledValueRow) {
|
|
|
113612
113612
|
);
|
|
113613
113613
|
if (member.kind === MEMBER_KIND_CLASS2 && isObjectRecord2(body)) {
|
|
113614
113614
|
const children = Object.values(body);
|
|
113615
|
-
return
|
|
113615
|
+
return referencesRows(children) ? { kind: "class", body } : null;
|
|
113616
113616
|
}
|
|
113617
113617
|
if (member.kind === MEMBER_KIND_LIST2 && member.listKind !== "unordered" && Array.isArray(body)) {
|
|
113618
113618
|
const rows = body.filter(
|
|
@@ -113680,7 +113680,7 @@ function emitMemberDefaultSourcesV4(records2, manifest) {
|
|
|
113680
113680
|
member,
|
|
113681
113681
|
{ classId: defaultValue.classId ?? null, value: backed.body },
|
|
113682
113682
|
visited,
|
|
113683
|
-
|
|
113683
|
+
(defaultValue.classId ?? member.classId) === member.classId && manifestMember?.kind === "class",
|
|
113684
113684
|
environment
|
|
113685
113685
|
);
|
|
113686
113686
|
} else if (backed.kind === "list") {
|
|
@@ -115000,6 +115000,9 @@ function lowerRowBackedDefault(context, member, backed, baseData3, binding) {
|
|
|
115000
115000
|
).expression;
|
|
115001
115001
|
const bindingEnvironment = bindingGenericEnvironment(context, binding);
|
|
115002
115002
|
if (member.kind === "class" && backed.kind === "class") {
|
|
115003
|
+
if (expression.kind === "litNull") {
|
|
115004
|
+
return { value: null, classId: null };
|
|
115005
|
+
}
|
|
115003
115006
|
if (expression.kind !== "new") {
|
|
115004
115007
|
throw new Error(`Default value ${binding.label} requires new(...).`);
|
|
115005
115008
|
}
|
|
@@ -118804,7 +118807,7 @@ function classValue(context, member, value, visited, targetTyped, outerEnvironme
|
|
|
118804
118807
|
projection.targetValueIds,
|
|
118805
118808
|
storedEnvironment
|
|
118806
118809
|
);
|
|
118807
|
-
const name = classValueTypeName(context, classId, member, environment);
|
|
118810
|
+
const name = targetTyped ? stringField3(schemaClass2, "name") : classValueTypeName(context, classId, member, environment);
|
|
118808
118811
|
let storedConstruction;
|
|
118809
118812
|
try {
|
|
118810
118813
|
storedConstruction = partial ? null : storedConstructorCallSource(
|
|
@@ -118905,7 +118908,10 @@ function classValue(context, member, value, visited, targetTyped, outerEnvironme
|
|
|
118905
118908
|
${fields.map((field) => indentNeoSourceNonEmptyLines(field, 2)).join(",\n")}
|
|
118906
118909
|
}`;
|
|
118907
118910
|
}
|
|
118908
|
-
const constructor2 = storedConstruction !== null ? storedConstruction : projection.arguments.length > 0 ? constructorCallSource(
|
|
118911
|
+
const constructor2 = storedConstruction !== null ? storedConstruction : projection.arguments.length > 0 ? constructorCallSource(
|
|
118912
|
+
targetTyped ? "new" : `new ${name}`,
|
|
118913
|
+
projection.arguments
|
|
118914
|
+
) : targetTyped ? "new()" : `new ${name}()`;
|
|
118909
118915
|
if (typeof value.id === "string" && (storedConstruction !== null || projection.arguments.length > 0 || schemaClass2.requiredConstructorId !== void 0)) {
|
|
118910
118916
|
context.materializedConstructors.set(value.id, constructor2);
|
|
118911
118917
|
}
|
|
@@ -131448,7 +131454,7 @@ var init_registry2 = __esm({
|
|
|
131448
131454
|
"schema-contract/registry.mjs"() {
|
|
131449
131455
|
"use strict";
|
|
131450
131456
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
131451
|
-
cliVersion: "0.48.
|
|
131457
|
+
cliVersion: "0.48.2",
|
|
131452
131458
|
projectFileUploadBatchSize: 32,
|
|
131453
131459
|
documentRecords: {
|
|
131454
131460
|
member: {
|
|
@@ -138498,7 +138504,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
138498
138504
|
async function main() {
|
|
138499
138505
|
const args = parseArgs(process.argv.slice(2));
|
|
138500
138506
|
if (args.command === "--version") {
|
|
138501
|
-
console.log("0.48.
|
|
138507
|
+
console.log("0.48.2");
|
|
138502
138508
|
return;
|
|
138503
138509
|
}
|
|
138504
138510
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|
package/package.json
CHANGED
|
@@ -88,7 +88,7 @@ wrappers.
|
|
|
88
88
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
89
89
|
|
|
90
90
|
```html
|
|
91
|
-
<!-- reviewed-through-cli: 0.48.
|
|
91
|
+
<!-- reviewed-through-cli: 0.48.2 -->
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -121,6 +121,15 @@ membership rules as member defaults.
|
|
|
121
121
|
|
|
122
122
|
## Defaults and localization
|
|
123
123
|
|
|
124
|
+
A class member whose default constructs its declared type emits a contextual
|
|
125
|
+
`= new()`, including populated defaults and defaults whose value row is
|
|
126
|
+
virtual. A default that constructs a subclass keeps the concrete type, such as
|
|
127
|
+
`Base Value = new Derived();`. Edit the declaration to change the shared
|
|
128
|
+
default, or assign the member inside an instance initializer to override only
|
|
129
|
+
that instance. Leaving the emitted construction unchanged creates no redundant
|
|
130
|
+
value rows. A nullable member with no default remains bare; an explicit null
|
|
131
|
+
default emits `= null`.
|
|
132
|
+
|
|
124
133
|
Omitted members are virtual projections of the instance's recorded constructor
|
|
125
134
|
or variant. Later edits to that source update every omitted member. Writing a
|
|
126
135
|
member creates a sparse override with its deterministic projected ID; removing
|