Skip to content

v0.3.1

Choose a tag to compare

@ayuhito ayuhito released this 27 Sep 17:02
· 107 commits to main since this release
31f6482

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);
  • feat(decoder): add strict mode flag by @ayuhito in #36

Full Changelog: v0.3.0...v0.3.1