@k03mad/request 5.4.1 → 5.6.0

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.
@@ -25,9 +25,6 @@ jobs:
25
25
  with:
26
26
  node-version-file: '.nvmrc'
27
27
 
28
- - name: Install PNPM
29
- run: npm i pnpm -g
30
-
31
28
  - name: Run setup
32
29
  run: npm run setup
33
30
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Kirill Molchanov
3
+ Copyright (c) Kirill Molchanov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1 +1 @@
1
- "Got" with queues and debug logs
1
+ Simple "Got" requests library wrapper for personal use
@@ -22,8 +22,8 @@ const cacheGotResponseKeys = [
22
22
 
23
23
  const gotDefaultOpts = got.extend({
24
24
  dnsCache: true,
25
- headers: {'user-agent': 'curl/8.4.0'},
26
- timeout: {request: 15_000},
25
+ headers: {'user-agent': 'curl/8.5.0'},
26
+ timeout: {request: 10_000},
27
27
  });
28
28
 
29
29
  const cacheDebug = msgArr => {
@@ -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.4.1",
3
+ "version": "5.6.0",
4
4
  "description": "Request library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -24,18 +24,17 @@
24
24
  "strip-ansi": "7.1.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@k03mad/eslint-config": "18.0.0",
27
+ "@k03mad/eslint-config": "19.4.0",
28
28
  "eslint": "8.56.0",
29
29
  "husky": "8.0.3"
30
30
  },
31
31
  "scripts": {
32
- "lint": "pnpm run lint:eslint",
32
+ "lint": "npm run lint:eslint",
33
33
  "lint:eslint": "eslint ./ --cache",
34
- "clean": "pnpm run clean:modules && pnpm run clean:eslint:cache",
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": "pnpm run clean && pnpm i",
38
- "setup:prod": "pnpm run clean && pnpm i --omit=dev",
37
+ "setup": "npm run clean && npm i",
39
38
  "prepare": "husky install || true"
40
39
  }
41
40
  }