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

Enhancement/Parser Rewrite for plugins #80

Merged
merged 20 commits into from
Sep 23, 2022
Merged

Conversation

mercillo
Copy link
Contributor

@mercillo mercillo commented Sep 8, 2022

Changed the parsers to be built around the plugins. The plugins should determine what the nodetypes are for template, applicability and switches. Based on that nodetype, they should parse their own respective nodes.

Version

Published prerelease version: 0.3.0-next.0

Changelog

🚀 Enhancement

🐛 Bug Fix

📝 Documentation

Authors: 7

@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Base: 77.32% // Head: 77.01% // Decreases project coverage by -0.30% ⚠️

Coverage data is based on head (04c8486) compared to base (ea59026).
Patch coverage: 71.12% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
- Coverage   77.32%   77.01%   -0.31%     
==========================================
  Files         130      129       -1     
  Lines        4427     4499      +72     
  Branches     1093     1114      +21     
==========================================
+ Hits         3423     3465      +42     
- Misses        727      754      +27     
- Partials      277      280       +3     
Impacted Files Coverage Δ
core/player/src/plugins/flow-exp-plugin.ts 93.33% <ø> (-1.41%) ⬇️
core/player/src/validation/controller.ts 84.49% <ø> (ø)
core/view/src/view.ts 65.90% <ø> (ø)
tools/cli/src/commands/dsl/compile.ts 0.00% <0.00%> (ø)
tools/cli/src/utils/babel-register.ts 0.00% <ø> (ø)
language/dsl/src/compiler/compiler.ts 51.66% <28.57%> (-21.87%) ⬇️
core/player/src/player.ts 78.29% <50.00%> (-1.39%) ⬇️
core/view/src/plugins/applicability.ts 85.71% <75.00%> (-14.29%) ⬇️
core/view/src/plugins/template-plugin.ts 80.00% <81.81%> (ø)
core/view/src/parser/index.ts 79.01% <86.66%> (+1.63%) ⬆️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@KetanReddy
Copy link
Member

In general I think this should be fine, it does look like there are some cases not covered by tests. Can we get a few more tests just to cover those?

@mercillo
Copy link
Contributor Author

In general I think this should be fine, it does look like there are some cases not covered by tests. Can we get a few more tests just to cover those?

added some more unit tests!

@hborawski
Copy link
Contributor

applitools diff looks to be a view presentation timing diff, i added a delay in iOS before calling applitools, i can do it for android as well

core/view/src/__tests__/view.test.ts Outdated Show resolved Hide resolved
core/view/src/parser/__tests__/parser.test.ts Outdated Show resolved Hide resolved
core/view/src/parser/index.ts Outdated Show resolved Hide resolved
core/view/src/parser/index.ts Show resolved Hide resolved
Comment on lines +101 to +102
currentValue: any,
objToParse: unknown,
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between currentValue and objToParse?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are cases when the current value is just a value with nothing to parse, so it doesnt contain a children element on the return

core/view/src/parser/index.ts Outdated Show resolved Hide resolved
core/view/src/parser/index.ts Outdated Show resolved Hide resolved
@mercillo
Copy link
Contributor Author

looks like the codecov patch is hitting the compiler.ts file again which can be ignored haha

@mercillo mercillo requested a review from adierkens September 23, 2022 19:39
@adierkens adierkens added the minor Increment the minor version when merged label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants