Upgrading package_config 2 to 3
Breaking2.2.0 → 3.0.0Breaking3Deprecated1New2Changed1
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- The package no longer reads the old .packages file format. Only the newer package_config.json format is supported.
- The function for reading a configuration file has a new name and no longer takes the preferNewest option.
- The function for reading a configuration file URI has a new name and no longer takes the preferNewest option.
- The old function names still work but are deprecated and ignore the preferNewest option.
Must act 4 items need code or config changes
Dart SDK requirement changed in 3.0.0: ^3.4.0 → ^3.11.0.
What you must change
Breaking3
Removes support for the .packages file, which the Dart SDK no longer supports or generates.
.packagesRenames readAnyConfigFile to readConfigFile and removes the preferNewest parameter.
readAnyConfigFilereadConfigFilepreferNewestRenames readAnyConfigFileUri to readConfigFileUri and removes the preferNewest parameter.
readAnyConfigFileUrireadConfigFileUripreferNewestDeprecations to plan for
Deprecated1
Keeps the old readAnyConfigFile and readAnyConfigFileUri functions as deprecated, forwarding to the new functions without preferNewest.
readAnyConfigFilereadAnyConfigFileUripreferNewest