📦 Chore(custom): update scripts and migrate to esm

This commit is contained in:
Kuingsmile
2025-07-31 17:59:39 +08:00
parent c80587aaf0
commit af4e8145cd
13 changed files with 547 additions and 540 deletions

View File

@@ -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
})