Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove node-fetch #196

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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