Commit graph

43 commits

Author SHA1 Message Date
cassaundra 5554889f88
Include rust-version in publish request
crates.io reads rust-version from the tarball directly, but we can include it in
the publish request for the sake of consistency for third-party registries.
2023-04-26 11:59:29 -07:00
Eric Huss eea69e549f Bump versions of local crates 2023-04-23 13:01:29 -07:00
bors c429784fd5 Auto merge of #11951 - ehuss:check-token-tab, r=hi-rustin
Fix credential token format validation.

The existing validation incorrectly excluded tab because of a missing backslash. This updates to add the backslash.

This also rewords the comments. I found the current comments to be a little confusing.

This also extends the test to verify more valid inputs.

cc #11600
2023-04-10 04:02:43 +00:00
Eric Huss 35f5862979 Validate token on publish. 2023-04-09 12:15:40 -07:00
Eric Huss 57264ed433 Fix credential token format validation. 2023-04-09 11:53:46 -07:00
Weihang Lo 8296cfe547
Bump crates-io to 0.36.0
This was an overlook of https://github.com/rust-lang/cargo/pull/11600
2023-03-09 17:10:32 +00:00
akida31 823ab52f19
Address review comments
* moved `is_empty` check into `check_token`
* improved error message (is quite long now but should explain the error
  well)
* removed one helper function from new test
2023-02-16 19:12:46 +01:00
akida31 3d2e107b5a
Error on invalid token for registry auth
When using registry operations with authentication there will be now an
error if the given token is not valid.
This is a technically a breaking change because a registry might give
some tokens which will be denied by these new checks.
In practice these tokens cause issues with HTTP so no registry should
generate them.
2023-02-16 16:42:30 +01:00
Scott Schafer c3043d9a9e chore: Make dependencies alphabetical order 2023-02-15 09:22:08 -06:00
Jacob Finkelman 29ff25f6d9 cleanups round 1 2022-12-13 23:49:07 +00:00
Jacob Finkelman 6d1c07bcc5 Send asymmetric tokens with mutations 2022-12-12 20:11:26 +00:00
Arlo Siemsen 9827412fee Implement RFC 3139: alternative registry authentication support 2022-11-16 14:36:19 -06:00
Weihang Lo 054a19ba2f
Bump crate crates-io to 0.35.0 2022-11-13 10:55:15 +00:00
Scott Schafer 251a2c7915 cargo-test-support: Make publish http api write to file system 2022-09-22 10:00:49 -06:00
Eric Huss 43a063c80a Stabilize namespaced and weak dependency features. 2022-01-06 15:56:56 -08:00
Eric Huss 06bffb59a7 Bump versions of local deps. 2021-12-03 11:05:03 -08:00
Alex Crichton c687d83ada Remove authors directives from Cargo crates
Most of these are pretty dated and Cargo defaults nowadays to not
emitting an `authors` field so this commit also removes them from the
manifests.
2021-10-22 10:27:20 -07:00
Alex Crichton cabe1cca0a Upgrade Cargo to the 2021 edition
This didn't actually result in any code changes yet, for now this simply
flips the edition flag for all of our crates and documentation.
2021-10-22 10:25:52 -07:00
Eric Huss 10eb56f2c4 Update clippy lint allow set. 2021-04-13 09:02:07 -07:00
Eric Huss c9bd6e12e1 Minor update to registry API error messages. 2021-02-27 12:38:17 -08:00
Eric Huss 196673bb1e Add a schema version to the index. 2021-02-10 10:58:07 -08:00
Eric Huss 06b8d1cac1 Add a ResponseError for registry API interaction.
The intent here is to make it easier to work with API errors.

This also includes some new tests for checking network errors.
2021-02-02 17:44:57 -08:00
Eric Huss eaa5896405 Remove Registry::new. 2021-01-22 11:06:51 -08:00
Eric Huss eb081ed301 Workaround fs issue in cargo publish. 2020-12-05 14:10:29 -08:00
Igor Matuszewski aab416f6e6 Use u32/64::to/from_le_bytes instead of bit fiddling 2020-11-09 23:32:39 +01:00
Aaron Hill 939b5ff766
Bump anyhow dependency to 1.0.34 in crates-io crate
This will keep `crates-io` compiling if https://github.com/rust-lang/rust/issues/33953
is fixed. See https://github.com/dtolnay/anyhow/pull/120
2020-11-02 18:45:18 -05:00
est31 65591e8144 Remove unused serde_derive dependency 2020-06-26 17:29:09 +02:00
Eric Huss 65274ea7d5 Add a warning when using registry.token with source replacement. 2020-04-19 09:25:32 -07:00
Eric Huss 944f5049f1 Re-implement proc-macro feature decoupling. 2020-03-22 15:08:02 -07:00
Eric Huss 5a1862cd36 Add proc-macro to the index. 2020-03-15 10:10:25 -07:00
Alex Tokarev 45ad3f9986 Remove unused imports 2020-02-20 23:58:10 +03:00
bors c95f396b4c Auto merge of #7778 - ehuss:bump-crates-io, r=alexcrichton
Bump crates-io

Needed for #7776.
2020-01-08 18:26:02 +00:00
Eric Huss b688f7da56 Bump crates-io 2020-01-08 10:05:35 -08:00
Alex Crichton d0430dd2b1 Run rustfmt 2020-01-07 20:01:34 -08:00
Alex Crichton 3a18c89a55 Migrate from the failure crate to anyhow
The `anyhow` crate interoperates with the `std::error::Error` trait
rather than a custom `Fail` trait, and this is the general trend of
error handling in Rust as well.

Note that this is mostly mechanical (sed) and intended to get the test
suite passing. As usual there's still more idiomatic cleanup that can
happen, but that's left to later commits.
2020-01-07 16:50:09 -08:00
Eric Huss 1df81ee07e Bump to 0.42.0, Update changelog 2019-11-07 11:19:48 -08:00
Eric Huss 8ad031b54f Bump to 0.41.0, Update changelog 2019-09-27 09:02:13 -07:00
Alex Crichton 0f751deffb Remove dependency on winapi 0.2
This commit removes Cargo's dependency on `winapi` 0.2 which takes an
excessively long time to build, slowing down Windows builds. The
`winapi` 0.2 crate was pulled in via a dependency chain that looked
like:

    cargo
    \- crates-io
       \- http
          \- bytes
             \- iovec
                \- winapi 0.2

The fix implemented here was to remove the `http` crate dependency from
`crates-io` which is only used for rendering status codes, but it's easy
enough to inline that function locally.
2019-09-19 11:53:24 -07:00
Eric Huss 5c7875d2e0 Bump to 0.40.0, Update changelog 2019-08-19 14:27:15 -07:00
Alex Crichton 3c67dc8430 Update the url crate to 2.0
Looks like minor API changes, primarily around percent encoding.
2019-07-24 08:26:28 -07:00
Eric Huss 2208c1f62f Bump to 0.39.0 2019-07-05 10:42:46 -07:00
Matthias Krüger 51a56a452d format crates-io and cargo-test-macro subcrates 2019-06-23 00:29:52 +02:00
Alex Crichton e449cb23e3 Move the crates-io crate to a crates directory
That way when we add more crates we've got a place to put them!
2019-06-18 10:47:44 -07:00