Add pubspec_overrides.yaml to basicIgnoreRules (#3503)
diff --git a/lib/src/package.dart b/lib/src/package.dart
index 4d90311..f1e9c1d 100644
--- a/lib/src/package.dart
+++ b/lib/src/package.dart
@@ -191,6 +191,7 @@
'packages/',
'pubspec.lock',
'!pubspec.lock/', // We allow a directory called pubspec lock.
+ '/pubspec_overrides.yaml',
];
/// Returns a list of files that are considered to be part of this package.
diff --git a/test/lish/does_not_include_pubspec_overrides_file.dart b/test/lish/does_not_include_pubspec_overrides_file.dart
new file mode 100644
index 0000000..3fa378b
--- /dev/null
+++ b/test/lish/does_not_include_pubspec_overrides_file.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:convert';
+
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+import 'package:shelf/shelf.dart' as shelf;
+import 'package:test/test.dart';
+import 'package:test_descriptor/test_descriptor.dart' as td;
+
+import '../descriptor.dart' as d;
+import '../test_pub.dart';
+import 'utils.dart';
+
+/// Describes a package with dot-files in tree.
+td.DirectoryDescriptor get validPackageWithPubspecOverridesFile =>
+ d.dir(appPath, [
+ d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0 <=2.0.0'),
+ d.pubspecOverrides({
+ 'dependency_overrides': {'lib': '2.0.0'}
+ }),
+ td.file('LICENSE', 'Eh, do what you want.'),
+ td.file('README.md', "This package isn't real."),
+ td.file('CHANGELOG.md', '# 1.0.0\nFirst version\n'),
+ td.dir('lib', [td.file('test_pkg.dart', 'int i = 1;')])
+ ]);
+
+void main() {
+ setUp(validPackageWithPubspecOverridesFile.create);
+
+ test('Check if package doesn\'t include pubspec_overrides.yaml', () async {
+ await servePackages();
+ await d.credentialsFile(globalServer, 'access token').create();
+ var pub = await startPublish(globalServer);
+
+ await confirmPublish(pub);
+ handleUploadForm(globalServer);
+ handleUpload(globalServer);
+
+ globalServer.expect('GET', '/create', (request) {
+ return shelf.Response.ok(jsonEncode({
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ }));
+ });
+
+ expect(pub.stdout, emits('test_pkg.dart'));
+ expect(pub.stdout, neverEmits('pubspec_overrides.yaml'));
+ await pub.shouldExit(exit_codes.SUCCESS);
+ });
+}