@atproto/api 0.10.1 → 0.10.2
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/CHANGELOG.md +15 -0
- package/dist/index.js +11 -12
- package/dist/index.js.map +2 -2
- package/package.json +6 -6
- package/src/bsky-agent.ts +5 -5
- package/src/client/lexicons.ts +1 -1
- package/src/rich-text/detection.ts +6 -8
- package/tests/bsky-agent.test.ts +8 -1
- package/tests/rich-text-detection.test.ts +16 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atproto/api
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2245](https://github.com/bluesky-social/atproto/pull/2245) [`61b3d2525`](https://github.com/bluesky-social/atproto/commit/61b3d25253353db2da1336004f94e7dc5adb0410) Thanks [@mary-ext](https://github.com/mary-ext)! - Prevent hashtag emoji from being parsed as a tag
|
|
8
|
+
|
|
9
|
+
- [#2218](https://github.com/bluesky-social/atproto/pull/2218) [`43531905c`](https://github.com/bluesky-social/atproto/commit/43531905ce1aec6d36d9be5943782811ecca6e6d) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Fix mute word upsert logic by ensuring we're comparing sanitized word values
|
|
10
|
+
|
|
11
|
+
- [#2245](https://github.com/bluesky-social/atproto/pull/2245) [`61b3d2525`](https://github.com/bluesky-social/atproto/commit/61b3d25253353db2da1336004f94e7dc5adb0410) Thanks [@mary-ext](https://github.com/mary-ext)! - Properly calculate length of tag
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`0c815b964`](https://github.com/bluesky-social/atproto/commit/0c815b964c030aa0f277c40bf9786f130dc320f4)]:
|
|
14
|
+
- @atproto/syntax@0.2.0
|
|
15
|
+
- @atproto/lexicon@0.3.2
|
|
16
|
+
- @atproto/xrpc@0.4.2
|
|
17
|
+
|
|
3
18
|
## 0.10.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -20411,7 +20411,7 @@ var schemaDict = {
|
|
|
20411
20411
|
defs: {
|
|
20412
20412
|
main: {
|
|
20413
20413
|
type: "query",
|
|
20414
|
-
description: "Fetch all labels from a labeler created after a certain date.
|
|
20414
|
+
description: "DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",
|
|
20415
20415
|
parameters: {
|
|
20416
20416
|
type: "params",
|
|
20417
20417
|
properties: {
|
|
@@ -30193,23 +30193,22 @@ function detectFacets(text) {
|
|
|
30193
30193
|
}
|
|
30194
30194
|
}
|
|
30195
30195
|
{
|
|
30196
|
-
const re = /(
|
|
30196
|
+
const re = /(^|\s)#((?!\ufe0f)[^\d\s]\S*)(?=\s)?/g;
|
|
30197
30197
|
while (match = re.exec(text.utf16)) {
|
|
30198
|
-
let [tag] = match;
|
|
30199
|
-
const hasLeadingSpace = /^\s/.test(tag);
|
|
30198
|
+
let [, leading, tag] = match;
|
|
30200
30199
|
tag = tag.trim().replace(/\p{P}+$/gu, "");
|
|
30201
|
-
if (tag.length >
|
|
30200
|
+
if (tag.length === 0 || tag.length > 64)
|
|
30202
30201
|
continue;
|
|
30203
|
-
const index = match.index +
|
|
30202
|
+
const index = match.index + leading.length;
|
|
30204
30203
|
facets.push({
|
|
30205
30204
|
index: {
|
|
30206
30205
|
byteStart: text.utf16IndexToUtf8Index(index),
|
|
30207
|
-
byteEnd: text.utf16IndexToUtf8Index(index + tag.length)
|
|
30206
|
+
byteEnd: text.utf16IndexToUtf8Index(index + 1 + tag.length)
|
|
30208
30207
|
},
|
|
30209
30208
|
features: [
|
|
30210
30209
|
{
|
|
30211
30210
|
$type: "app.bsky.richtext.facet#tag",
|
|
30212
|
-
tag
|
|
30211
|
+
tag
|
|
30213
30212
|
}
|
|
30214
30213
|
]
|
|
30215
30214
|
});
|
|
@@ -32283,17 +32282,17 @@ async function updateMutedWords(agent, mutedWords, action) {
|
|
|
32283
32282
|
let mutedWordsPref = prefs.findLast((pref) => defs_exports5.isMutedWordsPref(pref) && defs_exports5.validateMutedWordsPref(pref).success);
|
|
32284
32283
|
if (mutedWordsPref && defs_exports5.isMutedWordsPref(mutedWordsPref)) {
|
|
32285
32284
|
if (action === "upsert" || action === "update") {
|
|
32286
|
-
for (const
|
|
32285
|
+
for (const word of mutedWords) {
|
|
32287
32286
|
let foundMatch = false;
|
|
32288
32287
|
for (const existingItem of mutedWordsPref.items) {
|
|
32289
|
-
if (existingItem.value ===
|
|
32290
|
-
existingItem.targets = action === "upsert" ? Array.from(/* @__PURE__ */ new Set([...existingItem.targets, ...
|
|
32288
|
+
if (existingItem.value === sanitizeMutedWord(word).value) {
|
|
32289
|
+
existingItem.targets = action === "upsert" ? Array.from(/* @__PURE__ */ new Set([...existingItem.targets, ...word.targets])) : word.targets;
|
|
32291
32290
|
foundMatch = true;
|
|
32292
32291
|
break;
|
|
32293
32292
|
}
|
|
32294
32293
|
}
|
|
32295
32294
|
if (action === "upsert" && !foundMatch) {
|
|
32296
|
-
mutedWordsPref.items.push(sanitizeMutedWord(
|
|
32295
|
+
mutedWordsPref.items.push(sanitizeMutedWord(word));
|
|
32297
32296
|
}
|
|
32298
32297
|
}
|
|
32299
32298
|
} else if (action === "remove") {
|