Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rust): Address clippy warnings #14

Merged
merged 7 commits into from
Sep 18, 2024
Merged

fix(rust): Address clippy warnings #14

merged 7 commits into from
Sep 18, 2024

Conversation

bitdivine
Copy link
Member

Motivation

The code is failing the rust linter in CI.

Changes

  • Address clippy lints.

Tests

See CI

bitdivine and others added 7 commits September 17, 2024 16:05
# Motivation
The api lib.rs is going to become one large unmanageable mess very
quickly if all the code is in one file.


# Changes
- Move api definitions into smaller files.

# Tests
See CI
# Motivation
Dependabot does not use conventional commit titles

# Changes
- Specify the prefix to use to create conventional commits.

# Tests
Bumps
[@dfinity/auth-client](https://github.com/dfinity/agent-js/tree/HEAD/packages/auth-client)
from 2.0.0 to 2.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dfinity/agent-js/releases"><code>@​dfinity/auth-client</code>'s
releases</a>.</em></p>
<blockquote>
<h2>Release 2.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(asset): add headers to StoreArgs by <a
href="https://github.com/chenyan-dfinity"><code>@​chenyan-dfinity</code></a>
in <a
href="https://redirect.github.com/dfinity/agent-js/pull/928">dfinity/agent-js#928</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dfinity/agent-js/compare/v2.1.0...v2.1.1">https://github.com/dfinity/agent-js/compare/v2.1.0...v2.1.1</a></p>
<h2>Release 2.1.0</h2>
<h2>Noteworthy Features</h2>
<p>This feature includes the v3 synchronous call API! Calls to mainnet
are able to bypass polling using the new endpoint</p>
<p>The HttpAgent allows you to set and read <code>replicaTime</code>,
which it will maintain information about in order to handle
disagreements between the client and replica about time.</p>
<p>Fixes and improvements for the <code>useAuthClient</code> library</p>
<h2>Other changes and enhancements</h2>
<ul>
<li>chore: updating dependencies for elliptic advisory by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/912">dfinity/agent-js#912</a></li>
<li>feat: management canister interface schnorr update by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/913">dfinity/agent-js#913</a></li>
<li>feat: use-auth-client react hook by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/911">dfinity/agent-js#911</a></li>
<li>docs: documentation and metadata for use-auth-client by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/914">dfinity/agent-js#914</a></li>
<li>feat: ensure that seed phrase must produce a 64 byte seed by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/915">dfinity/agent-js#915</a></li>
<li>feat: new option for setting rootKey during agent creation by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/918">dfinity/agent-js#918</a></li>
<li>chore: npm audit by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/919">dfinity/agent-js#919</a></li>
<li>fix: passing request correctly during pollForResponse Processing
status by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/909">dfinity/agent-js#909</a></li>
<li>feat: v3 api sync call by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/906">dfinity/agent-js#906</a></li>
<li>docs: clarifies meaning of <code>effectiveCanisterId</code> in
<code>CallOptions</code> by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/920">dfinity/agent-js#920</a></li>
<li>feat: exports polling utilities from <code>@dfinity/agent</code> by
<a href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in
<a
href="https://redirect.github.com/dfinity/agent-js/pull/921">dfinity/agent-js#921</a></li>
<li>feat: multi-actor config by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/916">dfinity/agent-js#916</a></li>
<li>feat: expose inner certificate in Certificate by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/925">dfinity/agent-js#925</a></li>
<li>fix: build paths on use-auth-client by <a
href="https://github.com/pocesar"><code>@​pocesar</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/922">dfinity/agent-js#922</a></li>
<li>feat: allow option set agent replica time by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/923">dfinity/agent-js#923</a></li>
<li>chore: awaits prettier formatting by <a
href="https://github.com/krpeacock"><code>@​krpeacock</code></a> in <a
href="https://redirect.github.com/dfinity/agent-js/pull/926">dfinity/agent-js#926</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/pocesar"><code>@​pocesar</code></a> made
their first contribution in <a
href="https://redirect.github.com/dfinity/agent-js/pull/922">dfinity/agent-js#922</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dfinity/agent-js/compare/v2.0.0...v2.1.0">https://github.com/dfinity/agent-js/compare/v2.0.0...v2.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/dfinity/agent-js/blob/main/docs/CHANGELOG.md"><code>@​dfinity/auth-client</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>[2.1.1] - 2024-09-13</h2>
<h3>Added</h3>
<ul>
<li>fix: support for headers during upload with
<code>@dfinity/assets</code></li>
</ul>
<h2>[2.1.0] - 2024-09-12</h2>
<h3>Added</h3>
<ul>
<li>chore: awaits prettier formatting in release automation</li>
<li>feat: expose inner certificate in <code>Certificate</code> for
inspection or use in raw calls. <code>Certificate.cert</code> is now a
public property</li>
<li>feat: allow creation of multiple Actors in
<code>useAuthClient</code> by passing a record to
<code>actorOptions</code> with the actor name as the key, and
<code>CreateActorOptions</code> as the value</li>
<li>feat: sync_call support in HttpAgent and Actor
<ul>
<li>Skips polling if the sync call succeeds and provides a
certificate</li>
<li>Falls back to v2 api if the v3 endpoint 404's</li>
<li>Adds certificate to SubmitResponse endpoint</li>
<li>adds callSync option to <code>HttpAgent.call</code>, which defaults
to <code>true</code></li>
</ul>
</li>
<li>feat: management canister interface updates for schnorr
signatures</li>
<li>feat: ensure that identity-secp256k1 seed phrase must produce a 64
byte seed</li>
<li>docs: documentation and metadata for use-auth-client</li>
<li>feat: adds optional <code>rootKey</code> to
<code>HttpAgentOptions</code> to allow for a custom root key to be used
for verifying signatures from other networks</li>
<li>chore: npm audit bumping micromatch</li>
<li>feat: exports polling utilities from <code>@dfinity/agent</code> for
use in other packages
<ul>
<li><code>pollForResponse</code> now uses the default strategy by
default</li>
<li>Updated the <code>bls-verify</code> jsdoc comment to accurately
reflect that the default strategy now uses
<code>@​noble/curves</code></li>
</ul>
</li>
<li>docs: clarifies meaning of <code>effectiveCanisterId</code> in
<code>CallOptions</code></li>
</ul>
<h3>Changed</h3>
<ul>
<li>feat: replaces hdkey and bip32 implementations with
<code>@scure/bip39</code> and <code>@scure/bip32</code> due to
vulnerability and lack of maintenance for <code>elliptic</code></li>
<li>chore: bumps dev dependency versions to remove warnings</li>
<li>chore: addresses eslint errors uncovered by bumping eslint
version</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/dfinity/agent-js/commit/21cf4700eff1de7f6f15304b758a16e5881afca3"><code>21cf470</code></a>
chore: release 2.1.1 (<a
href="https://github.com/dfinity/agent-js/tree/HEAD/packages/auth-client/issues/929">#929</a>)</li>
<li><a
href="https://github.com/dfinity/agent-js/commit/cad8bde06bb729b54810faade43a1e354c9d442a"><code>cad8bde</code></a>
chore: release 2.1.0 (<a
href="https://github.com/dfinity/agent-js/tree/HEAD/packages/auth-client/issues/927">#927</a>)</li>
<li><a
href="https://github.com/dfinity/agent-js/commit/3b4df1b9dca5a4d3799e6e463e34ccf7866ece64"><code>3b4df1b</code></a>
chore: updating dependencies for elliptic advisory (<a
href="https://github.com/dfinity/agent-js/tree/HEAD/packages/auth-client/issues/912">#912</a>)</li>
<li>See full diff in <a
href="https://github.com/dfinity/agent-js/commits/v2.1.1/packages/auth-client">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@dfinity/auth-client&package-manager=npm_and_yarn&previous-version=2.0.0&new-version=2.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@bitdivine bitdivine merged commit a46910f into main Sep 18, 2024
9 checks passed
@bitdivine bitdivine deleted the devops branch September 18, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant