@neocompose/cli 0.82.0 → 0.82.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 +6 -0
- package/dist/neo.mjs +49 -13
- package/dist/test-worker.mjs +1 -1
- 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/values-identities-and-references.md +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.82.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d58730: Fix collection-bound Reference<T> and Set<Reference<T>> declarations whose generic target extends a class. Preserve inherited lookup overrides during export, and report authored source diagnostics instead of secondary manifest errors when a base declaration is invalid.
|
|
8
|
+
|
|
3
9
|
## 0.82.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/neo.mjs
CHANGED
|
@@ -45146,6 +45146,7 @@ function contextualAnnotationFields(document, position) {
|
|
|
45146
45146
|
if (annotation2) {
|
|
45147
45147
|
return fieldsForAnnotation(annotation2.name, {
|
|
45148
45148
|
kind: "member",
|
|
45149
|
+
ownerName: declaration.name,
|
|
45149
45150
|
type: semanticType(member.type),
|
|
45150
45151
|
memberKind: member.kind
|
|
45151
45152
|
});
|
|
@@ -45569,6 +45570,7 @@ function validateMember(uri, member, ownerName, documentKind, ownerScope, enviro
|
|
|
45569
45570
|
member.annotations,
|
|
45570
45571
|
documentKind === "flow" ? member.kind === "field" && member.flowInitializer ? { kind: "flowGraph" } : member.kind === "field" ? { kind: "flowBinding", type: memberType2 } : { kind: "flowMember", type: memberType2 } : {
|
|
45571
45572
|
kind: "member",
|
|
45573
|
+
ownerName,
|
|
45572
45574
|
type: memberType2,
|
|
45573
45575
|
memberKind: member.kind,
|
|
45574
45576
|
reference: member.type.name === "Reference"
|
|
@@ -45854,6 +45856,7 @@ function validateAnnotations(uri, annotations, context, environment, diagnostics
|
|
|
45854
45856
|
argument2.text,
|
|
45855
45857
|
argument2.range,
|
|
45856
45858
|
context.type,
|
|
45859
|
+
context.kind === "member" ? context.ownerName : void 0,
|
|
45857
45860
|
environment,
|
|
45858
45861
|
diagnostics
|
|
45859
45862
|
);
|
|
@@ -45871,7 +45874,7 @@ function validateAnnotations(uri, annotations, context, environment, diagnostics
|
|
|
45871
45874
|
}
|
|
45872
45875
|
}
|
|
45873
45876
|
}
|
|
45874
|
-
function validateLookupCollectionType(uri, collection, range2, declared, environment, diagnostics) {
|
|
45877
|
+
function validateLookupCollectionType(uri, collection, range2, declared, ownerName, environment, diagnostics) {
|
|
45875
45878
|
const path = collection.trim().split(".");
|
|
45876
45879
|
const [owner, name] = path;
|
|
45877
45880
|
if (path.length !== 2 || owner === void 0 || name === void 0) return;
|
|
@@ -45885,15 +45888,45 @@ function validateLookupCollectionType(uri, collection, range2, declared, environ
|
|
|
45885
45888
|
const entry = entryIndex === null ? void 0 : collectionType.arguments?.[entryIndex];
|
|
45886
45889
|
const target = declared.name === "List" || declared.name === "Set" ? declared.arguments?.[0] : declared;
|
|
45887
45890
|
if (!entry || !target) return;
|
|
45888
|
-
const
|
|
45889
|
-
|
|
45890
|
-
if (
|
|
45891
|
-
|
|
45892
|
-
|
|
45893
|
-
|
|
45894
|
-
|
|
45895
|
-
|
|
45896
|
-
|
|
45891
|
+
const key = `lookup:${ownerName ?? ""}:${describeType(target)}>${describeType(entry)}`;
|
|
45892
|
+
let assignable = environment.assignability.get(key);
|
|
45893
|
+
if (assignable === void 0) {
|
|
45894
|
+
const declaringClass2 = ownerName === void 0 ? void 0 : environment.projectIndex.typeByName.get(ownerName);
|
|
45895
|
+
const context = {
|
|
45896
|
+
project: environment.project,
|
|
45897
|
+
kind: "initializerExpression",
|
|
45898
|
+
...declaringClass2 ? {
|
|
45899
|
+
declaringType: {
|
|
45900
|
+
kind: "named",
|
|
45901
|
+
typeId: declaringClass2.id
|
|
45902
|
+
}
|
|
45903
|
+
} : {}
|
|
45904
|
+
};
|
|
45905
|
+
const resolve7 = (type) => resolveNeoScriptType(
|
|
45906
|
+
semanticAst({ ...type, nullable: false }, { line: 1, column: 1 }),
|
|
45907
|
+
context,
|
|
45908
|
+
environment.projectIndex
|
|
45909
|
+
);
|
|
45910
|
+
const isClass = (type) => {
|
|
45911
|
+
const bound = neoScriptMemberLookupType(type);
|
|
45912
|
+
return bound.kind === "named" && environment.projectIndex.typeById.get(bound.typeId)?.kind === "class";
|
|
45913
|
+
};
|
|
45914
|
+
try {
|
|
45915
|
+
const targetType = resolve7(target);
|
|
45916
|
+
const entryType = resolve7(entry);
|
|
45917
|
+
const classes = isClass(targetType) && isClass(entryType);
|
|
45918
|
+
assignable = isNeoScriptTypeAssignable(
|
|
45919
|
+
classes ? targetType : entryType,
|
|
45920
|
+
classes ? entryType : targetType,
|
|
45921
|
+
environment.projectIndex
|
|
45922
|
+
);
|
|
45923
|
+
environment.assignability.set(key, assignable);
|
|
45924
|
+
} catch (error) {
|
|
45925
|
+
if (!(error instanceof CompileError)) throw error;
|
|
45926
|
+
return;
|
|
45927
|
+
}
|
|
45928
|
+
}
|
|
45929
|
+
if (assignable) return;
|
|
45897
45930
|
pushDiagnostic(
|
|
45898
45931
|
diagnostics,
|
|
45899
45932
|
uri,
|
|
@@ -55922,7 +55955,7 @@ var init_registry = __esm({
|
|
|
55922
55955
|
"../packages/manifest/schema-contract/registry.mjs"() {
|
|
55923
55956
|
"use strict";
|
|
55924
55957
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
55925
|
-
cliVersion: "0.82.
|
|
55958
|
+
cliVersion: "0.82.1",
|
|
55926
55959
|
projectFileUploadBatchSize: 32,
|
|
55927
55960
|
documentRecords: {
|
|
55928
55961
|
member: {
|
|
@@ -152354,7 +152387,8 @@ function computeStatus(workspace, options, conflictedFiles, parseErrors, parseWa
|
|
|
152354
152387
|
}
|
|
152355
152388
|
}
|
|
152356
152389
|
} catch (error) {
|
|
152357
|
-
parseErrors.
|
|
152390
|
+
if (!parseErrors.some(isBlockingSchemaSourceError))
|
|
152391
|
+
parseErrors.push(diagnostic(error));
|
|
152358
152392
|
}
|
|
152359
152393
|
invalidSchema = parseErrors.some(isBlockingSchemaSourceError);
|
|
152360
152394
|
}
|
|
@@ -152383,6 +152417,8 @@ function computeStatus(workspace, options, conflictedFiles, parseErrors, parseWa
|
|
|
152383
152417
|
);
|
|
152384
152418
|
return refusedStatus(conflictedFiles, parseErrors, parseWarnings);
|
|
152385
152419
|
}
|
|
152420
|
+
if (schemaDocuments === void 0 && invalidSchema)
|
|
152421
|
+
return refusedStatus(conflictedFiles, parseErrors, parseWarnings);
|
|
152386
152422
|
const sourceByKey = manifestRecordSources(manifest);
|
|
152387
152423
|
const documents = schemaDocuments ?? projectSchemaManifestToDocuments(manifest, documentContext);
|
|
152388
152424
|
const documentsByKey = new Map(
|
|
@@ -205722,7 +205758,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
205722
205758
|
async function main() {
|
|
205723
205759
|
const args = parseArgs(process.argv.slice(2));
|
|
205724
205760
|
if (args.command === "--version") {
|
|
205725
|
-
console.log("0.82.
|
|
205761
|
+
console.log("0.82.1");
|
|
205726
205762
|
return;
|
|
205727
205763
|
}
|
|
205728
205764
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|
package/dist/test-worker.mjs
CHANGED
|
@@ -61885,7 +61885,7 @@ var INITIALIZER_KEY_PLACEHOLDER = new RegExp(
|
|
|
61885
61885
|
|
|
61886
61886
|
// ../packages/manifest/schema-contract/registry.mjs
|
|
61887
61887
|
var PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
61888
|
-
cliVersion: "0.82.
|
|
61888
|
+
cliVersion: "0.82.1",
|
|
61889
61889
|
projectFileUploadBatchSize: 32,
|
|
61890
61890
|
documentRecords: {
|
|
61891
61891
|
member: {
|
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.82.
|
|
132
|
+
<!-- reviewed-through-cli: 0.82.1 -->
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -196,6 +196,12 @@ not clone it or turn it into a separate wrapper object. An optional generic
|
|
|
196
196
|
argument checks the target type. Lookup assignment still requires an existing
|
|
197
197
|
backing row and enforces its declared target and collection constraints.
|
|
198
198
|
|
|
199
|
+
A class-constrained generic lookup may select from a collection of its bound
|
|
200
|
+
class. For example, `Reference<TAsset>` with `TAsset extends HeldItemAsset`
|
|
201
|
+
may use `@settings(collection: CosmeticAssets.HeldItems)` when that collection
|
|
202
|
+
holds `HeldItemAsset`. Derived classes may specialize the target and override
|
|
203
|
+
the member; retain the collection setting on each override.
|
|
204
|
+
|
|
199
205
|
Use the `Reference` intrinsic. Prefer the most readable form the target
|
|
200
206
|
supports:
|
|
201
207
|
|