Skip to content
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 PEM files from npm #411

Closed
Mottie opened this issue Oct 1, 2017 · 4 comments
Closed

Remove PEM files from npm #411

Mottie opened this issue Oct 1, 2017 · 4 comments

Comments

@Mottie
Copy link

Mottie commented Oct 1, 2017

Please remove the test folder, or just the PEM files in the test folder, from the node package - these can be excluded by adding it to a .npmignore file.

I am working on a WebExtension and using web-ext which includes this module. When I attempt to "Load unpacked extension..." into Chrome, I see the following warnings and can not load the extension until I manually delete the test folder from this module.

Update: I misspoke. I can run the extension while these warnings are shown.

@ziluvatar
Copy link
Contributor

ziluvatar commented Oct 9, 2017

It's weird, in the v8.0 there was a change to fix that: https://github.com/auth0/node-jsonwebtoken/blob/master/package.json#L46-L51

I've just downloaded the package (with npm i) and this is what I see:
screen shot 2017-10-09 at 3 15 49 pm

Are you using v8.0?

@Mottie
Copy link
Author

Mottie commented Nov 20, 2017

Sorry for not responding earlier, yes I was using v8.0+ (I'm currently using v9.2.0). I am still seeing the reported .pem files included when I install the module.

@ziluvatar
Copy link
Contributor

🤔 Current last version is v8.1.0.

From npm: https://docs.npmjs.com/misc/developers

If, given the structure of your project, you find .npmignore to be a maintenance headache, you might instead try populating the files property of package.json, which is an array of file or directory names that should be included in your package. Sometimes a whitelist is easier to manage than a blacklist.

So both of them should provide the same result.

What do you see if you do a npm install? Can you see the test folder? I wondering if the installation is different inside the WebExtension system you mentioned. What about other installed modules, does it respect their package json "files" property?

@Mottie
Copy link
Author

Mottie commented Nov 28, 2017

Well, if I npm install jsonwebtoken directly, I don't see the test folder; but when I npm install web-ext I do... it appears that module is still using v7.1.9. So once they update it should fix the problem. Thanks!

@Mottie Mottie closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants