Skip to content

Commit

Permalink
fix: node-fetch for node16 runner
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHeneise committed Mar 15, 2023
1 parent 787ff96 commit e4e66f4
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { write } from './lib/write.js'
import { fetchDashboards, fetchDashboard, fetchFolders } from './lib/grafana.js'
import fetch from 'node-fetch'

const writeFiles = []
const dashboards = await fetchDashboards()
Expand Down
1 change: 1 addition & 0 deletions lib/grafana.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { grafanaOrg, grafanaApiKey } from '../config.js'
import fetch from 'node-fetch'

const fetchGrafana = async (query) => {
const res = await fetch(`https://${grafanaOrg}.grafana.net/api/${query}`, {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"@semantic-release/github"
]
},
"dependencies": {
"node-fetch": "^3.3.1"
},
"devDependencies": {
"dotenv": "^16.0.3",
"eslint": "^8.36.0",
Expand Down
43 changes: 43 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4e66f4

Please sign in to comment.