Socket
Socket
Sign inDemoInstall

vue-axios-http

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-axios-http - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

14

CHANGELOG.md

@@ -5,2 +5,16 @@ # Changelog

### [3.0.1](https://github.com/chantouchsek/vue-axios-http/compare/v3.0.0...v3.0.1) (2022-05-25)
### Bug Fixes
* :beer: make type of axios error ([a7b6f9d](https://github.com/chantouchsek/vue-axios-http/commit/a7b6f9d68472a4c7458c3e0b381dc0837adfdf6d))
* :fire: fix data type wrong ([56d343b](https://github.com/chantouchsek/vue-axios-http/commit/56d343b700d583d609f23fb8e13e164c27e792cb))
* :fire: fix put and path method with only payload ([9b324f5](https://github.com/chantouchsek/vue-axios-http/commit/9b324f59aa65efa421e2d9c525e9a93f983ae10b))
* **deps:** bump actions/checkout from 3.0.1 to 3.0.2 ([a5654c9](https://github.com/chantouchsek/vue-axios-http/commit/a5654c9fc19feabdd944966e6983f53c30f81ccd))
* **deps:** bump actions/setup-node from 3.1.1 to 3.2.0 ([90ac179](https://github.com/chantouchsek/vue-axios-http/commit/90ac1791ff15740e968b65911df1d9a080e999f3))
* **deps:** bump github/codeql-action from 1 to 2 ([e153058](https://github.com/chantouchsek/vue-axios-http/commit/e153058ddb0ffd1dd29bdd5c1d0c802c9095af13))
* remove check file in puth method ([d1d0173](https://github.com/chantouchsek/vue-axios-http/commit/d1d017325f490f2d9cf2bb5fd039b278cfe0c1a8))
* remove type ([3cf6170](https://github.com/chantouchsek/vue-axios-http/commit/3cf61701875d936b8ad0279f6eb5fa9b7b5baf89))
## [3.0.0](https://github.com/chantouchsek/vue-axios-http/compare/v2.0.1...v3.0.0) (2022-04-19)

@@ -7,0 +21,0 @@

7

dist/core/BaseService.d.ts

@@ -22,8 +22,4 @@ /// <reference types="@types/qs" />

store<T>(payload: any, config?: AxiosRequestConfig): Promise<T>;
put<T>(payload: any): Promise<T>;
put<T>(id: string | number, payload: any): Promise<T>;
put<T>(payload: any, config?: AxiosRequestConfig): Promise<T>;
put<T>(id: string | number, payload: any, config?: AxiosRequestConfig): Promise<T>;
patch<T>(payload: any): Promise<T>;
patch<T>(id: string | number, payload: any): Promise<T>;
patch<T>(payload: any, config?: AxiosRequestConfig): Promise<T>;

@@ -34,5 +30,2 @@ patch<T>(id: string | number, payload: any, config?: AxiosRequestConfig): Promise<T>;

remove<T>(id: string | number): Promise<T>;
submit<T = any>(requestType: Method): Promise<T>;
submit<T = any>(requestType: Method, parameter?: string | number): Promise<T>;
submit<T = any>(requestType: Method, parameter?: string | number, form?: T): Promise<T>;
submit<T = any>(requestType: Method, parameter?: string | number, form?: T, config?: AxiosRequestConfig): Promise<T>;

@@ -39,0 +32,0 @@ private __getParameterString;

12

dist/core/BaseService.js

@@ -40,11 +40,13 @@ "use strict";

const parameter = id && !(0, util_1.isObject)(id) ? `/${id}` : '';
const requestType = (0, util_1.hasFiles)(payload) ? 'post' : 'put';
if ((0, util_1.hasFiles)(payload)) {
Object.assign(payload, { _method: 'put' });
const body = (0, util_1.isObject)(id) ? id : payload;
const requestType = (0, util_1.hasFiles)(body) ? 'post' : 'put';
if ((0, util_1.hasFiles)(body)) {
Object.assign(body, { _method: 'put' });
}
return this.submit(requestType, parameter, payload, config);
return this.submit(requestType, parameter, body, config);
}
patch(id, payload, config) {
const parameter = id && !(0, util_1.isObject)(id) ? `/${id}` : '';
return this.submit('patch', parameter, payload, config);
const body = (0, util_1.isObject)(id) ? id : payload;
return this.submit('patch', parameter, body, config);
}

@@ -51,0 +53,0 @@ update(id, payload) {

{
"name": "vue-axios-http",
"version": "3.0.0",
"version": "3.0.1",
"description": "Elegant and simple way to build requests for REST API",

@@ -51,4 +51,4 @@ "main": "dist/index.js",

"devDependencies": {
"@commitlint/cli": "^16.0.1",
"@commitlint/config-conventional": "^16.0.0",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@nuxt/types": "^2.15.8",

@@ -61,3 +61,2 @@ "@types/jest": "^27.4.0",

"@vue/test-utils": "^1.2.2",
"axios": "^0.26.1",
"axios-mock-adapter": "^1.20.0",

@@ -69,3 +68,3 @@ "eslint": "^8.13.0",

"eslint-plugin-promise": "^6.0.0",
"husky": "^7.0.4",
"husky": "^8.0.1",
"jest": "^27.4.5",

@@ -87,2 +86,3 @@ "lint-staged": ">=10",

"dependencies": {
"axios": "^0.27.2",
"qs": "^6.10.2"

@@ -89,0 +89,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc