[pkg] prefer 'any' deps for package dev dependencies

Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml
index 5f4c879..ad5468c 100644
--- a/pkg/_fe_analyzer_shared/pubspec.yaml
+++ b/pkg/_fe_analyzer_shared/pubspec.yaml
@@ -9,5 +9,9 @@
 dependencies:
   meta: ^1.0.2
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
-  test: ^1.3.4
+  test: any
diff --git a/pkg/_js_interop_checks/pubspec.yaml b/pkg/_js_interop_checks/pubspec.yaml
index 776dab8..9be1352 100644
--- a/pkg/_js_interop_checks/pubspec.yaml
+++ b/pkg/_js_interop_checks/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   kernel: any
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index 4b7314d..93103cb 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.17.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   analyzer: any
@@ -25,6 +26,7 @@
   watcher: any
   yaml: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   analyzer_utilities: any
   cli_util: any
diff --git a/pkg/analysis_server_client/pubspec.yaml b/pkg/analysis_server_client/pubspec.yaml
index c243b32..a5438e9 100644
--- a/pkg/analysis_server_client/pubspec.yaml
+++ b/pkg/analysis_server_client/pubspec.yaml
@@ -13,11 +13,12 @@
   path: ^1.8.0
   pub_semver: ^2.0.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
-  analyzer:
-    path: ../analyzer
-  analysis_server:
-    path: ../analysis_server
-  analyzer_utilities:
-    path: ../analyzer_utilities
-  test: ^1.14.2
+  analyzer: any
+  analysis_server: any
+  analyzer_utilities: any
+  test: any
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 25c8cda..77c258e 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -20,13 +20,16 @@
   watcher: ^1.0.0
   yaml: ^3.0.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
-  analyzer_utilities:
-    path: ../analyzer_utilities
-  args: ^2.0.0
-  async: ^2.5.0
-  linter: ^1.12.0
-  lints: ^2.0.0
-  matcher: ^0.12.10
-  test: ^1.16.0
-  test_reflective_loader: ^0.2.0
+  analyzer_utilities: any
+  args: any
+  async: any
+  linter: any
+  lints: any
+  matcher: any
+  test: any
+  test_reflective_loader: any
diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml
index 6007114..2eb61ca 100644
--- a/pkg/analyzer_cli/pubspec.yaml
+++ b/pkg/analyzer_cli/pubspec.yaml
@@ -7,6 +7,7 @@
 environment:
   sdk: "^2.14.0"
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   analyzer: any
   args: any
@@ -16,6 +17,7 @@
   pub_semver: any
   yaml: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   lints: any
   test_reflective_loader: any
diff --git a/pkg/analyzer_plugin/pubspec.yaml b/pkg/analyzer_plugin/pubspec.yaml
index 946fd7e..0115b6f 100644
--- a/pkg/analyzer_plugin/pubspec.yaml
+++ b/pkg/analyzer_plugin/pubspec.yaml
@@ -13,10 +13,13 @@
   pub_semver: ^2.0.0
   yaml: ^3.1.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
-  analyzer_utilities:
-    path: ../analyzer_utilities
-  html: ^0.15.0
-  path: ^1.8.0
-  test_reflective_loader: ^0.2.0
-  test: ^1.16.6
+  analyzer_utilities: any
+  html: any
+  path: any
+  test_reflective_loader: any
+  test: any
diff --git a/pkg/analyzer_utilities/pubspec.yaml b/pkg/analyzer_utilities/pubspec.yaml
index e974be1..a7c634c 100644
--- a/pkg/analyzer_utilities/pubspec.yaml
+++ b/pkg/analyzer_utilities/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   analyzer: any
   html: any
@@ -12,5 +13,6 @@
   path: any
   test: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   lints: any
diff --git a/pkg/async_helper/pubspec.yaml b/pkg/async_helper/pubspec.yaml
index 55bc80d..dc909f9 100644
--- a/pkg/async_helper/pubspec.yaml
+++ b/pkg/async_helper/pubspec.yaml
@@ -3,14 +3,14 @@
 publish_to: none
 
 description: >-
- Async_helper is used for asynchronous tests that do not want to
- make use of the Dart unittest library - for example, the core
- language tests.
- Third parties are discouraged from using this, and should use
- the facilities provided in package:test.
+ Async_helper is used for asynchronous tests that do not want to make use of
+ the Dart unittest library - for example, the core language tests. Third
+ parties are discouraged from using this, and should use the facilities
+ provided in package:test.
 
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   expect: any
diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml
index 2286f3e..fbb8715 100644
--- a/pkg/build_integration/pubspec.yaml
+++ b/pkg/build_integration/pubspec.yaml
@@ -8,8 +8,10 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   front_end: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   test: any
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index 071e5e1..ff1ae62 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -6,8 +6,7 @@
 environment:
   sdk: '>=2.16.0 <3.0.0'
 
-# NOTE: `pub get / pub upgrade` are generally not needed when working on this
-# package. The `.packages` file in the repository root will be used by default.
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   _js_interop_checks: any
@@ -21,6 +20,7 @@
   kernel: any
   vm_service: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   args: any
   dart_style: any
diff --git a/pkg/dart2js_info/pubspec.yaml b/pkg/dart2js_info/pubspec.yaml
index 838c754..04e3c7b 100644
--- a/pkg/dart2js_info/pubspec.yaml
+++ b/pkg/dart2js_info/pubspec.yaml
@@ -8,6 +8,7 @@
 environment:
   sdk: '>=2.16.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   args: any
   collection: any
@@ -17,6 +18,7 @@
   shelf: any
   yaml: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   lints: any
   test: any
diff --git a/pkg/dart2js_runtime_metrics/pubspec.yaml b/pkg/dart2js_runtime_metrics/pubspec.yaml
index 8db9891..57a2179 100644
--- a/pkg/dart2js_runtime_metrics/pubspec.yaml
+++ b/pkg/dart2js_runtime_metrics/pubspec.yaml
@@ -11,5 +11,6 @@
   # a later version of the SDK without it being a breaking change.
   sdk: ">=2.14.0 <2.15.0"
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   expect: any
diff --git a/pkg/dart2js_tools/pubspec.yaml b/pkg/dart2js_tools/pubspec.yaml
index ec4d63b..ce67a9b 100644
--- a/pkg/dart2js_tools/pubspec.yaml
+++ b/pkg/dart2js_tools/pubspec.yaml
@@ -8,6 +8,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   path: any
   source_maps: any
diff --git a/pkg/dart2native/pubspec.yaml b/pkg/dart2native/pubspec.yaml
index 6cd6814..80bf3ee 100644
--- a/pkg/dart2native/pubspec.yaml
+++ b/pkg/dart2native/pubspec.yaml
@@ -9,8 +9,10 @@
 executables:
   dart2native:
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
    path: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   lints: any
diff --git a/pkg/dart2wasm/pubspec.yaml b/pkg/dart2wasm/pubspec.yaml
index 2c0f711..f4ed37e 100644
--- a/pkg/dart2wasm/pubspec.yaml
+++ b/pkg/dart2wasm/pubspec.yaml
@@ -4,6 +4,7 @@
 environment:
   sdk: '>=2.12.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _js_interop_checks: any
   front_end: any
diff --git a/pkg/dartdev/pubspec.yaml b/pkg/dartdev/pubspec.yaml
index 2e71998..58afb2a 100644
--- a/pkg/dartdev/pubspec.yaml
+++ b/pkg/dartdev/pubspec.yaml
@@ -6,6 +6,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   analysis_server: any
   analysis_server_client: any
@@ -25,6 +26,7 @@
   telemetry: any
   usage: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   expect: any
   lints: any
diff --git a/pkg/dds/pubspec.yaml b/pkg/dds/pubspec.yaml
index e2ca11c..40e8453 100644
--- a/pkg/dds/pubspec.yaml
+++ b/pkg/dds/pubspec.yaml
@@ -19,18 +19,22 @@
   json_rpc_2: ^3.0.0
   meta: ^1.1.8
   path: ^1.8.0
-  shelf: ^1.0.0
   shelf_proxy: ^1.0.0
   shelf_static: ^1.0.0
   shelf_web_socket: ^1.0.0
-  stack_trace: ^1.10.0
+  shelf: ^1.0.0
   sse: ^4.0.0
+  stack_trace: ^1.10.0
   stream_channel: ^2.0.0
   vm_service: ^8.1.0
   web_socket_channel: ^2.0.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
-  http: ^0.13.0
+  http: any
   lints: any
-  test: ^1.0.0
-  webdriver: ^3.0.0
+  test: any
+  webdriver: any
diff --git a/pkg/dds_service_extensions/pubspec.yaml b/pkg/dds_service_extensions/pubspec.yaml
index f26c41ba..f42ed22 100644
--- a/pkg/dds_service_extensions/pubspec.yaml
+++ b/pkg/dds_service_extensions/pubspec.yaml
@@ -12,5 +12,9 @@
   async: ^2.4.1
   vm_service: ^8.1.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
   lints: any
diff --git a/pkg/dev_compiler/pubspec.yaml b/pkg/dev_compiler/pubspec.yaml
index f666b47..1acbb51 100644
--- a/pkg/dev_compiler/pubspec.yaml
+++ b/pkg/dev_compiler/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.15.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   _js_interop_checks: any
@@ -21,6 +22,7 @@
   source_maps: any
   source_span: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   browser_launcher: any
   expect: any
diff --git a/pkg/expect/pubspec.yaml b/pkg/expect/pubspec.yaml
index e231d0c..5f045c2 100644
--- a/pkg/expect/pubspec.yaml
+++ b/pkg/expect/pubspec.yaml
@@ -11,6 +11,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   meta: any
   smith: any
diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml
index 780e0c6..aedd3be 100644
--- a/pkg/front_end/pubspec.yaml
+++ b/pkg/front_end/pubspec.yaml
@@ -8,27 +8,29 @@
 environment:
   sdk: '>=2.13.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   kernel: any
   package_config: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   analyzer: any
   args: any
   async_helper: any
   build_integration: any
   compiler: any
-  dart2wasm: any
   dart_style: any
+  dart2wasm: any
   dev_compiler: any
   expect: any
   json_rpc_2: any
   path: any
-  test: any
   test_reflective_loader: any
+  test: any
   testing: any
-  vm: any
   vm_service: any
+  vm: any
   web_socket_channel: any
   yaml: any
diff --git a/pkg/frontend_server/pubspec.yaml b/pkg/frontend_server/pubspec.yaml
index 9ce3011..93b3740 100644
--- a/pkg/frontend_server/pubspec.yaml
+++ b/pkg/frontend_server/pubspec.yaml
@@ -6,6 +6,7 @@
 environment:
   sdk: "^2.15.0"
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   args: any
@@ -19,6 +20,7 @@
   usage: any
   vm: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   mockito: any
   test: any
diff --git a/pkg/js/pubspec.yaml b/pkg/js/pubspec.yaml
index c8d12d3..25acfba 100644
--- a/pkg/js/pubspec.yaml
+++ b/pkg/js/pubspec.yaml
@@ -9,5 +9,9 @@
 dependencies:
   meta: ^1.7.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
   lints: any
diff --git a/pkg/js_ast/pubspec.yaml b/pkg/js_ast/pubspec.yaml
index 7d23ea0..f630c01 100644
--- a/pkg/js_ast/pubspec.yaml
+++ b/pkg/js_ast/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.16.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   expect: any
   lints: any
diff --git a/pkg/js_runtime/pubspec.yaml b/pkg/js_runtime/pubspec.yaml
index 14f07a4..a452bc9 100644
--- a/pkg/js_runtime/pubspec.yaml
+++ b/pkg/js_runtime/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
-  expect: any
   _fe_analyzer_shared: any
+  expect: any
diff --git a/pkg/js_shared/pubspec.yaml b/pkg/js_shared/pubspec.yaml
index 6424aac..3503f25 100644
--- a/pkg/js_shared/pubspec.yaml
+++ b/pkg/js_shared/pubspec.yaml
@@ -5,6 +5,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
-  expect: any
   _fe_analyzer_shared: any
+  expect: any
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index 31ec688..2fb1c7d 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -8,6 +8,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   args: any
   expect: any
diff --git a/pkg/language_versioning_2.7_test/pubspec.yaml b/pkg/language_versioning_2.7_test/pubspec.yaml
index 3245f03..5ee0691 100644
--- a/pkg/language_versioning_2.7_test/pubspec.yaml
+++ b/pkg/language_versioning_2.7_test/pubspec.yaml
@@ -11,4 +11,3 @@
 
 environment:
   sdk: '>=2.7.0 <3.0.0'
-
diff --git a/pkg/modular_test/pubspec.yaml b/pkg/modular_test/pubspec.yaml
index 538c555..1a20237 100644
--- a/pkg/modular_test/pubspec.yaml
+++ b/pkg/modular_test/pubspec.yaml
@@ -2,18 +2,20 @@
 # This package is not intended for consumption on pub.dev. DO NOT publish.
 publish_to: none
 description: >
- Small framework to test modular pipelines.
- This is used within the Dart SDK to define and validate modular tests, and to
- execute them using the modular pipeline of different SDK tools.
+ Small framework to test modular pipelines. This is used within the Dart SDK to
+ define and validate modular tests, and to execute them using the modular
+ pipeline of different SDK tools.
 
 environment:
   sdk: '>=2.16.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   args: any
   package_config: any
   yaml: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   async_helper: any
   expect: any
diff --git a/pkg/native_stack_traces/pubspec.yaml b/pkg/native_stack_traces/pubspec.yaml
index 50320e5..ad5add0 100644
--- a/pkg/native_stack_traces/pubspec.yaml
+++ b/pkg/native_stack_traces/pubspec.yaml
@@ -13,5 +13,9 @@
   args: ^2.0.0
   path: ^1.8.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
   lints: any
diff --git a/pkg/nnbd_migration/pubspec.yaml b/pkg/nnbd_migration/pubspec.yaml
index 67f287b..381567b 100644
--- a/pkg/nnbd_migration/pubspec.yaml
+++ b/pkg/nnbd_migration/pubspec.yaml
@@ -6,10 +6,11 @@
 environment:
   sdk: '>=2.14.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
-  analyzer: any
   analyzer_plugin: any
+  analyzer: any
   args: any
   cli_util: any
   collection: any
@@ -20,9 +21,10 @@
   source_span: any
   yaml: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   analyzer_utilities: any
   http: any
   lints: any
-  test: any
   test_reflective_loader: any
+  test: any
diff --git a/pkg/scrape/pubspec.yaml b/pkg/scrape/pubspec.yaml
index ca3cee5..ccfb019 100644
--- a/pkg/scrape/pubspec.yaml
+++ b/pkg/scrape/pubspec.yaml
@@ -6,10 +6,12 @@
 environment:
   sdk: ^2.13.0
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
-  args: any
   analyzer: any
+  args: any
   path: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   lints: any
diff --git a/pkg/smith/pubspec.yaml b/pkg/smith/pubspec.yaml
index 4dfeaea..e92131c 100644
--- a/pkg/smith/pubspec.yaml
+++ b/pkg/smith/pubspec.yaml
@@ -2,7 +2,10 @@
 description: Shared code for working with the Dart SDK's tests and test runner.
 # This package is not intended for consumption on pub.dev. DO NOT publish.
 publish_to: none
+
 environment:
-  sdk: "^2.12.0"
+  sdk: '^2.12.0'
+
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   expect: any
diff --git a/pkg/sourcemap_testing/pubspec.yaml b/pkg/sourcemap_testing/pubspec.yaml
index fdeb960..d739276 100644
--- a/pkg/sourcemap_testing/pubspec.yaml
+++ b/pkg/sourcemap_testing/pubspec.yaml
@@ -6,6 +6,7 @@
 environment:
   sdk: '>=2.16.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   _fe_analyzer_shared: any
   collection: any
@@ -15,5 +16,6 @@
   source_maps: any
   source_span: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   lints: any
diff --git a/pkg/status_file/pubspec.yaml b/pkg/status_file/pubspec.yaml
index 27e76b2..70c564c 100644
--- a/pkg/status_file/pubspec.yaml
+++ b/pkg/status_file/pubspec.yaml
@@ -5,9 +5,11 @@
 environment:
   sdk: "^2.12.0"
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
-  path: any
   args: any
+  path: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   expect: any
diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml
index 12acecc..d1b687c 100644
--- a/pkg/telemetry/pubspec.yaml
+++ b/pkg/telemetry/pubspec.yaml
@@ -6,6 +6,7 @@
 environment:
   sdk: '>=2.12.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   http: any
   meta: any
@@ -13,5 +14,6 @@
   stack_trace: any
   usage: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   test: any
diff --git a/pkg/test_runner/pubspec.yaml b/pkg/test_runner/pubspec.yaml
index 96fa67d..26f868f 100644
--- a/pkg/test_runner/pubspec.yaml
+++ b/pkg/test_runner/pubspec.yaml
@@ -5,9 +5,11 @@
 name: test_runner
 # This package is not intended for consumption on pub.dev. DO NOT publish.
 publish_to: none
+
 environment:
   sdk: "^2.9.0"
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   args: any
   dart2js_tools: any
@@ -18,6 +20,7 @@
   status_file: any
   webdriver: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   analyzer: any
   expect: any
diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml
index ca8bf35..009cfeba 100644
--- a/pkg/vm/pubspec.yaml
+++ b/pkg/vm/pubspec.yaml
@@ -6,6 +6,7 @@
 environment:
   sdk: '>=2.15.0 <3.0.0'
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dependencies:
   args: any
   build_integration: any
@@ -15,6 +16,7 @@
   kernel: any
   package_config: any
 
+# Use 'any' constraints here; we get our versions from the DEPS file.
 dev_dependencies:
   expect: any
   json_rpc_2: any
diff --git a/pkg/vm_service/pubspec.yaml b/pkg/vm_service/pubspec.yaml
index 9eda722..7f9470e 100644
--- a/pkg/vm_service/pubspec.yaml
+++ b/pkg/vm_service/pubspec.yaml
@@ -11,6 +11,10 @@
 
 dependencies:
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
   async: any
   expect: any
@@ -19,5 +23,5 @@
   mockito: any
   path: any
   pub_semver: any
-  test: any
   test_package: any
+  test: any
diff --git a/pkg/vm_snapshot_analysis/pubspec.yaml b/pkg/vm_snapshot_analysis/pubspec.yaml
index 10816d4..b38740a 100644
--- a/pkg/vm_snapshot_analysis/pubspec.yaml
+++ b/pkg/vm_snapshot_analysis/pubspec.yaml
@@ -14,6 +14,10 @@
   collection: ^1.15.0
   path: ^1.8.0
 
+# We use 'any' version constraints here as we get our package versions from
+# the dart-lang/sdk repo's DEPS file. Note that this is a special case; the
+# best practice for packages is to specify their compatible version ranges.
+# See also https://dart.dev/tools/pub/dependencies.
 dev_dependencies:
   lints: any
-  test: ^1.16.8
+  test: any
diff --git a/pkg/wasm_builder/pubspec.yaml b/pkg/wasm_builder/pubspec.yaml
index af4d545..a4286a4 100644
--- a/pkg/wasm_builder/pubspec.yaml
+++ b/pkg/wasm_builder/pubspec.yaml
@@ -5,5 +5,3 @@
 
 environment:
   sdk: '>=2.12.0'
-
-dependencies:
diff --git a/tools/package_deps/bin/package_deps.dart b/tools/package_deps/bin/package_deps.dart
index 9556a1a..3cf437c 100644
--- a/tools/package_deps/bin/package_deps.dart
+++ b/tools/package_deps/bin/package_deps.dart
@@ -251,41 +251,39 @@
       fail = true;
     }
 
-    // Validate that we don't have relative deps into third_party.
-    // TODO(devoncarew): This is currently just enforced for publishable
-    // packages.
     if (publishable) {
-      for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) {
-        if (dep is PathPubDep) {
-          var path = dep.path;
-
-          if (path.contains('third_party/pkg_tested/') ||
-              path.contains('third_party/pkg/')) {
-            out('  Prefer a semver dependency for packages brought in via DEPS:');
-            out('    $dep');
-            fail = true;
-          }
-        }
-      }
-    }
-
-    // Validate that published packages don't use path deps.
-    if (publishable) {
+      // Validate that deps for published packages use semver (but not any).
       for (PubDep dep in _declaredPubDeps) {
-        if (dep is PathPubDep) {
-          out('  Published packages should use semver deps:');
-          out('    $dep');
-          fail = true;
-        }
+        if (dep is SemverPubDep) continue;
+
+        out('  Published packages should use semver deps:');
+        out('    $dep');
+        fail = true;
+      }
+
+      // Validate that dev deps for published packages use an 'any' constraint.
+      for (PubDep dep in _declaredDevPubDeps) {
+        if (dep is AnyPubDep) continue;
+
+        out('  Prefer an `any` constraint for dev dependencies');
+        out('    $dep');
+        fail = true;
+      }
+    } else {
+      // Validate that non-publishable packages use an 'any' constraint.
+      for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) {
+        if (dep is AnyPubDep) continue;
+
+        out('  Prefer an `any` constraint for unpublished packages');
+        out('    $dep');
+        fail = true;
       }
     }
 
     // Validate that the version of any package dep'd in works with our declared
     // version ranges.
     for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) {
-      if (dep is! SemverPubDep) {
-        continue;
-      }
+      if (dep is! SemverPubDep) continue;
 
       ResolvedDep? resolvedDep = sdkDeps.resolve(dep.name);
       if (resolvedDep == null) {
@@ -322,17 +320,6 @@
       }
     }
 
-    // Validate that non-published packages use relative a (relative) path dep
-    // for pkg/ packages.
-    if (!publishable) {
-      for (PubDep dep in [..._declaredPubDeps, ..._declaredDevPubDeps]) {
-        if (dep is AnyPubDep) continue;
-        out('  Prefer `any` dependencies for unpublished packages');
-        out('    $dep');
-        fail = true;
-      }
-    }
-
     if (!fail) {
       print('  No issues.');
     }
diff --git a/tools/verify_docs/README.md b/tools/verify_docs/README.md
index 41be863..f2adb28 100644
--- a/tools/verify_docs/README.md
+++ b/tools/verify_docs/README.md
@@ -123,4 +123,3 @@
 // final BuildContext context;
 // final String userAvatarUrl;
 ```
-