googlearchive / web-push-encryption

[Deprecated] Encryption Utilities for Web Push protocol
Apache License 2.0
84 stars 23 forks source link

Version on NPM is broken #22

Closed MacIElson closed 8 years ago

MacIElson commented 8 years ago

The version available on npm has the line: const encrypt = require('./encrypt').encrypt; which should be: const encrypt = require('./encrypt');

This prevents the package from functioning and is fixed in master but not pushed to npm. I would greatly appreciate it if this change could be pushed to npm.

(Sorry if this isn't the appropriate place for this kind of question)

Thanks!

gauntface commented 8 years ago

Thanks for raising this @MaciCrowell, let me get some tests in flight to make sure we don't do something like this again in the future and I'll see if I can do another push to NPM.

gauntface commented 8 years ago

@wibblymat this is all on you ;)

I don't have permission to publish to NPM, if you cant add me to it and I'll hook up the tests to be run before a publish is performed - reusing one of the existing publishing scripts.

gauntface commented 8 years ago

I've got the PR out that makes use of a semi-reasonable publish script which we should be using from this point onwards and that will run tests before allowing a publish.

gauntface commented 8 years ago

I nagged @wibblymat and got publishing rights.

I've commit 4 versions (Sorry) but they are all the same, I just needed to fix a few issues to get doc publishing working with the release. In the future this should be all smooth sailing.

If it's still broken please reopen this issue with any problems and I'll make sure we have some tests to protect against those issues.

wibblymat commented 8 years ago

Thanks @gauntface!

yashasg commented 8 years ago

I still seem to have an issue with this.I am on npm version 3.10.1. Here's what i see when i run node server. const encrypt = require('./encrypt'); ^^^^^ SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (C:\Users\u1006\Desktop\newGAPP\emergency-ops\nodewebservice\server.js:6:15) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16) at node.js:814:3

I figured it out,I was running an older version of node that didnt support const in strict mode.it works now.Sorry for the trouble.