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

Revert "Export all missing modules in compat" #4032

Merged
merged 1 commit into from
Sep 28, 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
7 changes: 0 additions & 7 deletions extensions/emoji/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/emoji/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ app.initializers.add('flarum-emoji', () => {
// render emoji as image in Posts content and title.
renderEmoji();
});

// Expose compat API
import emojiCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, emojiCompat);
2 changes: 0 additions & 2 deletions extensions/flags/js/src/forum/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import FlagList from './components/FlagList';
import FlagPostModal from './components/FlagPostModal';
import FlagsPage from './components/FlagsPage';
import FlagsDropdown from './components/FlagsDropdown';
import FlagListState from './states/FlagListState';

export default {
'flags/addFlagsToPosts': addFlagsToPosts,
Expand All @@ -17,5 +16,4 @@ export default {
'flags/components/FlagPostModal': FlagPostModal,
'flags/components/FlagsPage': FlagsPage,
'flags/components/FlagsDropdown': FlagsDropdown,
'flags/states/FlagListState': FlagListState,
};
11 changes: 0 additions & 11 deletions extensions/likes/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/likes/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@ app.initializers.add('flarum-likes', () => {
});
});
});

// Expose compat API
import likesCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, likesCompat);
7 changes: 0 additions & 7 deletions extensions/lock/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/lock/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@ app.initializers.add('flarum-lock', () => {
});
});
});

// Expose compat API
import lockCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, lockCompat);
5 changes: 0 additions & 5 deletions extensions/markdown/js/src/admin/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/markdown/js/src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,3 @@ import app from 'flarum/admin/app';
import { initialize } from '../common/index';

app.initializers.add('flarum-markdown', initialize);

// Expose compat API
import markdownCompat from './compat';
import { compat } from '@flarum/core/admin';

Object.assign(compat, markdownCompat);
7 changes: 0 additions & 7 deletions extensions/markdown/js/src/common/compat.ts

This file was deleted.

5 changes: 0 additions & 5 deletions extensions/markdown/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/markdown/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,3 @@ import app from 'flarum/forum/app';
import { initialize } from '../common/index';

app.initializers.add('flarum-markdown', initialize);

// Expose compat API
import markdownCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, markdownCompat);
22 changes: 0 additions & 22 deletions extensions/mentions/js/src/forum/compat.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import GroupMentionedNotification from './components/GroupMentionedNotification';
import MentionedByModal from './components/MentionedByModal';
import MentionsDropdownItem from './components/MentionsDropdownItem';
import MentionsUserPage from './components/MentionsUserPage';
import PostMentionedNotification from './components/PostMentionedNotification';
import UserMentionedNotification from './components/UserMentionedNotification';
Expand All @@ -11,24 +9,13 @@ import getMentionText from './utils/getMentionText';
import * as reply from './utils/reply';
import selectedText from './utils/selectedText';
import * as textFormatter from './utils/textFormatter';
import GroupMention from './mentionables/GroupMention';
import MentionableModel from './mentionables/MentionableModel';
import MentionableModels from './mentionables/MentionableModels';
import PostMention from './mentionables/PostMention';
import TagMention from './mentionables/TagMention';
import UserMention from './mentionables/UserMention';
import AtMentionFormat from './mentionables/formats/AtMentionFormat';
import HashMentionFormat from './mentionables/formats/HashMentionFormat';
import MentionFormat from './mentionables/formats/MentionFormat';
import MentionFormats from './mentionables/formats/MentionFormats';
import Mentionables from './extenders/Mentionables';
import MentionedByModalState from './state/MentionedByModalState';

export default {
'mentions/components/MentionsUserPage': MentionsUserPage,
'mentions/components/PostMentionedNotification': PostMentionedNotification,
'mentions/components/MentionedByModal': MentionedByModal,
'mentions/components/MentionsDropdownItem': MentionsDropdownItem,
'mentions/components/UserMentionedNotification': UserMentionedNotification,
'mentions/components/GroupMentionedNotification': GroupMentionedNotification,
'mentions/fragments/AutocompleteDropdown': AutocompleteDropdown,
Expand All @@ -38,16 +25,7 @@ export default {
'mentions/utils/reply': reply,
'mentions/utils/selectedText': selectedText,
'mentions/utils/textFormatter': textFormatter,
'mentions/mentionables/GroupMention': GroupMention,
'mentions/mentionables/MentionableModel': MentionableModel,
'mentions/mentionables/MentionableModels': MentionableModels,
'mentions/mentionables/PostMention': PostMention,
'mentions/mentionables/TagMention': TagMention,
'mentions/mentionables/UserMention': UserMention,
'mentions/mentionables/formats/AtMentionFormat': AtMentionFormat,
'mentions/mentionables/formats/HashMentionFormat': HashMentionFormat,
'mentions/mentionables/formats/MentionFormat': MentionFormat,
'mentions/mentionables/formats/MentionFormats': MentionFormats,
'mentions/extenders/Mentionables': Mentionables,
'mentions/state/MentionedByModalState': MentionedByModalState,
};
5 changes: 0 additions & 5 deletions extensions/nicknames/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/nicknames/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,3 @@ app.initializers.add('flarum/nicknames', () => {
}
});
});

// Expose compat API
import nicknamesCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, nicknamesCompat);
52 changes: 0 additions & 52 deletions extensions/package-manager/js/src/admin/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/package-manager/js/src/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,3 @@ app.initializers.add('flarum-extension-manager', (app) => {
);
});
});

// Expose compat API
import packageManagerCompat from './compat';
import { compat } from '@flarum/core/admin';

Object.assign(compat, packageManagerCompat);
11 changes: 0 additions & 11 deletions extensions/statistics/js/src/admin/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/statistics/js/src/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ app.initializers.add('flarum-statistics', () => {

app.extensionData.for('flarum-statistics').registerPage(StatisticsPage);
});

// Expose compat API
import statisticsCompat from './compat';
import { compat } from '@flarum/core/admin';

Object.assign(compat, statisticsCompat);
5 changes: 0 additions & 5 deletions extensions/sticky/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/sticky/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ app.initializers.add('flarum-sticky', () => {
addStickyExcerpt();
addStickyClass();
});

// Expose compat API
import stickyCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, stickyCompat);
9 changes: 0 additions & 9 deletions extensions/subscriptions/js/src/forum/compat.ts

This file was deleted.

6 changes: 0 additions & 6 deletions extensions/subscriptions/js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,3 @@ app.initializers.add('subscriptions', function () {
});
});
});

// Expose compat API
import subscriptionsCompat from './compat';
import { compat } from '@flarum/core/forum';

Object.assign(compat, subscriptionsCompat);
2 changes: 0 additions & 2 deletions extensions/suspend/js/src/forum/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ import SuspendUserModal from './components/SuspendUserModal';
import SuspensionInfoModal from './components/SuspensionInfoModal';
import UserSuspendedNotification from './components/UserSuspendedNotification';
import UserUnsuspendedNotification from './components/UserUnsuspendedNotification';
import * as suspensionHelper from './helpers/suspensionHelper';
import checkForSuspension from './checkForSuspension';

export default {
'suspend/components/suspendUserModal': SuspendUserModal,
'suspend/components/suspensionInfoModal': SuspensionInfoModal,
'suspend/components/UserSuspendedNotification': UserSuspendedNotification,
'suspend/components/UserUnsuspendedNotification': UserUnsuspendedNotification,
'suspend/helpers/suspensionHelper': suspensionHelper,
'suspend/checkForSuspension': checkForSuspension,
};
2 changes: 0 additions & 2 deletions extensions/tags/js/src/admin/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import addTagsHomePageOption from './addTagsHomePageOption';
import addTagChangePermission from './addTagChangePermission';
import TagsPage from './components/TagsPage';
import EditTagModal from './components/EditTagModal';
import SelectTagsSettingComponent from './components/SelectTagsSettingComponent';
import addTagPermission from './addTagPermission';
import addTagsPermissionScope from './addTagsPermissionScope';

Expand All @@ -13,7 +12,6 @@ export default Object.assign(compat, {
'tags/addTagChangePermission': addTagChangePermission,
'tags/components/TagsPage': TagsPage,
'tags/components/EditTagModal': EditTagModal,
'tags/components/SelectTagsSettingComponent': SelectTagsSettingComponent,
'tags/addTagPermission': addTagPermission,
'tags/addTagsPermissionScope': addTagsPermissionScope,
});
2 changes: 0 additions & 2 deletions extensions/tags/js/src/forum/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import addTagControl from './addTagControl';
import TagHero from './components/TagHero';
import TagDiscussionModal from './components/TagDiscussionModal';
import TagsPage from './components/TagsPage';
import ToggleButton from './components/ToggleButton';
import DiscussionTaggedPost from './components/DiscussionTaggedPost';
import TagLinkButton from './components/TagLinkButton';
import addTagList from './addTagList';
Expand All @@ -19,7 +18,6 @@ export default Object.assign(compat, {
'tags/components/TagHero': TagHero,
'tags/components/TagDiscussionModal': TagDiscussionModal,
'tags/components/TagsPage': TagsPage,
'tags/components/ToggleButton': ToggleButton,
'tags/components/DiscussionTaggedPost': DiscussionTaggedPost,
'tags/components/TagLinkButton': TagLinkButton,
'tags/addTagList': addTagList,
Expand Down
8 changes: 0 additions & 8 deletions framework/core/js/src/admin/compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import ExtensionsWidget from './components/ExtensionsWidget';
import HeaderSecondary from './components/HeaderSecondary';
import SettingsModal from './components/SettingsModal';
import DashboardWidget from './components/DashboardWidget';
import DebugWarningWidget from './components/DebugWarningWidget';
import ExtensionPage from './components/ExtensionPage';
import ExtensionLinkButton from './components/ExtensionLinkButton';
import PermissionGrid from './components/PermissionGrid';
Expand All @@ -29,7 +28,6 @@ import UserListPage from './components/UserListPage';
import EditCustomHeaderModal from './components/EditCustomHeaderModal';
import PermissionsPage from './components/PermissionsPage';
import PermissionDropdown from './components/PermissionDropdown';
import ReadmeModal from './components/ReadmeModal';
import AdminNav from './components/AdminNav';
import AdminHeader from './components/AdminHeader';
import EditCustomCssModal from './components/EditCustomCssModal';
Expand All @@ -38,8 +36,6 @@ import routes from './routes';
import AdminApplication from './AdminApplication';
import generateElementId from './utils/generateElementId';
import CreateUserModal from './components/CreateUserModal';
import ExtensionReadme from './models/ExtensionReadme';
import ExtensionPageResolver from './resolvers/ExtensionPageResolver';

export default Object.assign(compat, {
'utils/saveSettings': saveSettings,
Expand All @@ -58,7 +54,6 @@ export default Object.assign(compat, {
'components/HeaderSecondary': HeaderSecondary,
'components/SettingsModal': SettingsModal,
'components/DashboardWidget': DashboardWidget,
'components/DebugWarningWidget': DebugWarningWidget,
'components/ExtensionPage': ExtensionPage,
'components/ExtensionLinkButton': ExtensionLinkButton,
'components/PermissionGrid': PermissionGrid,
Expand All @@ -72,14 +67,11 @@ export default Object.assign(compat, {
'components/EditCustomHeaderModal': EditCustomHeaderModal,
'components/PermissionsPage': PermissionsPage,
'components/PermissionDropdown': PermissionDropdown,
'components/ReadmeModal': ReadmeModal,
'components/AdminNav': AdminNav,
'components/AdminHeader': AdminHeader,
'components/EditCustomCssModal': EditCustomCssModal,
'components/EditGroupModal': EditGroupModal,
'components/CreateUserModal': CreateUserModal,
'models/ExtensionReadme': ExtensionReadme,
'resolvers/ExtensionPageResolver': ExtensionPageResolver,
routes: routes,
AdminApplication: AdminApplication,
});
Loading
Loading