Skip to content

Commit 9f7b9a2

Browse files
committed
Merge branch 'dev' into releases/v2
2 parents 4a1676b + 3180b04 commit 9f7b9a2

File tree

9 files changed

+161
-117
lines changed

9 files changed

+161
-117
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-node@v3
2121
with:
22-
node-version: 'v14.18.1'
22+
node-version: 16
2323
registry-url: 'https://registry.npmjs.org'
2424

2525
- name: Install Yarn
@@ -33,6 +33,6 @@ jobs:
3333
yarn test
3434
3535
- name: Uploade CodeCov Report
36-
uses: codecov/codecov-action@v3.1.0
36+
uses: codecov/codecov-action@v3.1.1
3737
with:
3838
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-node@v3
2020
with:
21-
node-version: 'v14.18.1'
21+
node-version: 16
2222
registry-url: 'https://registry.npmjs.org'
2323

2424
- name: Install Yarn

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Setup .npmrc file to publish to npm
1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 'v14.18.1'
20+
node-version: 16
2121
registry-url: 'https://registry.npmjs.org'
2222
scope: '@jamesives'
2323

@@ -42,7 +42,7 @@ jobs:
4242
# Setup .npmrc file to publish to GitHub Packages
4343
- uses: actions/setup-node@v3
4444
with:
45-
node-version: 12
45+
node-version: 16
4646
registry-url: 'https://npm.pkg.github.com'
4747
scope: '@jamesives'
4848

.github/workflows/sponsors.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
file: 'README.md'
1919
template: '<a href="https://github.com/{{{ login }}}"><img src="https://github.com/{{{ login }}}.png" width="50px" alt="{{{ login }}}" /></a>&nbsp;&nbsp;'
2020
maximum: 9999
21-
organization: true
2221

2322
- name: Generate Sponsors 💖
2423
uses: JamesIves/github-sponsors-readme-action@v1
@@ -28,7 +27,6 @@ jobs:
2827
minimum: 10000
2928
template: '<a href="https://github.com/{{{ login }}}"><img src="https://github.com/{{{ login }}}.png" width="80px" alt="{{{ login }}}" /></a>&nbsp;&nbsp;'
3029
marker: 'premium'
31-
organization: true
3230

3331
- name: Deploy to GitHub Pages
3432
uses: JamesIves/github-pages-deploy-action@v4

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939
</p>
4040

4141
<p align="center">
42-
Maintainence of this project is made possible by all the <a href="https://github.com/JamesIves/github-pages-deploy-action/graphs/contributors">contributors</a> and <a href="https://github.com/sponsors/JamesIves">sponsors</a>. If you'd like to sponsor this project and have your avatar or company logo appear below <a href="https://github.com/sponsors/JamesIves">click here</a>. 💖
42+
Maintenance of this project is made possible by all the <a href="https://github.com/JamesIves/github-pages-deploy-action/graphs/contributors">contributors</a> and <a href="https://github.com/sponsors/JamesIves">sponsors</a>. If you'd like to sponsor this project and have your avatar or company logo appear below <a href="https://github.com/sponsors/JamesIves">click here</a>. 💖
4343
</p>
4444

4545
<p align="center">
46-
<!-- premium --><a href="https://github.com/github"><img src="https://github.com/github.png" width="80px" alt="github" /></a>&nbsp;&nbsp;<!-- premium -->
46+
<!-- premium --><!-- premium -->
4747
</p>
4848

4949
<p align="center">
50-
<!-- sponsors --><a href="https://github.com/Chooksta69"><img src="https://github.com/Chooksta69.png" width="50px" alt="Chooksta69" /></a>&nbsp;&nbsp;<a href="https://github.com/robjtede"><img src="https://github.com/robjtede.png" width="50px" alt="robjtede" /></a>&nbsp;&nbsp;<a href="https://github.com/hadley"><img src="https://github.com/hadley.png" width="50px" alt="hadley" /></a>&nbsp;&nbsp;<a href="https://github.com/kevinchalet"><img src="https://github.com/kevinchalet.png" width="50px" alt="kevinchalet" /></a>&nbsp;&nbsp;<a href="https://github.com/Yousazoe"><img src="https://github.com/Yousazoe.png" width="50px" alt="Yousazoe" /></a>&nbsp;&nbsp;<!-- sponsors -->
50+
<!-- sponsors --><a href="https://github.com/Chooksta69"><img src="https://github.com/Chooksta69.png" width="50px" alt="Chooksta69" /></a>&nbsp;&nbsp;<a href="https://github.com/robjtede"><img src="https://github.com/robjtede.png" width="50px" alt="robjtede" /></a>&nbsp;&nbsp;<a href="https://github.com/hadley"><img src="https://github.com/hadley.png" width="50px" alt="hadley" /></a>&nbsp;&nbsp;<a href="https://github.com/kevinchalet"><img src="https://github.com/kevinchalet.png" width="50px" alt="kevinchalet" /></a>&nbsp;&nbsp;<!-- sponsors -->
5151
</p>
5252

5353
## Getting Started ✈️
@@ -188,7 +188,7 @@ The following configuration options should be set.
188188
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -------- |
189189
| `token-endpoint` | If the `endpoint` API requires you to make a request to get an access token prior to fetching data you can perform this task by specifying a token endpoint. Any data returned from the token end can be referenced in the `configuration` variable using the triple bracket syntax: `{{{ access_token }}}`. For more information refer to the [Token Request part of the readme](https://github.com/JamesIves/fetch-api-data-action#token-request-%EF%B8%8F); | `with` | **No** |
190190
| `token-configuration` | Any applicable configuration settings that should be set such as authentication tokens. You can reference secrets using the `${{ secrets.secret_name }}` syntax. For more information refer to the [Fetch API documentation](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch). | `secrets / with` | **No** |
191-
| `retry` | If you're working with an intermittent API you can toggle this option to `true`. Doing so will make the action try the request 3 times at random invervals before failing. | `with` | **No** |
191+
| `retry` | If you're working with an intermittent API you can toggle this option to `true`. Doing so will make the action try the request 3 times at random intervals before failing. | `with` | **No** |
192192
| `save-location` | By default the save location of the file is `fetch-api-data-action/data.json`, if you'd like to override the directory you can do so by specifying a new one with this variable. | `with` | **No** |
193193
| `save-name` | You can override the name of the exported `.json` file by specifying a new one here. You should _not_ include the file extension in your name. | `with` | **No** |
194194
| `set-output` | Determines if the returned data should be saved as an environment variable or not. This field defaults to `true`, but depending on your API response length you may need to toggle this. | `with` | **No** |

__tests__/fetch.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('fetch', () => {
5454
})
5555
} catch (error) {
5656
expect(error instanceof Error && error.message).toBe(
57-
"There was an error fetching from the API: TypeError: Cannot read property 'cat' of null ❌"
57+
"There was an error fetching from the API: TypeError: Cannot read properties of null (reading 'cat') ❌"
5858
)
5959
}
6060
})
@@ -159,7 +159,7 @@ describe('fetch', () => {
159159
})
160160
} catch (error) {
161161
expect(error instanceof Error && error.message).toBe(
162-
`There was an error generating the export file: TypeError [ERR_INVALID_OPT_VALUE_ENCODING]: The value "hexxxxx" is invalid for option "encoding" ❌`
162+
"There was an error generating the export file: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'hexxxxx' is invalid encoding. Received 'encoding' ❌"
163163
)
164164
}
165165
})

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'Fetch API Data'
22
description: 'This action will handle authenticated API requests, allowing you to save the data from the request into your workspace.'
33
author: 'James Ives <iam@jamesiv.es>'
44
runs:
5-
using: 'node12'
5+
using: 'node16'
66
main: 'lib/main.js'
77
branding:
88
icon: 'truck'

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@jamesives/fetch-api-data-action",
33
"description": "GitHub action for handling authenticated API requests, allowing you to save the data from the request into your workspace as an environment variable and a .json file.",
44
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
5-
"version": "2.2.2",
5+
"version": "2.2.3",
66
"license": "MIT",
77
"main": "lib/lib.js",
88
"types": "lib/lib.d.ts",
@@ -35,7 +35,7 @@
3535
"github-action"
3636
],
3737
"dependencies": {
38-
"@actions/core": "1.9.0",
38+
"@actions/core": "1.9.1",
3939
"@actions/io": "1.1.2",
4040
"async-retry": "1.3.3",
4141
"cross-fetch": "3.1.5",
@@ -44,19 +44,19 @@
4444
"devDependencies": {
4545
"@types/async-retry": "1.4.3",
4646
"@types/jest": "27.5.0",
47-
"@types/mustache": "4.1.2",
48-
"@types/node": "18.0.0",
47+
"@types/mustache": "4.2.1",
48+
"@types/node": "18.8.3",
4949
"@typescript-eslint/eslint-plugin": "5.20.0",
5050
"@typescript-eslint/parser": "5.20.0",
51-
"eslint": "8.18.0",
51+
"eslint": "8.24.0",
5252
"eslint-config-prettier": "8.5.0",
53-
"eslint-plugin-jest": "26.5.3",
54-
"eslint-plugin-prettier": "4.0.0",
53+
"eslint-plugin-jest": "27.1.1",
54+
"eslint-plugin-prettier": "4.2.1",
5555
"jest": "27.5.1",
5656
"jest-circus": "27.5.1",
57-
"nock": "13.2.4",
57+
"nock": "13.2.9",
5858
"prettier": "2.7.1",
5959
"ts-jest": "27.1.4",
60-
"typescript": "4.7.4"
60+
"typescript": "4.8.4"
6161
}
6262
}

0 commit comments

Comments
 (0)