@valkyrjaio/valkyrja 26.4.0 → 26.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valkyrjaio/valkyrja",
3
- "version": "26.4.0",
3
+ "version": "26.4.1",
4
4
  "description": "The Valkyrja Framework.",
5
5
  "keywords": [
6
6
  "framework",
@@ -8,8 +8,8 @@
8
8
  */
9
9
 
10
10
  export class ApplicationInfo {
11
- static readonly VERSION = '26.4.0' as const;
12
- static readonly VERSION_BUILD_DATE_TIME = 'July 27 2026 22:05:07 MST' as const;
11
+ static readonly VERSION = '26.4.1' as const;
12
+ static readonly VERSION_BUILD_DATE_TIME = 'July 28 2026 21:18:39 MST' as const;
13
13
  static readonly ASCII = `
14
14
  _ _ _
15
15
  /\\ /\\__ _| | | ___ _ _ __(_) __ _
@@ -121,8 +121,9 @@ export class Answer extends Message implements AnswerContract {
121
121
  const validationCallable = this.validationCallable;
122
122
  const userResponse = this.userResponse;
123
123
 
124
+ // allowedResponses always contains at least the default response (seeded by every
125
+ // constructor and mutator), so the "no constraints at all" case is unreachable.
124
126
  return (
125
- (this.allowedResponses.length === 0 && validationCallable === null) ||
126
127
  this.allowedResponses.includes(userResponse) ||
127
128
  (validationCallable !== null && validationCallable(userResponse))
128
129
  );
@@ -62,11 +62,11 @@ export class QuestionWriter implements WriterContract {
62
62
  const answer = question.getAnswer();
63
63
  const validResponses = answer.getAllowedResponses();
64
64
 
65
- if (validResponses.length > 0) {
66
- output = output.writeMessage(new Message(' ('));
67
- output = output.writeMessage(new Message(validResponses.map((v) => `\`${v}\``).join(' or ')));
68
- output = output.writeMessage(new Message(')'));
69
- }
65
+ // An answer always carries at least its default response, so there is always at least one
66
+ // valid response to render.
67
+ output = output.writeMessage(new Message(' ('));
68
+ output = output.writeMessage(new Message(validResponses.map((v) => `\`${v}\``).join(' or ')));
69
+ output = output.writeMessage(new Message(')'));
70
70
 
71
71
  output = output.writeMessage(new Message(' [default: "'));
72
72
  output = output.writeMessage(new Message(answer.getDefaultResponse(), new HighlightedTextFormatter()));