From d1c3bbc8699624a8fc413312017b0dcd8457745d Mon Sep 17 00:00:00 2001 From: Christian Malek Date: Tue, 13 Jul 2021 20:35:33 +0200 Subject: [PATCH 1/5] update axios peer dep to ^0.21 --- CHANGELOG.md | 4 ++++ package.json | 4 ++-- tests/package.json | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09eccad..d9c024c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ (format is `dd.mm.yyyy` ) +### 2.14.0 (13.07.2021) + +* updated axios peer dependency to version `^0.21` + ### 2.13.0 (19.07.2020) * allow all HTTP request methods to set a payload (contributed by @dries007, see https://github.com/christianmalek/vuex-rest-api/pull/103) diff --git a/package.json b/package.json index 58f561d..d65478b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuex-rest-api", - "version": "2.13.0", + "version": "2.14.0", "description": "A helper utility to simplify the usage of REST APIs with Vuex. Based on axios.", "author": "Christian Malek", "license": "MIT", @@ -12,7 +12,7 @@ "lodash.clonedeep": "^4.5" }, "peerDependencies": { - "axios": "^0.19" + "axios": "^0.21" }, "scripts": { "build": "tsc -p ." diff --git a/tests/package.json b/tests/package.json index 6516885..8c42301 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,7 +14,6 @@ "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs" }, "dependencies": { - "axios": "^0.19.1", "vue": "^2.2.6", "vue-router": "^2.3.1", "vuex": "^2.3.1" From f6f6465f1b6f9e7bcdcafb9e8bbb1283fcdd3901 Mon Sep 17 00:00:00 2001 From: Christian Malek Date: Tue, 24 May 2022 19:20:21 +0200 Subject: [PATCH 2/5] update ts lib to es2018 and add DOM lib --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index d53a140..ac4ad38 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,8 @@ "removeComments": false, "declaration": true, "lib": [ - "es2015" + "es2018", + "DOM" ] }, "include": [ From 3b084e4b169460e4b9b223e85f15c487ba9df0ff Mon Sep 17 00:00:00 2001 From: Christian Malek Date: Tue, 24 May 2022 19:21:46 +0200 Subject: [PATCH 3/5] update typescript to ^4.6 and axios to ^0.27 --- dist/Resource.js | 2 +- dist/Store.js | 10 +++++----- dist/index.js | 2 +- package.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dist/Resource.js b/dist/Resource.js index a307fff..fe0295a 100644 --- a/dist/Resource.js +++ b/dist/Resource.js @@ -20,7 +20,7 @@ var Resource = /** @class */ (function () { var headersFn = this.getHeadersFn(options); if (this.HTTPMethod.indexOf(options.method) === -1) { var methods = this.HTTPMethod.join(", "); - throw new Error("Illegal HTTP method set. Following methods are allowed: " + methods + ". You chose \"" + options.method + "\"."); + throw new Error("Illegal HTTP method set. Following methods are allowed: ".concat(methods, ". You chose \"").concat(options.method, "\".")); } var urlFn; if (typeof options.path === "function") { diff --git a/dist/Store.js b/dist/Store.js index 08f6631..2591e17 100644 --- a/dist/Store.js +++ b/dist/Store.js @@ -113,7 +113,7 @@ var StoreCreator = /** @class */ (function () { var actions = this.resource.actions; Object.keys(actions).forEach(function (action) { var _a = actions[action], property = _a.property, commitString = _a.commitString, beforeRequest = _a.beforeRequest, onSuccess = _a.onSuccess, onError = _a.onError, axios = _a.axios; - mutations["" + commitString] = function (state, actionParams) { + mutations["".concat(commitString)] = function (state, actionParams) { if (property !== null) { state.pending[property] = true; state.error[property] = null; @@ -122,7 +122,7 @@ var StoreCreator = /** @class */ (function () { beforeRequest(state, actionParams); } }; - mutations[commitString + "_" + _this.successSuffix] = function (state, _a) { + mutations["".concat(commitString, "_").concat(_this.successSuffix)] = function (state, _a) { var payload = _a.payload, actionParams = _a.actionParams; if (property !== null) { state.pending[property] = false; @@ -135,7 +135,7 @@ var StoreCreator = /** @class */ (function () { state[property] = payload.data; } }; - mutations[commitString + "_" + _this.errorSuffix] = function (state, _a) { + mutations["".concat(commitString, "_").concat(_this.errorSuffix)] = function (state, _a) { var payload = _a.payload, actionParams = _a.actionParams; if (property !== null) { state.pending[property] = false; @@ -171,13 +171,13 @@ var StoreCreator = /** @class */ (function () { commit(commitString, actionParams); return [2 /*return*/, requestFn(actionParams.params, actionParams.data) .then(function (response) { - commit(commitString + "_" + _this.successSuffix, { + commit("".concat(commitString, "_").concat(_this.successSuffix), { payload: response, actionParams: actionParams }); return Promise.resolve(response); }, function (error) { - commit(commitString + "_" + _this.errorSuffix, { + commit("".concat(commitString, "_").concat(_this.errorSuffix), { payload: error, actionParams: actionParams }); diff --git a/dist/index.js b/dist/index.js index cf252b9..684a554 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35,7 +35,7 @@ var Vapi = /** @class */ (function () { }; Vapi.prototype.getStore = function (options) { if (options === void 0) { options = {}; } - return Store_1.createStore(this.resource, options); + return (0, Store_1.createStore)(this.resource, options); }; return Vapi; }()); diff --git a/package.json b/package.json index d65478b..b10b728 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,13 @@ "lodash.clonedeep": "^4.5" }, "peerDependencies": { - "axios": "^0.21" + "axios": "^0.27" }, "scripts": { "build": "tsc -p ." }, "devDependencies": { - "typescript": "^3.6" + "typescript": "^4.6" }, "files": [ "dist", From 971916e7fd56566970611cb8063c6098ab23eba2 Mon Sep 17 00:00:00 2001 From: Christian Malek Date: Tue, 24 May 2022 19:22:08 +0200 Subject: [PATCH 4/5] increase version to 2.15.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b10b728..7077aca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuex-rest-api", - "version": "2.14.0", + "version": "2.15.0", "description": "A helper utility to simplify the usage of REST APIs with Vuex. Based on axios.", "author": "Christian Malek", "license": "MIT", From 86263c8ffa4ba04d08f57b40c00f0643d2d28aef Mon Sep 17 00:00:00 2001 From: Christian Malek Date: Tue, 24 May 2022 19:43:38 +0200 Subject: [PATCH 5/5] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9c024c..07d077c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ (format is `dd.mm.yyyy` ) +### 2.15.0 (24.05.2022) + +* updated axios peer dependency to version `^0.27` +* updated typescript dev dependency to `^4.6` +* updated typescript lib configuration from es2015 to es2018 and DOM + ### 2.14.0 (13.07.2021) * updated axios peer dependency to version `^0.21`