@neocompose/cli 0.36.0 → 0.36.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,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.36.1] - 2026-08-19
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Preserve authored function parameter defaults in live project-source symbols,
|
|
8
|
+
so calls may omit a defaulted trailing argument and hover/signature help show
|
|
9
|
+
the declared `= value`.
|
|
10
|
+
- Store direct field and property reads, including static getters such as
|
|
11
|
+
`FeatureFlags.StartInventorySize`, as executable member initializers instead
|
|
12
|
+
of rejecting them as unresolved persisted literals.
|
|
13
|
+
|
|
3
14
|
## [0.36.0] - 2026-08-19
|
|
4
15
|
|
|
5
16
|
### Added
|
package/dist/neo.mjs
CHANGED
|
@@ -25290,13 +25290,14 @@ function compileProjectSourceBodies(documents) {
|
|
|
25290
25290
|
implicitMemberAccess: true,
|
|
25291
25291
|
staticMember: false,
|
|
25292
25292
|
kind: "constructor",
|
|
25293
|
-
parameters: constructor2.parameters.map(
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25293
|
+
parameters: constructor2.parameters.map(
|
|
25294
|
+
(parameter4, index) => sourceParameter(
|
|
25295
|
+
parameter4,
|
|
25296
|
+
owner,
|
|
25297
|
+
graph.typeIdsByName,
|
|
25298
|
+
`${declaredConstructorId(owner, declaration, constructor2)}:argument:${index}`
|
|
25299
|
+
)
|
|
25300
|
+
),
|
|
25300
25301
|
functionName: constructor2.name
|
|
25301
25302
|
},
|
|
25302
25303
|
projectIndex,
|
|
@@ -25325,13 +25326,12 @@ function compileProjectSourceBodies(documents) {
|
|
|
25325
25326
|
staticMember: false,
|
|
25326
25327
|
kind: "constructor",
|
|
25327
25328
|
parameters: (declaration.headerParameters ?? []).map(
|
|
25328
|
-
(parameter4, index) => (
|
|
25329
|
-
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25334
|
-
})
|
|
25329
|
+
(parameter4, index) => sourceParameter(
|
|
25330
|
+
parameter4,
|
|
25331
|
+
owner,
|
|
25332
|
+
graph.typeIdsByName,
|
|
25333
|
+
`${initId}:argument:${index}`
|
|
25334
|
+
)
|
|
25335
25335
|
),
|
|
25336
25336
|
functionName: "init"
|
|
25337
25337
|
},
|
|
@@ -25368,13 +25368,14 @@ function compileProjectSourceBodies(documents) {
|
|
|
25368
25368
|
context: {
|
|
25369
25369
|
...baseContext2,
|
|
25370
25370
|
kind: "function",
|
|
25371
|
-
parameters: member.parameters.map(
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25371
|
+
parameters: member.parameters.map(
|
|
25372
|
+
(parameter4, index) => sourceParameter(
|
|
25373
|
+
parameter4,
|
|
25374
|
+
owner,
|
|
25375
|
+
graph.typeIdsByName,
|
|
25376
|
+
`${info.symbol.id}:argument:${index}`
|
|
25377
|
+
)
|
|
25378
|
+
),
|
|
25378
25379
|
deferred: member.modifiers.includes("async"),
|
|
25379
25380
|
functionName: member.name
|
|
25380
25381
|
},
|
|
@@ -25741,13 +25742,9 @@ function sourceMemberSymbol(member, owner, typeIds, source) {
|
|
|
25741
25742
|
...common,
|
|
25742
25743
|
kind: "function",
|
|
25743
25744
|
returnType: type,
|
|
25744
|
-
parameters: member.parameters.map(
|
|
25745
|
-
|
|
25746
|
-
|
|
25747
|
-
type: sourceTypeRef(parameter4.type, owner, typeIds),
|
|
25748
|
-
location: location(owner.uri, parameter4.range),
|
|
25749
|
-
selectionLocation: location(owner.uri, parameter4.nameRange)
|
|
25750
|
-
})),
|
|
25745
|
+
parameters: member.parameters.map(
|
|
25746
|
+
(parameter4, index) => sourceParameter(parameter4, owner, typeIds, `${id2}:argument:${index}`)
|
|
25747
|
+
),
|
|
25751
25748
|
deferred: member.modifiers.includes("async"),
|
|
25752
25749
|
...member.modifiers.includes("native") ? { native: true } : {}
|
|
25753
25750
|
};
|
|
@@ -25819,8 +25816,7 @@ function requiredConstructorSymbol(owner, declaration, typeIds) {
|
|
|
25819
25816
|
return {
|
|
25820
25817
|
id: requiredConstructorBodyId(owner),
|
|
25821
25818
|
parameters: headerParameters.map((parameter4) => ({
|
|
25822
|
-
|
|
25823
|
-
type: sourceTypeRef(parameter4.type, owner, typeIds),
|
|
25819
|
+
...sourceParameter(parameter4, owner, typeIds),
|
|
25824
25820
|
required: !parameter4.type.nullable
|
|
25825
25821
|
})),
|
|
25826
25822
|
required: true,
|
|
@@ -25831,14 +25827,23 @@ function declaredConstructorSymbol(owner, declaration, constructor2, typeIds) {
|
|
|
25831
25827
|
return {
|
|
25832
25828
|
id: declaredConstructorId(owner, declaration, constructor2),
|
|
25833
25829
|
parameters: constructor2.parameters.map((parameter4) => ({
|
|
25834
|
-
|
|
25835
|
-
type: sourceTypeRef(parameter4.type, owner, typeIds),
|
|
25830
|
+
...sourceParameter(parameter4, owner, typeIds),
|
|
25836
25831
|
required: !parameter4.type.nullable
|
|
25837
25832
|
})),
|
|
25838
25833
|
...constructor2.docsText ? { documentation: constructor2.docsText } : {},
|
|
25839
25834
|
location: location(owner.uri, constructor2.range)
|
|
25840
25835
|
};
|
|
25841
25836
|
}
|
|
25837
|
+
function sourceParameter(parameter4, owner, typeIds, id2) {
|
|
25838
|
+
return {
|
|
25839
|
+
...id2 === void 0 ? {} : { id: id2 },
|
|
25840
|
+
name: parameter4.name,
|
|
25841
|
+
type: sourceTypeRef(parameter4.type, owner, typeIds),
|
|
25842
|
+
...parameter4.defaultValue === void 0 ? {} : { defaultValue: { displayText: parameter4.defaultValue.text } },
|
|
25843
|
+
location: location(owner.uri, parameter4.range),
|
|
25844
|
+
selectionLocation: location(owner.uri, parameter4.nameRange)
|
|
25845
|
+
};
|
|
25846
|
+
}
|
|
25842
25847
|
function substituteInheritedSourceMember(member, baseInfo, resolvedBaseType) {
|
|
25843
25848
|
if (baseInfo.declaration.kind !== "class" || resolvedBaseType.kind !== "named") {
|
|
25844
25849
|
return {
|
|
@@ -59730,6 +59735,7 @@ function lowerExpressionValue(context, expression, declaredExpected, ownerClass,
|
|
|
59730
59735
|
function positionRequiresEvaluation(context, expression, expected, ownerClass) {
|
|
59731
59736
|
if (isStoredDelegateLiteral(expected, expression)) return false;
|
|
59732
59737
|
if (isStoredActionLiteral(expected, expression)) return false;
|
|
59738
|
+
if (isSourceMemberValueRead(context, expression, ownerClass)) return true;
|
|
59733
59739
|
return initializerRequiresEvaluation(
|
|
59734
59740
|
context.declaredConstructors,
|
|
59735
59741
|
expression,
|
|
@@ -59740,6 +59746,36 @@ function positionRequiresEvaluation(context, expression, expected, ownerClass) {
|
|
|
59740
59746
|
)
|
|
59741
59747
|
);
|
|
59742
59748
|
}
|
|
59749
|
+
function isSourceMemberValueRead(context, expression, ownerClass) {
|
|
59750
|
+
let current = expression;
|
|
59751
|
+
while (current.kind === "annotated") current = current.expression;
|
|
59752
|
+
const path = expressionMemberPath(current);
|
|
59753
|
+
if (path === null) return false;
|
|
59754
|
+
const parts = path.split(".");
|
|
59755
|
+
let classId;
|
|
59756
|
+
let memberName;
|
|
59757
|
+
let requiresStatic = false;
|
|
59758
|
+
if (parts.length === 1 || parts.length === 2 && parts[0] === "this") {
|
|
59759
|
+
classId = materializedId(ownerClass, "class", ownerClass.name);
|
|
59760
|
+
memberName = parts.at(-1);
|
|
59761
|
+
} else if (parts.length === 2) {
|
|
59762
|
+
classId = context.classIdsByName.get(parts[0]);
|
|
59763
|
+
memberName = parts[1];
|
|
59764
|
+
requiresStatic = true;
|
|
59765
|
+
} else {
|
|
59766
|
+
const receiverPath = parts.slice(0, -1).join(".");
|
|
59767
|
+
classId = context.rootValueTargetsByPath.get(receiverPath)?.classId;
|
|
59768
|
+
memberName = parts.at(-1);
|
|
59769
|
+
}
|
|
59770
|
+
if (classId === void 0 || memberName === void 0) return false;
|
|
59771
|
+
const memberId = effectiveMemberIdByName(context, classId, memberName);
|
|
59772
|
+
if (memberId === null) return false;
|
|
59773
|
+
const source = context.sourceMembersById.get(memberId)?.member;
|
|
59774
|
+
if (source?.kind === "function") return false;
|
|
59775
|
+
const schema = context.loweredMembers.get(memberId) ?? context.baseMembers.get(memberId);
|
|
59776
|
+
const isStatic = source?.modifiers.includes("static") ?? schema?.isStatic ?? false;
|
|
59777
|
+
return !requiresStatic || isStatic;
|
|
59778
|
+
}
|
|
59743
59779
|
function isStoredDelegateLiteral(type, expression) {
|
|
59744
59780
|
if (type.name !== "NeoDelegate") return false;
|
|
59745
59781
|
let current = expression;
|
|
@@ -113795,7 +113831,7 @@ var init_registry2 = __esm({
|
|
|
113795
113831
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
113796
113832
|
formatVersion: 3,
|
|
113797
113833
|
contractVersion: "3.14",
|
|
113798
|
-
cliVersion: "0.36.
|
|
113834
|
+
cliVersion: "0.36.1",
|
|
113799
113835
|
projectFileUploadBatchSize: 32,
|
|
113800
113836
|
documentRecords: {
|
|
113801
113837
|
member: {
|
|
@@ -120397,7 +120433,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
120397
120433
|
async function main() {
|
|
120398
120434
|
const args = parseArgs(process.argv.slice(2));
|
|
120399
120435
|
if (args.command === "--version") {
|
|
120400
|
-
console.log("0.36.
|
|
120436
|
+
console.log("0.36.1");
|
|
120401
120437
|
return;
|
|
120402
120438
|
}
|
|
120403
120439
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@ wrappers.
|
|
|
83
83
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
|
-
<!-- reviewed-through-cli: 0.36.
|
|
86
|
+
<!-- reviewed-through-cli: 0.36.1 -->
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -154,6 +154,12 @@ components must be numeric literals. When a computed list or dictionary entry
|
|
|
154
154
|
carries an authored `@id`, parenthesize the expression — `@id("row")
|
|
155
155
|
(A.B / A.C)` — so the annotation names the row rather than its left operand.
|
|
156
156
|
|
|
157
|
+
A direct field or property read is computed too, whether it is local,
|
|
158
|
+
qualified static, or reached through a stable root path. For example,
|
|
159
|
+
`protected int Slots = FeatureFlags.StartInventorySize;` evaluates the current
|
|
160
|
+
static field or getter whenever a new instance is constructed; it is not baked
|
|
161
|
+
into a persisted literal during push.
|
|
162
|
+
|
|
157
163
|
Declare overloadable constructors as members when each constructor body owns
|
|
158
164
|
its parameter scope:
|
|
159
165
|
|