-
Notifications
You must be signed in to change notification settings - Fork 48
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
View Parser Plugin Decomposition #413
Conversation
08cb60a
to
b5b47ae
Compare
67ed64a
to
b806e58
Compare
29767b0
to
0aad1eb
Compare
0aad1eb
to
19bb017
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #413 +/- ##
==========================================
+ Coverage 91.84% 91.93% +0.08%
==========================================
Files 338 340 +2
Lines 26831 26826 -5
Branches 1941 1942 +1
==========================================
+ Hits 24644 24663 +19
+ Misses 2173 2149 -24
Partials 14 14 ☔ View full report in Codecov by Sentry. |
8940520
to
3183681
Compare
dd3b0fc
to
60535ed
Compare
4c37617
to
96863cd
Compare
@@ -34,6 +39,7 @@ test("uses the exact same object if nothing changes", () => { | |||
); | |||
|
|||
new StringResolverPlugin().apply(view); | |||
new AssetPlugin().apply(view); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of these tests have these new plugins added in, it's because these (Multinode + Asset) used to come for free with the parser, right?
Is there appetite in consolidating them to some test util to some default plugin setup like DefaultViewPlugin
to avoid having to remember which ones you need to apply in every test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to create a separate test util plugin? Could we not use the DefaultViewPlugin
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya that's possibly fine, it's probably registering more plugins than you need for a lot of tests that are very targeted.
Maybe @KetanReddy can chime in here
@@ -245,21 +248,26 @@ describe("applicability", () => { | |||
}); | |||
}); | |||
|
|||
it("determines if nodeType is applicability", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know we removed the determineNodeType
hook, but should we still do some similar type checking by indirectly testing private isApplicability(obj: any)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would we test a private function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'd call the hook that calls the private function, then verify the side effects of the private function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed in slack, these tests might not be relevant anymore since the result being returned -> isApplicability returned true, as long as we have a test for negative case as well, this is fine
e8b8f0d
to
0508ecf
Compare
0508ecf
to
6b54598
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 This is a huge refactor, glad to see it fitting properly into the plugin architecture!
This PR refactors the view parser so that parseLocalObject does not contain code to parse specific nodes, but rather delegates that functionality to plugins.
resolves #373
resolves #412
Change Type (required)
Indicate the type of change your pull request is:
patch
minor
major
Does your PR have any documentation updates?
Version
Published prerelease version:
0.8.0-next.5
Changelog
Release Notes
Update to use TypeScript 5.5 and enable
isolatedDeclarations
(#431)Update to use TypeScript 5.5 and enable
isolatedDeclarations
bump js rules, use node 20 (#430)
Use Node 20 for builds
JS Package Cleanup (#442)
Fix migration issues in JS packages
Does your PR have any documentation updates?
Bazel 6 Migration (#252)
Swaps the repo internals to use
bazel@6
,rules_js
, bazel modules,vitest
andtsup
for the core + plugin builds🚀 Enhancement
🐛 Bug Fix
🏠 Internal
📝 Documentation
🔩 Dependency Updates
isolatedDeclarations
#431 (@KetanReddy)Authors: 11