PackageTrack
Sign in Get early access

pubspec_manager

Read, write and modify a pubspec.yaml with a type safe API including retention and modifications of comments and out of spec content.

4.0.1 85K downloads/mo #1188 most downloaded on pub.dev onepub-dev/pubspec_manager

What this package is like to depend on

Last release 5 months ago

01 Mar 2026

Release timing varies

gaps range from 8 days to 10 months

Nearly every release is documented

notes for 14 of 14 stable releases

2 versions withdrawn

withdrawn after publishing

3 years old

29 releases · first in 2023

10 releases in the last 12 months

see the full history below

Release timeline

29 releases · Oct 2023 to Mar 2026
2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 29
  1. 4.0.1 01 Mar 2026
    Release notes
    • Improve the readme.
    Open source →
  2. 4.0.0 01 Mar 2026
    Release notes
    • Fixed comment parsing when a comment appears at a lower indentation level than expected before a child key.
    • Misindented comments are now attached to the subsequent yaml element and their original indentation is preserved when writing.
    • Added support for additional documented pubspec keys:
      • funding
      • false_secrets
      • topics
      • ignored_advisories
      • screenshots
    • Fixed #20: dev_dependencies.exists(...) could miss some dependencies when comments/blank lines appeared around path dependencies, which could lead to duplicate insertion logic in callers.
    • Added regression coverage for #20.
    • Thanks to @jonpittock for reporting issue #20.
    • Expanded tests for new keys, including:
      • read/write round trips
      • existence checks
      • keys with no values
      • empty list item values
      • descendant-line removal behavior
    Open source →
  3. 3.2.1 11 Feb 2026
    Release notes
    • Added method Environent.isFlutterPackage which returns true if the loaded pubspec.yaml is a flutter package. We look for the 'flutter' dependency in the pubspec.yaml.
    Open source →
  4. 3.2.0 02 Jan 2026
    Release notes
    • work to remove move usages of late by moving to factory ctors.
    • fixed a cluster of missing initialisations for fields that were late final.
    Open source →
  5. 3.1.1 23 Dec 2025
    Release notes
    • changed the environment.sdkConstraint and environment.flutterConstraint to return a semver VersionConstraint rather than our interal VersionConstraint for better compatibility with the broader dart ecosystem.
    Open source →
  6. 3.1.0 23 Dec 2025 withdrawn
    Release notes
    • exposed new getters for environment.sdkConstraint and environment.flutterConstraint
    Open source →
  7. 3.0.1 17 Oct 2025
    Release notes
    • marked the Dependency class as sealed is the pub.dev spec defines a closed set of types.
    Open source →
  8. 3.0.0 17 Oct 2025 withdrawn
    Release notes
    • was retracted due a couple of issues.
    Open source →
  9. 2.0.1 26 Sep 2025
    Release notes
    • added isNone method to PublishTo. Publish_to will now return an empty url if there is no publish_to key or it has one but it is empty. Added a new method publish_to.isPubDev to indicate if the package would be publishe to pub.dev.
    • upgraded to lint_hard 6.0 and fixed lints.
    Open source →
  10. 2.0.0 26 Sep 2025
    Release notes
    • BREAKING removed publishTo.none as this was breaking debug sessions as the 'none' getter was actually settting the url to 'none'. Check all other getters to ensure we were not doing something equally stupid. You will need to change all occurances of publish_to.none to publish_to.setNone()
    Open source →
  11. 1.0.3 07 Jul 2025
    Release notes
    • Widen strings dependency range to include 4.0.0 release (no breaking changes).
    Open source →
  12. 1.0.2 18 Apr 2025
    Release notes
    • Fixed a parsing bug. If there was no version for the pubspec we would grab the version from the first dependency. We now only look for a version at the top level.
    • Fixed #17 - a comment line that appeared after the name of a depencency for a hosted package would cause the parser to fail.
    Open source →
  13. 1.0.1 04 Jan 2025
    Release notes
    • Merge pull request #15 from Azramis/main
    • Add unit tests for git deps usage
    • Fixed Git dependencies usage
    Open source →
  14. 1.0.0 25 Mar 2024
    Release notes
    • originally released as 0.9.0 as we are missing a few features, but the dart pub resolution keeps telling people to upgrade to the 1.x beta (which is actually older) so I need to change to 1.0.0 to keep things sane. No other changes have been made.
    Open source →
  15. 1.0.0-beta.1 29 Feb 2024 pre-release
    Release notes
    • relased first beta.
    Open source →
  16. 1.0.0-alpha.17 27 Feb 2024 pre-release
    Release notes
    • changed publishTo.set to value - not certain this is consistent. executables.append no directly takes a name rather than requiring a builder.
    • renamed Platform to PlatformSupport to avoid a conflict with the dart core Platform class.
    • implemented value and set for version.
    • added additional examples to the readme.
    • fixed the processing of multi-line strings - essentially the description field.
    • made version and environment sections and dealt with the fall out. renamed section.line to section.sectionHeading to make its use more obvious.
    • added specific description class
    • added update example to README.md
    • added an example on how to update the version no.
    Open source →
  17. 1.0.0-alpha.16 20 Feb 2024 pre-release
    Release notes
    • Fixed a bug in the iterator for dependencies, exectuables and platforms.
    Open source →
  18. 1.0.0-alpha.15 19 Feb 2024 pre-release
    Release notes
    • updated tests and example in line with api changes.
    • change getVersion and setVersion to getSemVersion and setSemVersion to make their nature more apparent.
    • renaned the environmentBuilder arg to PubSpec to environment in keeping with the naming pattern elsewhere.
    • Fixed a number of the setters for pubspec keys.
    • removed the need to pass the key to the versionbuider as it is known by the builder.
    • added publishTo key.
    • Fixed a bug where the section for a dependency wasn't being created correctly as we created it before all of the dependencies' lines had been added to the document.
    Open source →
  19. 1.0.0-alpha.14 14 Jan 2024 pre-release
    Release notes
    • Fixed a formatting issue where inline comments didn't preserve leading whitespace. We now do.
    • Fixed a bug where a comment after a dep was being associated with two sections.
    Open source →
  20. 1.0.0-alpha.13 13 Jan 2024 pre-release
    Release notes
    • Fixes: #3 when loading a pubspec an an exception was thrown we reported that the pubspec was being loaded from a string even when it was loaded from a file.
    Open source →
  21. 1.0.0-alpha.12 13 Jan 2024 pre-release
    Release notes
    • BREAKING dependency classes have been renamed to begin with Dependency so PubHostedDependency becomes DependencyPubHosted. This is to help with discovery and auto-completion.
    • HostedDependency is now called DependencyAltHosted
    Open source →
  22. 1.0.0-alpha.11 25 Oct 2023 pre-release
    Release notes
    • Fixes for environment when the sdk or flutter constraints where missing.
    • work on validating the function of the VersionConstraint class
    Open source →
  23. 1.0.0-alpha.10 25 Oct 2023 pre-release
    Release notes
    • Fixed a bug in the version_constraint. It wasn't being updated correctly when a new value was assigned to it.
    Open source →
  24. 1.0.0-alpha.9 25 Oct 2023 pre-release
    Release notes
    • lint cleanup
    • Change insert to InsertBefore to avoid line maths being done all over the place. Now you just pass the nearest line and we insert relative to that. Added helper functions to make the indent consistent.
    • renamed the base section to builders and removed the 'attached' component of the section names;
    Open source →
  25. 1.0.0-alpha.8 24 Oct 2023 pre-release
    Release notes
    • fixed a bug in Line.text where the text value wasn't being updated if the key or value of the line where changed.
    • additional test cases.
    • line_section now implements rather than extends line.
    • Added toString method to key_value
    • added platform specific line terminator when writting pubspec.
    • changed the pubspec render process to use a writer interface so we can switch out the render target.
    • Fixed bugs in executables when trying to append or update an executable.
    • imporved the readme example.
    • Fixed a bug in ExectuableAttached which prevented changing of the executable name. Fixed a bug in the scriptPath. When there was no script we returned .dart rather than name.dart.
    Open source →
  26. 1.0.0-alpha.7 24 Oct 2023 pre-release

    Nothing published for this version

  27. 1.0.0-alpha.6 04 Oct 2023 pre-release
    Release notes
    • renamed Pubspec to PubSpec.
    • Fixed a bug when setting the flutter and sdk environments.
    • Added logic to track if versions where quoted so we can preserve the quoting.
    • general cleanup nd bug fixes.
    Open source →
  28. 0.9.1 23 Mar 2024
    Release notes
    • corrected the name of DependencyAltHostedBuilder as it should be DependencyBuilderAltHosted.
    Open source →
  29. 0.9.0 23 Mar 2024
    Release notes
    • released with a few, low use, missing keys. a good release is better than perfection with no release.
    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