Skip to content

Commit

Permalink
Merge pull request #196 from qgustavor/remove-node-fetch
Browse files Browse the repository at this point in the history
Remove node-fetch
  • Loading branch information
qgustavor authored Jun 29, 2024
2 parents dd32344 + e50e85f commit 2068b0a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 134 deletions.
3 changes: 1 addition & 2 deletions lib/api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ class API extends EventEmitter {
if (typeof globalThis.fetch === 'function') {
API.fetchModule = globalThis.fetch.bind(globalThis)
} else {
const nodeFetch = await import('node-fetch')
API.fetchModule = nodeFetch.fetch
throw Error('globalThis.fetch not found!')
}
}

Expand Down
127 changes: 0 additions & 127 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
},
"dependencies": {
"abort-controller": "^3.0.0",
"node-fetch": "^3.3.2",
"pumpify": "^2.0.1",
"secure-random": "^1.1.2",
"stream-skip": "^1.0.3"
Expand Down
15 changes: 11 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

Unofficial JavaScript SDK for MEGA

> **IMPORTANT**
> [Collaboration restricted to only pull requests. Only supporters can open discussions. Issues opened by non-supporters will be closed immediately.](https://github.com/qgustavor/mega/discussions/138).
**API documentation and examples are available in the website: [https://mega.js.org/](https://mega.js.org/)**

* This is based on [tonistiigi's mega library](https://github.com/tonistiigi/mega).
Expand All @@ -13,13 +10,23 @@ Unofficial JavaScript SDK for MEGA

## Contributing

Whenever you can, try contributing using pull requests!

**IMPORTANT!** Before opening issues or discussions, look at the documentation, look at the examples, look for existent issues, look for existent discussions, then, if you still think that's a issue, follow the issue template!

[![pr-release](https://img.shields.io/badge/-pr--release-blueviolet)](https://pr-release.org/) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com/)

How to contribute using pull requests:

- Fork the project
- Clone it
- Run `npm install`
- Switch to a feature branch
- Change the library as you want
- Change the library
- Fix issues
- Add features
- Refactor things
- `npm run lint-fix` to fix common issues
- Build the bundled versions using `npm run build`
- Run at least Node tests using `npm test node` to test Node
- Optionally run `npm test deno` to test Deno if you have it installed (CI will test Deno anyway)
Expand Down

0 comments on commit 2068b0a

Please sign in to comment.