@optique/core 1.3.4 → 1.3.5

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.
@@ -258,7 +258,7 @@ function* getSuggestionsWithDependency(valueParser, prefix, dependencyRegistry,
258
258
  * @internal
259
259
  */
260
260
  function* suggestOptionSync(optionNames$1, valueParser, hidden, description, context, prefix) {
261
- if (hidden) return;
261
+ if (hidden || context.optionsTerminated) return;
262
262
  const equalsIndex = prefix.indexOf("=");
263
263
  if (equalsIndex >= 0) {
264
264
  const optionPart = prefix.slice(0, equalsIndex);
@@ -343,7 +343,7 @@ async function* getSuggestionsWithDependencyAsync(valueParser, prefix, dependenc
343
343
  * @internal
344
344
  */
345
345
  async function* suggestOptionAsync(optionNames$1, valueParser, hidden, description, context, prefix) {
346
- if (hidden) return;
346
+ if (hidden || context.optionsTerminated) return;
347
347
  const equalsIndex = prefix.indexOf("=");
348
348
  if (equalsIndex >= 0) {
349
349
  const optionPart = prefix.slice(0, equalsIndex);
@@ -922,8 +922,8 @@ function flag(...args) {
922
922
  error: require_message.message`${require_message.optionNames(optionNames$1)}: ${state.error}`
923
923
  };
924
924
  },
925
- suggest(_context, prefix) {
926
- if (require_usage.isSuggestionHidden(options.hidden)) return [];
925
+ suggest(context, prefix) {
926
+ if (require_usage.isSuggestionHidden(options.hidden) || context.optionsTerminated) return [];
927
927
  const suggestions = [];
928
928
  if (prefix.startsWith("--") || prefix.startsWith("-") || prefix.startsWith("/") || prefix.startsWith("+")) {
929
929
  for (const optionName$1 of optionNames$1) if (optionName$1.startsWith(prefix)) {
@@ -258,7 +258,7 @@ function* getSuggestionsWithDependency(valueParser, prefix, dependencyRegistry,
258
258
  * @internal
259
259
  */
260
260
  function* suggestOptionSync(optionNames$1, valueParser, hidden, description, context, prefix) {
261
- if (hidden) return;
261
+ if (hidden || context.optionsTerminated) return;
262
262
  const equalsIndex = prefix.indexOf("=");
263
263
  if (equalsIndex >= 0) {
264
264
  const optionPart = prefix.slice(0, equalsIndex);
@@ -343,7 +343,7 @@ async function* getSuggestionsWithDependencyAsync(valueParser, prefix, dependenc
343
343
  * @internal
344
344
  */
345
345
  async function* suggestOptionAsync(optionNames$1, valueParser, hidden, description, context, prefix) {
346
- if (hidden) return;
346
+ if (hidden || context.optionsTerminated) return;
347
347
  const equalsIndex = prefix.indexOf("=");
348
348
  if (equalsIndex >= 0) {
349
349
  const optionPart = prefix.slice(0, equalsIndex);
@@ -922,8 +922,8 @@ function flag(...args) {
922
922
  error: message`${optionNames(optionNames$1)}: ${state.error}`
923
923
  };
924
924
  },
925
- suggest(_context, prefix) {
926
- if (isSuggestionHidden(options.hidden)) return [];
925
+ suggest(context, prefix) {
926
+ if (isSuggestionHidden(options.hidden) || context.optionsTerminated) return [];
927
927
  const suggestions = [];
928
928
  if (prefix.startsWith("--") || prefix.startsWith("-") || prefix.startsWith("/") || prefix.startsWith("+")) {
929
929
  for (const optionName$1 of optionNames$1) if (optionName$1.startsWith(prefix)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",
@@ -237,7 +237,7 @@
237
237
  },
238
238
  "sideEffects": false,
239
239
  "devDependencies": {
240
- "@optique/env": "1.3.4",
240
+ "@optique/env": "1.3.5",
241
241
  "@types/node": "^24.0.0",
242
242
  "fast-check": "^4.7.0",
243
243
  "tsdown": "^0.13.0",