-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix name requirements and add test cases
- Loading branch information
Showing
2 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,16 +65,14 @@ bazel | |
|
||
- The default repository ("registry") is ``https://bcr.bazel.build``, the | ||
Bazel Central Registry (BCR). | ||
- The ``name`` is the module name. It is case sensitive, but a single registry | ||
will never contain two different module names that compare equal | ||
case-insensitively. | ||
- The ``name`` is the module name. It must be lowercased. | ||
- The ``version`` is the module version in `Bazel's relaxed semver format | ||
<https://bazel.build/external/module#version_format>`_. | ||
- The optional ``repository_url`` can be used to specify the URL of an | ||
alternative registry. | ||
alternative registry, with any trailing forward slashes removed. | ||
- The optional ``subpath`` can name a particular Bazel target in the module via | ||
a label with the leading double slash (``//``) removed and canonicalized by | ||
omitting the target name if it is equal to the name of the containing package. | ||
omitting the target name if it is equal to the name of the containing package. | ||
- Examples:: | ||
|
||
pkg:bazel/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -622,5 +622,89 @@ | |
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bazel module with default registry", | ||
"purl": "pkg:bazel/[email protected]?registry_url=https://bcr.bazel.build/", | ||
"canonical_purl": "pkg:bazel/[email protected]", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "rules_java", | ||
"version": "7.8.0", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bazel module with custom registry", | ||
"purl": "pkg:bazel/[email protected]?registry_url=https://example.org/bazel-registry/", | ||
"canonical_purl": "pkg:bazel/[email protected]?registry_url=https://example.org/bazel-registry", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "rules_java", | ||
"version": "7.8.0", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bazel module with relaxed semver version", | ||
"purl": "pkg:bazel/[email protected]", | ||
"canonical_purl": "pkg:bazel/[email protected]", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "curl", | ||
"version": "8.8.0.bcr.1", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bazel module names are lowercased", | ||
"purl": "pkg:bazel/[email protected]", | ||
"canonical_purl": "pkg:bazel/[email protected]", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "curl", | ||
"version": "8.8.0.bcr.1", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": true | ||
}, | ||
{ | ||
"description": "bazel module with target", | ||
"purl": "pkg:bazel/[email protected]#//toolchains:singlejar", | ||
"canonical_purl": "pkg:bazel/[email protected]#toolchains:singlejar", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "rules_java", | ||
"version": "7.8.0", | ||
"qualifiers": null, | ||
"subpath": "toolchains:singlejar", | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bazel module with target in short-hand form", | ||
"purl": "pkg:bazel/[email protected]#//go:go", | ||
"canonical_purl": "pkg:bazel/[email protected]#go", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "rules_go", | ||
"version": "0.48.0", | ||
"qualifiers": null, | ||
"subpath": "go", | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bazel module with top-level target", | ||
"purl": "pkg:bazel/[email protected]#//:stdlib", | ||
"canonical_purl": "pkg:bazel/[email protected]#:stdlib", | ||
"type": "bazel", | ||
"namespace": null, | ||
"name": "rules_go", | ||
"version": "0.48.0", | ||
"qualifiers": null, | ||
"subpath": ":stdlib", | ||
"is_invalid": false | ||
} | ||
] |