pokenode-ts 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -13
- package/README.md +1 -1
- package/dist/config/logger.js +8 -8
- package/dist/index.d.ts +1 -1
- package/package.json +28 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## [1.10.1](https://github.com/Gabb-c/pokenode-ts/compare/v1.10.0...v1.10.1) (2022-01-10)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* **
|
|
7
|
-
* **models:** evolution and gender ([32417bb](https://github.com/Gabb-c/pokenode-ts/commit/32417bb56be255c02306d42e52f415ad8af2131f))
|
|
8
|
-
* **models:** flavor text remove version ([1e43981](https://github.com/Gabb-c/pokenode-ts/commit/1e4398115ea8027c77408c71f4f66e521494dd68))
|
|
9
|
-
* **models:** location and machine types ([eecd050](https://github.com/Gabb-c/pokenode-ts/commit/eecd050b58bce8198df5dce23cc58dc8e8609eb6))
|
|
10
|
-
* **models:** location area types ([9bd621f](https://github.com/Gabb-c/pokenode-ts/commit/9bd621f28e17308926b78c248b031d04fe0c1684))
|
|
11
|
-
* **models:** move types ([4e68cfb](https://github.com/Gabb-c/pokenode-ts/commit/4e68cfbb5dbb89c6ea9f561e698c1156bd46d03a))
|
|
12
|
-
* **models:** pokemo form sprites types ([d8d4cd4](https://github.com/Gabb-c/pokenode-ts/commit/d8d4cd45b44e23935bc83048290cb402b85c8e0b))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Features
|
|
16
|
-
|
|
17
|
-
* **models:** better sprite interfaces for pokemon ([51b1b88](https://github.com/Gabb-c/pokenode-ts/commit/51b1b8852c858ef892eb1de977d4f0ff1c04f065))
|
|
6
|
+
* **logger:** fix eslint warnings ([0a8ce4e](https://github.com/Gabb-c/pokenode-ts/commit/0a8ce4e80089ae1fb5d395b4195250f0dc380103))
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ A lightweight Node.js wrapper for the PokéAPI with built-in types. An easy way
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
18
|
- [Bulit-in typings](https://gabb-c.github.io/pokenode-ts/#/typings/berry-typings?id=berries)
|
|
19
|
-
- [Axios with auto-cache
|
|
19
|
+
- [Axios with auto-cache requests](https://gabb-c.github.io/pokenode-ts/#/getting-started/cache)
|
|
20
20
|
- [Logging configuration](https://gabb-c.github.io/pokenode-ts/#/getting-started/logs)
|
|
21
21
|
|
|
22
22
|
## Installation
|
package/dist/config/logger.js
CHANGED
|
@@ -11,18 +11,18 @@ const handleRequest = (config, logger) => {
|
|
|
11
11
|
return config;
|
|
12
12
|
};
|
|
13
13
|
exports.handleRequest = handleRequest;
|
|
14
|
-
const handleRequestError = (error, logger) =>
|
|
15
|
-
logger.error(`[ Request Error ] ${error.code || 'UNKNOWN'} | ${error.message}`);
|
|
16
|
-
|
|
17
|
-
}
|
|
14
|
+
const handleRequestError = (error, logger) => {
|
|
15
|
+
logger.error(`[ Request Error ] CODE ${error.code || 'UNKNOWN'} | ${error.message}`);
|
|
16
|
+
throw error;
|
|
17
|
+
};
|
|
18
18
|
exports.handleRequestError = handleRequestError;
|
|
19
19
|
const handleResponse = (response, logger) => {
|
|
20
20
|
logger.info(response.data);
|
|
21
21
|
return response;
|
|
22
22
|
};
|
|
23
23
|
exports.handleResponse = handleResponse;
|
|
24
|
-
const handleResponseError = (error, logger) =>
|
|
25
|
-
logger.error(`[ Response Error ] ${error.code || 'UNKNOWN'} | ${error.message}`);
|
|
26
|
-
|
|
27
|
-
}
|
|
24
|
+
const handleResponseError = (error, logger) => {
|
|
25
|
+
logger.error(`[ Response Error ] CODE ${error.code || 'UNKNOWN'} | ${error.message}`);
|
|
26
|
+
throw error;
|
|
27
|
+
};
|
|
28
28
|
exports.handleResponseError = handleResponseError;
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pokenode-ts",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A lightweight Node.js wrapper for the PokéAPI with built-in types.",
|
|
6
6
|
"keywords": [
|
|
@@ -53,58 +53,58 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"axios": "^0.24.0",
|
|
55
55
|
"axios-cache-adapter": "^2.7.3",
|
|
56
|
-
"pino": "^7.
|
|
57
|
-
"pino-pretty": "^7.
|
|
56
|
+
"pino": "^7.6.3",
|
|
57
|
+
"pino-pretty": "^7.3.0",
|
|
58
58
|
"tslib": "^2.3.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@babel/cli": "^7.16.
|
|
62
|
-
"@babel/core": "^7.16.
|
|
63
|
-
"@babel/node": "^7.16.
|
|
64
|
-
"@babel/preset-env": "^7.16.
|
|
65
|
-
"@babel/preset-typescript": "^7.16.
|
|
66
|
-
"@commitlint/cli": "^
|
|
67
|
-
"@commitlint/config-conventional": "^
|
|
68
|
-
"@commitlint/cz-commitlint": "^
|
|
61
|
+
"@babel/cli": "^7.16.7",
|
|
62
|
+
"@babel/core": "^7.16.7",
|
|
63
|
+
"@babel/node": "^7.16.7",
|
|
64
|
+
"@babel/preset-env": "^7.16.7",
|
|
65
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
66
|
+
"@commitlint/cli": "^16.0.2",
|
|
67
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
68
|
+
"@commitlint/cz-commitlint": "^16.0.0",
|
|
69
69
|
"@semantic-release/changelog": "^6.0.1",
|
|
70
70
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
71
71
|
"@semantic-release/git": "^10.0.1",
|
|
72
72
|
"@semantic-release/github": "^8.0.2",
|
|
73
73
|
"@semantic-release/npm": "^8.0.3",
|
|
74
74
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
75
|
-
"@types/jest": "^27.0
|
|
76
|
-
"@types/node": "^
|
|
77
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
78
|
-
"@typescript-eslint/parser": "^5.
|
|
75
|
+
"@types/jest": "^27.4.0",
|
|
76
|
+
"@types/node": "^17.0.8",
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
78
|
+
"@typescript-eslint/parser": "^5.9.1",
|
|
79
79
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
80
80
|
"commitizen": "^4.2.4",
|
|
81
|
-
"conventional-changelog-conventionalcommits": "^4.6.
|
|
81
|
+
"conventional-changelog-conventionalcommits": "^4.6.3",
|
|
82
82
|
"cz-conventional-changelog": "3.3.0",
|
|
83
|
-
"dts-bundle-generator": "^6.
|
|
84
|
-
"eslint": "^8.
|
|
83
|
+
"dts-bundle-generator": "^6.3.0",
|
|
84
|
+
"eslint": "^8.6.0",
|
|
85
85
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
86
86
|
"eslint-config-airbnb-typescript": "^16.1.0",
|
|
87
87
|
"eslint-config-node": "^4.1.0",
|
|
88
88
|
"eslint-config-prettier": "^8.3.0",
|
|
89
89
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
90
|
-
"eslint-plugin-import": "^2.25.
|
|
91
|
-
"eslint-plugin-jest": "^25.3.
|
|
90
|
+
"eslint-plugin-import": "^2.25.4",
|
|
91
|
+
"eslint-plugin-jest": "^25.3.4",
|
|
92
92
|
"eslint-plugin-node": "^11.1.0",
|
|
93
93
|
"eslint-plugin-prettier": "^4.0.0",
|
|
94
|
-
"eslint-plugin-promise": "^
|
|
95
|
-
"eslint-plugin-unicorn": "^
|
|
96
|
-
"http-status-codes": "^2.
|
|
94
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
95
|
+
"eslint-plugin-unicorn": "^40.0.0",
|
|
96
|
+
"http-status-codes": "^2.2.0",
|
|
97
97
|
"husky": "^7.0.4",
|
|
98
98
|
"is-ci": "^3.0.1",
|
|
99
|
-
"jest": "^27.4.
|
|
100
|
-
"lint-staged": "^12.1.
|
|
99
|
+
"jest": "^27.4.7",
|
|
100
|
+
"lint-staged": "^12.1.7",
|
|
101
101
|
"lockfile-lint": "^4.6.2",
|
|
102
|
-
"prettier": "^2.5.
|
|
102
|
+
"prettier": "^2.5.1",
|
|
103
103
|
"semantic-release": "^18.0.1",
|
|
104
104
|
"sort-package-json": "^1.53.1",
|
|
105
|
-
"ts-jest": "^27.
|
|
105
|
+
"ts-jest": "^27.1.2",
|
|
106
106
|
"ts-node-dev": "^1.1.8",
|
|
107
|
-
"typescript": "^4.5.
|
|
107
|
+
"typescript": "^4.5.4"
|
|
108
108
|
},
|
|
109
109
|
"engines": {
|
|
110
110
|
"node": ">=14"
|