diff --git a/package.json b/package.json index 65c2f2e..d99271c 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { - "name": "@vue-hooks-plus/monorepo", - "version": "1.0.0", - "private": true, + "name": "@vue-hooks-plus/monorepo", + "version": "1.0.0", + "private": true, "scripts": { - "bootstrap": "tsx scripts/bootstrap.ts", - "build:vitepress-demo-block":"cd packages/vitepress/vitepress-demo-block && pnpm build", - "docs:dev":"pnpm build:vitepress-demo-block && tsx scripts/docs.ts dev", - "docs:build":"pnpm build:vitepress-demo-block && tsx scripts/docs.ts build", - "docs:build-github":"pnpm build:vitepress-demo-block && tsx scripts/gitPage.ts github", - "docs:build-gitee":"pnpm build:vitepress-demo-block && tsx scripts/gitPage.ts gitee", - "clean": " rimraf dist lib es", + "bootstrap": "tsx scripts/bootstrap.ts", + "build:vitepress-demo-block": "cd packages/vitepress/vitepress-demo-block && pnpm build", + "docs:dev": "pnpm build:vitepress-demo-block && tsx scripts/docs.ts dev", + "docs:build": "pnpm build:vitepress-demo-block && tsx scripts/docs.ts build", + "docs:build-github": "pnpm build:vitepress-demo-block && tsx scripts/gitPage.ts github", + "docs:build-gitee": "pnpm build:vitepress-demo-block && tsx scripts/gitPage.ts gitee", + "clean": " rimraf dist lib es", "build": "pnpm bootstrap && tsx scripts/build.ts", - "test": "vitest", + "test": "vitest", "test:ui": "vitest --ui", - "coverage": "vitest run --coverage", + "coverage": "vitest run --coverage", "prepare": "husky install" }, "devDependencies": { @@ -30,20 +30,20 @@ "@types/node": "^17.0.21", "@types/qs": "^6.9.7", "@vitejs/plugin-vue": "^2.3.1", - "@vue/compiler-core": "^3.2.37", - "@vue-hooks-plus/vite-plugin-gen-temp": "^2.6.6", + "@vue/compiler-core": "^3.2.37", + "@vue-hooks-plus/vite-plugin-gen-temp": "^2.6.6", "@vue-hooks-plus/md-demo-plugins": "^1.0.0", "@vue-hooks-plus/vitepress": "^1.2.4", "@vue-hooks-plus/vitepress-demo-block": "workspace:^1.0.0", - "@vue-hooks-plus/use-immer":"workspace:^1.0.0", - "@vue-hooks-plus/use-worker":"workspace:^1.0.0", - "@vue-hooks-plus/use-request":"workspace:^2.0.0", - "@vue-hooks-plus/use-request-plugins":"workspace:^2.0.0", - "@vue-hooks-plus/types":"workspace:^2.0.0", - "@vue-hooks-plus/eslint-config":"workspace:^1.0.0", + "@vue-hooks-plus/use-immer": "workspace:^1.0.0", + "@vue-hooks-plus/use-worker": "workspace:^1.0.0", + "@vue-hooks-plus/use-request": "workspace:^2.0.0", + "@vue-hooks-plus/use-request-plugins": "workspace:^2.0.0", + "@vue-hooks-plus/types": "workspace:^2.0.0", + "@vue-hooks-plus/eslint-config": "workspace:^1.0.0", "@vue/test-utils": "^2.1.0", - "@vitest/coverage-c8":"^0.25.7", - "execa":"^6.1.0", + "@vitest/coverage-c8": "^0.25.7", + "execa": "^6.1.0", "husky": "^8.0.1", "lint-staged": "^13.0.3", "cross-env": "^7.0.3", @@ -52,12 +52,12 @@ "gh-pages": "^4.0.0", "happy-dom": "^7.5.10", "less": "^4.1.3", - "kolorist": "^1.6.0", + "kolorist": "^1.6.0", "prettier": "^1.19.1", "rimraf": "^3.0.2", "ts-morph": "^13.0.2", "ts-node": "^10.7.0", - "tsx": "^3.11.0", + "tsx": "^3.11.0", "typeit": "^8.7.0", "typescript": "^5.0.4", "vite": "3.0.2", @@ -68,11 +68,11 @@ "vue": "^3.2.25", "vue-tsc": "1.0.9", "vue-typical": "^2.1.0", - "pinia":"^2.0.34", - "broadcast-channel":"^5.1.0", - "three":"0.147.0", - "axios": "^1.4.0", - "vue-demi": "^0.13.11" + "pinia": "^2.0.34", + "broadcast-channel": "^5.1.0", + "three": "0.147.0", + "axios": "^1.4.0", + "vue-demi": "^0.13.11" }, "lint-staged": { "*.{js,ts,tsx,vue}": [ @@ -88,4 +88,4 @@ "vue hooks", "typeScript" ] -} +} \ No newline at end of file diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 204cba6..80fa906 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -33,7 +33,7 @@ "type": "tsc -d" }, "dependencies": { - "@vue/devtools-api": "^6.5.0", + "@vue/devtools-api": "^6.5.0", "@types/js-cookie": "^3.0.1", "js-cookie": "^3.0.1", "lodash": "^4.17.21", @@ -41,11 +41,11 @@ "query-string": "^7.1.1", "screenfull": "^5.0.0" }, - "peerDependencies": { + "peerDependencies": { "vue": "^3.2.25" }, "repository": "https://github.com/InhiblabCore/vue-hooks-plus", "homepage": "https://github.com/InhiblabCore/vue-hooks-plus", "author": "NelsonYong", "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/hooks/src/useKeyPress/index.ts b/packages/hooks/src/useKeyPress/index.ts index abe4af3..4d836f3 100644 --- a/packages/hooks/src/useKeyPress/index.ts +++ b/packages/hooks/src/useKeyPress/index.ts @@ -1,5 +1,4 @@ import { ref } from 'vue' -// import { isFunction, isNumber, isString } from 'lodash' import { BasicTarget, getTargetElement } from '../utils/domTarget' import useDeepCompareEffectWithTarget from '../utils/useDeepCompareWithTarget' import { isNumber, isFunction, isString } from '../utils' diff --git a/packages/hooks/src/useRequest/plugins/useDebouncePlugin.ts b/packages/hooks/src/useRequest/plugins/useDebouncePlugin.ts index 7d3aae7..47bc2db 100644 --- a/packages/hooks/src/useRequest/plugins/useDebouncePlugin.ts +++ b/packages/hooks/src/useRequest/plugins/useDebouncePlugin.ts @@ -7,7 +7,7 @@ const useDebouncePlugin: UseRequestPlugin = ( fetchInstance, { debounceWait, debounceLeading, debounceTrailing, debounceMaxWait } ) => { - const debouncedRef = ref>(); + const debouncedRef = ref void) => void>>(); const options = computed(() => { const ret: DebounceSettings = {}; const debounceLeading_ = unref(debounceLeading) diff --git a/packages/hooks/src/useRequest/plugins/useThrottlePlugin.ts b/packages/hooks/src/useRequest/plugins/useThrottlePlugin.ts index 2ced2af..6c6a1a0 100644 --- a/packages/hooks/src/useRequest/plugins/useThrottlePlugin.ts +++ b/packages/hooks/src/useRequest/plugins/useThrottlePlugin.ts @@ -1,5 +1,5 @@ import { computed, unref, watchEffect } from 'vue' -import { DebouncedFunc, ThrottleSettings } from 'lodash' +import type { DebouncedFunc, ThrottleSettings } from 'lodash' import throttle from 'lodash/throttle' import { UseRequestPlugin } from '../types' diff --git a/packages/resolvers/package.json b/packages/resolvers/package.json index 28232b1..73df126 100644 --- a/packages/resolvers/package.json +++ b/packages/resolvers/package.json @@ -38,12 +38,5 @@ }, "peerDependencies": { "vue-hooks-plus": ">=1.5.2" - }, - "pnpm": { - "peerDependencyRules": { - "ignoreMissing": [ - "vue" - ] - } } } diff --git a/packages/use-request/src/plugins/useThrottlePlugin.ts b/packages/use-request/src/plugins/useThrottlePlugin.ts index 2ced2af..6c6a1a0 100644 --- a/packages/use-request/src/plugins/useThrottlePlugin.ts +++ b/packages/use-request/src/plugins/useThrottlePlugin.ts @@ -1,5 +1,5 @@ import { computed, unref, watchEffect } from 'vue' -import { DebouncedFunc, ThrottleSettings } from 'lodash' +import type { DebouncedFunc, ThrottleSettings } from 'lodash' import throttle from 'lodash/throttle' import { UseRequestPlugin } from '../types'