mirror of https://github.com/tauri-apps/tauri
Disable version check with semver for now (#1810)
This commit is contained in:
parent
a68b4ee827
commit
66b6136e06
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Packages are checked with `!=` instead of `semver` for beta releases.
|
|
@ -38,11 +38,11 @@ export class YarnManager implements IManager {
|
|||
getLatestVersion(packageName: string): string {
|
||||
const child = crossSpawnSync(
|
||||
'yarn',
|
||||
['info', packageName, 'versions', '--json'],
|
||||
['info', packageName, 'version', '--json'],
|
||||
{ cwd: appDir }
|
||||
)
|
||||
const output = String(child.output[1])
|
||||
const packageJson = JSON.parse(output) as { data: string[] }
|
||||
return packageJson.data[packageJson.data.length - 1]
|
||||
const packageJson = JSON.parse(output) as { data: string }
|
||||
return packageJson.data
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import { sync as crossSpawnSync } from 'cross-spawn'
|
||||
import { resolve as appResolve } from '../../helpers/app-paths'
|
||||
import { existsSync } from 'fs'
|
||||
import semver from 'semver'
|
||||
// import semver from 'semver'
|
||||
import { IManager, NpmManager, YarnManager, PnpmManager } from './managers'
|
||||
|
||||
const getManager = (): IManager => {
|
||||
|
@ -60,7 +60,9 @@ function padVersion(version: string): string {
|
|||
}
|
||||
|
||||
function semverLt(first: string, second: string): boolean {
|
||||
return semver.lt(padVersion(first), padVersion(second))
|
||||
return first !== second
|
||||
// TODO: When version 1.0.0 is released this code should work again
|
||||
// return semver.lt(padVersion(first), padVersion(second))
|
||||
}
|
||||
|
||||
export {
|
||||
|
|
Loading…
Reference in New Issue