pub repository
mirror.p-hatan.compackage_config
3.0.0Support for reading and writing Dart Package Configuration files.
Cached in Iran · Upstream SHA-256 matched
Readme
Build Status pub package package publisher
Support for working with Package Configuration files as described in the Package Configuration v2 design document.
A Dart package configuration file is used to resolve Dart package names (e.g.
foobar) to Dart files containing the source code for that package (e.g.
file:///Users/myuser/.pub-cache/hosted/pub.dartlang.org/foobar-1.1.0). The
standard package configuration file is .dart_tool/package_config.json, and is
written by the Dart tool when the command dart pub get is run.
The primary libraries of this package are
-
package_config.dart: Defines thePackageConfigclass and other types needed to use package configurations, and provides functions to find, read and write package configuration files. -
package_config_types.dart: Just thePackageConfigclass and other types needed to use package configurations. This library does not depend ondart:io.
The package no longer contains backwards compatible functionality to
work with .packages files.
Changelog
3.0.0
-
Adds discovery API to find both a configuration and its location:
findPackageConfigAndFileandfindPackageConfigAndUri. -
Removes support for the
.packagesfile. The Dart SDK no longer supports that file, and no new.packagesfiles will be generated. Since the SDK requirement for this package is above 3.0.0, no supporting SDK can use or generate.packages. -
Simplifies API that no longer needs to support two separate files.
- Renamed
readAnyConfigFiletoreadConfigFile, and removed thepreferNewestparameter. - Same for
readAnyConfigFileUriwhich becomesreadConfigFileUri. - Old functions still exists as deprecated, forwarding to the new
functions without the
preferNewestargument.
Makes
PackageConfig,PackageandLanguageVersion@sealedclasses, in preparation for making themfinalin a future update. - Renamed
-
Adds
PackageConfig.minVersionto complement.maxVersion. Currently both are2.
2.2.0
-
Add relational operators to
LanguageVersionwith extension methods exported underLanguageVersionRelationalOperators. -
Include correct parameter names in errors when validating the
majorandminorversions in theLanguageVersion.newconstructor.
2.1.1
- Require Dart 3.4
- Move to
dart-lang/toolsmonorepo.
2.1.0
-
Adds
minVersiontofindPackageConfigandfindPackageConfigVersionwhich allows ignoring earlier versions (which currently only means ignoring version 1, aka..packagesfiles.) -
Changes the version number of
SimplePackageConfig.emptyto the current maximum version. -
Improve file read performance; improve lookup performance.
-
Emit an error when a package is inside the package root of another package.
-
Fix a link in the readme.
2.0.2
- Update package description and README.
- Change to package:lints for style checking.
- Add an example.
2.0.1
- Use unique library names to correct docs issue.
2.0.0
- Migrate to null safety.
- Remove legacy APIs.
- Adds
relativeRootproperty toPackagewhich controls whether to make the root URI relative when writing a configuration file.
1.9.3
- Fix
Packageconstructor not accepting relativepackageUriRoot.
1.9.2
- Updated to support new rules for picking
package_config.jsonover a specified.packages. - Deduce package root from
.packagesderived package configuration, and default all such packages to language version 2.7.
1.9.1
- Remove accidental transitive import of
dart:iofrom entrypoints that are supposed to be cross-platform compatible.
1.9.0
- Based on new JSON file format with more content.
- This version includes all the new functionality intended for a 2.0.0 version, as well as the, now deprecated, version 1 functionality. When we release 2.0.0, the deprecated functionality will be removed.
1.1.0
- Allow parsing files with default-package entries and metadata. A default-package entry has an empty key and a valid package name as value. Metadata is attached as fragments to base URIs.
1.0.5
- Fix usage of SDK constants.
1.0.4
- Set max SDK version to <3.0.0.
1.0.3
- Removed unneeded dependency constraint on SDK.
1.0.2
- Update SDK constraint to be 2.0.0 dev friendly.
1.0.1
- Fix test to not write to sink after it's closed.
1.0.0
- Public API marked stable.
0.1.5
FilePackagesDirectoryPackages.getBase(..)performance improvements.
0.1.4
- Strong mode fixes.
0.1.3
- Invalid test cleanup (to keep up with changes in
Uri).
0.1.1
- Syntax updates.
0.1.0
- Initial implementation.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add package_configpubspec.yaml
name: package_config
version: 3.0.0
description: Support for reading and writing Dart Package Configuration files.
repository: https://github.com/dart-lang/tools/tree/main/pkgs/package_config
issue_tracker: https://github.com/dart-lang/tools/labels/package%3Apackage_config
environment:
sdk: ^3.11.0
dependencies:
meta: ^1.15.0
dev_dependencies:
dart_flutter_team_lints: ^3.4.0
test: ^1.16.0
dependency_overrides:
analyzer: ^13.1.0
coverage: ^1.15.0
test: ^1.31.1
test_core: ^0.6.18
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.2 | 2015-05-28T17:52:43.716Z | Cached | feda356cc14167d791465b4b2fd1c291e339d85b340ac458a3bb1e0d5d150c9f |
| 0.0.2+1 | 2015-05-28T20:12:09.421Z | Cached | 43b9aa8905a488aaed43fe1abe8e54586390de10a24cc879ad95c527c3c65d25 |
| 0.0.2+2 | 2015-05-28T20:57:27.565Z | Cached | 4e312b931a74f6aec2760fa00e4e78c9acadeac7cca6f730a5a81bd5fd0ea581 |
| 0.0.2+3 | 2015-05-28T23:24:39.957Z | Cached | 1afef9b8ce07538471661563931ce8fe3bcfa2136887fdfeae7a0ff62c703734 |
| 0.0.2+4 | 2015-05-29T17:28:54.250Z | Cached | 09f4eb1a85ed0f292289b9ddcc224f87b8ace7ae27f07860d417400e7778b1a0 |
| 0.0.3+1 | 2015-06-09T18:04:55.705Z | Cached | 6841498e42f19843e07c78871ea85fbe3b987a2959142db7c3e8681bc9d54808 |
| 0.0.4 | 2015-06-16T09:22:15.059710Z | Cached | 64ea9df93cbeb167bc3805123080cf4ccd0bf43b43b2c2a87647b0b44499f536 |
| 0.1.1 | 2015-06-24T20:55:14.893Z | Cached | 4931c67fd1c3ce96fe69d0fafa09e136b0ad0a862a573197184323a04dbad0ec |
| 0.1.3 | 2015-08-20T11:12:41.294Z | Cached | 108971cdd0196e73f048bb4c5b800db1999fec9faba5e3afea99c3f6e3bf5c43 |
| 0.1.5 | 2016-06-09T16:04:30.350Z | Cached | dccb9846568b5d65ff9614411435da22d84d187d7d34de9d4c358f7e25604c94 |
| 1.0.0 | 2016-06-14T16:37:24.628Z | Cached | 1af9acd7fa5f8a17a9ae1d7144666e8679b0053a23c21ed7ac83010e6c05b1f3 |
| 1.0.1 | 2017-05-04T14:14:09.518510Z | Cached | da9ad0caa9b7631c3fb81cae3eb0837c01d86af1e664db51aa043b53f73ba8bf |
| 1.0.2 | 2017-07-19T19:48:40.175150Z | Cached | c2cf05f6b7291b5dc1ff8440d0007b9342ed920a0c7f810c6c7b9bb8db9f9893 |
| 1.0.3 | 2017-09-22T19:29:17.503422Z | Cached | 5cb06f1ca921edcaa34962010fb5d98e28a997e3996e84a3f9fa402cec706a37 |
| 1.0.4 | 2018-07-17T18:01:47.294803Z | Cached | 8a3f05d53c7f012706d6e2c23451ffddd6ab10578e15d9f02a05aa64f2bb224f |
| 1.0.5 | 2018-07-18T20:38:50.696936Z | Cached | 345942e4ef0bd53e9230cb366a32a57af528f7f6b871cc56c11e718f8d421857 |
| 1.1.0 | 2019-08-16T13:09:32.751349Z | Cached | 65af9cb3cea35d27b0bc3e690dd2e0d12b5d1c5069b1a749e7e0a44540434451 |
| 1.9.0 | 2020-02-26T20:01:41.247445Z | Cached | df8dd4cc9a874435701651b80ad00ea53606b9eb1dda98ff1ab6d7deefafd98f |
| 1.9.1 | 2020-02-26T22:35:29.790258Z | Cached | b65048497a65ecc83ba56e38da00fc5dfd644f37057222f079c190c22e287266 |
| 1.9.2 | 2020-03-18T15:01:06.707766Z | Cached | f86b4970b47c9a30bdcdc8eecc908bd3b1222bd25ca24a28f3cabe74f42a1137 |
| 1.9.3 | 2020-03-26T16:09:31.559817Z | Cached | 08b3acb5f8c9736aaf26776864ea68441bb69a82d900cbce47cd962b3ddb12c9 |
| 2.0.0-dev | 2020-12-16T14:02:16.707470Z | Cached | 94fd749a609ae6fcc68f542b83836761555d56185aa71207a15cf11b28308fac |
| 2.0.0-nullsafety.0 | 2021-01-19T14:06:39.949813Z | Cached | ded48b940c4423ef1e7e6265bcc99e54c8b8fdab861e0fdc8a9aa569664824f3 |
| 2.0.0 | 2021-02-05T19:14:50.556047Z | Cached | 20e7154d701fedaeb219dad732815ecb66677667871127998a9a6581c2aba4ba |
| 2.0.2 | 2021-09-13T14:32:11.296669Z | Cached | a4d5ede5ca9c3d88a2fef1147a078570c861714c806485c596b109819135bc12 |
| 2.1.0 | 2022-06-15T08:39:39.954785Z | Cached | 1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd |
| 2.1.1 | 2024-12-11T09:01:56.125768Z | Cached | 92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67 |
| 2.2.0 | 2025-03-11T15:40:13.816974Z | Cached | f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc |
| 3.0.0 | 2026-06-08T17:53:07.480088Z | Cached | ffcf4cf3d6c0b74ac43708d9f56625506e8a68aa935abe9d267a7330f320eb5d |
Dependencies
meta "^1.15.0"