Skip to content

Releases: yangshun/tree-node-cli

v3.0.0

07 Mar 13:09

Choose a tag to compare

What's New

New Features

  • JSON output format (-J flag) — output directory tree as JSON
  • Gitignore support — respects .gitignore patterns by default
  • Full path prefix (-f flag) — display full path for each entry
  • Prune empty directories (--prune flag) — remove empty directories from output
  • File permissions (-p flag) — show file type and permissions
  • Last modification time (-D flag) — show last modification time for each entry
  • Quoted filenames (-Q flag) — quote filenames in double quotes
  • No-indentation mode (-i flag) — print entries without tree indentation lines
  • Disk usage (--du flag) — show directory sizes as cumulative disk usage
  • All Linux tree sorting options — including version/natural sort (-v)
  • treeJson() API — programmatic JSON tree output

Improvements

  • File size options now match Linux tree: -s for raw bytes, -h for human-readable (1024-based), --si for SI units (1000-based)
  • Permission errors handled gracefully, matching Linux tree behavior
  • Refactored to tree-first architecture: build tree then format
  • CLI options reordered to match Linux tree categories
  • Test coverage improved from 80% to 98%
  • Performance: cached lstatSync results to avoid redundant syscalls

Breaking Changes

  • File size flag behavior changed to match Linux tree (-s, -h, --si)
  • Gitignore filtering is now enabled by default
  • Requires Node.js >= 22

Full Changelog: v2.0.0...v3.0.0

v2.0.0

07 Mar 08:53

Choose a tag to compare

Breaking Changes

  • Requires Node.js >= 22
  • Migrated to TypeScript with ESM + CJS dual packaging
  • Migrated CLI parser from Commander to cac

Changes

  • Dropped fast-folder-size dependency
  • Added GitHub Actions CI
  • Added prepublishOnly script for safer publishing
  • Improved test coverage (symlinks, special characters, combined options, edge cases)

Internal

  • Migrated from Jest to Vitest
  • Migrated from Prettier to Oxfmt
  • Added Oxlint for linting
  • Build toolchain changed to tsdown
  • Package manager changed to pnpm

v1.6.0

07 Mar 08:45

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.4.0...v1.6.0

v1.4.0

07 Mar 08:45

Choose a tag to compare

Full Changelog: v1.3.0...v1.4.0

v1.3.0

05 Apr 08:50

Choose a tag to compare

Dependencies upgrade for security issues

v1.2.5

24 Jun 03:16

Choose a tag to compare

  • Remove engines field from package.json since we're not really using any new ES features.

v1.2.4

24 Jun 03:09

Choose a tag to compare

  • Messed up v1.2.3's release. Republishing as v1.2.4.

v1.2.3

24 Jun 03:08

Choose a tag to compare

  • Treat symlinks (and other non-file, non-directory paths) as files as only print their names out.

v1.2.2

31 May 05:47

Choose a tag to compare

  • Remove use of spread operator to be backward compatible with older Node versions.

v1.2.1

31 May 05:46

Choose a tag to compare

This release is the same as v1.2.0 but npm experienced issues with publishing and v1.2.0 was affected. Hence republished as v1.2.1.