@optique/core 1.0.0-dev.1789 → 1.0.0-dev.1793

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.
@@ -46,7 +46,10 @@ function normalizeInjectedAnnotationState(state) {
46
46
  return require_annotations.unwrapInjectedAnnotationWrapper(state);
47
47
  }
48
48
  /**
49
- * Returns whether a state is still the annotation-wrapped initial sentinel.
49
+ * Returns whether a state is still at the initial sentinel after normalizing
50
+ * Optique's injected annotation wrapper.
51
+ *
52
+ * This treats plain `undefined` and annotation-wrapped `undefined` the same.
50
53
  *
51
54
  * @internal
52
55
  */
@@ -63,7 +66,7 @@ function getWrappedChildParseState(parentState, childState, parser) {
63
66
  const annotations = require_annotations.getAnnotations(parentState);
64
67
  const shouldInheritAnnotations = Reflect.get(parser, require_parser.inheritParentAnnotationsKey) === true;
65
68
  if (childState == null) {
66
- if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations({}, annotations);
69
+ if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations(childState, annotations);
67
70
  return childState;
68
71
  }
69
72
  if (annotations === void 0 || typeof childState !== "object" || require_annotations.getAnnotations(childState) === annotations || !shouldInheritAnnotations) return childState;
@@ -80,7 +83,7 @@ function getWrappedChildState(parentState, childState, parser) {
80
83
  const annotations = require_annotations.getAnnotations(parentState);
81
84
  const shouldInheritAnnotations = Reflect.get(parser, require_parser.inheritParentAnnotationsKey) === true;
82
85
  if (childState == null) {
83
- if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations({}, annotations);
86
+ if (annotations !== void 0 && shouldInheritAnnotations) return require_annotations.injectAnnotations(childState, annotations);
84
87
  return childState;
85
88
  }
86
89
  if (annotations === void 0 || typeof childState !== "object" || require_annotations.getAnnotations(childState) === annotations) return childState;
@@ -46,7 +46,10 @@ function normalizeInjectedAnnotationState(state) {
46
46
  return unwrapInjectedAnnotationWrapper(state);
47
47
  }
48
48
  /**
49
- * Returns whether a state is still the annotation-wrapped initial sentinel.
49
+ * Returns whether a state is still at the initial sentinel after normalizing
50
+ * Optique's injected annotation wrapper.
51
+ *
52
+ * This treats plain `undefined` and annotation-wrapped `undefined` the same.
50
53
  *
51
54
  * @internal
52
55
  */
@@ -63,7 +66,7 @@ function getWrappedChildParseState(parentState, childState, parser) {
63
66
  const annotations = getAnnotations(parentState);
64
67
  const shouldInheritAnnotations = Reflect.get(parser, inheritParentAnnotationsKey) === true;
65
68
  if (childState == null) {
66
- if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations({}, annotations);
69
+ if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations(childState, annotations);
67
70
  return childState;
68
71
  }
69
72
  if (annotations === void 0 || typeof childState !== "object" || getAnnotations(childState) === annotations || !shouldInheritAnnotations) return childState;
@@ -80,7 +83,7 @@ function getWrappedChildState(parentState, childState, parser) {
80
83
  const annotations = getAnnotations(parentState);
81
84
  const shouldInheritAnnotations = Reflect.get(parser, inheritParentAnnotationsKey) === true;
82
85
  if (childState == null) {
83
- if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations({}, annotations);
86
+ if (annotations !== void 0 && shouldInheritAnnotations) return injectAnnotations(childState, annotations);
84
87
  return childState;
85
88
  }
86
89
  if (annotations === void 0 || typeof childState !== "object" || getAnnotations(childState) === annotations) return childState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.1789+57e90898",
3
+ "version": "1.0.0-dev.1793+265902c9",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",