Skip to content

Commit 3347d82

Browse files
authored
Merge pull request #1076 from kmycode/upstream-20251217
Upstream 20251217
2 parents 1e95d88 + 5db2e09 commit 3347d82

File tree

385 files changed

+6637
-2766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+6637
-2766
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.11
1+
24.12

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.7
1+
3.4.8

.storybook/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const config: StorybookConfig = {
2727
'oops.gif',
2828
'oops.png',
2929
].map((path) => ({ from: `../public/${path}`, to: `/${path}` })),
30+
{ from: '../app/javascript/images/logo.svg', to: '/custom-emoji/logo.svg' },
3031
],
3132
viteFinal(config) {
3233
// For an unknown reason, Storybook does not use the root

.storybook/preview.tsx

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import type { Preview } from '@storybook/react-vite';
1111
import { initialize, mswLoader } from 'msw-storybook-addon';
1212
import { action } from 'storybook/actions';
1313

14+
import {
15+
importCustomEmojiData,
16+
importLegacyShortcodes,
17+
importEmojiData,
18+
} from '@/mastodon/features/emoji/loader';
1419
import type { LocaleData } from '@/mastodon/locales';
1520
import { reducerWithInitialState } from '@/mastodon/reducers';
1621
import { defaultMiddleware } from '@/mastodon/store/store';
@@ -50,12 +55,31 @@ const preview: Preview = {
5055
locale: 'en',
5156
},
5257
decorators: [
53-
(Story, { parameters, globals, args }) => {
58+
(Story, { parameters, globals, args, argTypes }) => {
5459
// Get the locale from the global toolbar
5560
// and merge it with any parameters or args state.
5661
const { locale } = globals as { locale: string };
5762
const { state = {} } = parameters;
58-
const { state: argsState = {} } = args;
63+
64+
const argsState: Record<string, unknown> = {};
65+
for (const [key, value] of Object.entries(args)) {
66+
const argType = argTypes[key];
67+
if (argType?.reduxPath) {
68+
const reduxPath = Array.isArray(argType.reduxPath)
69+
? argType.reduxPath.map((p) => p.toString())
70+
: argType.reduxPath.split('.');
71+
72+
reduxPath.reduce((acc, key, i) => {
73+
if (acc[key] === undefined) {
74+
acc[key] = {};
75+
}
76+
if (i === reduxPath.length - 1) {
77+
acc[key] = value;
78+
}
79+
return acc[key] as Record<string, unknown>;
80+
}, argsState);
81+
}
82+
}
5983

6084
const reducer = reducerWithInitialState(
6185
{
@@ -64,7 +88,7 @@ const preview: Preview = {
6488
},
6589
},
6690
state as Record<string, unknown>,
67-
argsState as Record<string, unknown>,
91+
argsState,
6892
);
6993

7094
const store = configureStore({
@@ -127,7 +151,12 @@ const preview: Preview = {
127151
</MemoryRouter>
128152
),
129153
],
130-
loaders: [mswLoader],
154+
loaders: [
155+
mswLoader,
156+
importCustomEmojiData,
157+
importLegacyShortcodes,
158+
({ globals: { locale } }) => importEmojiData(locale as string),
159+
],
131160
parameters: {
132161
layout: 'centered',
133162

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
// The addon package.json incorrectly exports types, so we need to override them here.
2+
3+
import type { RootState } from '@/mastodon/store';
4+
25
// See: https://github.com/storybookjs/storybook/blob/v9.0.4/code/addons/vitest/package.json#L70-L76
36
declare module '@storybook/addon-vitest/vitest-plugin' {
47
export * from '@storybook/addon-vitest/dist/vitest-plugin/index';
58
}
69

10+
type RootPathKeys = keyof RootState;
11+
12+
declare module 'storybook/internal/csf' {
13+
export interface InputType {
14+
reduxPath?:
15+
| `${RootPathKeys}.${string}`
16+
| [RootPathKeys, ...(string | number)[]];
17+
}
18+
}
19+
720
export {};

.yarn/patches/babel-plugin-lodash-npm-3.3.4-c7161075b6.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.5.3] - 2025-12-08
6+
7+
### Security
8+
9+
- Fix inconsistent error handling leaking information on existence of private posts ([GHSA-gwhw-gcjx-72v8](https://github.com/mastodon/mastodon/security/advisories/GHSA-gwhw-gcjx-72v8))
10+
11+
### Fixed
12+
13+
- Fix “Delete and Redraft” on a non-quote being treated as a quote post in some cases (#37140 by @ClearlyClaire)
14+
- Fix YouTube embeds by sending referer (#37126 by @ChaosExAnima)
15+
- Fix streamed quoted polls not being hydrated correctly (#37118 by @ClearlyClaire)
16+
- Fix creation of duplicate conversations (#37108 by @oneiros)
17+
- Fix extraneous `noreferrer` in external links (#37107 by @ChaosExAnima)
18+
- Fix edge case error handling in some database migrations (#37079 by @ClearlyClaire)
19+
- Fix error handling when re-fetching already-known statuses (#37077 by @ClearlyClaire)
20+
- Fix post navigation in single-column mode when Advanced UI is enabled (#37044 by @diondiondion)
21+
- Fix `tootctl status remove` removing quoted posts and remote quotes of local posts (#37009 by @ClearlyClaire)
22+
- Fix known expensive S3 batch delete operation failing because of short timeouts (#37004 by @ClearlyClaire)
23+
- Fix compose autosuggest always lowercasing input token (#36995 by @ClearlyClaire)
24+
525
## [4.5.2] - 2025-11-20
626

727
### Changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ARG BASE_REGISTRY="docker.io"
1313

1414
# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.4.x"]
1515
# renovate: datasource=docker depName=docker.io/ruby
16-
ARG RUBY_VERSION="3.4.7"
16+
ARG RUBY_VERSION="3.4.8"
1717
# # Node.js version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="22"]
1818
# renovate: datasource=node-version depName=node
1919
ARG NODE_MAJOR_VERSION="24"

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ group :test do
138138
# Browser integration testing
139139
gem 'capybara', '~> 3.39'
140140
gem 'capybara-playwright-driver'
141-
gem 'playwright-ruby-client', '1.56.0', require: false # Pinning the exact version as it needs to be kept in sync with the installed npm package
141+
gem 'playwright-ruby-client', '1.57.0', require: false # Pinning the exact version as it needs to be kept in sync with the installed npm package
142142

143143
# Used to reset the database between system tests
144144
gem 'database_cleaner-active_record'

0 commit comments

Comments
 (0)