Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove app alias for imports #8314

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/actions/local/category.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import {DMS_CATEGORY} from '@app/constants/categories';
import {setCurrentUserId} from '@app/queries/servers/system';
import {DMS_CATEGORY} from '@constants/categories';
import DatabaseManager from '@database/manager';
import {setCurrentUserId} from '@queries/servers/system';

import {
deleteCategory,
Expand Down
2 changes: 1 addition & 1 deletion app/actions/local/channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
updateDmGmDisplayName,
} from './channel';

import type {ChannelModel, MyChannelModel, SystemModel} from '@app/database/models/server';
import type {ChannelModel, MyChannelModel, SystemModel} from '@database/models/server';
import type ServerDataOperator from '@database/operator/server_data_operator';
import type {Database} from '@nozbe/watermelondb';

Expand Down
4 changes: 2 additions & 2 deletions app/actions/local/post.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import {ActionType, Post} from '@app/constants';
import {COMBINED_USER_ACTIVITY} from '@app/utils/post_list';
import {ActionType, Post} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import TestHelper from '@test/test_helper';
import {COMBINED_USER_ACTIVITY} from '@utils/post_list';

import {
sendAddToChannelEphemeralPost,
Expand Down
2 changes: 1 addition & 1 deletion app/actions/local/reactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as logUtils from '@utils/log';

import {addRecentReaction} from './reactions';

import type ServerDataOperator from '@app/database/operator/server_data_operator';
import type ServerDataOperator from '@database/operator/server_data_operator';

jest.mock('@database/manager');
jest.mock('@queries/servers/system');
Expand Down
4 changes: 2 additions & 2 deletions app/actions/local/systems.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import Database from '@nozbe/watermelondb/Database';

import {ActionType} from '@app/constants';
import {SYSTEM_IDENTIFIERS} from '@app/constants/database';
import {ActionType} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import TestHelper from '@test/test_helper';

Expand Down
2 changes: 1 addition & 1 deletion app/actions/local/team.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import ServerDataOperator from '@app/database/operator/server_data_operator';
import DatabaseManager from '@database/manager';
import ServerDataOperator from '@database/operator/server_data_operator';
import {getMyTeamById, getTeamById, getTeamSearchHistoryById, prepareDeleteTeam, removeTeamFromTeamHistory} from '@queries/servers/team';
import {logError} from '@utils/log';

Expand Down
2 changes: 1 addition & 1 deletion app/actions/local/thread.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import {ActionType} from '@app/constants';
import {ActionType} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import Preferences from '@constants/preferences';
import DatabaseManager from '@database/manager';
Expand Down
2 changes: 1 addition & 1 deletion app/actions/local/user.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import {SYSTEM_IDENTIFIERS} from '@app/constants/database';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';

import {
Expand Down
4 changes: 2 additions & 2 deletions app/actions/remote/post.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

/* eslint-disable max-lines */

import {ActionType, Post} from '@app/constants';
import PostModel from '@app/database/models/server/post';
import {ActionType, Post} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import PostModel from '@database/models/server/post';
import NetworkManager from '@managers/network_manager';
import TestHelper from '@test/test_helper';

Expand Down
4 changes: 2 additions & 2 deletions app/actions/remote/preference.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/* eslint-disable max-lines */

import {Preferences} from '@app/constants';
import {Preferences} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import NetworkManager from '@managers/network_manager';
Expand All @@ -22,7 +22,7 @@ import {
savePreferredSkinTone,
} from './preference';

import type {PreferenceModel} from '@app/database/models/server';
import type {PreferenceModel} from '@database/models/server';
import type ServerDataOperator from '@database/operator/server_data_operator';

const serverUrl = 'baseHandler.test.com';
Expand Down
2 changes: 1 addition & 1 deletion app/actions/remote/reactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/* eslint-disable max-lines */

import {ActionType} from '@app/constants';
import {ActionType} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import NetworkManager from '@managers/network_manager';
Expand Down
2 changes: 1 addition & 1 deletion app/actions/remote/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// See LICENSE.txt for license information.

import {getPosts} from '@actions/local/post';
import {General} from '@app/constants';
import {General} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import NetworkManager from '@managers/network_manager';
Expand Down
2 changes: 1 addition & 1 deletion app/actions/remote/thread.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/* eslint-disable max-lines */

import {ActionType} from '@app/constants';
import {ActionType} from '@constants';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import DatabaseManager from '@database/manager';
import NetworkManager from '@managers/network_manager';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {Button} from '@rneui/base';
import React, {useCallback, useRef, useState} from 'react';
import {StyleSheet, View} from 'react-native';

import ProgressBar from '@app/components/progress_bar';
import {useTheme} from '@app/context/theme';
import Document, {type DocumentRef} from '@components/document';
import ProgressBar from '@components/progress_bar';
import {useTheme} from '@context/theme';

import BookmarkDetails from './bookmark_details';

Expand Down
2 changes: 1 addition & 1 deletion app/components/post_list/post/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import {View} from 'react-native';

import FormattedText from '@app/components/formatted_text';
import FormattedText from '@components/formatted_text';
import FormattedTime from '@components/formatted_time';
import PostPriorityLabel from '@components/post_priority/post_priority_label';
import {CHANNEL, THREAD} from '@constants/screens';
Expand Down
2 changes: 1 addition & 1 deletion app/products/calls/components/call_notification/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {withObservables} from '@nozbe/watermelondb/react';
import {of as of$} from 'rxjs';
import {distinctUntilChanged, switchMap} from 'rxjs/operators';

import {observeAllActiveServers} from '@app/queries/app/servers';
import {CallNotification} from '@calls/components/call_notification/call_notification';
import DatabaseManager from '@database/manager';
import {observeAllActiveServers} from '@queries/app/servers';
import {observeChannelMembers} from '@queries/servers/channel';
import {observeCurrentUser, observeTeammateNameDisplay} from '@queries/servers/user';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {View, Text, Platform, type Insets} from 'react-native';
import {Shadow} from 'react-native-shadow-2';

import {uploadFile} from '@actions/remote/file';
import CompassIcon from '@app/components/compass_icon';
import FileIcon from '@app/components/files/file_icon';
import ProgressBar from '@app/components/progress_bar';
import CompassIcon from '@components/compass_icon';
import FileIcon from '@components/files/file_icon';
import FormattedText from '@components/formatted_text';
import ProgressBar from '@components/progress_bar';
import TouchableWithFeedback from '@components/touchable_with_feedback';
import {useServerUrl} from '@context/server';
import {useTheme} from '@context/theme';
Expand Down
2 changes: 1 addition & 1 deletion app/screens/channel_bookmark/components/bookmark_link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import React, {useCallback, useMemo, useState} from 'react';
import {useIntl} from 'react-intl';
import {Platform, View} from 'react-native';

import {useIsTablet} from '@app/hooks/device';
import FloatingTextInput from '@components/floating_text_input_label';
import FormattedText from '@components/formatted_text';
import Loading from '@components/loading';
import {useTheme} from '@context/theme';
import {debounce} from '@helpers/api/general';
import {useIsTablet} from '@hooks/device';
import useDidUpdate from '@hooks/did_update';
import {fetchOpenGraph} from '@utils/opengraph';
import {changeOpacity, getKeyboardAppearanceFromTheme, makeStyleSheetFromTheme} from '@utils/theme';
Expand Down
10 changes: 5 additions & 5 deletions app/screens/code/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import React, {useCallback, useEffect} from 'react';
import {StyleSheet, type TextStyle} from 'react-native';
import {SafeAreaView, type Edge} from 'react-native-safe-area-context';

import CompassIcon from '@app/components/compass_icon';
import {SNACK_BAR_TYPE} from '@app/constants/snack_bar';
import {useTheme} from '@app/context/theme';
import useNavButtonPressed from '@app/hooks/navigation_button_pressed';
import {showSnackBar} from '@app/utils/snack_bar';
import CompassIcon from '@components/compass_icon';
import SyntaxHiglight from '@components/syntax_highlight';
import {SNACK_BAR_TYPE} from '@constants/snack_bar';
import {useTheme} from '@context/theme';
import useAndroidHardwareBackHandler from '@hooks/android_back_handler';
import useNavButtonPressed from '@hooks/navigation_button_pressed';
import {popTopScreen, setButtons} from '@screens/navigation';
import {showSnackBar} from '@utils/snack_bar';

import type {AvailableScreens} from '@typings/screens/navigation';

Expand Down
2 changes: 1 addition & 1 deletion app/screens/gallery/footer/avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {StyleSheet, View} from 'react-native';

import {buildAbsoluteUrl} from '@actions/remote/file';
import {buildProfileImageUrlFromUser} from '@actions/remote/user';
import {useServerUrl} from '@app/context/server';
import CompassIcon from '@components/compass_icon';
import {useServerUrl} from '@context/server';
import {changeOpacity} from '@utils/theme';

import type UserModel from '@typings/database/models/servers/user';
Expand Down
2 changes: 1 addition & 1 deletion app/screens/home/tab_bar/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import React, {useEffect, useState} from 'react';
import {DeviceEventEmitter, Platform, StyleSheet, View} from 'react-native';
import {Notifications} from 'react-native-notifications';

import useDidUpdate from '@app/hooks/did_update';
import Badge from '@components/badge';
import CompassIcon from '@components/compass_icon';
import {BOTTOM_TAB_ICON_SIZE} from '@constants/view';
import {subscribeAllServers} from '@database/subscription/servers';
import {subscribeUnreadAndMentionsByServer, type UnreadObserverArgs} from '@database/subscription/unreads';
import {useAppState} from '@hooks/device';
import useDidUpdate from '@hooks/did_update';
import {logDebug} from '@utils/log';
import {changeOpacity} from '@utils/theme';

Expand Down
2 changes: 1 addition & 1 deletion app/utils/deep_link/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import urlParse from 'url-parse';
import {makeDirectChannel, switchToChannelByName} from '@actions/remote/channel';
import {showPermalink} from '@actions/remote/permalink';
import {fetchUsersByUsernames} from '@actions/remote/user';
import DeepLinkType from '@app/constants/deep_linking';
import {DeepLink, Launch, Screens} from '@constants';
import DeepLinkType from '@constants/deep_linking';
import {getDefaultThemeByAppearance} from '@context/theme';
import DatabaseManager from '@database/manager';
import {DEFAULT_LOCALE, t} from '@i18n';
Expand Down
1 change: 0 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
root: ['.'],
alias: {
'@actions': './app/actions',
'@app': './app/',
'@assets': './dist/assets/',
'@calls': './app/products/calls',
'@client': './app/client',
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"baseUrl": ".",
"paths": {
"@actions/*": ["app/actions/*"],
"@app/*": ["app/*"],
"@assets/*": ["dist/assets/*"],
"@calls/*": ["app/products/calls/*"],
"@client/*": ["app/client/*"],
Expand Down