BREAKING CHANGE(SmartArchive): Refactor public API: rename factory/extraction methods, introduce typed interfaces and improved compression tools
This commit is contained in:
@@ -33,19 +33,18 @@ tap.preTask('should prepare downloads', async (tools) => {
|
||||
});
|
||||
|
||||
tap.test('should extract existing files on disk', async () => {
|
||||
const testSmartarchive = await smartarchive.SmartArchive.fromArchiveUrl(
|
||||
const testSmartarchive = await smartarchive.SmartArchive.fromUrl(
|
||||
'https://verdaccio.lossless.digital/@pushrocks%2fwebsetup/-/websetup-2.0.14.tgz',
|
||||
);
|
||||
await testSmartarchive.exportToFs(testPaths.nogitDir);
|
||||
await testSmartarchive.extractToDirectory(testPaths.nogitDir);
|
||||
});
|
||||
|
||||
tap.skip.test('should extract a b2zip', async () => {
|
||||
const dataUrl =
|
||||
'https://daten.offeneregister.de/de_companies_ocdata.jsonl.bz2';
|
||||
const testArchive = await smartarchive.SmartArchive.fromArchiveUrl(dataUrl);
|
||||
await testArchive.exportToFs(
|
||||
const testArchive = await smartarchive.SmartArchive.fromUrl(dataUrl);
|
||||
await testArchive.extractToDirectory(
|
||||
plugins.path.join(testPaths.nogitDir, 'de_companies_ocdata.jsonl'),
|
||||
'data.jsonl',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user