@optique/core 1.0.0-dev.1739 → 1.0.0-dev.1743
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/dist/modifiers.cjs +1 -6
- package/dist/modifiers.js +2 -7
- package/package.json +1 -1
package/dist/modifiers.cjs
CHANGED
|
@@ -94,12 +94,7 @@ function isPromiseLike(value) {
|
|
|
94
94
|
*/
|
|
95
95
|
function deriveOptionalInnerParseState(outerState, parser) {
|
|
96
96
|
if (Array.isArray(outerState)) return outerState[0];
|
|
97
|
-
|
|
98
|
-
if (outerState != null && typeof outerState === "object") {
|
|
99
|
-
const annotations = require_annotations.getAnnotations(outerState);
|
|
100
|
-
if (annotations != null) return require_annotations.injectAnnotations(initial, annotations);
|
|
101
|
-
}
|
|
102
|
-
return initial;
|
|
97
|
+
return require_annotations.inheritAnnotations(outerState, parser.initialState);
|
|
103
98
|
}
|
|
104
99
|
/**
|
|
105
100
|
* Internal helper for optional-style parsing logic shared by optional()
|
package/dist/modifiers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { annotateFreshArray, annotationKey, getAnnotations, inheritAnnotations,
|
|
1
|
+
import { annotateFreshArray, annotationKey, getAnnotations, inheritAnnotations, isInjectedAnnotationWrapper, unwrapInjectedAnnotationWrapper } from "./annotations.js";
|
|
2
2
|
import { formatMessage, message, text } from "./message.js";
|
|
3
3
|
import { dispatchByMode, dispatchIterableByMode, mapModeValue } from "./mode-dispatch.js";
|
|
4
4
|
import { composeDependencyMetadata } from "./dependency-metadata.js";
|
|
@@ -94,12 +94,7 @@ function isPromiseLike(value) {
|
|
|
94
94
|
*/
|
|
95
95
|
function deriveOptionalInnerParseState(outerState, parser) {
|
|
96
96
|
if (Array.isArray(outerState)) return outerState[0];
|
|
97
|
-
|
|
98
|
-
if (outerState != null && typeof outerState === "object") {
|
|
99
|
-
const annotations = getAnnotations(outerState);
|
|
100
|
-
if (annotations != null) return injectAnnotations(initial, annotations);
|
|
101
|
-
}
|
|
102
|
-
return initial;
|
|
97
|
+
return inheritAnnotations(outerState, parser.initialState);
|
|
103
98
|
}
|
|
104
99
|
/**
|
|
105
100
|
* Internal helper for optional-style parsing logic shared by optional()
|