upgrade to node.js 8.x/10.x features #23

Closed
by Ghost opened 5 years ago · 4 comments
Ghost commented 5 years ago

The code can be much simpler to read, understand and contribute if you can drop support EOL versions of node.js. Promises can become async/awaits, string concatenation - template literals.

Also, enabling ESLint can detect most common mistakes.

I can create a pull request with all these changes (I already have it working in production) if you are ok with this change

The code can be much simpler to read, understand and contribute if you can drop support EOL versions of node.js. Promises can become async/awaits, string concatenation - template literals. Also, enabling ESLint can detect most common mistakes. I can create a pull request with all these changes (I already have it working in production) if you are ok with this change
Owner

Hey gugu,

Awesome to hear, but now I wish I had published the roadmap or published in some other way what I've been in the middle of.

Major Version on the way

I actually just did a rewrite of this for the browser last week and fixed a number of bugs and cleanup up some of the code:

Of particular import is a bugfix to the nonce handling and supporting ACME draft 15, which becomes mandatory in November.

I wrote the code on purpose to be easy to port to the browser, it just took me a while to actually porting it. I plan to port that all back to node (which is far much less work), and in doing so I'm going to be keeping some of the things that otherwise are... stupid things to do (like the whole encodings package). 100% "isomorphism" isn't a hard-and-fast goal, per se, but it turns out to be convenient.

Along with that, I've dropped all of the old code that was only there for backwards compatibility (which made a mess of the place), and made it so that greenlock.js challenge plugins are 1:1 with acme.js challenge handlers.

That said, the next release will be a breaking change.

Node v6 is alive and well

Looking at stats we have a TON of users still on node v6. I don't want to use any syntax that doesn't work in node v6, but I do want to include some sort of polyfill file that handles a few things like Buffers and Promises, some of which has already been done:

About half of our users are on Windows and I don't recall the exact number, but something like 30% are on node v6. I could look it up (these numbers come from greenlock.js and rsa-compat.js, which accounts for most of the installs of acme-v2.js).

Less Tooling => Better Security

I've been using JSHint. I should probably publish my .jshintrc into the repo, but I'm guessing all the same options could be set in .eslint as well.

I'm very wary of the security vulnerabilities in the big tools chains, especially with all the malware that was published to npm last year (stealing credentials, stealing bitcoin wallets, etc) and made it into big tool chains (everyone who had create-react-app).

Do it anyway

That said, go ahead and make the PR so that I can see what the changes look like.

Hey gugu, Awesome to hear, but now I wish I had published the roadmap or published in some other way what I've been in the middle of. ## Major Version on the way I actually just did a rewrite of this for the browser last week and fixed a number of bugs and cleanup up some of the code: * https://git.rootprojects.org/root/bluecrypt-acme.js * https://rootprojects.org/acme/ (ugly technical demo) * https://rootprojects.org/acme/bluecrypt-acme.js * https://greenlock.domains/ (pretty, soon to be migrated to acme.js) Of particular import is a bugfix to the `nonce` handling and supporting ACME draft 15, which becomes mandatory in November. I wrote the code on purpose to be easy to port to the browser, it just took me a while to actually porting it. I plan to port that all back to node (which is far much less work), and in doing so I'm going to be keeping some of the things that otherwise are... stupid things to do (like the whole encodings package). 100% "isomorphism" isn't a hard-and-fast goal, per se, but it turns out to be convenient. Along with that, I've dropped all of the old code that was only there for backwards compatibility (which made a mess of the place), and made it so that greenlock.js challenge plugins are 1:1 with acme.js challenge handlers. That said, the next release will be a breaking change. ## Node v6 is alive and well Looking at stats we have a TON of users still on node v6. I don't want to use any syntax that doesn't work in node v6, but I do want to include some sort of polyfill file that handles a few things like Buffers and Promises, some of which has already been done: * https://www.npmjs.com/package/buffer-v6-polyfill About half of our users are on Windows and I don't recall the exact number, but something like 30% are on node v6. I could look it up (these numbers come from greenlock.js and rsa-compat.js, which accounts for most of the installs of acme-v2.js). ## Less Tooling => Better Security I've been using JSHint. I should probably publish my `.jshintrc` into the repo, but I'm guessing all the same options could be set in `.eslint` as well. I'm very wary of the security vulnerabilities in the big tools chains, especially with all the malware that was published to npm last year (stealing credentials, stealing bitcoin wallets, etc) and made it into big tool chains (everyone who had create-react-app). ## Do it anyway That said, go ahead and make the PR so that I can see what the changes look like.

Node v6 is alive and well

Better Security

The problem is node v6 maintenance is over. No more security and bug fixes, as far as I understand:
https://github.com/nodejs/Release

I hope I'll send a PR soon

> Node v6 is alive and well > Better Security The problem is node v6 maintenance is over. No more security and bug fixes, as far as I understand: https://github.com/nodejs/Release I hope I'll send a PR soon
Owner

I got sick over the weekend and didn't finish the new version. Should be done by this weekend.

I got sick over the weekend and didn't finish the new version. Should be done by this weekend.
coolaj86 closed this issue 5 years ago
Owner

I update the browser version ( https://greenlock.domains/app/js/bluecrypt-acme.js ), but I haven't backported it to node yet, but I will.

I update the browser version ( https://greenlock.domains/app/js/bluecrypt-acme.js ), but I haven't backported it to node yet, but I will.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.