v0.3.1
Overview
Small release to include a new strict mode flag to give the option between absolute correctness and leniency when dealing with many real world variations.
createTarDecoder and unpackTar now accept strict: boolean in their options field.
import { unpackTar } from 'modern-tar/fs';
import { createReadStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';
const tarStream = createReadStream('backup.tar');
const extractStream = unpackTar('/restore/location', {
strip: 1,
fmode: 0o644, // Set consistent file permissions
strict: true, // Enable strict validation
});
await pipeline(tarStream, extractStream);Full Changelog: v0.3.0...v0.3.1