From 190fca998e4d23f621f4169ef5b75cd4ce04d39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 5 Nov 2024 17:17:59 +0100 Subject: [PATCH] pl-fe: Exports/deps cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/package.json | 4 ---- packages/pl-fe/src/features/video/index.tsx | 1 - packages/pl-fe/src/reducers/followed-tags.ts | 4 ++-- packages/pl-fe/src/reducers/tags.ts | 4 ++-- .../pl-fe/src/reducers/trending-statuses.ts | 5 ++--- packages/pl-fe/src/selectors/index.ts | 1 - packages/pl-fe/src/stores/modals.ts | 2 +- packages/pl-fe/yarn.lock | 17 +---------------- 8 files changed, 8 insertions(+), 30 deletions(-) diff --git a/packages/pl-fe/package.json b/packages/pl-fe/package.json index 32664306c..fe4898c8a 100644 --- a/packages/pl-fe/package.json +++ b/packages/pl-fe/package.json @@ -81,7 +81,6 @@ "detect-passive-events": "^2.0.0", "emoji-datasource": "15.0.1", "emoji-mart": "^5.6.0", - "escape-html": "^1.0.3", "exifr": "^7.1.3", "fasttext.wasm.js": "^1.0.0", "flexsearch": "^0.7.43", @@ -153,10 +152,8 @@ "@testing-library/react": "^16.0.1", "@testing-library/react-hooks": "^8.0.1", "@testing-library/user-event": "^14.5.2", - "@types/escape-html": "^1.0.4", "@types/leaflet": "^1.9.12", "@types/lodash": "^4.17.9", - "@types/object-assign": "^4.0.33", "@types/path-browserify": "^1.0.3", "@types/react": "^18.3.11", "@types/react-color": "^3.0.12", @@ -166,7 +163,6 @@ "@types/react-sparklines": "^1.7.5", "@types/react-swipeable-views": "^0.13.5", "@types/redux-mock-store": "^1.0.6", - "@types/semver": "^7.5.8", "@typescript-eslint/eslint-plugin": "^8.8.0", "@typescript-eslint/parser": "^8.8.0", "eslint": "^8.57.1", diff --git a/packages/pl-fe/src/features/video/index.tsx b/packages/pl-fe/src/features/video/index.tsx index 38e129c2a..13a400d19 100644 --- a/packages/pl-fe/src/features/video/index.tsx +++ b/packages/pl-fe/src/features/video/index.tsx @@ -569,7 +569,6 @@ const Video: React.FC = ({ export { formatTime, - findElementPosition, getPointerPosition, Video as default, }; diff --git a/packages/pl-fe/src/reducers/followed-tags.ts b/packages/pl-fe/src/reducers/followed-tags.ts index 03c14502f..7aa673f2a 100644 --- a/packages/pl-fe/src/reducers/followed-tags.ts +++ b/packages/pl-fe/src/reducers/followed-tags.ts @@ -7,10 +7,10 @@ import { FOLLOWED_HASHTAGS_EXPAND_REQUEST, FOLLOWED_HASHTAGS_EXPAND_SUCCESS, FOLLOWED_HASHTAGS_EXPAND_FAIL, + TagsAction, } from 'pl-fe/actions/tags'; import type { PaginatedResponse, Tag } from 'pl-api'; -import type { AnyAction } from 'redux'; const ReducerRecord = ImmutableRecord({ items: ImmutableList(), @@ -18,7 +18,7 @@ const ReducerRecord = ImmutableRecord({ next: null as (() => Promise>) | null, }); -const followed_tags = (state = ReducerRecord(), action: AnyAction) => { +const followed_tags = (state = ReducerRecord(), action: TagsAction) => { switch (action.type) { case FOLLOWED_HASHTAGS_FETCH_REQUEST: return state.set('isLoading', true); diff --git a/packages/pl-fe/src/reducers/tags.ts b/packages/pl-fe/src/reducers/tags.ts index 69096b8f3..7675d69c9 100644 --- a/packages/pl-fe/src/reducers/tags.ts +++ b/packages/pl-fe/src/reducers/tags.ts @@ -6,14 +6,14 @@ import { HASHTAG_FOLLOW_FAIL, HASHTAG_UNFOLLOW_REQUEST, HASHTAG_UNFOLLOW_FAIL, + type TagsAction, } from 'pl-fe/actions/tags'; import type { Tag } from 'pl-api'; -import type { AnyAction } from 'redux'; const initialState = ImmutableMap(); -const tags = (state = initialState, action: AnyAction) => { +const tags = (state = initialState, action: TagsAction) => { switch (action.type) { case HASHTAG_FETCH_SUCCESS: return state.set(action.name, action.tag); diff --git a/packages/pl-fe/src/reducers/trending-statuses.ts b/packages/pl-fe/src/reducers/trending-statuses.ts index c9f964de9..66f44d674 100644 --- a/packages/pl-fe/src/reducers/trending-statuses.ts +++ b/packages/pl-fe/src/reducers/trending-statuses.ts @@ -1,9 +1,8 @@ import { Record as ImmutableRecord } from 'immutable'; -import { TRENDING_STATUSES_FETCH_REQUEST, TRENDING_STATUSES_FETCH_SUCCESS } from 'pl-fe/actions/trending-statuses'; +import { TRENDING_STATUSES_FETCH_REQUEST, TRENDING_STATUSES_FETCH_SUCCESS, type TrendingStatusesAction } from 'pl-fe/actions/trending-statuses'; import type { Status } from 'pl-api'; -import type { AnyAction } from 'redux'; const ReducerRecord = ImmutableRecord({ items: Array(), @@ -20,7 +19,7 @@ const importStatuses = (state: State, statuses: Array) => state.set('isLoading', false); }); -const trending_statuses = (state: State = ReducerRecord(), action: AnyAction) => { +const trending_statuses = (state: State = ReducerRecord(), action: TrendingStatusesAction) => { switch (action.type) { case TRENDING_STATUSES_FETCH_REQUEST: return state.set('isLoading', true); diff --git a/packages/pl-fe/src/selectors/index.ts b/packages/pl-fe/src/selectors/index.ts index e2acb9ca8..5043b296a 100644 --- a/packages/pl-fe/src/selectors/index.ts +++ b/packages/pl-fe/src/selectors/index.ts @@ -356,7 +356,6 @@ const makeGetStatusIds = () => createSelector([ export { type RemoteInstance, selectAccount, - selectAccounts, selectOwnAccount, makeGetAccount, getFilters, diff --git a/packages/pl-fe/src/stores/modals.ts b/packages/pl-fe/src/stores/modals.ts index c8d8db48a..107dce67f 100644 --- a/packages/pl-fe/src/stores/modals.ts +++ b/packages/pl-fe/src/stores/modals.ts @@ -103,4 +103,4 @@ const useModalsStore = create((set) => ({ })), })); -export { useModalsStore, type OpenModalProps }; +export { useModalsStore }; diff --git a/packages/pl-fe/yarn.lock b/packages/pl-fe/yarn.lock index 4d8e2154f..aed313f75 100644 --- a/packages/pl-fe/yarn.lock +++ b/packages/pl-fe/yarn.lock @@ -2441,11 +2441,6 @@ resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.39.13.tgz#afeb1648648dc096efe57983e20387627306e2aa" integrity sha512-cFq+fO/isvhvmuP/+Sl4K4jtU6E23DoivtbO4r50e3odaxAiVdbfSYRDdJ4gCdxx+3aRjhphS5ZMwIH4hFy/Cw== -"@types/escape-html@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@types/escape-html/-/escape-html-1.0.4.tgz#dc7c166b76c7b03b27e32f80edf01d91eb5d9af2" - integrity sha512-qZ72SFTgUAZ5a7Tj6kf2SHLetiH5S6f8G5frB2SPQ3EyF02kxdyBFf4Tz4banE3xCgGnKgWLt//a6VuYHKYJTg== - "@types/eslint@9": version "9.6.1" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" @@ -2541,11 +2536,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== -"@types/object-assign@^4.0.33": - version "4.0.33" - resolved "https://registry.yarnpkg.com/@types/object-assign/-/object-assign-4.0.33.tgz#62546e6192d6fa639b040afdbb514bb10daff2dd" - integrity sha512-HeuamLPmpVPuJU/oY7z/YGAezy4HFy6mhvzwupi9Xc8n0FKY8tR1/U3AKaOn/I5Mb4dvbw2szSYcXi84eW07TQ== - "@types/path-browserify@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@types/path-browserify/-/path-browserify-1.0.3.tgz#25de712d4def94b3901f033c30d3d3bd16eba8d3" @@ -2646,7 +2636,7 @@ resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== -"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.8": +"@types/semver@^7.3.12", "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== @@ -4704,11 +4694,6 @@ escalade@^3.2.0: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-html@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"