Skip to content

Commit dffc512

Browse files
committed
fix(lint): list metadata-protocol in the changeset; state both directions of a has()/optional member read (#22274)
The changeset names metadata-protocol's doors in its BREAKING section, so that package carries the entry beside lint, as the door-crossing changesets in this seam do. The member refusal's tail no longer says a has() test or an optional read is admitted: it is refused on every write, or admitted on every write when negated or defaulted to a passing value. Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK Co-authored-by: Claude <noreply@anthropic.com>
1 parent 65ac7df commit dffc512

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎.changeset/22274-option-visible-when-members.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
"@objectstack/lint": minor
3+
"@objectstack/metadata-protocol": minor
34
---
45

56
fix(lint)!: `os build` and the object save door refuse a select option's `visibleWhen` that reads a member of `ctx` or `os` the server's option check never binds, such as `os.org.id`, `os.env` or `ctx.locale` (#22274)

‎packages/lint/src/validate-expressions.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,8 @@ function optionVisibleWhenMemberIssue(
12861286
`its ADR-0068 aliases \`user\`, \`ctx\` and \`os\`), and under \`${root}\` it binds the ` +
12871287
`\`user\` member and nothing else, so ${path} is unbound there. ` +
12881288
`${FIELD_TRAVERSAL_CONSEQUENCE['option visibleWhen']}; a \`has()\` test or an optional read ` +
1289-
`of it finds it unset on every write. ${prescription}`,
1289+
`of it never finds it set, so the option is refused on every write instead, or admitted on ` +
1290+
`every write when the test is negated or the read's default passes. ${prescription}`,
12901291
};
12911292
}
12921293
return null;

0 commit comments

Comments
 (0)