Merge commit '4e277f83dc740b3a842c7fd8ed167c3c76fcabf8' into glitch-soc/merge-upstream

This commit is contained in:
Claire 2024-01-17 18:09:15 +01:00
commit 8485bedddc
2 changed files with 80 additions and 125 deletions

View file

@ -59,25 +59,19 @@ export const accountsReducer: Reducer<typeof initialState> = (
return normalizeAccounts(state, action.payload.accounts);
else if (followAccountSuccess.match(action)) {
return state
.update(
action.payload.relationship.id,
(account) => account?.update('followers_count', (n) => n + 1),
.update(action.payload.relationship.id, (account) =>
account?.update('followers_count', (n) => n + 1),
)
.update(
getCurrentUser(),
(account) => account?.update('following_count', (n) => n + 1),
.update(getCurrentUser(), (account) =>
account?.update('following_count', (n) => n + 1),
);
} else if (unfollowAccountSuccess.match(action))
return state
.update(
action.payload.relationship.id,
(account) =>
account?.update('followers_count', (n) => Math.max(0, n - 1)),
.update(action.payload.relationship.id, (account) =>
account?.update('followers_count', (n) => Math.max(0, n - 1)),
)
.update(
getCurrentUser(),
(account) =>
account?.update('following_count', (n) => Math.max(0, n - 1)),
.update(getCurrentUser(), (account) =>
account?.update('following_count', (n) => Math.max(0, n - 1)),
);
else return state;
};

183
yarn.lock
View file

@ -2898,15 +2898,15 @@ __metadata:
linkType: hard
"@testing-library/jest-dom@npm:^6.0.0":
version: 6.1.6
resolution: "@testing-library/jest-dom@npm:6.1.6"
version: 6.2.0
resolution: "@testing-library/jest-dom@npm:6.2.0"
dependencies:
"@adobe/css-tools": "npm:^4.3.2"
"@babel/runtime": "npm:^7.9.2"
aria-query: "npm:^5.0.0"
chalk: "npm:^3.0.0"
css.escape: "npm:^1.5.1"
dom-accessibility-api: "npm:^0.5.6"
dom-accessibility-api: "npm:^0.6.3"
lodash: "npm:^4.17.15"
redent: "npm:^3.0.0"
peerDependencies:
@ -2923,7 +2923,7 @@ __metadata:
optional: true
vitest:
optional: true
checksum: f98f79f3e470517469c86947d0ff1bb83ac2e59fd2a29728ab306eca5fba63c948084ec06b7b531642e6002d1f0211d918c298c628f0d386c0ef63ba881c47ba
checksum: 71421693e0ad6a46be7d16f00b58a45725c238693972b8b5b1fd9ab797902ccf1209cf259afe8da1bf59d7c958762c46ee85d1aa5b164a5ec330981ea2376b08
languageName: node
linkType: hard
@ -3682,14 +3682,14 @@ __metadata:
linkType: hard
"@typescript-eslint/eslint-plugin@npm:^6.0.0":
version: 6.16.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.16.0"
version: 6.19.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.19.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.5.1"
"@typescript-eslint/scope-manager": "npm:6.16.0"
"@typescript-eslint/type-utils": "npm:6.16.0"
"@typescript-eslint/utils": "npm:6.16.0"
"@typescript-eslint/visitor-keys": "npm:6.16.0"
"@typescript-eslint/scope-manager": "npm:6.19.0"
"@typescript-eslint/type-utils": "npm:6.19.0"
"@typescript-eslint/utils": "npm:6.19.0"
"@typescript-eslint/visitor-keys": "npm:6.19.0"
debug: "npm:^4.3.4"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.2.4"
@ -3702,54 +3702,44 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: c8a68e0953d8b94f6b85d3a82090e61e670bcb0945cbee4d741321c56db727429ad47c48b8403ad1dab3b0842689bd2d4b85c99b76c51ac4f5be7f5f61c4c314
checksum: ab1a5ace6663b0c6d2418e321328fa28aa4bdc4b5fae257addec01346fb3a9c2d3a2960ade0f7114e6974c513a28632c9e8e602333cc0fab3135c445babdef59
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:^6.17.0":
version: 6.17.0
resolution: "@typescript-eslint/parser@npm:6.17.0"
version: 6.19.0
resolution: "@typescript-eslint/parser@npm:6.19.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:6.17.0"
"@typescript-eslint/types": "npm:6.17.0"
"@typescript-eslint/typescript-estree": "npm:6.17.0"
"@typescript-eslint/visitor-keys": "npm:6.17.0"
"@typescript-eslint/scope-manager": "npm:6.19.0"
"@typescript-eslint/types": "npm:6.19.0"
"@typescript-eslint/typescript-estree": "npm:6.19.0"
"@typescript-eslint/visitor-keys": "npm:6.19.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 66b53159688083eb48259de5b4daf076f3de284ac3b4d2618bda3f7ab2d8ee27b01ae851b08e8487047e33ff3668424f17d677d66413164cb231f1519dcff82f
checksum: d547bfb1aaed112cfc0f9f0be8506a280952ba3b61be42b749352139361bd94e4a47fa043d819e19c6a498cacbd8bb36a46e3628c436a7e2009e7ac27afc8861
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:6.16.0":
version: 6.16.0
resolution: "@typescript-eslint/scope-manager@npm:6.16.0"
"@typescript-eslint/scope-manager@npm:6.19.0":
version: 6.19.0
resolution: "@typescript-eslint/scope-manager@npm:6.19.0"
dependencies:
"@typescript-eslint/types": "npm:6.16.0"
"@typescript-eslint/visitor-keys": "npm:6.16.0"
checksum: 3b275e528d19f4f36c4acd6cb872b5f004175512dce30cef0ac7a9121bb23d21e5e0f4b62658dbfea2b15851e7fa930372696f25a6c87492f863171ab56f5364
"@typescript-eslint/types": "npm:6.19.0"
"@typescript-eslint/visitor-keys": "npm:6.19.0"
checksum: 1ec7b9dedca7975f0aa4543c1c382f7d6131411bd443a5f9b96f137acb6adb450888ed13c95f6d26546b682b2e0579ce8a1c883fdbe2255dc0b61052193b8243
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:6.17.0":
version: 6.17.0
resolution: "@typescript-eslint/scope-manager@npm:6.17.0"
"@typescript-eslint/type-utils@npm:6.19.0":
version: 6.19.0
resolution: "@typescript-eslint/type-utils@npm:6.19.0"
dependencies:
"@typescript-eslint/types": "npm:6.17.0"
"@typescript-eslint/visitor-keys": "npm:6.17.0"
checksum: b7ac7d9c39515c2a1b3844577fab967bf126ec25ccf28076240748b3f42d60ab3e64131bfffee61f66251bdf2d59e50e39f5cb0bee7987c85c49140c75d26b5f
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:6.16.0":
version: 6.16.0
resolution: "@typescript-eslint/type-utils@npm:6.16.0"
dependencies:
"@typescript-eslint/typescript-estree": "npm:6.16.0"
"@typescript-eslint/utils": "npm:6.16.0"
"@typescript-eslint/typescript-estree": "npm:6.19.0"
"@typescript-eslint/utils": "npm:6.19.0"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.0.1"
peerDependencies:
@ -3757,30 +3747,23 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: a5339cc1375d12411fcb242249143b28401fb18890bb2a1cff5275ba946affb4a2066cd8203e83ac383bd9d791a79ea6ee1cbf7a30deed5c832ed002897bbf82
checksum: 5b146b985481e587122026c703ac9f537ad7e90eee1dca814971bca0d7e4a5d4ff9861fb4bf749014c28c6a4fbb4a01a4527355961315eb9501f3569f8e8dd38
languageName: node
linkType: hard
"@typescript-eslint/types@npm:6.16.0":
version: 6.16.0
resolution: "@typescript-eslint/types@npm:6.16.0"
checksum: 74d9a8b7fd1b85fd1824295c92bc2f506148e450c9897f65ddaa089091017df4e25676c5b098b75c8f00529b84492f303a6b1870bb0ffee83997081325891d53
"@typescript-eslint/types@npm:6.19.0":
version: 6.19.0
resolution: "@typescript-eslint/types@npm:6.19.0"
checksum: 6f81860a3c14df55232c2e6dec21fb166867b9f30b3c3369b325aef5ee1c7e41e827c0504654daa49c8ff1a3a9ca9d9bfe76786882b6212a7c1b58991a9c80b9
languageName: node
linkType: hard
"@typescript-eslint/types@npm:6.17.0":
version: 6.17.0
resolution: "@typescript-eslint/types@npm:6.17.0"
checksum: c458d985b9ab4f369018536bcb88f0aedafb0c8c4b22ffd376e0c0c768a44e3956475c85ebeef40ae44238841c8df268893477b85873aa2621995c37e738e37e
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:6.16.0":
version: 6.16.0
resolution: "@typescript-eslint/typescript-estree@npm:6.16.0"
"@typescript-eslint/typescript-estree@npm:6.19.0":
version: 6.19.0
resolution: "@typescript-eslint/typescript-estree@npm:6.19.0"
dependencies:
"@typescript-eslint/types": "npm:6.16.0"
"@typescript-eslint/visitor-keys": "npm:6.16.0"
"@typescript-eslint/types": "npm:6.19.0"
"@typescript-eslint/visitor-keys": "npm:6.19.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
@ -3790,63 +3773,34 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: c7109e90b40b3c8f1042beb7f1a7a97eeba3b6a903acd82df4947900d68bd31d04b530a190c099666c5ca4886efc162de7b42de754a44b189e41237210797d9e
checksum: 5b365f009e43c7beafdbb7d8ecad78ee1087b0a4338cd9ec695eed514b7b4c1089e56239761139ddae629ec0ce8d428840c6ebfeea3618d2efe00c84f8794da5
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:6.17.0":
version: 6.17.0
resolution: "@typescript-eslint/typescript-estree@npm:6.17.0"
dependencies:
"@typescript-eslint/types": "npm:6.17.0"
"@typescript-eslint/visitor-keys": "npm:6.17.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
minimatch: "npm:9.0.3"
semver: "npm:^7.5.4"
ts-api-utils: "npm:^1.0.1"
peerDependenciesMeta:
typescript:
optional: true
checksum: 5a858288bb05f45a2a45b04394115826ff19f85555144bfb67dc281d4e75fc3a1e1aceb3dee68022e86b91f199d1310c15bda3100a4890004b8e474d86afad51
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:6.16.0, @typescript-eslint/utils@npm:^6.5.0":
version: 6.16.0
resolution: "@typescript-eslint/utils@npm:6.16.0"
"@typescript-eslint/utils@npm:6.19.0, @typescript-eslint/utils@npm:^6.5.0":
version: 6.19.0
resolution: "@typescript-eslint/utils@npm:6.19.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@types/json-schema": "npm:^7.0.12"
"@types/semver": "npm:^7.5.0"
"@typescript-eslint/scope-manager": "npm:6.16.0"
"@typescript-eslint/types": "npm:6.16.0"
"@typescript-eslint/typescript-estree": "npm:6.16.0"
"@typescript-eslint/scope-manager": "npm:6.19.0"
"@typescript-eslint/types": "npm:6.19.0"
"@typescript-eslint/typescript-estree": "npm:6.19.0"
semver: "npm:^7.5.4"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
checksum: 586c4c0e1ca249daf9958f0d88df3af010a7592a19db1a7dc198754542b584314896536fe56ea9c93dd0ddd531154e7697002643d46e24a8d3a459721a626e91
checksum: 343ff4cd4f7e102df8c46b41254d017a33d95df76455531fda679fdb92aebb9c111df8ee9ab54972e73c1e8fad9dd7e421001233f0aee8115384462b0821852e
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:6.16.0":
version: 6.16.0
resolution: "@typescript-eslint/visitor-keys@npm:6.16.0"
"@typescript-eslint/visitor-keys@npm:6.19.0":
version: 6.19.0
resolution: "@typescript-eslint/visitor-keys@npm:6.19.0"
dependencies:
"@typescript-eslint/types": "npm:6.16.0"
"@typescript-eslint/types": "npm:6.19.0"
eslint-visitor-keys: "npm:^3.4.1"
checksum: 13c4d90355e288eac432d2845e37bb2acc03dab6d8568564558c1914a9aa44352f2a7ff29d0f50e0b3e68d66cca5f27b2732af5ff193b82571b4366309842880
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:6.17.0":
version: 6.17.0
resolution: "@typescript-eslint/visitor-keys@npm:6.17.0"
dependencies:
"@typescript-eslint/types": "npm:6.17.0"
eslint-visitor-keys: "npm:^3.4.1"
checksum: 75a48f5810c6a69bc1c082b07d2b840c40895807b1b4ecf9d3ab9eb783176eeb3e7b11eb89d652e8331da79d604f82300f315ffc21cd937819197a8601b48d1d
checksum: bb34e922e018aadf34866995ea5949d6623f184cc4f6470ab05767dd208ffabb003b7dc3872199714574b7f10afe89d49c6f89a4e8d086edea82be73e189f1bb
languageName: node
linkType: hard
@ -6836,13 +6790,20 @@ __metadata:
languageName: node
linkType: hard
"dom-accessibility-api@npm:^0.5.6, dom-accessibility-api@npm:^0.5.9":
"dom-accessibility-api@npm:^0.5.9":
version: 0.5.16
resolution: "dom-accessibility-api@npm:0.5.16"
checksum: b2c2eda4fae568977cdac27a9f0c001edf4f95a6a6191dfa611e3721db2478d1badc01db5bb4fa8a848aeee13e442a6c2a4386d65ec65a1436f24715a2f8d053
languageName: node
linkType: hard
"dom-accessibility-api@npm:^0.6.3":
version: 0.6.3
resolution: "dom-accessibility-api@npm:0.6.3"
checksum: 10bee5aa514b2a9a37c87cd81268db607a2e933a050074abc2f6fa3da9080ebed206a320cbc123567f2c3087d22292853bdfdceaffdd4334ffe2af9510b29360
languageName: node
linkType: hard
"dom-helpers@npm:^3.4.0":
version: 3.4.0
resolution: "dom-helpers@npm:3.4.0"
@ -7351,9 +7312,9 @@ __metadata:
linkType: hard
"eslint-define-config@npm:^2.0.0":
version: 2.0.0
resolution: "eslint-define-config@npm:2.0.0"
checksum: 617c3143bc1ed8df0b20ae632d428d5f241dbb04483631e1410c58fe65ba3e503cf94631c5973115482b58ba464d052422a718c0f4d49182f8d13ffbb36bf1d6
version: 2.1.0
resolution: "eslint-define-config@npm:2.1.0"
checksum: 034bd6bfbfec2db6c720a51815de6b072efeef7afbf99d90c23a1871f9cd741bb77f9d34e0bc2465262298c6110c5c45b704714d8575c6567fd2df963fb792ea
languageName: node
linkType: hard
@ -7447,8 +7408,8 @@ __metadata:
linkType: hard
"eslint-plugin-jsdoc@npm:^48.0.0":
version: 48.0.1
resolution: "eslint-plugin-jsdoc@npm:48.0.1"
version: 48.0.2
resolution: "eslint-plugin-jsdoc@npm:48.0.2"
dependencies:
"@es-joy/jsdoccomment": "npm:~0.41.0"
are-docs-informative: "npm:^0.0.2"
@ -7461,7 +7422,7 @@ __metadata:
spdx-expression-parse: "npm:^4.0.0"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
checksum: 9b211cfb2e07e076dad12681cd2045c65766dd24fe9399fd0adeaf6f8785f9a4dd58608f1183195f63d3c6c91013aa1cf9edc9101580cff9cb60e1e688f456f9
checksum: 6e6062c22fa4039e4be898a62f8ca0edef8bcbdc8257abb18302471e9819ccd63941971cf8de0ccf4eb59b3508902aa06de56214d80bdfc9bde7cadb94906190
languageName: node
linkType: hard
@ -7492,8 +7453,8 @@ __metadata:
linkType: hard
"eslint-plugin-prettier@npm:^5.0.0":
version: 5.1.2
resolution: "eslint-plugin-prettier@npm:5.1.2"
version: 5.1.3
resolution: "eslint-plugin-prettier@npm:5.1.3"
dependencies:
prettier-linter-helpers: "npm:^1.0.0"
synckit: "npm:^0.8.6"
@ -7507,7 +7468,7 @@ __metadata:
optional: true
eslint-config-prettier:
optional: true
checksum: e16c9fbb0e9f8da45bdbb1cf6e4a190266235c3686deede3815196d2604bbe2bac531d1fc9adc3c0b9a03d88b55bd3bfaa4f9d85e34e73dc040d545a1931fab9
checksum: f45d5fc1fcfec6b0cf038a7a65ddd10a25df4fe3f9e1f6b7f0d5100e66f046a26a2492e69ee765dddf461b93c114cf2e1eb18d4970aafa6f385448985c136e09
languageName: node
linkType: hard
@ -13271,11 +13232,11 @@ __metadata:
linkType: hard
"prettier@npm:^3.0.0":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
version: 3.2.2
resolution: "prettier@npm:3.2.2"
bin:
prettier: bin/prettier.cjs
checksum: facc944ba20e194ff4db765e830ffbcb642803381f0d2033ed397e79904fa4ccc877dc25ad68f42d36985c01d051c990ca1b905fb83d2d7d65fe69e4386fa1a3
checksum: e84d0d2a4ce2b88ee1636904effbdf68b59da63d9f887128f2ed5382206454185432e7c0a9578bc4308bc25d099cfef47fd0b9c211066777854e23e65e34044d
languageName: node
linkType: hard