-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: #8622 #8637
fix: #8622 #8637
Conversation
Thanks @dimitrisrk 👍 - we'll wanna check against Angular and Vue projects to make sure doesn't cause any side effects. |
@NathanWalker Considering Angular filename formats, I suspect there might really be issues since my patch extracts qualifiers by splitting path, using dot "." as separator. At the same time, I'm working on finding a more accurate solution. EDITED: By the way, according to NS docs, angular does not support all qualifiers: Anyway, let me see if I manage to improve this code more. Thanks. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
@NathanWalker After few tests of mine with angular and vue app samples, it seems that this module resolver isn't being used for these frameworks's components, but only for NS Core modules. Either way, I worked on qualifier-matcher and used regular expressions in certain cases. Example:Before this update: After this update: This update also fixes #8622 . Please feel free to make tests in depth. |
Thanks @dimitrisrk, really appreciate the effort here. Possible to add just a sample component to the |
@NathanWalker Done. Hope this sample is helpful. |
In the case of screen-size qualifiers, regular expressions are used to ensure proper values. This commit also includes fix for #8622
Thanks for another excellent contribution @dimitrisrk - this will go out with another round of updates at end of week 👍 |
Sounds great. By the way, it seems I missed a semicolon at the end of https://github.com/NativeScript/NativeScript/blob/master/nativescript-core/module-name-resolver/qualifier-matcher/qualifier-matcher.d.ts. Since it's at the end of the file it's causing no issues, I just wanted to point out that small omission. |
@dimitrisrk one thing I noticed is that the unit tests fail with these changes. Although it's merged we may hold on releasing it until the unit tests pass. To run them do the following from root of repo:
The results of the tests will output in the simluator and in console and note that most all the failures are from the qualifier matchers. Not sure if tests need to be updated or if this indicates these changes may have introduced regression. Can you give it a shot and if you see same issue you might check and can submit another PR to clear 👍 |
@NathanWalker I apologize for the inconvenience. It seems there were things I missed. I submitted PR #8658 . |
closes #8622 Co-authored-by: Dimitris - Rafail Katsampas <katsampasdr@gmail.com>
closes #8622 Co-authored-by: Dimitris - Rafail Katsampas <katsampasdr@gmail.com>
…ript#8637) closes NativeScript#8622 Co-authored-by: Dimitris - Rafail Katsampas <katsampasdr@gmail.com>
Co-authored-by: Dimitris - Rafail Katsampas <katsampasdr@gmail.com>
PR Checklist
What is the current behavior?
Live-sync fails to load script and style files . (e.g. js, css) for [.]*.xml files.
What is the new behavior?
Reload will work.
Closes #8622 .
This way of making module-resolve reload these files is quite dirty, so I hope there'll be a better alternative of extracting qualifiers from file paths.