diff --git a/docs/依赖升级说明.md b/docs/依赖升级说明.md index 2c0e5e3..b959af9 100644 --- a/docs/依赖升级说明.md +++ b/docs/依赖升级说明.md @@ -18,6 +18,7 @@ - `client` 保持在与现有代码兼容的 React 18、`react-router-dom` 6、`framer-motion` 11、`lucide-react` 0.x、`vite` 5 组合。 - `server` 保持在与现有代码兼容的 Express 4、`cron-parser` 4、`node-cron` 3、`tar` 6 组合。 +- `server` 的 `uuid` 已升级为 `>=14.0.0`,同时移除了不再需要的 `@types/uuid`,改用 `uuid` 自带类型声明。 - `server/src/utils/tarSecurityFilter.ts` 改为通过 `tar.extract` 推导类型,避免直接引用不存在的 `ExtractOptions`。 ## 验证方式 @@ -39,5 +40,6 @@ npm run build ## 说明 - 这次升级已经同步更新了锁文件。 +- `uuid@14.0.0` 仍然保持 ESM 导出和 `types` 声明导出,和当前服务端的 `type: module`、TypeScript 配置兼容。 - 构建时如果看到 Vite 的 chunk size 警告,属于体积提示,不影响本次升级结果。 - 如果后续要继续冲主版本,建议分模块推进,先改依赖,再改类型和运行时调用。 diff --git a/server/package-lock.json b/server/package-lock.json index c85679c..3c953ab 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -31,7 +31,7 @@ "socket.io": "^4.8.3", "tar": "^7.5.13", "tar-stream": "^3.1.8", - "uuid": "^9.0.1", + "uuid": ">=14.0.0", "winston": "^3.19.0", "yaml": "^2.8.3" }, @@ -48,7 +48,6 @@ "@types/node": "^20.19.37", "@types/node-cron": "^3.0.11", "@types/tar-stream": "^3.1.4", - "@types/uuid": "^9.0.8", "fast-check": "^4.6.0", "jest": "^29.7.0", "ts-jest": "^29.4.6", @@ -1881,13 +1880,6 @@ "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", "license": "MIT" }, - "node_modules/@types/uuid": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", - "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/ws": { "version": "8.18.1", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", @@ -6789,16 +6781,16 @@ } }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist-node/bin/uuid" } }, "node_modules/v8-to-istanbul": { diff --git a/server/package.json b/server/package.json index 58bcd0a..3666d16 100644 --- a/server/package.json +++ b/server/package.json @@ -33,7 +33,7 @@ "socket.io": "^4.8.3", "tar": "^7.5.13", "tar-stream": "^3.1.8", - "uuid": "^9.0.1", + "uuid": ">=14.0.0", "winston": "^3.19.0", "yaml": "^2.8.3" }, @@ -56,7 +56,6 @@ "@types/node": "^20.19.37", "@types/node-cron": "^3.0.11", "@types/tar-stream": "^3.1.4", - "@types/uuid": "^9.0.8", "jest": "^29.7.0", "tsx": "^4.21.0", "typescript": "^5.9.3"