Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libreoffice-convert

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libreoffice-convert - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

12

index.js

@@ -52,9 +52,7 @@ 'use strict';

loadDestination: ['convert', (results, callback) =>
fs.readFile(path.join(results.tempDir, `source.${format}`), (err, destination) => {
if (err) {
return callback(err);
}
return callback(null, destination);
})],
async.retry({
times: 3,
interval: 200
}, (callback) => fs.readFile(path.join(results.tempDir, `source.${format}`), callback), callback)
]
}, (err, res) => {

@@ -61,0 +59,0 @@ temp.cleanup();

{
"name": "libreoffice-convert",
"version": "1.0.4",
"version": "1.0.5",
"description": "A simple and fast node.js module for converting office documents to different formats",

@@ -5,0 +5,0 @@ "main": "index.js",

var _jest = require('jest'),
_fs = require('fs'),
_path = require('path'),
{ exec } = require('child_process'),
convert = require('../index').convert;

@@ -22,2 +23,13 @@

});
it('if an another instance of soffice exists, should convert a word document to text', (done) => {
exec("soffice --headless")
// this command create an instance of soffice. This instance will get a failure "Error: source file could not be loaded"
// but only after we ask a new convert. So this is enought to reproduce fail when an another instance is open
setTimeout(()=> {
const docx = _fs.readFileSync(_path.join(__dirname, '/resources/hello.docx'));
convert(docx, 'txt', undefined, expectHello(done));
}, 100);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc