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!: update to latest schema version #829

Merged
merged 1 commit into from
Sep 16, 2024
Merged

chore!: update to latest schema version #829

merged 1 commit into from
Sep 16, 2024

Conversation

EvanHahn
Copy link
Contributor

This updates @mapeo/schema to 3.0.0-next.27. I expect this to be the final version before @comapeo/[email protected].

This update required several changes:

  • Updating dev dependencies of @mapeo/schema: @mapeo/mock-data and @mapeo/default-config.

  • Removing unused isInitialProject from project settings.

  • Allowing translation regionCodes to be undefined (but not null).

  • Requiring deviceType on device info.

This updates `@mapeo/schema` to 3.0.0-next.27. I expect this to be the
final version before `@comapeo/[email protected]`.

This update required several changes:

- Updating dev dependencies of `@mapeo/schema`: `@mapeo/mock-data` and
  `@mapeo/default-config`.

- Removing unused `isInitialProject` from project settings.

- Allowing translation `regionCode`s to be undefined (but not `null`).

- Requiring `deviceType` on device info.
@EvanHahn EvanHahn added the mvp Requirement for MVP label Sep 16, 2024
@EvanHahn EvanHahn requested a review from gmaclennan September 16, 2024 19:18
if (!languageCode) {
warnings.push(new Error(`invalid translation language ${lang}`))
return
}
let { region: regionCode } = parsed
regionCode ||= undefined
Copy link
Member

Choose a reason for hiding this comment

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

nit: I assume this is to catch regionCode being null. This syntax is new/obscure enough that I think this warrants a comment, or changing to code to something more explicit like if (regionCode === null) regionCode = undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's to catch regionCode being falsy. '', null, and undefined should all be coerced to null.

This is because regionCode has to be between 2 and 3 characters when defined; the empty string is not valid.

Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

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

Couple of small comments but mostly due to lacking some context

drizzle/client/meta/_journal.json Show resolved Hide resolved
src/config-import.js Show resolved Hide resolved
src/mapeo-manager.js Show resolved Hide resolved
@EvanHahn EvanHahn merged commit 0ae25fb into main Sep 16, 2024
7 checks passed
@EvanHahn EvanHahn deleted the update-deps branch September 16, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mvp Requirement for MVP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants