PackageTrack
Sign in Get early access

better_imports

A CLI tool to automatically sort and organize Dart imports in your project files, supporting custom rules, configs, and formatting options.

1.8.0 oppahansi/better_imports

What this package is like to depend on

Last release 9 days ago

15 Aug 2026

Release timing varies

gaps range from 8 days to 7 months

Nearly every release is documented

notes for 27 of 28 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

28 releases · first in 2023

6 releases in the last 12 months

see the full history below

Release timeline

28 releases · Dec 2023 to Aug 2026
2024 2025 2026
Release Pre-release

Releases

latest 28
  1. 1.8.0 15 Aug 2026
    Release notes

    Full Changelog: 1.7.0...1.8.0

    Open source →
    Release notes
    • Fix: package imports in test files are preserved instead of being rewritten to relative imports when the file is under test/tests and the import targets the project lib tree.
    • Fix: test-local imports inside the test tree can still remain relative while project imports for app code keep package: style.
    • Fix: symlinked dependency/plugin directories are no longer traversed during collection, preventing files under .symlinks, generated folders, and other external trees from being sorted.
    • Fix: export directives are handled separately and remain below imports, instead of being mixed into project-import ordering.
    • Fix: invalid Dart files are skipped without crashing the tool while valid files continue to be processed.
    • Chore: adds regression coverage for symlinked dependency folders, test-file import rules, export ordering, and parser-skipped invalid files.
    Open source →
  2. 1.7.0 06 Aug 2026
    Release notes

    Full Changelog: 1.6.0...1.7.0

    Open source →
    Release notes
    • Fix: --dart-fmt / dart_fmt was parsed and documented but never actually applied; the Dart formatter ran unconditionally regardless of the flag. It is now correctly wired up, and defaults to false (previously formatting always ran).
    • Fix: relative/project import classification could match the wrong file when one file's name was a substring of another's (e.g. utils.dart matching core_utils.dart); now matched by exact file name.
    • Fix: project-import detection could fail on Windows due to a hardcoded / path separator check.
    • Perf: avoid recompiling regex patterns for every collected file when filtering by ignore-files-like / files-like.
    • Perf: file-name lookup during import classification is now O(1) instead of scanning every collected file per import.
    • Chore: dart_style dependency no longer pins a -wip pre-release constraint.
    • Refactor: de-duplicated list-option config merging in Cfg.
    Open source →
  3. 1.6.0 20 Jun 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 1.5.0...1.6.0

    Open source →
    Release notes
    • Fix #10 Nestest Relative Import by @burhankhanzada in https://github.com/oppahansi/better_imports/pull/11
    • Fix #12: Long package import converion to relative import by @burhankhanzada in https://github.com/oppahansi/better_imports/pull/13
    • docs: add burhankhanzada as a contributor for bug, code, and 2 more by @allcontributors[bot] in https://github.com/oppahansi/better_imports/pull/15
    • fix: sort directive keys alphabetically to comply with the directives_ordering linter rule by @burhankhanzada in https://github.com/oppahansi/better_imports/pull/14

    New Contributors

    • @burhankhanzada made their first contribution in https://github.com/oppahansi/better_imports/pull/11

    Full Changelog: https://github.com/oppahansi/better_imports/compare/1.5.0...1.6.0

    Open source →
  4. 1.5.0 30 May 2026
    Release notes

    Full Changelog: 1.4.5...1.5.0

    Open source →
    Release notes
    • File Sorter: Language version selection is now dynamic and picks the current dart sdk version on the machine.
    Open source →
  5. 1.4.5 17 Dec 2025
    Release notes

    Full Changelog: 1.4.4...1.4.5

    Open source →
    Release notes
    • Do not process barrel files with export statements
    Open source →
  6. 1.4.3 08 Sep 2025
    Release notes

    chore: bumb version and add changelog

    Open source →
    Release notes
    • Bump sdk version for dart formatter to 3.9.2
    Open source →
  7. 1.4.2 19 Aug 2025
    Release notes

    chore: update version to 1.4.2 in pubspec.yaml; update CHANGELOG for …

    Open source →
    Release notes
    • Updated project name from pubspec.yaml if it differs from the currentfolder name
    Open source →
  8. 1.4.1 19 Aug 2025

    Nothing published for this version

  9. 1.4.0 05 Aug 2025
    Release notes

    chore: update version to 1.4.0 in pubspec.yaml; add changelog entry f…

    Open source →
    Release notes
    • Remove default folders in cfg to enable support for different project structures
    Open source →
  10. 1.3.9 23 Jun 2025
    Release notes

    chore: update version to 1.3.9 in pubspec.yaml and add entry to CHANG…

    Open source →
    Release notes
    • Possibly prevent adding an additial empty line after imports
    Open source →
  11. 1.3.8 20 Jun 2025
    Release notes
    • Fixed sorting packages that contained "flutter_" being wrongly categorized as flutter imports
    Open source →
  12. 1.3.7 20 Jun 2025
    Release notes
    • Make --files paths system independent
    Open source →
  13. 1.3.6 20 Jun 2025
    Release notes
    • Fix --files filtering
    Open source →
  14. 1.3.5 09 Jun 2025
    Release notes
    • Update description in pubspec.yaml for better clarity and add example file
    Open source →
  15. 1.3.4 07 Jun 2025
    Release notes
    • Prevent adding new line after imports
    Open source →
  16. 1.3.3 07 Jun 2025
    Release notes
    • Update some dependencies
    • Drop dart format option due to inconsistensis
    Open source →
  17. 1.3.1 08 Mar 2025
    Release notes
    • Update SDK version when using DartFormatter to a newer Version
    Open source →
  18. 1.3.0 03 Mar 2025
    Release notes
    • Enhance file path filtering and update DartFormatter usage
    • Update version to 1.3.0 and enhance file path filtering in documentation
    Open source →
  19. 1.2.1 19 Aug 2024
    Release notes
    • Added better linux instructions
    Open source →
  20. 1.2.0 16 Aug 2024
    Release notes
    • Upped dart version and dependencies
    Open source →
  21. 1.1.2 06 May 2024
    Release notes
    • Fixed reading dart fmt flag from config
    Open source →
  22. 1.1.1 28 Apr 2024
    Release notes
    • Optimizations and Refactoring of String operations
    Open source →
  23. 1.1.0 24 Apr 2024
    Release notes
    • Added an option to disable dart formatter
      • only the imports are always formatted, rest of the code is untouched
    • Rewrote the sorting logic
    • Added new Tests
    Open source →
  24. 1.0.4 23 Dec 2023
    Release notes
    • Added dry run support
    • Added support for library directives
    Open source →
  25. 1.0.3 22 Dec 2023
    Release notes
    • Moved all files in src folder to hide them from importing.
    Open source →
  26. 1.0.2 22 Dec 2023
    Release notes
    • Dropped all barrel files to not export anything.
    Open source →
  27. 1.0.1 22 Dec 2023
    Release notes
    • Updated readme with the Run on Save configuration option.
    Open source →
  28. 1.0.0 22 Dec 2023
    Release notes
    • Initial version.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive