@optique/core 1.0.0-dev.1202 → 1.0.0-dev.1211
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/valueparser.cjs +4 -1
- package/dist/valueparser.d.cts +3 -1
- package/dist/valueparser.d.ts +3 -1
- package/dist/valueparser.js +4 -1
- package/package.json +1 -1
package/dist/valueparser.cjs
CHANGED
|
@@ -802,7 +802,9 @@ function locale(options = {}) {
|
|
|
802
802
|
* By default, the parser enforces strict [RFC 9562] validation: it requires
|
|
803
803
|
* a standardized version digit (1 through 8) and the RFC 9562 variant bits
|
|
804
804
|
* (`10xx`). The nil and max UUIDs are accepted as special standard values.
|
|
805
|
-
* Set `strict: false` to disable
|
|
805
|
+
* Set `strict: false` to disable the default RFC 9562 version/variant
|
|
806
|
+
* checks. An explicit {@link UuidOptions.allowedVersions} list still
|
|
807
|
+
* constrains the version nibble even in lenient mode.
|
|
806
808
|
*
|
|
807
809
|
* [RFC 9562]: https://www.rfc-editor.org/rfc/rfc9562
|
|
808
810
|
* @param options Configuration options for the UUID parser.
|
|
@@ -813,6 +815,7 @@ function uuid(options = {}) {
|
|
|
813
815
|
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
814
816
|
const metavar = options.metavar ?? "UUID";
|
|
815
817
|
require_nonempty.ensureNonEmptyString(metavar);
|
|
818
|
+
checkBooleanOption(options, "strict");
|
|
816
819
|
const strict = options.strict !== false;
|
|
817
820
|
const allowedVersions = options.allowedVersions != null ? Object.freeze([...options.allowedVersions]) : null;
|
|
818
821
|
const invalidUuid = options.errors?.invalidUuid;
|
package/dist/valueparser.d.cts
CHANGED
|
@@ -625,7 +625,9 @@ interface UuidOptions {
|
|
|
625
625
|
* By default, the parser enforces strict [RFC 9562] validation: it requires
|
|
626
626
|
* a standardized version digit (1 through 8) and the RFC 9562 variant bits
|
|
627
627
|
* (`10xx`). The nil and max UUIDs are accepted as special standard values.
|
|
628
|
-
* Set `strict: false` to disable
|
|
628
|
+
* Set `strict: false` to disable the default RFC 9562 version/variant
|
|
629
|
+
* checks. An explicit {@link UuidOptions.allowedVersions} list still
|
|
630
|
+
* constrains the version nibble even in lenient mode.
|
|
629
631
|
*
|
|
630
632
|
* [RFC 9562]: https://www.rfc-editor.org/rfc/rfc9562
|
|
631
633
|
* @param options Configuration options for the UUID parser.
|
package/dist/valueparser.d.ts
CHANGED
|
@@ -625,7 +625,9 @@ interface UuidOptions {
|
|
|
625
625
|
* By default, the parser enforces strict [RFC 9562] validation: it requires
|
|
626
626
|
* a standardized version digit (1 through 8) and the RFC 9562 variant bits
|
|
627
627
|
* (`10xx`). The nil and max UUIDs are accepted as special standard values.
|
|
628
|
-
* Set `strict: false` to disable
|
|
628
|
+
* Set `strict: false` to disable the default RFC 9562 version/variant
|
|
629
|
+
* checks. An explicit {@link UuidOptions.allowedVersions} list still
|
|
630
|
+
* constrains the version nibble even in lenient mode.
|
|
629
631
|
*
|
|
630
632
|
* [RFC 9562]: https://www.rfc-editor.org/rfc/rfc9562
|
|
631
633
|
* @param options Configuration options for the UUID parser.
|
package/dist/valueparser.js
CHANGED
|
@@ -802,7 +802,9 @@ function locale(options = {}) {
|
|
|
802
802
|
* By default, the parser enforces strict [RFC 9562] validation: it requires
|
|
803
803
|
* a standardized version digit (1 through 8) and the RFC 9562 variant bits
|
|
804
804
|
* (`10xx`). The nil and max UUIDs are accepted as special standard values.
|
|
805
|
-
* Set `strict: false` to disable
|
|
805
|
+
* Set `strict: false` to disable the default RFC 9562 version/variant
|
|
806
|
+
* checks. An explicit {@link UuidOptions.allowedVersions} list still
|
|
807
|
+
* constrains the version nibble even in lenient mode.
|
|
806
808
|
*
|
|
807
809
|
* [RFC 9562]: https://www.rfc-editor.org/rfc/rfc9562
|
|
808
810
|
* @param options Configuration options for the UUID parser.
|
|
@@ -813,6 +815,7 @@ function uuid(options = {}) {
|
|
|
813
815
|
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
814
816
|
const metavar = options.metavar ?? "UUID";
|
|
815
817
|
ensureNonEmptyString(metavar);
|
|
818
|
+
checkBooleanOption(options, "strict");
|
|
816
819
|
const strict = options.strict !== false;
|
|
817
820
|
const allowedVersions = options.allowedVersions != null ? Object.freeze([...options.allowedVersions]) : null;
|
|
818
821
|
const invalidUuid = options.errors?.invalidUuid;
|