Remove node-fetch change to another fetch package #179

Closed
opened 2021-09-05 02:38:46 +00:00 by Sirherobrine23 · 1 comment

With the new version of node-fetch that is forcing many projects to use ESM for their own interests, we like ESM, but we won't mind ESM anytime soon.

Bds Maneger will still be programmed in CJS, even when NodeJS officially switches to ESM then we will be concerned about bringing Bds Maneger Core to ESM.

Tasks:

  • Install axios.
  • Install node-fetch@3
  • Resolve requests in node-fetch
  • Resolve requests in axios
With the new version of node-fetch that is forcing many projects to use ESM for their own interests, we like ESM, but we won't mind ESM anytime soon. Bds Maneger will still be programmed in CJS, even when NodeJS officially switches to ESM then we will be concerned about bringing Bds Maneger Core to ESM. Tasks: - [x] Install axios. - [x] Install node-fetch@3 - [x] Resolve requests in node-fetch - [x] Resolve requests in axios
jimmywarting commented 2021-09-05 09:37:30 +00:00 (Migrated from github.com)
Author
Owner

you could also just pin/stick with v2 of node-fetch
i would recommend keep using the fetch api, it's going to be introduced to nodejs core one day

the alternative is that you use the async import solution.

const fetch = (...args) => import('node-fetch').then(mod => mod.default(...args));
you could also just pin/stick with v2 of node-fetch i would recommend keep using the fetch api, it's going to be introduced to nodejs core one day the alternative is that you use the async import solution. ```js const fetch = (...args) => import('node-fetch').then(mod => mod.default(...args)); ```
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: go-bds/Maneger#179
No description provided.