@k03mad/request 5.5.0 → 5.6.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/.github/workflows/lint.yml +4 -14
- package/.github/workflows/publish.yml +21 -0
- package/.husky/pre-commit +0 -3
- package/LICENSE +1 -1
- package/app/lib/request.js +2 -2
- package/package.json +6 -6
|
@@ -12,21 +12,11 @@ on:
|
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
14
|
lint:
|
|
15
|
-
name: Lint
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
15
|
runs-on: ubuntu-latest
|
|
19
16
|
steps:
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- name: Install NodeJS
|
|
24
|
-
uses: actions/setup-node@v4
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
25
19
|
with:
|
|
26
20
|
node-version-file: '.nvmrc'
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
run: npm run setup
|
|
30
|
-
|
|
31
|
-
- name: Run lint
|
|
32
|
-
run: npm run lint
|
|
21
|
+
- run: npm run setup
|
|
22
|
+
- run: npm run lint
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
environment: npm
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version-file: '.nvmrc'
|
|
17
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
- run: npm run setup
|
|
19
|
+
- run: npm publish
|
|
20
|
+
env:
|
|
21
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.husky/pre-commit
CHANGED
package/LICENSE
CHANGED
package/app/lib/request.js
CHANGED
|
@@ -65,9 +65,9 @@ const sendRequest = async (url, opts) => {
|
|
|
65
65
|
|
|
66
66
|
if (err?.response?.body) {
|
|
67
67
|
try {
|
|
68
|
-
err.__.response = JSON.parse(err.response.body);
|
|
68
|
+
err.__.response = JSON.stringify(JSON.parse(err.response.body));
|
|
69
69
|
} catch {
|
|
70
|
-
err.__.response = err.response.body;
|
|
70
|
+
err.__.response = JSON.stringify(err.response.body);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/request",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.1",
|
|
4
4
|
"description": "Request library",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"chalk": "5.3.0",
|
|
20
20
|
"debug": "4.3.4",
|
|
21
|
-
"got": "14.
|
|
21
|
+
"got": "14.2.0",
|
|
22
22
|
"p-queue": "8.0.1",
|
|
23
23
|
"pretty-bytes": "6.1.1",
|
|
24
24
|
"strip-ansi": "7.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@k03mad/eslint-config": "
|
|
27
|
+
"@k03mad/eslint-config": "20.3.0",
|
|
28
28
|
"eslint": "8.56.0",
|
|
29
|
-
"husky": "
|
|
29
|
+
"husky": "9.0.11"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"lint": "npm run lint:eslint",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"clean": "npm run clean:modules && npm run clean:eslint:cache",
|
|
35
35
|
"clean:modules": "rm -rf ./node_modules || true",
|
|
36
36
|
"clean:eslint:cache": "rm -rf .eslintcache || true",
|
|
37
|
-
"setup": "npm run clean && npm i",
|
|
38
|
-
"prepare": "husky
|
|
37
|
+
"setup": "npm run clean && npm i pnpm -g && pnpm i",
|
|
38
|
+
"prepare": "husky || true"
|
|
39
39
|
}
|
|
40
40
|
}
|