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

chore: bump swr from 1.1.2 to 1.2.0 #103

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 31, 2022

Bumps swr from 1.1.2 to 1.2.0.

Release notes

Sourced from swr's releases.

1.2.0

Highlights of This Release

Optimistic Updates with Auto Error Rollback

There are now some new options in mutate:

mutate(patchUser(user), {
  optimisticData: user,
  populateCache: true,
  rollbackOnError: true,
  revalidate: true,
})

Here the cache will be immediately updated to user, the “optimistic value”. And then a request (remote mutation) is started via patchUser(user) and the response will be written to the cache. If that request fails, the original result will be rolled back safely so the optimistic value will be gone. And after all those finish, a revalidation will start to fetch the latest value.

This is extremely helpful for building the optimistic UI pattern.

You can do the same for the global mutate, just remember to pass the key. Also, the current mutate APIs stay unchanged so mutate(data, false) works the same.

Here's an example: https://codesandbox.io/s/swr-basic-forked-k5hps.

CleanShot.2022-01-27.at.15.39.58.mp4

.mjs Support

SWR now has .mjs exported for bundlers that prefer this format.

This doesn’t break environments that don’t support .mjs. An alternative .esm.js and CJS bundle are also published.

You can read more about ES modules here.

What's Changed

... (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 [swr](https://github.com/vercel/swr) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](vercel/swr@1.1.2...1.2.0)

---
updated-dependencies:
- dependency-name: swr
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@kylecarbs kylecarbs enabled auto-merge (squash) January 31, 2022 04:24
@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #103 (3e457dd) into main (d65ce2d) will increase coverage by 3.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
+ Coverage   67.82%   70.86%   +3.03%     
==========================================
  Files          33       38       +5     
  Lines        2897     3120     +223     
==========================================
+ Hits         1965     2211     +246     
+ Misses        756      700      -56     
- Partials      176      209      +33     
Flag Coverage Δ
unittest-go-macos-latest 67.79% <ø> (-0.04%) ⬇️
unittest-go-ubuntu-latest 69.83% <ø> (?)
Impacted Files Coverage Δ
peer/conn.go 76.82% <0.00%> (-0.79%) ⬇️
provisioner/terraform/parse.go 75.00% <0.00%> (ø)
provisioner/terraform/serve.go 66.66% <0.00%> (ø)
provisioner/terraform/provision.go 57.62% <0.00%> (ø)
database/postgres/postgres.go 70.00% <0.00%> (ø)
coderd/userpassword/userpassword.go 63.41% <0.00%> (ø)
peer/channel.go 84.75% <0.00%> (+2.43%) ⬆️
coderd/coderdtest/coderdtest.go 100.00% <0.00%> (+22.64%) ⬆️
database/migrate.go 52.38% <0.00%> (+52.38%) ⬆️
database/pubsub.go 77.08% <0.00%> (+77.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d65ce2d...3e457dd. Read the comment docs.

@kylecarbs kylecarbs merged commit 0f30d85 into main Jan 31, 2022
@kylecarbs kylecarbs deleted the dependabot/npm_and_yarn/swr-1.2.0 branch January 31, 2022 04:28
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.

None yet

1 participant