Compare commits

...

4 Commits

Author SHA1 Message Date
zyoshoka 81739b1f82
chore: follow up on fixing Chromatic CI diff strategy (#15912) 2025-04-29 21:22:01 +09:00
Julia 583df3ec63
Merge commit from fork
none of our endpoints will ever contain `..` (they might, maybe, at
some point, contain `.`, as in `something/get.html`?), so every
`Mk:api()` call to an endpoint that contains `..` can't work: let's
reject it outright

Co-authored-by: dakkar <dakkar@thenautilus.net>
2025-04-29 18:06:39 +09:00
github-actions[bot] 2cd3fbf1a3 Bump version to 2025.4.1-beta.9 2025-04-29 08:58:11 +00:00
かっこかり f8b0863b8e
fix(frontend): fix lint (#15906)
* fix(frontend): attempt to fix lint

* fix lint
2025-04-29 15:54:57 +09:00
6 changed files with 30 additions and 17 deletions

View File

@ -78,7 +78,7 @@ jobs:
if: github.event_name == 'pull_request_target'
id: chromatic_pull_request
run: |
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF} | xargs))"
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff --name-only origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF} | xargs))"
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi

View File

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2025.4.1-beta.8",
"version": "2025.4.1-beta.9",
"codename": "nasubi",
"repository": {
"type": "git",

View File

@ -6,17 +6,30 @@
import * as Misskey from 'misskey-js';
export function shouldCollapsed(note: Misskey.entities.Note, urls: string[]): boolean {
const collapsed = note.cw == null && (
(note.text != null && (
(note.text.includes('$[x2')) ||
(note.text.includes('$[x3')) ||
(note.text.includes('$[x4')) ||
(note.text.includes('$[scale')) ||
(note.text.split('\n').length > 9) ||
(note.text.length > 500) ||
(urls.length >= 4)
)) || (note.files != null && note.files.length >= 5)
);
if (note.cw != null) {
return false;
}
return collapsed;
if (note.text != null) {
if (
note.text.includes('$[x2') ||
note.text.includes('$[x3') ||
note.text.includes('$[x4') ||
note.text.includes('$[scale') ||
note.text.split('\n').length > 9 ||
note.text.length > 500
) {
return true;
}
}
if (urls.length >= 4) {
return true;
}
if (note.files != null && note.files.length >= 5) {
return true;
}
return false;
}

View File

@ -39,7 +39,7 @@ export function maybeMakeRelative(urlStr: string, baseStr: string): string {
return urlObj.pathname + urlObj.search + urlObj.hash;
}
return urlStr;
} catch (e) {
} catch {
return '';
}
}

View File

@ -68,7 +68,7 @@ export function createAiScriptEnv(opts: { storageKey: string, token?: string })
}),
'Mk:api': values.FN_NATIVE(async ([ep, param, token]) => {
utils.assertString(ep);
if (ep.value.includes('://')) {
if (ep.value.includes('://') || ep.value.includes('..')) {
throw new errors.AiScriptRuntimeError('invalid endpoint');
}
if (token) {

View File

@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
"version": "2025.4.1-beta.8",
"version": "2025.4.1-beta.9",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",