Skip to content

Commit

Permalink
removed update check
Browse files Browse the repository at this point in the history
  • Loading branch information
NyllRE committed Jun 8, 2024
1 parent 72ce5a1 commit 556aee7
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
addServerScanDir,
logger,
} from '@nuxt/kit'
import { $fetch } from 'ofetch'
// import { $fetch } from 'ofetch'
import defu from 'defu'
import { version } from '../package.json'

Expand All @@ -32,20 +32,14 @@ export default defineNuxtModule<ModuleOptions>({
})

if (nuxt.options.dev) {
$fetch('https://registry.npmjs.org/nuxt-file-storage/latest')
.then((release: any) => {
if (release.version > version)
logger.info(
`A new version of Nuxt File Storage (v${release.version}) is available: https://github.com/nyllre/nuxt-file-storage/releases/latest`,
)
})
.catch(() => {})

if (!config.public.fileStorage.version) {
config.public.fileStorage = defu(config.public.fileStorage, {
version: '0.0.0',
})
}
// $fetch('https://registry.npmjs.org/nuxt-file-storage/latest')
// .then((release: any) => {
// if (release.version > version)
// logger.info(
// `A new version of Nuxt File Storage (v${release.version}) is available: https://github.com/nyllre/nuxt-file-storage/releases/latest`,
// )
// })
// .catch(() => {})

//? Check for updates and alert users of new features
//! I couldn't find a way to detect new updates to warn one time so it will warn every time the server runs again, if you know how to warn about a breaking change only the first run after an update feel free to open a new pull request
Expand Down

0 comments on commit 556aee7

Please sign in to comment.