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 2026Releases
latest 28-
1.8.015 Aug 2026Release notes
Open source →- Fix: package imports in test files are preserved instead of being rewritten to relative imports when the file is under
test/testsand the import targets the projectlibtree. - 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:
exportdirectives 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.
- Fix: package imports in test files are preserved instead of being rewritten to relative imports when the file is under
-
1.7.006 Aug 2026Release notes
Open source →- Fix:
--dart-fmt/dart_fmtwas parsed and documented but never actually applied; the Dart formatter ran unconditionally regardless of the flag. It is now correctly wired up, and defaults tofalse(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.dartmatchingcore_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_styledependency no longer pins a-wippre-release constraint. - Refactor: de-duplicated list-option config merging in
Cfg.
- Fix:
-
1.6.020 Jun 2026Release notes
Open source →What's Changed
- Fix #10 Nestest Relative Import by @burhankhanzada in #11
- Fix #12: Long package import converion to relative import by @burhankhanzada in #13
- docs: add burhankhanzada as a contributor for bug, code, and 2 more by @allcontributors[bot] in #15
- fix: sort directive keys alphabetically to comply with the directives_ordering linter rule by @burhankhanzada in #14
New Contributors
- @burhankhanzada made their first contribution in #11
Full Changelog: 1.5.0...1.6.0
Release notes
Open source →- 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
-
1.5.030 May 2026Release notes
Open source →- File Sorter: Language version selection is now dynamic and picks the current dart sdk version on the machine.
-
1.4.517 Dec 2025 -
1.4.308 Sep 2025 -
1.4.219 Aug 2025Release notes
Open source →- Updated project name from pubspec.yaml if it differs from the currentfolder name
-
1.4.119 Aug 2025Nothing published for this version
-
1.4.005 Aug 2025Release notes
Open source →- Remove default folders in cfg to enable support for different project structures
-
1.3.923 Jun 2025 -
1.3.820 Jun 2025Release notes
Open source →- Fixed sorting packages that contained "flutter_" being wrongly categorized as flutter imports
-
1.3.720 Jun 2025 -
1.3.620 Jun 2025 -
1.3.509 Jun 2025Release notes
Open source →- Update description in pubspec.yaml for better clarity and add example file
-
1.3.407 Jun 2025 -
1.3.307 Jun 2025 -
1.3.108 Mar 2025 -
1.3.003 Mar 2025Release notes
Open source →- Enhance file path filtering and update DartFormatter usage
- Update version to 1.3.0 and enhance file path filtering in documentation
-
1.2.119 Aug 2024 -
1.2.016 Aug 2024 -
1.1.206 May 2024 -
1.1.128 Apr 2024 -
1.1.024 Apr 2024Release notes
Open source →- 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
- Added an option to disable dart formatter
-
1.0.423 Dec 2023 -
1.0.322 Dec 2023 -
1.0.222 Dec 2023 -
1.0.122 Dec 2023 -
1.0.022 Dec 2023