Skip to content

chore(deps): bump viem from 1.2.9 to 1.5.0#126

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/viem-1.5.0
Closed

chore(deps): bump viem from 1.2.9 to 1.5.0#126
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/viem-1.5.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 1, 2023

Bumps viem from 1.2.9 to 1.5.0.

Release notes

Sourced from viem's releases.

viem@1.5.0

Minor Changes

  • #847 1e5d4545 Thanks @​jxom! - Narrowed getBlock, watchBlocks, getFilterChanges, getFilterLogs & getLogs return types for when blockTag or includeTransactions is provided.

    • When blockTag !== 'pending', the return type will now include some non-nullish properties if it were dependent on pending blocks. Example: For getBlock, the block.number type is now non-nullish since blockTag !== 'pending'.
    • On the other hand, when blockTag: 'pending', some properties will be nullish. Example: For getBlock, the block.number type is now null since blockTag === 'pending'.
    • When includeTransactions is provided, the return type of will narrow the transactions property type. Example: block.transactions will be Transaction[] when includeTransactions: true instead of Hash[] | Transaction[].

    TLDR;

    // Before
    const block = publicClient.getBlock({ includeTransactions: true });
    block.transactions;
    //    ^? Hash[] | Transaction[]
    block.transactions[0].blockNumber;
    //                    ^? bigint | null
    // After
    const block = publicClient.getBlock({ includeTransactions: true });
    block.transactions;
    //    ^? Transaction[]
    block.transactions[0].blockNumber;
    //                    ^? bigint
    // Before
    const block = publicClient.getBlock({
    blockTag: "pending",
    includeTransactions: true
    });
    block.number;
    //    ^? number | null
    block.transactions[0].blockNumber;
    //                    ^? bigint | null
    // After
    const block = publicClient.getBlock({
    blockTag: "pending",
    includeTransactions: true
    });
    block.number;
    //    ^? null
    block.transactions[0].blockNumber;
    //                    ^? null

  • #847 1e5d4545 Thanks @​jxom! - Type Change: TPending has been added to slot 2 of the Log generics.

... (truncated)

Changelog

Sourced from viem's changelog.

1.5.0

Minor Changes

  • #847 1e5d4545 Thanks @​jxom! - Narrowed getBlock, watchBlocks, getFilterChanges, getFilterLogs & getLogs return types for when blockTag or includeTransactions is provided.

    • When blockTag !== 'pending', the return type will now include some non-nullish properties if it were dependent on pending blocks. Example: For getBlock, the block.number type is now non-nullish since blockTag !== 'pending'.
    • On the other hand, when blockTag: 'pending', some properties will be nullish. Example: For getBlock, the block.number type is now null since blockTag === 'pending'.
    • When includeTransactions is provided, the return type of will narrow the transactions property type. Example: block.transactions will be Transaction[] when includeTransactions: true instead of Hash[] | Transaction[].

    TLDR;

    // Before
    const block = publicClient.getBlock({ includeTransactions: true });
    block.transactions;
    //    ^? Hash[] | Transaction[]
    block.transactions[0].blockNumber;
    //                    ^? bigint | null
    // After
    const block = publicClient.getBlock({ includeTransactions: true });
    block.transactions;
    //    ^? Transaction[]
    block.transactions[0].blockNumber;
    //                    ^? bigint
    // Before
    const block = publicClient.getBlock({
    blockTag: "pending",
    includeTransactions: true
    });
    block.number;
    //    ^? number | null
    block.transactions[0].blockNumber;
    //                    ^? bigint | null
    // After
    const block = publicClient.getBlock({
    blockTag: "pending",
    includeTransactions: true
    });
    block.number;
    //    ^? null
    block.transactions[0].blockNumber;
    //                    ^? null

  • #847 1e5d4545 Thanks @​jxom! - Type Change: TPending has been added to slot 2 of the Log generics.

... (truncated)

Commits

Dependabot compatibility score

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 commands and options

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 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)

Bumps [viem](https://github.com/wagmi-dev/viem) from 1.2.9 to 1.5.0.
- [Release notes](https://github.com/wagmi-dev/viem/releases)
- [Changelog](https://github.com/wagmi-dev/viem/blob/main/CHANGELOG.md)
- [Commits](https://github.com/wagmi-dev/viem/compare/viem@1.2.9...viem@1.5.0)

---
updated-dependencies:
- dependency-name: viem
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from a team as a code owner August 1, 2023 07:10
@dependabot dependabot bot requested review from hozzjss, okhaimie-dev and tnrdd August 1, 2023 07:10
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Aug 1, 2023
@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for beautiful-sepolia-0d3117 ready!

Name Link
🔨 Latest commit b678340
🔍 Latest deploy log https://app.netlify.com/sites/beautiful-sepolia-0d3117/deploys/64c8afd6c1b96f0008c34e10
😎 Deploy Preview https://deploy-preview-126--beautiful-sepolia-0d3117.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for glistening-mainnet-d54e71 ready!

Name Link
🔨 Latest commit b678340
🔍 Latest deploy log https://app.netlify.com/sites/glistening-mainnet-d54e71/deploys/64c8afd6699fed0008425518
😎 Deploy Preview https://deploy-preview-126--glistening-mainnet-d54e71.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for incredible-optimism-fc8746 ready!

Name Link
🔨 Latest commit b678340
🔍 Latest deploy log https://app.netlify.com/sites/incredible-optimism-fc8746/deploys/64c8afd6f5c35d0008f67d3a
😎 Deploy Preview https://deploy-preview-126--incredible-optimism-fc8746.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 3, 2023

Superseded by #127.

@dependabot dependabot bot closed this Aug 3, 2023
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/viem-1.5.0 branch August 3, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants