mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-02 14:49:44 +08:00
📦 Chore(custom): update scripts and migrate to esm
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const ncu = require('npm-check-updates')
|
||||
const axios = require('axios')
|
||||
import axios from 'axios'
|
||||
import { run } from 'npm-check-updates'
|
||||
|
||||
async function getRepositoryInfo(packageName) {
|
||||
async function getRepositoryInfo (packageName) {
|
||||
try {
|
||||
const { data } = await axios.get(`https://registry.npmjs.org/${packageName}`)
|
||||
const repository = data.repository
|
||||
@@ -17,8 +17,8 @@ async function getRepositoryInfo(packageName) {
|
||||
return null
|
||||
}
|
||||
|
||||
async function checkUpdates() {
|
||||
const updated = await ncu.run({
|
||||
async function checkUpdates () {
|
||||
const updated = await run({
|
||||
packageFile: './package.json',
|
||||
upgrade: false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user