IQSS / IQSS/dataverse-client-javascript
Inconsistency in `DatasetVersionInfo` model? (Date vs string)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 20
- Forks
- 11
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 1
Description
I noticed that in the DatasetVersionInfo model, the timestamps use inconsistent types:
releaseTime and createTime are represented as Date objects, while lastUpdateTime is represented as an ISO 8601 string and not transformed into a Date object:
The return values from the Dataverse API for retrieving a dataset version are all consistently ISO 8601 strings:
I was wondering what the reason for this is, or whether this inconsistency should be cleaned up? (If so, I'd be open to opening a PR for that)
Contributor guide
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 with the referenced DatasetVersionInfo definition in src/datasets/domain/models/Dataset.ts and the transformation in src/datasets/infra/repositories/transformers/datasetTransformers.ts. Compare how releaseTime, createTime, and lastUpdateTime are represented against the Dataverse API response. Done means the model and transformer use a deliberate, consistent timestamp representation for all three fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100