@k03mad/request 1.1.2 → 1.2.2

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.
@@ -4,3 +4,7 @@ updates:
4
4
  directory: "/"
5
5
  schedule:
6
6
  interval: "monthly"
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
@@ -0,0 +1,40 @@
1
+ name: ESLint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+ schedule:
11
+ - cron: '00 15 * * 6'
12
+
13
+ jobs:
14
+ eslint:
15
+ name: ESLint
16
+ permissions:
17
+ contents: read
18
+ security-events: write
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v3
23
+
24
+ - name: Install NodeJS
25
+ uses: actions/setup-node@v3
26
+ with:
27
+ node-version-file: '.nvmrc'
28
+
29
+ - name: Install dependencies
30
+ run: npm run setup
31
+
32
+ - name: Run ESLint
33
+ run: npm run lint:github
34
+ continue-on-error: true
35
+
36
+ - name: Upload results
37
+ uses: github/codeql-action/upload-sarif@v2
38
+ with:
39
+ sarif_file: eslint-results.sarif
40
+ wait-for-processing: true
@@ -0,0 +1,39 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ eslint:
10
+ name: Publish
11
+ environment: npm
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v3
16
+
17
+ - name: Install NodeJS
18
+ uses: actions/setup-node@v3
19
+ with:
20
+ node-version-file: '.nvmrc'
21
+
22
+ - name: Install dependencies
23
+ run: npm run setup
24
+
25
+ - name: Set credentials
26
+ run: git config user.email "auto@action.autoaction_1" && git config user.name "Action"
27
+
28
+ - name: Update version
29
+ run: npm version patch
30
+
31
+ - name: Publish version
32
+ uses: JS-DevTools/npm-publish@v2
33
+ with:
34
+ token: ${{ secrets.NPM_TOKEN }}
35
+
36
+ - name: Create PR
37
+ uses: peter-evans/create-pull-request@v5
38
+ with:
39
+ title: Patch package version
@@ -17,6 +17,10 @@ const prepareRequestOpts = (opts = {}) => {
17
17
 
18
18
  const preparedOpts = {...opts};
19
19
 
20
+ if (!preparedOpts.dnsCache) {
21
+ preparedOpts.dnsCache = true;
22
+ }
23
+
20
24
  if (!preparedOpts.timeout) {
21
25
  preparedOpts.timeout = {request: 10_000};
22
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/request",
3
- "version": "1.1.2",
3
+ "version": "1.2.2",
4
4
  "description": "Request library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -21,17 +21,19 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@k03mad/eslint-config": "12.0.4",
24
- "eslint": "8.45.0",
25
- "eslint-plugin-import": "2.27.5",
26
- "eslint-plugin-jsdoc": "46.4.4",
24
+ "@microsoft/eslint-formatter-sarif": "3.0.0",
25
+ "eslint": "8.46.0",
26
+ "eslint-plugin-import": "2.28.0",
27
+ "eslint-plugin-jsdoc": "46.4.5",
27
28
  "eslint-plugin-n": "16.0.1",
28
29
  "eslint-plugin-simple-import-sort": "10.0.0",
29
30
  "eslint-plugin-sort-destructure-keys": "1.5.0",
30
- "eslint-plugin-unicorn": "48.0.0",
31
+ "eslint-plugin-unicorn": "48.0.1",
31
32
  "husky": "8.0.3"
32
33
  },
33
34
  "scripts": {
34
35
  "lint": "eslint ./ --report-unused-disable-directives",
36
+ "lint:github": "eslint ./ --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif",
35
37
  "clean": "rm -rfv ./node_modules || true",
36
38
  "setup": "npm run clean && npm i",
37
39
  "prepare": "husky install"