Skip to content

Commit 4367ce2

Browse files
authored
Remove node-fetch dependency (#2)
MagicMirror now requires Node 18+ which has built-in fetch support.
1 parent 635cbdf commit 4367ce2

File tree

5 files changed

+4835
-3198
lines changed

5 files changed

+4835
-3198
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Changed
1212

13+
* Removed dependency on node-fetch so that `npm install` is no longer required for setup.
14+
1315
### Removed
1416

1517
## [2.4.0]

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ National Hockey League Module for MagicMirror²
1010

1111
* An installation of [MagicMirror²](https://github.com/MichMich/MagicMirror)
1212
* npm
13-
* [node-fetch](https://www.npmjs.com/package/node-fetch)
1413

1514
## Installation
1615

@@ -27,8 +26,6 @@ National Hockey League Module for MagicMirror²
2726
}
2827
```
2928

30-
* Run command `npm i --production` in `~/MagicMirror/modules/MMM-NHL` directory.
31-
3229
## Config Options
3330

3431
| **Option** | **Default** | **Description** |

node_helper.js

-7
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99

1010
/* eslint-env node */
1111

12-
/**
13-
* @external node-fetch
14-
* @see https://www.npmjs.com/package/node-fetch
15-
*/
16-
const fetch = require('node-fetch');
17-
1812
/**
1913
* @external logger
2014
* @see https://github.com/MichMich/MagicMirror/blob/master/js/logger.js
@@ -78,7 +72,6 @@ const BASE_PLAYOFF_URL = 'https://api-web.nhle.com/v1/playoff-series/carousel';
7872
* @module node_helper
7973
* @description Backend for the module to query data from the API provider.
8074
*
81-
* @requires external:node-fetch
8275
* @requires external:logger
8376
* @requires external:node_helper
8477
*/

0 commit comments

Comments
 (0)