Use pub.dev in writing (#3528)
diff --git a/doc/repository-spec-v2.md b/doc/repository-spec-v2.md
index 224aa2d..b65b4d2 100644
--- a/doc/repository-spec-v2.md
+++ b/doc/repository-spec-v2.md
@@ -4,12 +4,12 @@
implement.
A package repository is a server from which packages can be downloaded,
-the default package repository is `'https://pub.dartlang.org'`, with public
-interface hosted at [pub.dev](https://pub.dev).
+the default package repository is `'https://pub.dev'`.
+It used to be [pub.dartlang.org](https://pub.dartlang.org).
## Hosted URL
A custom package repository is identified by a _hosted-url_, like
-`https://pub.dartlang.org` or `https://some-server.com/prefix/pub/`.
+`https://pub.dev` or `https://some-server.com/prefix/pub/`.
The _hosted-url_ always includes protocol `http://` or `https://`.
For the purpose of this specification the _hosted-url_ should always be
normalized such that it doesn't end with a slash (`/`). As all URL end-points
@@ -17,7 +17,7 @@
For the remainder of this specification the placeholder `<hosted-url>` will be
used in place of a _hosted-url_ such as:
- * `https://pub.dartlang.org`
+ * `https://pub.dev`
* `https://some-server.com/prefix/pub`
* `https://pub.other-server.com/prefix`
* `http://localhost:8080`
diff --git a/lib/src/command/lish.dart b/lib/src/command/lish.dart
index 2185110..7926d92 100644
--- a/lib/src/command/lish.dart
+++ b/lib/src/command/lish.dart
@@ -25,7 +25,7 @@
@override
String get name => 'publish';
@override
- String get description => 'Publish the current package to pub.dartlang.org.';
+ String get description => 'Publish the current package to pub.dev.';
@override
String get argumentsDescription => '[options]';
@override
@@ -154,9 +154,9 @@
Future<void> _publish(List<int> packageBytes) async {
try {
final officialPubServers = {
- 'https://pub.dartlang.org',
- // [validateAndNormalizeHostedUrl] normalizes https://pub.dev to
- // https://pub.dartlang.org, so we don't need to do allow that here.
+ 'https://pub.dev',
+ // [validateAndNormalizeHostedUrl] normalizes https://pub.dartlang.org
+ // to https://pub.dev, so we don't need to do allow that here.
// Pub uses oauth2 credentials only for authenticating official pub
// servers for security purposes (to not expose pub.dev access token to
diff --git a/lib/src/command/uploader.dart b/lib/src/command/uploader.dart
index cae4963..07ffacc 100644
--- a/lib/src/command/uploader.dart
+++ b/lib/src/command/uploader.dart
@@ -13,8 +13,7 @@
@override
String get name => 'uploader';
@override
- String get description =>
- 'Manage uploaders for a package on pub.dartlang.org.';
+ String get description => 'Manage uploaders for a package on pub.dev.';
@override
String get argumentsDescription => '[options] {add/remove} <email>';
@override
diff --git a/lib/src/http.dart b/lib/src/http.dart
index 724962b..6473a8e 100644
--- a/lib/src/http.dart
+++ b/lib/src/http.dart
@@ -19,14 +19,15 @@
import 'oauth2.dart' as oauth2;
import 'package.dart';
import 'sdk.dart';
+import 'source/hosted.dart';
import 'utils.dart';
/// Headers and field names that should be censored in the log output.
const _censoredFields = ['refresh_token', 'authorization'];
-/// Headers required for pub.dartlang.org API requests.
+/// Headers required for pub.dev API requests.
///
-/// The Accept header tells pub.dartlang.org which version of the API we're
+/// The Accept header tells pub.dev which version of the API we're
/// expecting, so it can either serve that version or give us a 406 error if
/// it's not supported.
const pubApiHeaders = {'Accept': 'application/vnd.pub.v2+json'};
@@ -79,7 +80,7 @@
return false;
}
} else {
- if (request.url.origin != 'https://pub.dartlang.org') return false;
+ if (!HostedSource.isPubDevUrl(request.url.toString())) return false;
}
if (Platform.environment.containsKey('CI') &&
@@ -222,7 +223,7 @@
}
if (status == 500 &&
- (request.url.host == 'pub.dartlang.org' ||
+ (request.url.host == 'pub.dev' ||
request.url.host == 'storage.googleapis.com')) {
fail('HTTP error 500: Internal Server Error at ${request.url}.\n'
'This is likely a transient error. Please try again later.');
@@ -281,7 +282,7 @@
http.Client get innerHttpClient => _pubClient._inner;
set innerHttpClient(http.Client client) => _pubClient._inner = client;
-/// Runs [callback] in a zone where all HTTP requests sent to `pub.dartlang.org`
+/// Runs [callback] in a zone where all HTTP requests sent to `pub.dev`
/// will indicate the [type] of the relationship between the root package and
/// the package being requested.
///
@@ -293,7 +294,7 @@
return runZoned(callback, zoneValues: {#_dependencyType: type});
}
-/// Handles a successful JSON-formatted response from pub.dartlang.org.
+/// Handles a successful JSON-formatted response from pub.dev.
///
/// These responses are expected to be of the form `{"success": {"message":
/// "some message"}}`. If the format is correct, the message will be printed;
@@ -308,7 +309,7 @@
log.message(log.green(parsed['success']['message']));
}
-/// Handles an unsuccessful JSON-formatted response from pub.dartlang.org.
+/// Handles an unsuccessful JSON-formatted response from pub.dev.
///
/// These responses are expected to be of the form `{"error": {"message": "some
/// message"}}`. If the format is correct, the message will be raised as an
diff --git a/lib/src/oauth2.dart b/lib/src/oauth2.dart
index 7229bb1..802a8c2 100644
--- a/lib/src/oauth2.dart
+++ b/lib/src/oauth2.dart
@@ -78,7 +78,7 @@
void logout(SystemCache cache) {
var credentialsFile = _credentialsFile(cache);
if (credentialsFile != null && entryExists(credentialsFile)) {
- log.message('Logging out of pub.dartlang.org.');
+ log.message('Logging out of pub.dev.');
log.message('Deleting $credentialsFile');
_clearCredentials(cache);
// Test if we also have a legacy credentials file.
diff --git a/lib/src/pubspec_parse.dart b/lib/src/pubspec_parse.dart
index 62eaa13..c86a706 100644
--- a/lib/src/pubspec_parse.dart
+++ b/lib/src/pubspec_parse.dart
@@ -14,7 +14,7 @@
///
/// This allows dot-separated valid Dart identifiers. The dots are there for
/// compatibility with Google's internal Dart packages, but they may not be used
-/// when publishing a package to pub.dartlang.org.
+/// when publishing a package to pub.dev.
final packageNameRegExp =
RegExp('^${identifierRegExp.pattern}(\\.${identifierRegExp.pattern})*\$');
diff --git a/lib/src/source.dart b/lib/src/source.dart
index e331da1..a918c68 100644
--- a/lib/src/source.dart
+++ b/lib/src/source.dart
@@ -66,7 +66,7 @@
/// [containingDir] is the path to the directory of the pubspec where this
/// description appears. It may be `null` if the description is coming from
/// some in-memory source (such as pulling down a pubspec from
- /// pub.dartlang.org).
+ /// pub.dev).
///
/// [languageVersion] is the minimum Dart version parsed from the pubspec's
/// `environment` field. Source implementations may use this parameter to only
diff --git a/lib/src/source/hosted.dart b/lib/src/source/hosted.dart
index e7dc870..160eed1 100644
--- a/lib/src/source/hosted.dart
+++ b/lib/src/source/hosted.dart
@@ -31,15 +31,18 @@
/// Validates and normalizes a [hostedUrl] which is pointing to a pub server.
///
/// A [hostedUrl] is a URL pointing to a _hosted pub server_ as defined by the
-/// [repository-spec-v2][1]. The default value is `pub.dartlang.org`, and can be
+/// [repository-spec-v2][1]. The default value is `pub.dev`, and can be
/// overwritten using `PUB_HOSTED_URL`. It can also specified for individual
/// hosted-dependencies in `pubspec.yaml`, and for the root package using the
/// `publish_to` key.
///
/// The [hostedUrl] is always normalized to a [Uri] with path that ends in slash
-/// unless the path is merely `/`, in which case we normalize to the bare domain
-/// this keeps the [hostedUrl] and maintains avoids unnecessary churn in
-/// `pubspec.lock` files which contain `https://pub.dartlang.org`.
+/// unless the path is merely `/`, in which case we normalize to the bare
+/// domain.
+///
+/// We change `https://pub.dev` to `https://pub.dartlang.org`, this maintains
+/// avoids churn for `pubspec.lock`-files which contain
+/// `https://pub.dartlang.org`.
///
/// Throws [FormatException] if there is anything wrong [hostedUrl].
///
@@ -83,6 +86,18 @@
//
// We rewrite here to avoid caching both, and to avoid having different
// credentials for these two.
+ //
+ // Changing this to pub.dev raises the following concerns:
+ //
+ // 1. It would blow through users caches.
+ // 2. It would cause conflicts for users checking pubspec.lock into git, if using
+ // different versions of the dart-sdk / pub client.
+ // 3. It might cause other problems (investigation needed) for pubspec.lock across
+ // different versions of the dart-sdk / pub client.
+ // 4. It would expand the API surface we're committed to supporting long-term.
+ //
+ // Clearly, a bit of investigation is necessary before we update this to
+ // pub.dev, it might be attractive to do next time we change the server API.
if (u == Uri.parse('https://pub.dev')) {
log.fine('Using https://pub.dartlang.org instead of https://pub.dev.');
u = Uri.parse('https://pub.dartlang.org');
@@ -91,7 +106,7 @@
}
/// A package source that gets packages from a package hosting site that uses
-/// the same API as pub.dartlang.org.
+/// the same API as pub.dev.
class HostedSource extends CachedSource {
static HostedSource instance = HostedSource._();
@@ -102,11 +117,17 @@
@override
final hasMultipleVersions = true;
- static String pubDevUrl = 'https://pub.dartlang.org';
+ static String pubDevUrl = 'https://pub.dev';
+ static String pubDartlangUrl = 'https://pub.dartlang.org';
+
+ static bool isPubDevUrl(String url) {
+ final origin = Uri.parse(url).origin;
+ return origin == pubDevUrl || origin == pubDartlangUrl;
+ }
static bool isFromPubDev(PackageId id) {
final description = id.description.description;
- return description is HostedDescription && description.url == pubDevUrl;
+ return description is HostedDescription && isPubDevUrl(description.url);
}
/// Gets the default URL for the package server for hosted dependencies.
diff --git a/test/global/activate/custom_hosted_url_test.dart b/test/global/activate/custom_hosted_url_test.dart
index 8b2f0fc..1c0bc04 100644
--- a/test/global/activate/custom_hosted_url_test.dart
+++ b/test/global/activate/custom_hosted_url_test.dart
@@ -8,7 +8,7 @@
void main() {
test('activating a package from a custom pub server', () async {
- // The default pub server (i.e. pub.dartlang.org).
+ // The default pub server (i.e. pub.dev).
final server = await servePackages();
server.serve('baz', '1.0.0');
diff --git a/test/lish/force_does_not_publish_if_there_are_errors_test.dart b/test/lish/force_does_not_publish_if_there_are_errors_test.dart
index 481f627..c949828 100644
--- a/test/lish/force_does_not_publish_if_there_are_errors_test.dart
+++ b/test/lish/force_does_not_publish_if_there_are_errors_test.dart
@@ -15,7 +15,7 @@
await d.dir(appPath, [
d.rawPubspec({
'name': 'test_pkg',
- 'homepage': 'http://pub.dartlang.org',
+ 'homepage': 'https://pub.dartlang.org',
'version': '1.0.0',
}),
]).create();
diff --git a/test/lish/package_validation_has_an_error_test.dart b/test/lish/package_validation_has_an_error_test.dart
index 14c83c0..3605670 100644
--- a/test/lish/package_validation_has_an_error_test.dart
+++ b/test/lish/package_validation_has_an_error_test.dart
@@ -15,7 +15,7 @@
await d.dir(appPath, [
d.rawPubspec({
'name': 'test_pkg',
- 'homepage': 'http://pub.dartlang.org',
+ 'homepage': 'https://pub.dev',
'version': '1.0.0',
}),
]).create();
diff --git a/test/oauth2/logout_test.dart b/test/oauth2/logout_test.dart
index a12a652..fb95c73 100644
--- a/test/oauth2/logout_test.dart
+++ b/test/oauth2/logout_test.dart
@@ -16,8 +16,7 @@
expiration: DateTime.now().add(Duration(hours: 1)))
.create();
- await runPub(
- args: ['logout'], output: contains('Logging out of pub.dartlang.org.'));
+ await runPub(args: ['logout'], output: contains('Logging out of pub.dev.'));
await d.dir(configPath, [d.nothing('pub-credentials.json')]).validate();
});
@@ -48,7 +47,7 @@
args: ['logout'],
output: allOf(
[
- contains('Logging out of pub.dartlang.org.'),
+ contains('Logging out of pub.dev.'),
contains('Also deleting legacy credentials at ')
],
),
diff --git a/test/pubspec_test.dart b/test/pubspec_test.dart
index 1e9c8bd..2ccb30f 100644
--- a/test/pubspec_test.dart
+++ b/test/pubspec_test.dart
@@ -622,7 +622,7 @@
test('throws on non-absolute URLs', () {
expectPubspecException(
- 'publish_to: pub.dartlang.org', (pubspec) => pubspec.publishTo);
+ 'publish_to: pub.dev', (pubspec) => pubspec.publishTo);
});
});
diff --git a/test/reformat_ranges_test.dart b/test/reformat_ranges_test.dart
index 9a88df6..d2c91ca 100644
--- a/test/reformat_ranges_test.dart
+++ b/test/reformat_ranges_test.dart
@@ -11,7 +11,7 @@
void main() {
final description = ResolvedHostedDescription(
- HostedDescription('foo', 'https://pub.dartlang.org'),
+ HostedDescription('foo', 'https://pub.dev'),
);
test('reformatMax when max has a build identifier', () {
expect(
diff --git a/test/test_pub.dart b/test/test_pub.dart
index 99f5655..c5b2d60 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -681,7 +681,7 @@
var package = <String, Object>{
'name': name,
'version': version,
- 'homepage': 'http://pub.dartlang.org',
+ 'homepage': 'http://pub.dev',
'description': 'A package, I guess.'
};
@@ -691,7 +691,7 @@
return package;
}
-/// Returns a Map in the format used by the pub.dartlang.org API to represent a
+/// Returns a Map in the format used by the pub.dev API to represent a
/// package version.
///
/// [pubspec] is the parsed pubspec of the package version. If [full] is true,
@@ -946,8 +946,8 @@
PackageServer get globalServer => _globalServer!;
PackageServer? _globalServer;
-/// Creates an HTTP server that replicates the structure of pub.dartlang.org and
-/// makes it the current [globalServer].
+/// Creates an HTTP server that replicates the structure of pub.dev and makes it
+/// the current [globalServer].
Future<PackageServer> servePackages() async {
final server = await startPackageServer();
_globalServer = server;
diff --git a/test/testdata/goldens/dependency_services/dependency_services_test/Can update a git package.txt b/test/testdata/goldens/dependency_services/dependency_services_test/Can update a git package.txt
index 1f90e4c..35de0ad 100644
--- a/test/testdata/goldens/dependency_services/dependency_services_test/Can update a git package.txt
+++ b/test/testdata/goldens/dependency_services/dependency_services_test/Can update a git package.txt
@@ -11,7 +11,7 @@
description:
path: "."
ref: HEAD
- resolved-ref: "92cdd4ac724a6da0db2a69ac149820aa220e8518"
+ resolved-ref: "5373af3230028f3e31e9ee39e326228db83710cb"
url: "../bar.git"
source: git
version: "1.0.0"
@@ -20,7 +20,7 @@
description:
path: "."
ref: HEAD
- resolved-ref: "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba"
+ resolved-ref: "428f5dd6e627cb2384343eca6aed099f4f7d183d"
url: "../foo.git"
source: git
version: "1.0.0"
@@ -34,7 +34,7 @@
"dependencies": [
{
"name": "bar",
- "version": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "version": "5373af3230028f3e31e9ee39e326228db83710cb",
"kind": "direct",
"constraint": "^1.0.0",
"source": {
@@ -42,14 +42,14 @@
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "resolved-ref": "5373af3230028f3e31e9ee39e326228db83710cb",
"path": "."
}
}
},
{
"name": "foo",
- "version": "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba",
+ "version": "428f5dd6e627cb2384343eca6aed099f4f7d183d",
"kind": "direct",
"constraint": "any",
"source": {
@@ -57,7 +57,7 @@
"description": {
"url": "../foo.git",
"ref": "HEAD",
- "resolved-ref": "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba",
+ "resolved-ref": "428f5dd6e627cb2384343eca6aed099f4f7d183d",
"path": "."
}
}
@@ -73,45 +73,45 @@
"dependencies": [
{
"name": "bar",
- "version": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "version": "5373af3230028f3e31e9ee39e326228db83710cb",
"kind": "direct",
"source": {
"type": "git",
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "resolved-ref": "5373af3230028f3e31e9ee39e326228db83710cb",
"path": "."
}
},
- "latest": "cf473c33e39eeec4615bc2cde8bf68cbb10ad02c",
+ "latest": "40d0ffbfc376f2a796b0bbb928636c242285a01c",
"constraint": "^1.0.0",
"compatible": [],
"singleBreaking": [
{
"name": "bar",
- "version": "cf473c33e39eeec4615bc2cde8bf68cbb10ad02c",
+ "version": "40d0ffbfc376f2a796b0bbb928636c242285a01c",
"kind": "direct",
"source": {
"type": "git",
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "cf473c33e39eeec4615bc2cde8bf68cbb10ad02c",
+ "resolved-ref": "40d0ffbfc376f2a796b0bbb928636c242285a01c",
"path": "."
}
},
"constraintBumped": "^2.0.0",
"constraintWidened": ">=1.0.0 <3.0.0",
"constraintBumpedIfNeeded": "^2.0.0",
- "previousVersion": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "previousVersion": "5373af3230028f3e31e9ee39e326228db83710cb",
"previousConstraint": "^1.0.0",
"previousSource": {
"type": "git",
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "resolved-ref": "5373af3230028f3e31e9ee39e326228db83710cb",
"path": "."
}
}
@@ -120,28 +120,28 @@
"multiBreaking": [
{
"name": "bar",
- "version": "cf473c33e39eeec4615bc2cde8bf68cbb10ad02c",
+ "version": "40d0ffbfc376f2a796b0bbb928636c242285a01c",
"kind": "direct",
"source": {
"type": "git",
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "cf473c33e39eeec4615bc2cde8bf68cbb10ad02c",
+ "resolved-ref": "40d0ffbfc376f2a796b0bbb928636c242285a01c",
"path": "."
}
},
"constraintBumped": "^2.0.0",
"constraintWidened": ">=1.0.0 <3.0.0",
"constraintBumpedIfNeeded": "^2.0.0",
- "previousVersion": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "previousVersion": "5373af3230028f3e31e9ee39e326228db83710cb",
"previousConstraint": "^1.0.0",
"previousSource": {
"type": "git",
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "resolved-ref": "5373af3230028f3e31e9ee39e326228db83710cb",
"path": "."
}
}
@@ -150,46 +150,46 @@
},
{
"name": "foo",
- "version": "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba",
+ "version": "428f5dd6e627cb2384343eca6aed099f4f7d183d",
"kind": "direct",
"source": {
"type": "git",
"description": {
"url": "../foo.git",
"ref": "HEAD",
- "resolved-ref": "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba",
+ "resolved-ref": "428f5dd6e627cb2384343eca6aed099f4f7d183d",
"path": "."
}
},
- "latest": "ad2d659389d4475f6c3a34282e2204160b753fd9",
+ "latest": "40c4eb4fb235961264ee9cdbdfa54ef7f6aa5199",
"constraint": "any",
"compatible": [],
"singleBreaking": [],
"multiBreaking": [
{
"name": "foo",
- "version": "ad2d659389d4475f6c3a34282e2204160b753fd9",
+ "version": "40c4eb4fb235961264ee9cdbdfa54ef7f6aa5199",
"kind": "direct",
"source": {
"type": "git",
"description": {
"url": "../foo.git",
"ref": "HEAD",
- "resolved-ref": "ad2d659389d4475f6c3a34282e2204160b753fd9",
+ "resolved-ref": "40c4eb4fb235961264ee9cdbdfa54ef7f6aa5199",
"path": "."
}
},
"constraintBumped": "^2.0.0",
"constraintWidened": "any",
"constraintBumpedIfNeeded": "any",
- "previousVersion": "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba",
+ "previousVersion": "428f5dd6e627cb2384343eca6aed099f4f7d183d",
"previousConstraint": "any",
"previousSource": {
"type": "git",
"description": {
"url": "../foo.git",
"ref": "HEAD",
- "resolved-ref": "1ae220cc484311a7a1e2e31d1ccc6ea995acb6ba",
+ "resolved-ref": "428f5dd6e627cb2384343eca6aed099f4f7d183d",
"path": "."
}
}
@@ -202,7 +202,7 @@
-------------------------------- END OF OUTPUT ---------------------------------
## Section apply
-$ echo '{"dependencyChanges":[{"name":"foo","version":"ad2d659389d4475f6c3a34282e2204160b753fd9"}]}' | dependency_services apply
+$ echo '{"dependencyChanges":[{"name":"foo","version":"40c4eb4fb235961264ee9cdbdfa54ef7f6aa5199"}]}' | dependency_services apply
{"dependencies":[]}
-------------------------------- END OF OUTPUT ---------------------------------
@@ -218,7 +218,7 @@
description:
path: "."
ref: HEAD
- resolved-ref: "92cdd4ac724a6da0db2a69ac149820aa220e8518"
+ resolved-ref: "5373af3230028f3e31e9ee39e326228db83710cb"
url: "../bar.git"
source: git
version: "1.0.0"
@@ -227,7 +227,7 @@
description:
path: "."
ref: HEAD
- resolved-ref: ad2d659389d4475f6c3a34282e2204160b753fd9
+ resolved-ref: "40c4eb4fb235961264ee9cdbdfa54ef7f6aa5199"
url: "../foo.git"
source: git
version: "2.0.0"
diff --git a/test/testdata/goldens/dependency_services/dependency_services_test/No pubspec.lock.txt b/test/testdata/goldens/dependency_services/dependency_services_test/No pubspec.lock.txt
index ca80a34..e5ab484 100644
--- a/test/testdata/goldens/dependency_services/dependency_services_test/No pubspec.lock.txt
+++ b/test/testdata/goldens/dependency_services/dependency_services_test/No pubspec.lock.txt
@@ -12,7 +12,7 @@
"dependencies": [
{
"name": "bar",
- "version": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "version": "5373af3230028f3e31e9ee39e326228db83710cb",
"kind": "direct",
"constraint": "any",
"source": {
@@ -20,7 +20,7 @@
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "resolved-ref": "5373af3230028f3e31e9ee39e326228db83710cb",
"path": "."
}
}
@@ -62,18 +62,18 @@
"dependencies": [
{
"name": "bar",
- "version": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "version": "5373af3230028f3e31e9ee39e326228db83710cb",
"kind": "direct",
"source": {
"type": "git",
"description": {
"url": "../bar.git",
"ref": "HEAD",
- "resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "resolved-ref": "5373af3230028f3e31e9ee39e326228db83710cb",
"path": "."
}
},
- "latest": "92cdd4ac724a6da0db2a69ac149820aa220e8518",
+ "latest": "5373af3230028f3e31e9ee39e326228db83710cb",
"constraint": "any",
"compatible": [],
"singleBreaking": [],
diff --git a/test/testdata/goldens/directory_option_test/commands taking a --directory~-C parameter work.txt b/test/testdata/goldens/directory_option_test/commands taking a --directory~-C parameter work.txt
index 47cbc9b..c536b72 100644
--- a/test/testdata/goldens/directory_option_test/commands taking a --directory~-C parameter work.txt
+++ b/test/testdata/goldens/directory_option_test/commands taking a --directory~-C parameter work.txt
@@ -53,7 +53,7 @@
Resolving dependencies in myapp/example2...
[STDERR] Error on line 1, column 9 of myapp/pubspec.yaml: "name" field doesn't match expected name "myapp".
[STDERR] ╷
-[STDERR] 1 │ {"name":"test_pkg","version":"1.0.0","homepage":"http://pub.dartlang.org","description":"A package, I guess.","environment":{"sdk":">=1.8.0 <=2.0.0"}, dependencies: { foo: ^1.0.0}}
+[STDERR] 1 │ {"name":"test_pkg","version":"1.0.0","homepage":"http://pub.dev","description":"A package, I guess.","environment":{"sdk":">=1.8.0 <=2.0.0"}, dependencies: { foo: ^1.0.0}}
[STDERR] │ ^^^^^^^^^^
[STDERR] ╵
[EXIT CODE] 65
diff --git a/test/testdata/goldens/embedding/embedding_test/--help.txt b/test/testdata/goldens/embedding/embedding_test/--help.txt
index ea8fd3f..13647a0 100644
--- a/test/testdata/goldens/embedding/embedding_test/--help.txt
+++ b/test/testdata/goldens/embedding/embedding_test/--help.txt
@@ -23,7 +23,7 @@
login Log into pub.dev.
logout Log out of pub.dev.
outdated Analyze your dependencies to find which ones can be upgraded.
- publish Publish the current package to pub.dartlang.org.
+ publish Publish the current package to pub.dev.
remove Removes a dependency from the current package.
token Manage authentication tokens for hosted pub repositories.
upgrade Upgrade the current package's dependencies to latest versions.
diff --git a/test/testdata/goldens/help_test/pub publish --help.txt b/test/testdata/goldens/help_test/pub publish --help.txt
index 2977db0..14e83e2 100644
--- a/test/testdata/goldens/help_test/pub publish --help.txt
+++ b/test/testdata/goldens/help_test/pub publish --help.txt
@@ -2,7 +2,7 @@
## Section 0
$ pub publish --help
-Publish the current package to pub.dartlang.org.
+Publish the current package to pub.dev.
Usage: pub publish [options]
-h, --help Print this usage information.
diff --git a/test/validator/dependency_test.dart b/test/validator/dependency_test.dart
index f90ed1d..93d2bc9 100644
--- a/test/validator/dependency_test.dart
+++ b/test/validator/dependency_test.dart
@@ -236,10 +236,7 @@
'bar': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {
- 'name': 'bar',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'bar', 'url': 'https://pub.dev'}
}
}
}))
@@ -262,10 +259,7 @@
'foo': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {
- 'name': 'foo',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'}
}
}
}))
@@ -286,10 +280,7 @@
'foo': {
'version': '0.1.2',
'source': 'hosted',
- 'description': {
- 'name': 'foo',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'}
}
}
}))
@@ -344,10 +335,7 @@
'bar': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {
- 'name': 'bar',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'bar', 'url': 'https://pub.dev'}
}
}
}))
@@ -370,10 +358,7 @@
'foo': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {
- 'name': 'foo',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'}
}
}
}))
@@ -392,10 +377,7 @@
'foo': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {
- 'name': 'foo',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'}
}
}
}))
@@ -416,10 +398,7 @@
'foo': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {
- 'name': 'foo',
- 'url': 'http://pub.dartlang.org'
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'}
}
}
}))
diff --git a/test/validator/pubspec_field_test.dart b/test/validator/pubspec_field_test.dart
index 43db483..cd205ef 100644
--- a/test/validator/pubspec_field_test.dart
+++ b/test/validator/pubspec_field_test.dart
@@ -20,7 +20,7 @@
test('has an HTTPS homepage URL', () async {
var pkg = packageMap('test_pkg', '1.0.0');
- pkg['homepage'] = 'https://pub.dartlang.org';
+ pkg['homepage'] = 'https://pub.dev';
await d.dir(appPath, [d.pubspec(pkg)]).create();
await expectValidation(pubspecField);
@@ -29,7 +29,7 @@
test('has an HTTPS repository URL instead of homepage', () async {
var pkg = packageMap('test_pkg', '1.0.0');
pkg.remove('homepage');
- pkg['repository'] = 'https://pub.dartlang.org';
+ pkg['repository'] = 'https://pub.dev';
await d.dir(appPath, [d.pubspec(pkg)]).create();
await expectValidation(pubspecField);
@@ -37,7 +37,7 @@
test('has an HTTPS documentation URL', () async {
var pkg = packageMap('test_pkg', '1.0.0');
- pkg['documentation'] = 'https://pub.dartlang.org';
+ pkg['documentation'] = 'https://pub.dev';
await d.dir(appPath, [d.pubspec(pkg)]).create();
await expectValidation(pubspecField);
diff --git a/test/version_solver_test.dart b/test/version_solver_test.dart
index 128ed73..69489a3 100644
--- a/test/version_solver_test.dart
+++ b/test/version_solver_test.dart
@@ -2911,7 +2911,7 @@
if (description is HostedDescription &&
(description.url == SystemCache().hosted.defaultUrl)) {
// If the dep uses the default hosted source, grab it from the test
- // package server rather than pub.dartlang.org.
+ // package server rather than pub.dev.
dep = cache.hosted
.refFor(dep.name, url: globalServer.url)
.withConstraint(dep.constraint);