vue-request
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -5,11 +5,42 @@ # Changelog | ||
### [1.0.5](https://github.com/attojs/vue-request/compare/v1.0.4...v1.0.5) (2021-03-22) | ||
## [1.1.0](https://github.com/attojs/vue-request/compare/v1.0.5...v1.1.0) (2021-04-19) | ||
### Features | ||
* **useLoadMore:** refactor `refresh` and `cancel` of `useLoadMore` [#36](https://github.com/attojs/vue-request/issues/36) ([7c34351](https://github.com/attojs/vue-request/commit/7c34351fbc8dad763effb33f4bd7b9e4cb18b9d6)) | ||
### Bug Fixes | ||
* `onSuccess` of `BaseOptions` must be optional ([4133481](https://github.com/attojs/vue-request/commit/413348141837bbffba5ad9872cd839bb1d555665)) | ||
* `onSuccess` type is incorrect ([407ed11](https://github.com/attojs/vue-request/commit/407ed116ebed813e1f07cede97ad2285281e76ba)), closes [#31](https://github.com/attojs/vue-request/issues/31) | ||
* invalid import path ([0a31504](https://github.com/attojs/vue-request/commit/0a315040a1e38cbb9b8cb877b912fbde091f471c)), closes [#33](https://github.com/attojs/vue-request/issues/33) | ||
* root level `refresh`, `mutate`, `cancel` not work with `queryKey` [#37](https://github.com/attojs/vue-request/issues/37) ([66b3198](https://github.com/attojs/vue-request/commit/66b31981353fee5c9ebda806bbbeccef4bf6e4c3)) | ||
### Refactor | ||
* **useLoadMore:** remove `mutate` of `useLoadMore` ([b935bcd](https://github.com/attojs/vue-request/commit/b935bcd01629b38ba068e82ca062380b6434c85f)) | ||
* **utils:** update some utility functions ([f60e34d](https://github.com/attojs/vue-request/commit/f60e34d011fd1170c915f5b70feb7e179c235ad9)) | ||
* update `serviceObject` types ([928d1a6](https://github.com/attojs/vue-request/commit/928d1a6fd5714d9a4b5226b07099b980c7a758b8)) | ||
## [1.1.0](https://github.com/attojs/vue-request/compare/v1.0.5...v1.1.0) (2021-04-19) | ||
### Features | ||
- **useLoadMore:** refactor `refresh` and `cancel` of `useLoadMore`, add `refreshing` [#36](https://github.com/attojs/vue-request/issues/36) ([7c34351](https://github.com/attojs/vue-request/commit/7c34351fbc8dad763effb33f4bd7b9e4cb18b9d6)) | ||
### Bug Fixes | ||
- root level `refresh`, `mutate`, `cancel` not work with `queryKey` [#37](https://github.com/attojs/vue-request/issues/37) ([66b3198](https://github.com/attojs/vue-request/commit/66b31981353fee5c9ebda806bbbeccef4bf6e4c3)) | ||
### ⚠ BREAKING CHANGES | ||
- **useLoadMore:** remove `mutate` of `useLoadMore` ([b935bcd](https://github.com/attojs/vue-request/commit/b935bcd01629b38ba068e82ca062380b6434c85f)) | ||
### [1.0.5](https://github.com/attojs/vue-request/compare/v1.0.4...v1.0.5) (2021-03-22) | ||
### Bug Fixes | ||
- `onSuccess` type is incorrect ([407ed11](https://github.com/attojs/vue-request/commit/407ed116ebed813e1f07cede97ad2285281e76ba)), closes [#31](https://github.com/attojs/vue-request/issues/31) | ||
- invalid import path ([0a31504](https://github.com/attojs/vue-request/commit/0a315040a1e38cbb9b8cb877b912fbde091f471c)), closes [#33](https://github.com/attojs/vue-request/issues/33) | ||
### [1.0.4](https://github.com/attojs/vue-request/compare/v1.0.3...v1.0.4) (2021-03-08) | ||
@@ -16,0 +47,0 @@ |
@@ -5,11 +5,42 @@ # Changelog | ||
### [1.0.5](https://github.com/attojs/vue-request/compare/v1.0.4...v1.0.5) (2021-03-22) | ||
## [1.1.0](https://github.com/attojs/vue-request/compare/v1.0.5...v1.1.0) (2021-04-19) | ||
### Features | ||
* **useLoadMore:** refactor `refresh` and `cancel` of `useLoadMore` [#36](https://github.com/attojs/vue-request/issues/36) ([7c34351](https://github.com/attojs/vue-request/commit/7c34351fbc8dad763effb33f4bd7b9e4cb18b9d6)) | ||
### Bug Fixes | ||
* `onSuccess` of `BaseOptions` must be optional ([4133481](https://github.com/attojs/vue-request/commit/413348141837bbffba5ad9872cd839bb1d555665)) | ||
* `onSuccess` type is incorrect ([407ed11](https://github.com/attojs/vue-request/commit/407ed116ebed813e1f07cede97ad2285281e76ba)), closes [#31](https://github.com/attojs/vue-request/issues/31) | ||
* invalid import path ([0a31504](https://github.com/attojs/vue-request/commit/0a315040a1e38cbb9b8cb877b912fbde091f471c)), closes [#33](https://github.com/attojs/vue-request/issues/33) | ||
* root level `refresh`, `mutate`, `cancel` not work with `queryKey` [#37](https://github.com/attojs/vue-request/issues/37) ([66b3198](https://github.com/attojs/vue-request/commit/66b31981353fee5c9ebda806bbbeccef4bf6e4c3)) | ||
### Refactor | ||
* **useLoadMore:** remove `mutate` of `useLoadMore` ([b935bcd](https://github.com/attojs/vue-request/commit/b935bcd01629b38ba068e82ca062380b6434c85f)) | ||
* **utils:** update some utility functions ([f60e34d](https://github.com/attojs/vue-request/commit/f60e34d011fd1170c915f5b70feb7e179c235ad9)) | ||
* update `serviceObject` types ([928d1a6](https://github.com/attojs/vue-request/commit/928d1a6fd5714d9a4b5226b07099b980c7a758b8)) | ||
## [1.1.0](https://github.com/attojs/vue-request/compare/v1.0.5...v1.1.0) (2021-04-19) | ||
### Features | ||
- **useLoadMore:** 重构 `useLoadMore` 的 `refresh` 和 `cancel` 方法,添加了 `refreshing` 用于记录是否正在刷新 [#36](https://github.com/attojs/vue-request/issues/36) ([7c34351](https://github.com/attojs/vue-request/commit/7c34351fbc8dad763effb33f4bd7b9e4cb18b9d6)) | ||
### Bug Fixes | ||
- 在使用 `queryKey` 后,根级别的 `refresh`, `mutate`, `cancel` 无法正常工作 [#37](https://github.com/attojs/vue-request/issues/37) ([66b3198](https://github.com/attojs/vue-request/commit/66b31981353fee5c9ebda806bbbeccef4bf6e4c3)) | ||
### ⚠ BREAKING CHANGES | ||
- **useLoadMore:** 移除 `useLoadMore` 里的 `mutate` 方法 ([b935bcd](https://github.com/attojs/vue-request/commit/b935bcd01629b38ba068e82ca062380b6434c85f)) | ||
### [1.0.5](https://github.com/attojs/vue-request/compare/v1.0.4...v1.0.5) (2021-03-22) | ||
### Bug Fixes | ||
- `onSuccess` 的 `data` 类型不正确 ([407ed11](https://github.com/attojs/vue-request/commit/407ed116ebed813e1f07cede97ad2285281e76ba)), closes [#31](https://github.com/attojs/vue-request/issues/31) | ||
- 错误的 import 路径 ([0a31504](https://github.com/attojs/vue-request/commit/0a315040a1e38cbb9b8cb877b912fbde091f471c)), closes [#33](https://github.com/attojs/vue-request/issues/33) | ||
### [1.0.4](https://github.com/attojs/vue-request/compare/v1.0.3...v1.0.4) (2021-03-08) | ||
@@ -16,0 +47,0 @@ |
@@ -6,2 +6,3 @@ import { RefObject, UnRef } from './types'; | ||
export declare const isPlainObject: (val: unknown) => val is Record<string, any>; | ||
export declare const isObject: (val: unknown) => val is Record<any, any>; | ||
export declare const isPromise: (fn: unknown) => fn is Promise<unknown>; | ||
@@ -8,0 +9,0 @@ export declare const isFunction: (fn: unknown) => fn is Function; |
@@ -13,3 +13,3 @@ import { Ref } from 'vue'; | ||
}; | ||
export declare type ServiceObject = { | ||
export declare type ServiceObject = Partial<RequestInit> & { | ||
[key: string]: any; | ||
@@ -16,0 +16,0 @@ url: string; |
@@ -5,8 +5,10 @@ import { Ref } from 'vue'; | ||
import { ServiceParams } from './core/utils/types'; | ||
export interface LoadMoreResult<R, P extends unknown[], LR extends unknown[]> extends Omit<BaseResult<R, P>, 'queries'> { | ||
export interface LoadMoreResult<R, P extends unknown[], LR extends unknown[]> extends Omit<BaseResult<R, P>, 'queries' | 'refresh' | 'mutate'> { | ||
dataList: Ref<LR>; | ||
noMore: Ref<boolean>; | ||
loadingMore: Ref<boolean>; | ||
refreshing: Ref<boolean>; | ||
loadMore: () => void; | ||
reload: () => void; | ||
refresh: () => void; | ||
} | ||
@@ -13,0 +15,0 @@ export declare type LoadMoreExtendsOption = { |
{ | ||
"name": "vue-request", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"description": "Vue 3 composition API for data fetching, supports SWR, polling, error retry, cache request, pagination and other cool features.", | ||
@@ -33,3 +33,3 @@ "license": "MIT", | ||
"build": "yarn clean && rollup --config ./build/rollup.config.js", | ||
"dev": "webpack serve --config ./build/webpack.config.js", | ||
"dev": "yarn vite ./example", | ||
"clean": "rimraf dist/*", | ||
@@ -42,3 +42,4 @@ "test": "jest --coverage", | ||
"format": "prettier -w '**/*.ts?(x)'", | ||
"version": "yarn changelog" | ||
"version": "yarn changelog", | ||
"vite": "vite --config ./build/vite.config.ts" | ||
}, | ||
@@ -76,2 +77,4 @@ "husky": { | ||
"@typescript-eslint/parser": "^4.8.2", | ||
"@vitejs/plugin-vue": "^1.2.1", | ||
"@vitejs/plugin-vue-jsx": "^1.1.3", | ||
"@vue/babel-plugin-jsx": "^1.0.0-rc.3", | ||
@@ -82,3 +85,2 @@ "@vue/compiler-sfc": "^3.0.6", | ||
"babel-jest": "^26.6.0", | ||
"babel-loader": "^8.2.1", | ||
"eslint": "^7.14.0", | ||
@@ -89,3 +91,2 @@ "eslint-config-prettier": "^6.15.0", | ||
"fetch-mock": "^9.10.7", | ||
"html-webpack-plugin": "^4.5.0", | ||
"husky": "^4.3.0", | ||
@@ -107,10 +108,6 @@ "jest": "^26.6.0", | ||
"ts-jest": "^26.4.1", | ||
"ts-loader": "^8.0.11", | ||
"typescript": "^4.0.5", | ||
"vue": "^3.0.2", | ||
"vue-loader": "^16.1.2", | ||
"webpack": "^5.4.0", | ||
"webpack-cli": "^4.2.0", | ||
"webpack-dev-server": "^3.11.0" | ||
"vite": "^2.1.5", | ||
"vue": "^3.0.2" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
697761
45
16696