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

records can be updated without being stored #957

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented Oct 21, 2024

This PR resolves the issue where a user is forced to store() a record prior to updating it. Now a user can pass store: false to the update options to signal they do not wish to store the updated record.

The default behavior remains the same, effectively store is defaulted to true. If the initial record was not already stored, it will throw with an error as it does today forcing the user to explicitly store() the record prior to updating it unless they do not want to store the udpate.

Resolves #955

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: 1b5b50b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web5/api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Oct 21, 2024

TBDocs Report

✅ No errors or warnings

@web5/api

  • Project entry file: packages/api/src/index.ts

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts

TBDocs Report Updated at 2024-10-21T20:48:14Z 1b5b50b

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.35%. Comparing base (5120f6f) to head (1b5b50b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #957   +/-   ##
=======================================
  Coverage   93.35%   93.35%           
=======================================
  Files         118      118           
  Lines       33734    33738    +4     
  Branches     2740     2740           
=======================================
+ Hits        31493    31497    +4     
  Misses       2200     2200           
  Partials       41       41           
Components Coverage Δ
agent 87.81% <ø> (ø)
api 99.61% <100.00%> (+<0.01%) ⬆️
common 95.02% <ø> (ø)
credentials 94.95% <ø> (ø)
crypto 93.79% <ø> (ø)
dids 97.77% <ø> (ø)
identity-agent 96.42% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.42% <ø> (ø)
user-agent 96.57% <ø> (ø)

@LiranCohen LiranCohen marked this pull request as ready for review October 21, 2024 20:48
@LiranCohen LiranCohen merged commit 1334fae into main Oct 21, 2024
35 checks passed
@LiranCohen LiranCohen deleted the lirancohen/update-remote-without-storing branch October 21, 2024 23:31
This was referenced Oct 22, 2024
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.

record.update() should take in option store: false similar to records.create()
2 participants