-
Notifications
You must be signed in to change notification settings - Fork 13
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 Traceur, V8-incompatible syntax sugar to run in node directly #15
base: master
Are you sure you want to change the base?
Conversation
Unfortunately, this library is designed to be run by both Node.js and in the browser. Removing Traceur means that it won't run in the browser. It would still be possible via Webpack, but we'd certainly need to update the README to explain this. |
You're right... I thought it worked, but apparently only in Chrome, FF, and Edge, not in IE or Safari. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*#Browser_compatibility Annoying. Curious, is anyone using libaxolotl in a webapp? Using it in a node program, an Electron app, or Chrome app seems reasonable, since all of those can be installed in a reasonably verifiable way (using shrinkwrap etc for reproducible builds, signing each release, etc). Doing end-to-end encryption in an webapp, on the other hand, seems questionable. Every time you load the app, you're trusting the server to send you untampered-with code, at which point you might as well trust it to handle the messages as well. |
That's a good point. I agree that it should not be used for online webapps currently - although I recently become aware that progress is being made in that area. My concern is that there may be offline JavaScript environments out there that aren't ES6 compatible. As I said, though, it's perfectly reasonable to assume that they could use Babel or Traceur themselves so this library doesn't have to. I can see the benefit, it would certainly simplify the build process for this library.
What is I'm happy to drop JSCS and JSHint in favour of something better. I've used ESLint recently, which I like. |
@@ -15,9 +15,9 @@ | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
|
|||
import Axolotl from "./src/Axolotl"; | |||
import axolotlCrypto from "axolotl-crypto"; | |||
const Axolotl = require("./src/Axolotl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep semicolons on the end of lines, please.
@joebandenburg |
If you prefer to keep the semicolons, I can use semistandard instead :) |
Subresource integrity is cool by the way, but doesn't provide a way to install a webapp securely. You still trust the server every time you use the app. What it does provide is a way to use CDNs etc securely: instead of just including, say, |
It seems to me that, as it stands, this pull request is changing two things at once:
Would you mind moving the style changes out of this pull request? I think I'm sold on 1 but not on 2. |
For what it's worth, I'm keeping an eye on the development of this library because I'm considering using it to add OMEMO encryption support to converse.js which is a browser-JS XMPP chat client. OMEMO relies on Axolotl. Converse.js is a purely client-side JS library that only communicates with an XMPP server and with no other backend web application. So this is a usecase where this library would be used purely in the browser. Previously I've added OTR support (via otr.js ) to converse.js and it remains a relatively popular feature. People have since asked for OMEMO support as well. Thanks and keep up the good work. |
This makes debugging easier Clean up tests, remove pure-cjs
@joebandenburg makes sense, fixed!
To get all Grunt tasks working again, I had to:
LMK if this looks reasonable, and also whether you want me to squash the commits. |
|
We can probably replace it later with Istanbul, so that we get code coverage reports again.
@joebandenburg I've updated the PR to match the existing code style. Thoughts? |
Node v4 supports most of ES6 by default now! This makes debugging easier.
Changes
Remove traceur dependency
Remove some of the fancy ES6 syntax so that we can run in node directly
Clean up tests, remove jscs and jshint.
(Locally I've replaced them with
standard
, getting rid of a good amount of unused code in the process, but I'll make a separate PR for that since it creates a huge diff.)Remove dist folder. The main entry point is the readable
index.js
rather than the generateddist.js