digitalbazaar / digitalbazaar/bedrock-tokenization
Determine if `updated` can ever be false when a registration record is found (but not changed)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 2
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Description
See: https://github.com/digitalbazaar/bedrock-tokenization/blob/v21.1.0/lib/documents.js#L320
From testing, it appears that updated will always be set to true whether or not the record in the database changed based on lastErrorObject.n being set to 1 (this is how updated is implemented internally). If updated is always true, we can simplify at least the comment exposition that follows after the above link in the function (and remove the FIXME) -- it may not change the code.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/documents.js#L320 and inspect how lastErrorObject.n determines updated when a registration record is found but unchanged. Verify whether the observed behavior is always true, then simplify the surrounding comment exposition and remove the FIXME if confirmed. Done means the behavior is established and the related explanation accurately reflects it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100