bump 5.0.0

This commit is contained in:
Takanashi Hoshino
2026-10-17 20:21:42 +08:00
parent 49c7800afe
commit 1bdc85998b
4 changed files with 17 additions and 6 deletions
+4 -4
View File
@@ -14,15 +14,15 @@ jobs:
include: include:
- os: ubuntu-latest - os: ubuntu-latest
platform: linux platform: linux
target: node18-linux-x64 target: node22-linux-x64
output: precompiled/app output: precompiled/app
- os: windows-latest - os: windows-latest
platform: win platform: win
target: node18-win-x64 target: node22-win-x64
output: precompiled/app.exe output: precompiled/app.exe
- os: macos-latest - os: macos-latest
platform: macos platform: macos
target: node18-macos-x64 target: node22-macos-x64
output: precompiled/app output: precompiled/app
steps: steps:
@@ -32,7 +32,7 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v6
with: with:
node-version: '18' node-version: '24'
- name: Setup pnpm - name: Setup pnpm
run: npm install -g pnpm@9 run: npm install -g pnpm@9
+1 -1
View File
@@ -163,7 +163,7 @@ docker run -d -p 3000:3000 moefurina/ncm-api:latest
```bash ```bash
#!/bin/bash #!/bin/bash
export PORT=9000 export PORT=9000
/var/lang/node16/bin/node app.js /var/lang/node22/bin/node app.js
``` ```
4. 完成部署后,访问 API 网关的 URL 即可 4. 完成部署后,访问 API 网关的 URL 即可
+11
View File
@@ -3,6 +3,17 @@ const fs = require('fs')
const path = require('path') const path = require('path')
const tmpPath = require('os').tmpdir() const tmpPath = require('os').tmpdir()
// engines 字段只在 npm/pnpm 安装时生效,直接 node app.js 不会被拦截,
// 这里给出友好的最低版本检查(>=22,与 package.json engines 保持一致)
const [major] = process.versions.node.split('.').map(Number)
if (major < 22) {
console.error(
`[${new Date().toLocaleString()}] Node.js >= 22 is required (current: ${process.versions.node}). ` +
'请升级 Node.js 后重试 / Please upgrade Node.js to v22 or newer.',
)
process.exit(1)
}
async function start() { async function start() {
// 检测是否存在 anonymous_token 文件,没有则生成 // 检测是否存在 anonymous_token 文件,没有则生成
if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) { if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@neteasecloudmusicapienhanced/api", "name": "@neteasecloudmusicapienhanced/api",
"version": "4.41.1", "version": "5.0.0",
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced)", "description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced)",
"scripts": { "scripts": {
"dev": "nodemon app.js", "dev": "nodemon app.js",