@neocompose/cli 0.48.0 → 0.48.1

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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.48.1] - 2026-09-10
4
+
5
+ - 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.
6
+
3
7
  ## [0.48.0] - 2026-09-10
4
8
 
5
9
  - 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 children.length > 0 && referencesRows(children) ? { kind: "class", body } : null;
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,9 @@ function emitMemberDefaultSourcesV4(records2, manifest) {
113680
113680
  member,
113681
113681
  { classId: defaultValue.classId ?? null, value: backed.body },
113682
113682
  visited,
113683
- false,
113683
+ (defaultValue.classId ?? member.classId) === member.classId && manifestMember?.kind === "class" && Object.values(manifestMember.classArguments).some(
113684
+ (argument2) => argument2.kind === "generic"
113685
+ ),
113684
113686
  environment
113685
113687
  );
113686
113688
  } else if (backed.kind === "list") {
@@ -115000,6 +115002,9 @@ function lowerRowBackedDefault(context, member, backed, baseData3, binding) {
115000
115002
  ).expression;
115001
115003
  const bindingEnvironment = bindingGenericEnvironment(context, binding);
115002
115004
  if (member.kind === "class" && backed.kind === "class") {
115005
+ if (expression.kind === "litNull") {
115006
+ return { value: null, classId: null };
115007
+ }
115003
115008
  if (expression.kind !== "new") {
115004
115009
  throw new Error(`Default value ${binding.label} requires new(...).`);
115005
115010
  }
@@ -118804,7 +118809,7 @@ function classValue(context, member, value, visited, targetTyped, outerEnvironme
118804
118809
  projection.targetValueIds,
118805
118810
  storedEnvironment
118806
118811
  );
118807
- const name = classValueTypeName(context, classId, member, environment);
118812
+ const name = targetTyped ? stringField3(schemaClass2, "name") : classValueTypeName(context, classId, member, environment);
118808
118813
  let storedConstruction;
118809
118814
  try {
118810
118815
  storedConstruction = partial ? null : storedConstructorCallSource(
@@ -118905,7 +118910,10 @@ function classValue(context, member, value, visited, targetTyped, outerEnvironme
118905
118910
  ${fields.map((field) => indentNeoSourceNonEmptyLines(field, 2)).join(",\n")}
118906
118911
  }`;
118907
118912
  }
118908
- const constructor2 = storedConstruction !== null ? storedConstruction : projection.arguments.length > 0 ? constructorCallSource(`new ${name}`, projection.arguments) : targetTyped ? "new()" : `new ${name}()`;
118913
+ const constructor2 = storedConstruction !== null ? storedConstruction : projection.arguments.length > 0 ? constructorCallSource(
118914
+ targetTyped ? "new" : `new ${name}`,
118915
+ projection.arguments
118916
+ ) : targetTyped ? "new()" : `new ${name}()`;
118909
118917
  if (typeof value.id === "string" && (storedConstruction !== null || projection.arguments.length > 0 || schemaClass2.requiredConstructorId !== void 0)) {
118910
118918
  context.materializedConstructors.set(value.id, constructor2);
118911
118919
  }
@@ -131448,7 +131456,7 @@ var init_registry2 = __esm({
131448
131456
  "schema-contract/registry.mjs"() {
131449
131457
  "use strict";
131450
131458
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
131451
- cliVersion: "0.48.0",
131459
+ cliVersion: "0.48.1",
131452
131460
  projectFileUploadBatchSize: 32,
131453
131461
  documentRecords: {
131454
131462
  member: {
@@ -138498,7 +138506,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
138498
138506
  async function main() {
138499
138507
  const args = parseArgs(process.argv.slice(2));
138500
138508
  if (args.command === "--version") {
138501
- console.log("0.48.0");
138509
+ console.log("0.48.1");
138502
138510
  return;
138503
138511
  }
138504
138512
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.48.0",
3
+ "version": "0.48.1",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ description: >-
9
9
  `@neocompose/cli` or `node cli/bin/neo.mjs` in the neo-compose repository.
10
10
  ---
11
11
 
12
- <!-- reviewed-through-cli: 0.48.0 -->
12
+ <!-- reviewed-through-cli: 0.48.1 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -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.0 -->
91
+ <!-- reviewed-through-cli: 0.48.1 -->
92
92
  ```
93
93
 
94
94
  The quoted version above is checked too, so this instruction cannot go stale
@@ -121,6 +121,13 @@ membership rules as member defaults.
121
121
 
122
122
  ## Defaults and localization
123
123
 
124
+ A class member with an empty construction default emits `= new Type()` even
125
+ when its value row is virtual. Edit that declaration with `new() { ... }` to
126
+ change the shared default, or assign the member inside an instance initializer
127
+ to override only that instance. Leaving the emitted construction unchanged
128
+ creates no redundant value rows. A nullable member with no default remains bare;
129
+ an explicit null default emits `= null`.
130
+
124
131
  Omitted members are virtual projections of the instance's recorded constructor
125
132
  or variant. Later edits to that source update every omitted member. Writing a
126
133
  member creates a sparse override with its deterministic projected ID; removing