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(common): unified XML parser/writer #12482

Merged
merged 8 commits into from
Oct 3, 2024

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Sep 27, 2024

  • unified API for XML parse and format
  • unit tests that verify exact format (and in some cases round trip) of XML parse and format

For: #12208 (this is a step in that direction - does not remove xml2js yet.)

#12331 will be rebased upon this (or reopened on another branch)

@keymanapp-test-bot skip

@srl295 srl295 self-assigned this Sep 27, 2024
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Sep 27, 2024

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S11 milestone Sep 27, 2024
- help make the parsed form identical across platforms

Fixes: #12208
Subsystems changed:
- ldml keyboard reader (main and test)
- kpj
- kvks
- kmp compiler

test: made the test-xml-utils less verbose about the pathnames

Fixes: #12208
@srl295 srl295 changed the title Feat/common/12208-unified-xml-parse feat(common): unified XML parser/writer Sep 27, 2024
@srl295 srl295 marked this pull request as ready for review September 27, 2024 23:45
@srl295
Copy link
Member Author

srl295 commented Sep 27, 2024

Doesn't remove xml2js yet - will have to reopen the ticket. that's for a following PR

Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

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

LGTM, nits and perhaps a cleaner approach for the different xml file types.

developer/src/common/web/utils/src/xml-utils.ts Outdated Show resolved Hide resolved
developer/src/common/web/utils/src/xml-utils.ts Outdated Show resolved Hide resolved
developer/src/common/web/utils/src/xml-utils.ts Outdated Show resolved Hide resolved
developer/src/common/web/utils/src/xml-utils.ts Outdated Show resolved Hide resolved
developer/src/common/web/utils/src/xml-utils.ts Outdated Show resolved Hide resolved
developer/src/common/web/utils/src/xml-utils.ts Outdated Show resolved Hide resolved
@srl295
Copy link
Member Author

srl295 commented Sep 29, 2024

Doesn't remove xml2js yet - will have to reopen the ticket. that's for a following PR

Sorry for being unclear with the closed pr

- declarative syntax for options
- workaround an issue where xml2js is mutating our options objects
- improve tests

Fixes: #12208
@github-actions github-actions bot added common/ and removed common/ labels Sep 30, 2024
@srl295 srl295 merged commit e483318 into master Oct 3, 2024
6 checks passed
@srl295 srl295 deleted the feat/common/12208-unified-xml-parse branch October 3, 2024 15:52
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.121-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants