diff options
author | Hailey <me@haileyok.com> | 2024-08-12 14:00:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-12 14:00:15 -0700 |
commit | 7df2327424e948e54b9731e5ab651e889f38a772 (patch) | |
tree | cd6513394de29696124374d1a72bd4cd78cbc1a7 /patches | |
parent | ae883e2df7bc53baca215fba527fe113e71cb5c2 (diff) | |
download | voidsky-7df2327424e948e54b9731e5ab651e889f38a772.tar.zst |
Upgrade API, implement XRPC rework (#4857)
Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/@atproto+lexicon+0.4.0.patch | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/patches/@atproto+lexicon+0.4.0.patch b/patches/@atproto+lexicon+0.4.0.patch deleted file mode 100644 index 4643db32a..000000000 --- a/patches/@atproto+lexicon+0.4.0.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/node_modules/@atproto/lexicon/dist/validators/complex.js b/node_modules/@atproto/lexicon/dist/validators/complex.js -index 32d7798..9d688b7 100644 ---- a/node_modules/@atproto/lexicon/dist/validators/complex.js -+++ b/node_modules/@atproto/lexicon/dist/validators/complex.js -@@ -113,7 +113,22 @@ function object(lexicons, path, def, value) { - if (value[key] === null && nullableProps.has(key)) { - continue; - } -- const propDef = def.properties[key]; -+ const propDef = def.properties[key] -+ if (typeof value[key] === 'undefined' && !requiredProps.has(key)) { -+ // Fast path for non-required undefined props. -+ if ( -+ propDef.type === 'integer' || -+ propDef.type === 'boolean' || -+ propDef.type === 'string' -+ ) { -+ if (typeof propDef.default === 'undefined') { -+ continue -+ } -+ } else { -+ // Other types have no defaults. -+ continue -+ } -+ } - const propPath = `${path}/${key}`; - const validated = (0, util_1.validateOneOf)(lexicons, propPath, propDef, value[key]); - const propValue = validated.success ? validated.value : value[key]; |