This package is only for Node.js 8 and up. #1

Open
opened 2018-09-02 14:44:20 +00:00 by Ghost · 3 comments

because of util.promisify.

Can you make it available for node.js 6?
Or write in package.json

{ "engines" : { "node" : ">=8" } }

But it does not solve my problem with Node.js6 :(

because of util.promisify. Can you make it available for node.js 6? Or write in package.json { "engines" : { "node" : ">=8" } } But it does not solve my problem with Node.js6 :(
Owner

I need to update the docs (and possibly the code), but I think all you have to do is to install the polyfills and it’ll work:

npm install bluebird buffer-v6-polyfill

You may need to do require(‘buffer-v6-polyfill’) in your main file.

I’ll check on it later today.

I need to update the docs (and possibly the code), but I think all you have to do is to install the polyfills and it’ll work: npm install bluebird buffer-v6-polyfill You may need to do require(‘buffer-v6-polyfill’) in your main file. I’ll check on it later today.
Author

You package is used by other module (e.g. greenlock/letsencrypt).
I cannot modify other modules.
And there is a side-effect everything works ok, and after install of the same package nothing works... Just because one package is updated. Normally braking of support for some node.js version is major number change.
2.0.0 in your case.

You package is used by other module (e.g. greenlock/letsencrypt). I cannot modify other modules. And there is a side-effect everything works ok, and after install of the same package nothing works... Just because one package is updated. Normally braking of support for some node.js version is major number change. 2.0.0 in your case.
Owner

You don't need to modify any other modules.

In your package.json for whatever you're doing, just include the polyfills.

I agree with you about the patch version, I reverted v1.0.4 to have the v1.0.2 behavior, but to include bluebird as a direct dependency (whereas before it assumed it to be there, but did not use it). However, this version pollutes the global fs instance by calling promisifyAll().

I've created v1.1.0 after v1.0.3 and put an error message that tells you to install bluebird if it isn't detected (and you don't have a Promise implementation with promisify).

You don't have to change any code whatsoever, you just have to include bluebird as a dependency.

You don't need to modify any other modules. In your package.json for whatever you're doing, just include the polyfills. I agree with you about the patch version, I reverted v1.0.4 to have the v1.0.2 behavior, but to include `bluebird` as a direct dependency (whereas before it assumed it to be there, but did not use it). However, this version pollutes the global `fs` instance by calling `promisifyAll()`. I've created v1.1.0 after v1.0.3 and put an error message that tells you to install bluebird if it isn't detected (and you don't have a Promise implementation with `promisify`). You don't have to change any code whatsoever, you just have to include bluebird as a dependency.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/fs-safe-replace.js#1
No description provided.