diff --git a/package.json b/package.json index c5c2b98..e009d22 100644 --- a/package.json +++ b/package.json @@ -51,10 +51,10 @@ }, "devDependencies": { "@antfu/eslint-config": "^2.27.3", - "@changesets/cli": "^2.27.9", - "@eslint/config-inspector": "^0.5.4", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.12.0", + "@changesets/cli": "^2.27.11", + "@eslint/config-inspector": "^0.5.6", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.17.0", "@ruan-cat/domains": "workspace:^", "@ruan-cat/generate-code-workspace": "workspace:^", "@ruan-cat/utils": "workspace:^", @@ -62,57 +62,57 @@ "@ruan-cat/vuepress-preset-config": "workspace:^", "@types/eslint-config-prettier": "^6.11.3", "@types/js-yaml": "^4.0.9", - "@types/lodash": "^4.17.10", + "@types/lodash": "^4.17.13", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.16.11", + "@types/node": "^20.17.10", "@vitest/ui": "2.1.8", - "@vuepress/bundler-vite": "2.0.0-rc.18", + "@vuepress/bundler-vite": "2.0.0-rc.19", "commitizen": "^4.3.1", - "consola": "^3.2.3", + "consola": "^3.3.1", "cpx2": "^7.0.2", "cross-env": "^7.0.3", - "cz-git": "^1.10.1", - "czg": "^1.10.1", + "cz-git": "^1.11.0", + "czg": "^1.11.0", "del": "^8.0.0", "esbuild": "^0.23.1", "esbuild-register": "^3.6.0", - "eslint": "^9.12.0", + "eslint": "^9.17.0", "eslint-config-flat-gitignore": "^0.1.8", "eslint-config-prettier": "^9.1.0", - "eslint-config-turbo": "^2.1.3", - "eslint-plugin-format": "^0.1.2", + "eslint-config-turbo": "^2.3.3", + "eslint-plugin-format": "^0.1.3", "eslint-plugin-jsdoc": "^48.11.0", "eslint-plugin-prettier": "^5.2.1", - "execa": "^9.4.0", + "execa": "^9.5.2", "glob": "^11.0.0", "js-yaml": "^4.1.0", "lodash": "^4.17.21", "markdown-it": "^14.1.0", "mkdirp": "^3.0.1", "pkg-types": "^1.2.1", - "prettier": "^3.3.3", + "prettier": "^3.4.2", "prettier-plugin-lint-md": "^1.0.1", "rimraf": "^6.0.1", "shx": "^0.3.4", "trash-cli": "^6.0.0", - "tsx": "^4.19.1", - "turbo": "^2.1.3", - "type-fest": "^4.26.1", + "tsx": "^4.19.2", + "turbo": "^2.3.3", + "type-fest": "^4.30.2", "type-plus": "^7.6.2", "typescript": "catalog:", "typescript-lodash": "^0.2.2", - "vercel": "^39.1.2", - "vite": "^5.4.8", - "vite-node": "^2.1.2", + "vercel": "^39.2.2", + "vite": "^5.4.11", + "vite-node": "^2.1.8", "vitest": "^2.1.8", - "vue": "^3.5.11", - "vue-tsc": "^2.1.6", - "vuepress": "2.0.0-rc.18", - "vuepress-theme-hope": "2.0.0-rc.58", - "wrangler": "^3.80.2" + "vue": "^3.5.13", + "vue-tsc": "^2.2.0", + "vuepress": "2.0.0-rc.19", + "vuepress-theme-hope": "2.0.0-rc.66", + "wrangler": "^3.99.0" }, "dependencies": { - "@dotenvx/dotenvx": "^1.17.0", + "@dotenvx/dotenvx": "^1.31.3", "lodash-es": "catalog:" } } \ No newline at end of file diff --git a/packages/utils/src/tests/mall-apifox-port/simple-axios.test.ts b/packages/utils/src/tests/mall-apifox-port/simple-axios.test.ts new file mode 100644 index 0000000..3fa9b53 --- /dev/null +++ b/packages/utils/src/tests/mall-apifox-port/simple-axios.test.ts @@ -0,0 +1,35 @@ +import axios from "axios"; + +/** + * 创建axios实例 + * @description + * 从商城项目内获取得来 + * + * @see https://apifox.com/apidoc/shared-c05cb8d7-e591-4d9c-aff8-11065a0ec1de/api-67132167 + */ +function createAxiosInstance() { + const instance = axios.create({ + baseURL: "https://pcapi-xiaotuxian-front-devtest.itheima.net", + + /** 请求超时时间 */ + timeout: 10000, + + /** 允许跨域 */ + // withCredentials: true, + }); + + // 使用qs序列化参数params参数 + // instance.defaults.paramsSerializer = function (params) { + // return qs.stringify(params); + // }; + + return instance; +} + +function main() { + axios.get("https://pcapi-xiaotuxian-front-devtest.itheima.net/home/hot").then((res) => { + console.log(" ? ", res); + }); +} + +main(); diff --git a/packages/utils/src/tests/vueuse/useAxios/useAxiosWrapper/index.test.ts b/packages/utils/src/tests/vueuse/useAxios/useAxiosWrapper/index.test.ts index c5c60e4..f23bd49 100644 --- a/packages/utils/src/tests/vueuse/useAxios/useAxiosWrapper/index.test.ts +++ b/packages/utils/src/tests/vueuse/useAxios/useAxiosWrapper/index.test.ts @@ -26,7 +26,7 @@ function createAxiosInstance() { timeout: 10000, /** 允许跨域 */ - withCredentials: true, + // withCredentials: true, }); // 使用qs序列化参数params参数 @@ -52,9 +52,18 @@ function homeCategoryHead() { }); } -test("测试接口请求", async () => { - const { execute, data } = homeCategoryHead(); +async function main() { + // const { execute, data } = homeCategoryHead(); + // await execute(); + // console.log(" ? ", data.value); - await execute(); - console.log(" ? ", data.value); -}); + // const res = await instance.get("/home/category/head"); + const res = await instance.get("/home/hot"); + console.log(" ? ", res); +} + +main(); + +// test("测试接口请求", async () => { +// await main(); +// }); diff --git a/tests/monorepo-1/package.json b/tests/monorepo-1/package.json index 4341e1f..45a0b2a 100644 --- a/tests/monorepo-1/package.json +++ b/tests/monorepo-1/package.json @@ -19,9 +19,9 @@ }, "devDependencies": { "@ruan-cat/vuepress-preset-config": "workspace:^", - "consola": "^3.2.3", - "vitepress": "^1.3.0", + "consola": "^3.3.1", + "vitepress": "^1.5.0", "vitepress-carbon": "^1.5.0", - "vitepress-sidebar": "^1.29.0" + "vitepress-sidebar": "^1.30.2" } -} +} \ No newline at end of file diff --git a/tests/monorepo-3/package.json b/tests/monorepo-3/package.json index 7217cf6..1627aa2 100644 --- a/tests/monorepo-3/package.json +++ b/tests/monorepo-3/package.json @@ -21,4 +21,4 @@ "peerDependencies": { "typescript": "catalog:" } -} +} \ No newline at end of file diff --git a/tests/monorepo-4/package.json b/tests/monorepo-4/package.json index ceb8162..c84e949 100644 --- a/tests/monorepo-4/package.json +++ b/tests/monorepo-4/package.json @@ -16,4 +16,4 @@ "devDependencies": { "@ruan-cat/vuepress-preset-config": "workspace:^" } -} +} \ No newline at end of file diff --git a/tests/monorepo-5/package.json b/tests/monorepo-5/package.json index 4e6b620..d53fe36 100644 --- a/tests/monorepo-5/package.json +++ b/tests/monorepo-5/package.json @@ -13,4 +13,4 @@ "clear": "rimraf dist .turbo .vercel .cache .temp", "rm:node_modules": "rimraf node_modules" } -} +} \ No newline at end of file diff --git a/tests/proj-2-vp2-custom-components/package.json b/tests/proj-2-vp2-custom-components/package.json index 5f5e624..65276c4 100644 --- a/tests/proj-2-vp2-custom-components/package.json +++ b/tests/proj-2-vp2-custom-components/package.json @@ -12,4 +12,4 @@ "docs:update-package": "pnpm dlx vp-update", "clear": "rimraf dist && rimraf .turbo && rimraf .vercel" } -} +} \ No newline at end of file