Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Port to ES6 and the rest endpoint #26

Open
jeffgca opened this issue Apr 22, 2015 · 8 comments
Open

Port to ES6 and the rest endpoint #26

jeffgca opened this issue Apr 22, 2015 · 8 comments
Assignees

Comments

@jeffgca
Copy link
Contributor

jeffgca commented Apr 22, 2015

( silence === assent, so if you aren't interested in this project just ignore, sorry for the spam )

I'd like feedback on this issue, so I'm tagging the current set of contributors to see if people have opinions:

I've done a bit of work to move this project over to es6 and the babel transpiler in the babel branch.

There are two key use cases for this library - writing scripts in node, and for use in web pages. There is a third smaller use case - for use in Firefox extensions. Moving to es6 is more of a 'new things are nice' move, but it was pretty straightforward. Shimming node / jetpack is nice, and the big change was bringing over Jame's work to change the client to use the rest endpoint instead of bzapi.

By moving to babel and a gulp-based build system I've implemented a very simple attempt at this:

  • get and post requests are abstracted in the xhr module which proxies either the SDK's request module or node's request module.
  • browserify produces a browser-compatible and bundled js file for browsers.

The current state is that basic things work but I haven't tested all functionality. I intend to port Heather's testing code and make it easier for people to contribute to this going forward, and fix any remaining bugs ( in particular auth issues that may crop up ).

@KevinGrandon
Copy link
Collaborator

Feedback+ from me. The main thing I care about was the 1.0.x work that @lightsofapollo was working on in #24. It seems that you have integrated that work, so I am happy, thanks!

@KWierso
Copy link
Contributor

KWierso commented Apr 22, 2015

Hrm, I'm getting | Error: Cannot find module 'request' | when I try using this from a webpage.

@jeffgca
Copy link
Contributor Author

jeffgca commented Apr 23, 2015

Yup, that's something I'm working on. The code works in node, but
browserifying the node module I'm using does not work.

On Wed, Apr 22, 2015 at 12:36 PM, KWierso [email protected] wrote:

Hrm, I'm getting | Error: Cannot find module 'request' | when I try using
this from a webpage.


Reply to this email directly or view it on GitHub
https://github.com/canuckistani/bz.js/issues/26#issuecomment-95312563.

@edmorley
Copy link

The version number has gone from 0.3.0 to 0.0.4 - presume this was unintentional? :-)

@jeffgca
Copy link
Contributor Author

jeffgca commented Apr 28, 2015

No, it was a big enough change I bumped the version. Lots of problems still, so no 1.0 yet.

@jeffgca
Copy link
Contributor Author

jeffgca commented Apr 28, 2015

I've done most of this work, including porting a bunch of the existing test suite to mocha. I'd urge caution and testing at this point.

@edmorley
Copy link

No, it was a big enough change I bumped the version. Lots of problems still, so no 1.0 yet.

Yeah I agree on not making it 1.0 - it's more the version has been decreased to lower than the 0.3.x version. The version is now 0.0.4, when I presume you meant 0.4.0.

@jeffgca
Copy link
Contributor Author

jeffgca commented Apr 28, 2015

Yeah I agree on not making it 1.0 - it's more the version has been decreased to lower than the 0.3.x
version. The version is now 0.0.4, when I presume you meant 0.4.0.

Whoops, I suspect that's semver muscle memory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants