User regular stream in lzma-native instead of readable-stream

Changelog-entry: User regular stream in lzma-native instead of readable-stream
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-07-31 15:35:46 +02:00
parent 482c29bc2a
commit f8e21e2338

View File

@ -154,8 +154,10 @@ const commonConfig = {
replace: 'bindings', replace: 'bindings',
}, },
), ),
replace(
/node_modules\/lzma-native\/index\.js$/,
// remove node-pre-gyp magic from lzma-native // remove node-pre-gyp magic from lzma-native
replace(/node_modules\/lzma-native\/index\.js$/, { {
search: 'require(binding_path)', search: 'require(binding_path)',
replace: () => { replace: () => {
return `require('./${path.posix.join( return `require('./${path.posix.join(
@ -163,7 +165,13 @@ const commonConfig = {
'lzma_native.node', 'lzma_native.node',
)}')`; )}')`;
}, },
}), },
// use regular stream module instead of readable-stream
{
search: "var stream = require('readable-stream');",
replace: "var stream = require('stream');",
},
),
// remove node-pre-gyp magic from usb // remove node-pre-gyp magic from usb
replace(/node_modules\/@balena.io\/usb\/usb\.js$/, { replace(/node_modules\/@balena.io\/usb\/usb\.js$/, {
search: 'require(binding_path)', search: 'require(binding_path)',