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

feat!: update @mapeo/schema to latest version #715

Merged
merged 25 commits into from
Aug 27, 2024
Merged

Conversation

EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented Jul 10, 2024

This patch:

  • Removes createdBy from documents. Removes MapeoProject.prototype.$createdByToDeviceId as a side-effect.

  • Returns originalVersionId on all documents.

  • Updates @mapeo/schema to the latest version, which requires a bunch of other changes.

Closes #371. Depends on https://github.com/digidem/mapeo-schema/pull/191 and digidem/mapeo-mock-data#7.

Co-Authored-By: Tomás Ciccola [email protected]

This patch:

- Removes `createdBy` from documents. Removes
  `MapeoProject.prototype.$createdByToDeviceId` as a side-effect.

- Returns `originalVersionId` on all documents.

Closes <#371>. Depends
on <https://github.com/digidem/mapeo-schema/pull/191> and
<digidem/mapeo-mock-data#7>.
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good, but see question about the createBy API, and comments on the schema PR

src/mapeo-project.js Outdated Show resolved Hide resolved
@EvanHahn EvanHahn requested a review from gmaclennan August 26, 2024 20:36
@EvanHahn
Copy link
Contributor Author

I think this is finally ready for another review.

A lot of (unrelated) stuff was required to update @mapeo/schema to the latest version.

EvanHahn added a commit that referenced this pull request Aug 26, 2024
Our tests have several spots where we create mock data, such as
observations or presets. We typically rely on `@mapeo/mock-data` for
this, but could use it in a few more places. That's what this commit
does!

I think this is useful for three reasons:

1. It's less code.
2. It doesn't need to be manually updated when we make schema updates.
3. It will make [an upcoming change][0] smaller.

[0]: #715
@EvanHahn EvanHahn changed the title feat!: replace createdBy with originalVersionId feat!: update @mapeo/schema to latest version Aug 26, 2024
EvanHahn added a commit that referenced this pull request Aug 26, 2024
Our tests have several spots where we create mock data, such as
observations or presets. We typically rely on `@mapeo/mock-data` for
this, but could use it in a few more places. That's what this commit
does!

I think this is useful for three reasons:

1. It's less code.
2. It doesn't need to be manually updated when we make schema updates.
3. It will make [an upcoming change][0] smaller.

[0]: #715
@EvanHahn
Copy link
Contributor Author

I'm going to merge this because:

  • Gregor has reviewed most of this,
  • Tomás and I paired on the rest,
  • and it's blocking some other work.

@EvanHahn EvanHahn merged commit 0564480 into main Aug 27, 2024
7 checks passed
@EvanHahn EvanHahn deleted the originalVersionId branch August 27, 2024 18:42
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.

Change createdBy to originalVersionId
2 participants