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

Please avoid node dependency to "natives" module #70

Closed
bpasero opened this issue Apr 10, 2018 · 8 comments
Closed

Please avoid node dependency to "natives" module #70

bpasero opened this issue Apr 10, 2018 · 8 comments

Comments

@bpasero
Copy link

bpasero commented Apr 10, 2018

Hi,

I am a developer on VSCode and wanted to reach out to inform you that this extension is either using or having a dependency to a node module "natives" that will soon no longer be supported in VSCode once we updated to node.js 8.x (as part of our Electron 2.0 update which is planned for the near term).

The full graph is:

It would be great if this dependency could be avoided by either not depending on it anymore or updating the dependencies to newer versions so that this module is no longer pulled in.

As soon as any code in your extension (including node_modules) calls require("natives") we will throw an exception to prevent this module from getting loaded.

If this is just a devDependency and the module is never loaded in production, then you can ignore this issue and just close it!

More details in microsoft/vscode#47569

Thanks!
Ben
VSCode Team

@Tyriar
Copy link

Tyriar commented Apr 10, 2018

Related: EvanOxfeld/node-unzip#97

@bpasero
Copy link
Author

bpasero commented Apr 10, 2018

A good alternative node module to unzip seems to be unzip-stream, a fork of the unzip library with similar API.

@hbenl
Copy link
Collaborator

hbenl commented Apr 10, 2018

Thanks for the early warning, I will replace the unzip dependency ASAP (definitely before the next VSCode release).

@bpasero
Copy link
Author

bpasero commented Apr 11, 2018

@hbenl thanks

@hbenl
Copy link
Collaborator

hbenl commented Apr 13, 2018

I have replaced unzip with unzipper, which doesn't depend on natives.

There is still the gulp package which depends on natives. However, gulp is only a devDependency, so that shouldn't be a problem, right? The output of npm ls -prod doesn't contain the natives module.

@Tyriar
Copy link

Tyriar commented Apr 13, 2018

@hbenl that's fine, as long as require('gulp') doesn't happen when the extension is run you're good to go 👍

@hbenl
Copy link
Collaborator

hbenl commented Apr 13, 2018

Thanks for clarifying.

@hbenl hbenl closed this as completed Apr 13, 2018
@bpasero
Copy link
Author

bpasero commented Apr 16, 2018

@hbenl thanks 👍

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

3 participants