Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/camera/camera_android_camerax/.pubignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.agents/
AGENTS.md
evals/
1 change: 1 addition & 0 deletions script/tool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Adds support for batch release of pre-1.0 packages.
* Exempts `AGENTS.md` from requiring version and changelog changes.

## 0.14.4

Expand Down
3 changes: 2 additions & 1 deletion script/tool/lib/src/common/file_filters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ bool isPackageSupportFile(String path) {
return path.endsWith('/AUTHORS') ||
path.endsWith('/CHANGELOG.md') ||
path.endsWith('/CONTRIBUTING.md') ||
path.endsWith('/README.md');
path.endsWith('/README.md') ||
path.endsWith('/AGENTS.md');
}
2 changes: 2 additions & 0 deletions script/tool/lib/src/common/package_state_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ Future<bool> _isDevChange(
pathComponents.first == 'run_tests.sh' ||
// CONTRIBUTING.md is dev-facing.
pathComponents.last == 'CONTRIBUTING.md' ||
// AGENTS.md is dev/agent-facing.
pathComponents.last == 'AGENTS.md' ||
// The top-level "pending_changelogs" directory is the repo convention for storing
// pending changelog files.
pathComponents.first == 'pending_changelogs' ||
Expand Down
15 changes: 15 additions & 0 deletions script/tool/test/common/file_filters_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,19 @@ void main() {
expect(isRepoLevelNonCodeImpactingFile('lib/main.dart'), isFalse);
});
});

group('isPackageSupportFile', () {
test('returns true for known package support files', () {
expect(isPackageSupportFile('packages/foo/AUTHORS'), isTrue);
expect(isPackageSupportFile('packages/foo/CHANGELOG.md'), isTrue);
expect(isPackageSupportFile('packages/foo/CONTRIBUTING.md'), isTrue);
expect(isPackageSupportFile('packages/foo/README.md'), isTrue);
expect(isPackageSupportFile('packages/foo/AGENTS.md'), isTrue);
});

test('returns false for other files', () {
expect(isPackageSupportFile('packages/foo/pubspec.yaml'), isFalse);
expect(isPackageSupportFile('packages/foo/lib/main.dart'), isFalse);
});
});
}
17 changes: 17 additions & 0 deletions script/tool/test/common/package_state_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void main() {
'packages/a_plugin/CHANGELOG.md',
// Dev-facing docs.
'packages/a_plugin/CONTRIBUTING.md',
'packages/a_plugin/AGENTS.md',
// Analysis.
'packages/a_plugin/example/android/lint-baseline.xml',
// Tests.
Expand Down Expand Up @@ -133,6 +134,22 @@ void main() {
expect(state.needsChangelogChange, false);
});

test('does not require version or changelog change for AGENTS.md changes', () async {
final RepositoryPackage package = createFakePlugin('a_plugin', packagesDir);

const changedFiles = <String>['packages/a_plugin/AGENTS.md'];

final PackageChangeState state = await checkPackageChangeState(
package,
changedPaths: changedFiles,
relativePackagePath: 'packages/a_plugin/',
);

expect(state.hasChanges, true);
expect(state.needsVersionChange, false);
expect(state.needsChangelogChange, false);
});

test('only considers a root "tool" folder to be special', () async {
final RepositoryPackage package = createFakePlugin('a_plugin', packagesDir);

Expand Down
1 change: 1 addition & 0 deletions script/tool/test/validate_command_version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ packages/plugin/example/ios/RunnerTests/Foo.m
packages/plugin/example/ios/RunnerUITests/info.plist
packages/plugin/darwin/Tests/Foo.swift
packages/plugin/analysis_options.yaml
packages/plugin/AGENTS.md
packages/plugin/CHANGELOG.md
''',
),
Expand Down
Loading