GithubHelp home page GithubHelp logo

megajs's Introduction

MEGAJS

Unofficial JavaScript SDK for MEGA

API documentation and examples are available in the website: https://mega.js.org/

Contributing

pr-release JavaScript Style Guide

  • Fork the project
  • Clone it
  • Run npm install
  • Switch to a feature branch
  • Change the library as you want
  • 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)
  • Create a pull-request against next (not main)

Before creating a pull request, please, run tests. It will avoid a lot of common issues! You can run npm run lint-fix to fix common issues.

If you implement new features them implement tests for it too if possible. The hash at the end of test/helpers/test-runner.mjs may be updated if tests are updated in a way it change server state (like adding new files to tests).

Project history

This package started as a fork, with the following objectives:

  • Make the original package work in browsers again: even following the instructions from the original library it stopped working because some dependencies used __proto__, which is non-standard and isn't supported in many browsers. Also the updated versions of those libraries broke backyards compatibility;
  • Reduce dependencies and replace big dependencies with smaller ones, like crypto libraries, which usually are huge;
  • Rewrite code using the new JavaScript syntax, allowing to use Rollup, which can generate smaller bundles;
  • Make tests work again after the changes above;
  • Continue the original library development implementing new features and improving performance.

Request package was replaced with a shim based in browser-request and xhr-stream, which additional changes in order to make it work inside Service Workers. Crypto was replaced with secure-random.

As there were many changes there isn't any plan to merge those changes into the original library, unless the original author accept those massive changes. That's why I put "js" in the name, which is silly because both libraries use JavaScript. At least it's better than other ideas I had, like "mega2", "mega-es" and "modern-mega".

In 1.0 release request was replaced with fetch, Deno support was added (including tests), TypeScript types were added, Rollup was replaced with esbuild, streaming libraries were updated or replaced and some issues were fixed.

megajs's People

Contributors

qgustavor avatar tonistiigi avatar championbuffalo1 avatar realalphabet avatar edtechd avatar vukkk avatar bluelovers avatar deltaevo avatar dautushenka avatar kenzuya avatar nico205 avatar i0x0 avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.