perf: remove semver dependency and skip version checks (#509)
This commit is contained in:
parent
3442adbeb6
commit
8d8b2b0a01
|
@ -44,14 +44,13 @@ export const useUsers = () => users
|
|||
export const characterLimit = computed(() => currentInstance.value?.configuration.statuses.maxCharacters ?? DEFAULT_POST_CHARS_LIMIT)
|
||||
|
||||
async function loginTo(user?: Omit<UserLogin, 'account'> & { account?: AccountCredentials }) {
|
||||
const config = useRuntimeConfig()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const server = user?.server || route.params.server as string || publicServer.value
|
||||
const masto = await loginMasto({
|
||||
url: `https://${server}`,
|
||||
accessToken: user?.token,
|
||||
disableVersionCheck: !!config.public.disableVersionCheck,
|
||||
disableVersionCheck: true,
|
||||
// Suppress warning of `masto/fetch` usage
|
||||
disableExperimentalWarning: true,
|
||||
})
|
||||
|
|
|
@ -40,6 +40,8 @@ export default defineNuxtConfig({
|
|||
'querystring': 'rollup-plugin-node-polyfills/polyfills/qs',
|
||||
'masto/fetch': 'masto/fetch',
|
||||
'masto': 'masto/fetch',
|
||||
'change-case': 'scule',
|
||||
'semver': 'unenv/runtime/mock/empty',
|
||||
},
|
||||
vite: {
|
||||
define: {
|
||||
|
@ -84,10 +86,6 @@ export default defineNuxtConfig({
|
|||
env: isCI ? isPreview ? 'staging' : 'production' : 'local',
|
||||
pwaEnabled: !isDevelopment || process.env.VITE_DEV_PWA === 'true',
|
||||
translateApi: '',
|
||||
// Masto uses Mastodon version checks to see what features are enabled.
|
||||
// Mastodon alternatives like GoToSocial will always fail these checks, so
|
||||
// provide a way to disable them.
|
||||
disableVersionCheck: false,
|
||||
},
|
||||
storage: {
|
||||
driver: isCI ? 'cloudflare' : 'fs',
|
||||
|
|
Loading…
Reference in a new issue