Repository navigation
[pubspec_parse] Add hooks field to Pubspec - #2568
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for the hooks field in the Pubspec class. This includes adding the hooks field to the Pubspec model, updating the generated JSON serialization and deserialization logic, updating the changelog and package version to 1.7.0-wip, and adding comprehensive unit tests to verify parsing and serialization of the new field. There are no review comments, and I have no additional feedback to provide.
# Conflicts: # pkgs/pubspec_parse/CHANGELOG.md # pkgs/pubspec_parse/lib/src/pubspec.dart # pkgs/pubspec_parse/lib/src/pubspec.g.dart # pkgs/pubspec_parse/test/parse_test.dart # pkgs/pubspec_parse/test/tojson_test.dart
kevmoo
approved these changes
Oct 19, 2026
copybara-service Bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Oct 20, 2026
tools (https://github.com/dart-lang/tools/compare/f6c7a2d..4d7715a): 4d7715ac Mon Oct 19 16:09:30 2026 -0700 Kevin Moore Replace `@dart-lang/dart-bat` with `@dart-lang/dart-ecosystem-team` in `CODEOWNERS` (dart-lang/tools#2697) a22c558c Tue Oct 20 06:56:10 2026 +0900 YeungKC [markdown] Check the first character before inline syntax regexes (dart-lang/tools#2695) c57bde49 Mon Oct 19 14:40:39 2026 -0700 dart-ecosystem-bot[bot] [boring] Update BoringSSL to 64188f17 (dart-lang/tools#2692) 7a4ea6f8 Tue Oct 20 00:09:47 2026 +0300 Hasan Armoush [pubspec_parse] Expose version constraint on PathDependency (dart-lang/tools#2581) 85e03753 Mon Oct 19 22:41:32 2026 +0200 Lukas Klingsbo [pubspec_parse] Add hooks field to Pubspec (dart-lang/tools#2568) 13139ec6 Mon Oct 19 22:28:47 2026 +0200 Lukas Klingsbo [pubspec_parse] Add false_secrets field to Pubspec (dart-lang/tools#2567) 462d92bf Mon Oct 19 21:56:25 2026 +0200 Lukas Klingsbo [pubspec_parse] Add platforms field to Pubspec (dart-lang/tools#2566) TEST=ci Change-Id: I106b05a08a7395f72e01a86a952abd41f4630831 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/566840 Commit-Queue: Kevin Moore <kevmoo@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
Member
|
Thanks for this and #2565, #2566, and #2567! All four are now published in |
Contributor
Author
Awesome, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
hooksfield toPubspecasMap<String, dynamic>? hooks, see https://dart.dev/tools/pub/pubspec#hooks.The field holds hook configuration such as
user_definesfor native build and link hooks. It is exposed as a raw map, mirroring thefluttersection, since its contents are defined by the hooks packages rather than by pub. It is included inPubspec.toJsonand covered by parsing, error, lenient, and round-trip tests.Follow-up to #2565. Each new field is in its own PR to keep them easy to review.