mirror of https://github.com/mx-space/core
parent
34373f9578
commit
df81a6740b
|
@ -1,4 +1,4 @@
|
|||
const { resolve } = require('path')
|
||||
const { resolve } = require('node:path')
|
||||
const axios = require('axios')
|
||||
const { fs } = require('zx-cjs')
|
||||
const {
|
||||
|
@ -8,7 +8,10 @@ const Package = require('./package.json')
|
|||
const endpoint = `https://api.github.com/repos/${repo}/releases/latest`
|
||||
|
||||
const latestVersion = async () => {
|
||||
const res = await axios.get(endpoint)
|
||||
const res = await axios.get(endpoint).catch((error) => {
|
||||
console.error(error.message)
|
||||
process.exit(1)
|
||||
})
|
||||
return res.data.tag_name.replace(/^v/, '')
|
||||
}
|
||||
async function main() {
|
||||
|
|
|
@ -31,7 +31,6 @@ export default sxzz(
|
|||
eqeqeq: 'off',
|
||||
|
||||
'no-void': 0,
|
||||
'@typescript-eslint/consistent-type-imports': 'warn',
|
||||
'@typescript-eslint/consistent-type-assertions': 0,
|
||||
'no-restricted-syntax': 0,
|
||||
'unicorn/filename-case': 0,
|
||||
|
|
Loading…
Reference in New Issue