Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
38 KiB
@atproto/lex-schema
0.0.19
Patch Changes
-
#4806
26d793aThanks @matthieusieben! - ExportAtUriStringutilities from@atproto/syntax -
Updated dependencies [
26d793a,26d793a,26d793a,55d06de,26d793a]:- @atproto/syntax@0.5.4
0.0.18
Patch Changes
-
#4828
c62651dThanks @matthieusieben! - Accept legacy blob references in non-strict mode. Legacy blob references (objects withcidandmimeTypeproperties) are now accepted whenstrict: false, which is the default behavior whenstrictResponseProcessingis disabled on the Client.BREAKING: The
allowLegacyoption has been removed from the blob schema builder, and legacy blobs are now handled automatically based on the strictness mode: in strict mode they are rejected, and in non-strict mode they are accepted. Consumers should stop passingallowLegacyand rely on strictness configuration instead. Likewise, CLI consumers should stop using the removed--allowLegacyBlobsflag and use the default strict/non-strict behavior. -
Updated dependencies [
c62651d,f6f100c,c62651d,c62651d]:- @atproto/lex-data@0.0.15
0.0.17
Patch Changes
-
#4779
527f5d4Thanks @matthieusieben! - UpdatelexErrorDataSchemato match spec (rejectingerrorconstants with whitespace) -
#4787
c4df84cThanks @matthieusieben! - Optimize counting of graphemes when validating strings -
#4779
527f5d4Thanks @matthieusieben! - Fixbuild()method of record and typed object to not perform validation. -
#4784
e5e5bcfThanks @matthieusieben! - Show invalid values in issue description (when stringifiable in reasonably small string) -
#4796
ac6bd18Thanks @matthieusieben! - Allow specifyingValidateOptionstomatches()andifMathces()method, allowing disabling "strict" mode -
#4799
c5c6c7dThanks @matthieusieben! - Allow any encoding to match payload that don't expect any particular encoding -
Updated dependencies [
0dbea15,d0c136c,527f5d4]:- @atproto/syntax@0.5.2
0.0.16
Patch Changes
-
#4761
6a88461Thanks @matthieusieben! - Allow using a dynamic non-strict validation mode -
Updated dependencies [
6a88461]:- @atproto/lex-data@0.0.14
0.0.15
Patch Changes
-
#4734
3dc3791Thanks @matthieusieben! - RenameIssueInvalidFormat'smessageproperty todetail -
#4734
3dc3791Thanks @matthieusieben! - Add a read-onlymessageproperty to theIssueclass -
#4734
3dc3791Thanks @matthieusieben! -LexValidationErrorclass now implementsResultFailureallowing it to be used as validation return value directly (without the need to be wrapped) -
#4734
3dc3791Thanks @matthieusieben! - Update stringification of issues (toString()) to consistently display the error path at the end. -
112b159Thanks @matthieusieben! - Export more string format type assertion utilities -
#4734
3dc3791Thanks @matthieusieben! -PropertyKeyis no longer exported. Use the global value instead. -
#4734
3dc3791Thanks @matthieusieben! - Add Standard Schema compatibility -
Updated dependencies [
67eb0c1]:- @atproto/syntax@0.5.1
0.0.14
Patch Changes
-
#4688
52834abThanks @matthieusieben! - AllowWWWAuthenticateto have multiple challenges for the same scheme -
#4689
f7c2610Thanks @matthieusieben! - Export moreDatetimeStringutilities from@atproto/syntax -
#4688
52834abThanks @matthieusieben! - Make$utility function bound to the instance, allowing to use them without the schema asthiscontext -
#4688
52834abThanks @matthieusieben! - Ignore empty strings fromparamsparsing -
#4688
52834abThanks @matthieusieben! - RenamingValidationErrortoLexValidationErrorfor consistency withLexError& sub-classes -
Updated dependencies [
f7c2610,f7c2610,f7c2610,f7c2610,52834ab,f7c2610,52834ab,f7c2610,52834ab]:- @atproto/syntax@0.5.0
- @atproto/lex-data@0.0.13
0.0.13
Patch Changes
-
#4654
39dea03Thanks @matthieusieben! - Params cannot be arrays of mixed string, number and booleans (items can only be of one type) -
#4660
ea5df64Thanks @matthieusieben! - Improve typeing ofstring()schemas -
#4660
ea5df64Thanks @matthieusieben! - Fix import statement -
#4654
39dea03Thanks @matthieusieben! - Schemas now define atypeproperty that allows to better discriminate them -
#4654
39dea03Thanks @matthieusieben! - Add support forknownValuesin string schemas -
#4660
ea5df64Thanks @matthieusieben! - ExposeMaybeTypedObjecttype utility (retrun type ofTypedObjectSchema.isTypeOfmethod) -
#4654
39dea03Thanks @matthieusieben! - Properly support "enum" and "const" schemas in params -
#4660
ea5df64Thanks @matthieusieben! - Allow usingInferMethod*type helpers without any argument -
#4660
ea5df64Thanks @matthieusieben! - Minor optimization when checking payload encoding -
#4660
ea5df64Thanks @matthieusieben! - Improve error messages when encountering an unexpected legacy blob -
#4660
ea5df64Thanks @matthieusieben! - Add newissueUnexpectedTypemethod onValidationContextto better allow creation issues with multiple allowed types -
#4660
ea5df64Thanks @matthieusieben! - Update validation message for $typed object to match working of@atproto/lexicon -
#4660
ea5df64Thanks @matthieusieben! - ReplaceUnknownObjectwithLexMapto improve consistency with underlying data structure being validated -
#4660
ea5df64Thanks @matthieusieben! - ExposeTypedRecordtype utility (result ofRecordSchema.isTypeOfmethid -
Updated dependencies [
ea5df64]:- @atproto/lex-data@0.0.12
0.0.12
Patch Changes
-
#4603
7b9a98aThanks @matthieusieben! - Constrain XRPCPayloadto beLexValueinstead ofunknown(better reflecting reality) -
#4603
7b9a98aThanks @matthieusieben! - Properly infer type of genericPayloadbody -
#4601
ed61c62Thanks @matthieusieben! - Fixexportsfield in package.json -
#4603
7b9a98aThanks @matthieusieben! - Properly coerce params into arrays when defined as such -
#4603
7b9a98aThanks @matthieusieben! - Constrain subscriptionmessageschema to validateLexValueonly -
#4601
ed61c62Thanks @matthieusieben! - Add JSDoc -
Updated dependencies [
ed61c62,ed61c62]:- @atproto/lex-data@0.0.11
0.0.11
Patch Changes
- Updated dependencies [
369bb02]:- @atproto/lex-data@0.0.10
0.0.10
Patch Changes
-
#4571
99963d0Thanks @matthieusieben! - RemoveasXandassertXstring format assertion utilities -
#4562
7310b97Thanks @matthieusieben! - Memoize array schemas (without options) -
#4562
7310b97Thanks @matthieusieben! - Removedefaultoption fromstring,integer,boolean,enumandliteraltypes. These are replace with a newwithDefault()type wrapper. -
#4562
7310b97Thanks @matthieusieben! -TypedObjectandRecord'sbuild()method now performs parsing of the input data (ensuring that defaults are applied). -
#4562
7310b97Thanks @matthieusieben! - RenameTypedObjecttoUnknown$TypedObject -
#4562
7310b97Thanks @matthieusieben! - Distinguish "parse" and "validation" modes when checking against a schema. Validation (validate()andsafeValidate()) only ensures that a value matches the input schema, while parsing (parse()andsafeParse()) will also apply defaults and coerce input values into the expected output type. -
#4562
7310b97Thanks @matthieusieben! - RenamecidLink()tocid() -
#4562
7310b97Thanks @matthieusieben! - Memoize emptyparamsschemas -
#4571
99963d0Thanks @matthieusieben! - Improve performance of string format checking -
#4562
7310b97Thanks @matthieusieben! - Fix inability to assign (object containing) open union results toLexMaptype -
#4562
7310b97Thanks @matthieusieben! - Add newUnknown$Typetype to represent records an object's unknown$typeproperty (typically from open unions). -
#4562
7310b97Thanks @matthieusieben! - RenameUnknownObjectOutputtoUnknownObject -
#4562
7310b97Thanks @matthieusieben! - Fail early when validating nested structures -
Updated dependencies [
99963d0,99963d0,99963d0,7310b97,99963d0,99963d0,99963d0]:- @atproto/syntax@0.4.3
- @atproto/lex-data@0.0.9
0.0.9
Patch Changes
0.0.8
Patch Changes
-
#4512
d78484fThanks @matthieusieben! - Add stricter validation rules forCidSchema -
#4512
d78484fThanks @matthieusieben! - ExposetokenSchemavalueas public property -
Updated dependencies [
d78484f,d78484f,d78484f]:- @atproto/lex-data@0.0.7
0.0.7
Patch Changes
-
#4501
2f78893Thanks @matthieusieben! - Export new$TypedMaybetype util -
Updated dependencies [
2f78893,2f78893,2f78893]:- @atproto/lex-data@0.0.6
0.0.6
Patch Changes
-
#4443
9af7a2dThanks @matthieusieben! - RemoveLexMapexported type -
#4443
9af7a2dThanks @matthieusieben! - AddjsonPayloadschema builder utilities -
#4443
9af7a2dThanks @matthieusieben! - ExposelexErrorDatavalidation schema -
#4443
9af7a2dThanks @matthieusieben! - ExposeMain<T>andgetMain()helpers to work with namespaced schemas -
#4443
9af7a2dThanks @matthieusieben! - Simplify definition ofTypedObject -
#4443
9af7a2dThanks @matthieusieben! -ValidationErrornow extendLexError(from@atproto/data) -
#4443
9af7a2dThanks @matthieusieben! - Memoize most popular schemas -
Updated dependencies [
9af7a2d,9af7a2d]:- @atproto/lex-data@0.0.5
0.0.5
Patch Changes
-
#4457
e6b6107Thanks @matthieusieben! - Addcast()method to Schema classes. This acts as a type cast that does not alter the value or throws if the value does not match the schema. -
#4457
e6b6107Thanks @matthieusieben! - Forbid use of unsafe integers -
#4457
e6b6107Thanks @matthieusieben! - ReplaceInferParamsSchemawithInferMethodParams -
#4457
e6b6107Thanks @matthieusieben! - AddmatchesEncodingmethod on thePayloadSchemaclass. -
#4457
e6b6107Thanks @matthieusieben! - ReplaceInferProcedureParameterswithInferMethodParams -
#4457
e6b6107Thanks @matthieusieben! - Export format checking utilities for string (isDidString,isCidString, etc.) -
#4457
e6b6107Thanks @matthieusieben! - Expose$TypedandUn$Typedutilities -
#4457
e6b6107Thanks @matthieusieben! - RenameResultFailure's error field toreason -
#4457
e6b6107Thanks @matthieusieben! - Type theencodingfield ofPayloadmore accurately. Methods with an encoding of*/*are now correctly represented as${string}/${string}instead of the*/*literal type. -
#4457
e6b6107Thanks @matthieusieben! - AddmatchesMimeutility method onBlobSchemaclass -
#4457
e6b6107Thanks @matthieusieben! - Enforce size and accept options when validating blobs -
#4457
e6b6107Thanks @matthieusieben! - ReplaceInferProcedureInputBodywithInferMethodInputBody -
#4457
e6b6107Thanks @matthieusieben! - Addcheck()method to all Schema classes. That method is an alias for theassert()method that allows to avoidts(2775)errors. -
#4457
e6b6107Thanks @matthieusieben! - Rename format assertion and checking utilities to all contain theStringprefix (like inasAtUriString,assertAtUriString, etc.) -
#4457
e6b6107Thanks @matthieusieben! - ReplaceInferProcedureOutputBodywithInferMethodOutputBody -
Updated dependencies [
e6b6107,e6b6107,e6b6107,e6b6107,e6b6107]:- @atproto/lex-data@0.0.4
0.0.4
Patch Changes
- Updated dependencies [
693784c]:- @atproto/lex-data@0.0.3
0.0.3
Patch Changes
-
#4390
1d445afThanks @matthieusieben! - Adddefaultoption toliteralandenumschemas -
#4390
1d445afThanks @matthieusieben! - Rework object validation logic to work withoutoptionsargument -
#4390
1d445afThanks @matthieusieben! -literalschemas no longer use the value as "default". The "default" must now be explicitly provided. -
#4390
1d445afThanks @matthieusieben! - Usel.nullablefor nullable object properties andl.optionalfor optional object properties in lex schemas. -
#4390
1d445afThanks @matthieusieben! - Addl.refineutility to add custom refinements to existing schemas. -
#4401
a487ab8Thanks @matthieusieben! - Add test suite for all schema types -
#4401
a487ab8Thanks @matthieusieben! - Allowarrayschema's generic to be both a Validator type or an item value type -
#4390
1d445afThanks @matthieusieben! - Validation issues are now child classed to theIssueabstract class instead of simple objects with interfaces. This allows for better extensibility and custom behavior on issues (such as custom error messages). -
#4390
1d445afThanks @matthieusieben! - Replace use ofCIDwithCid -
#4401
a487ab8Thanks @matthieusieben! - DroplexiconTypeproperty -
#4401
a487ab8Thanks @matthieusieben! - Fix type oftypedObjectandrecordschemas -
#4390
1d445afThanks @matthieusieben! - Remove options (required,nullable) fromobjectschemas. Those are replaced byl.optionalandl.nullablewrappers. -
#4390
1d445afThanks @matthieusieben! - Discriminated unions now only accept discriminators to be declared aliteralorenumschemas and will throw at initialization if discriminators values aren't strictly disjoined. -
#4389
bcae2b7Thanks @matthieusieben! - Use string formats from@atproto/syntax -
#4389
bcae2b7Thanks @matthieusieben! - Addl.regexpschema builder -
#4390
1d445afThanks @matthieusieben! - Requirel.discriminatedUniondiscriminator field to be aliteralorenumschema -
#4401
a487ab8Thanks @matthieusieben! - SimplifyParamsSchemainterface -
#4390
1d445afThanks @matthieusieben! - Remove options (required) fromparamsschemas. Those are replaced byl.optionalwrappers. -
#4387
9f87ff3Thanks @matthieusieben! - Simplifydicttype definition -
#4390
1d445afThanks @matthieusieben! - Rename schema methodsvalidate,checkandmaybetosafeParse,matchesandifMatchesrespectively. -
#4397
688f9d6Thanks @matthieusieben! - AddCHANGELOG.mdto npm package -
#4390
1d445afThanks @matthieusieben! - Adddefaultoption toconstandenumschemas -
Updated dependencies [
1d445af,1d445af,bcae2b7,688f9d6]:- @atproto/lex-data@0.0.2
- @atproto/syntax@0.4.2
0.0.2
Patch Changes
- #4380
23c271fThanks @matthieusieben! - Useliteralvalue as default
0.0.1
Patch Changes
-
#4371
46550d6Thanks @matthieusieben! - Release -
Updated dependencies [
46550d6]:- @atproto/lex-data@0.0.1