-
Notifications
You must be signed in to change notification settings - Fork 522
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: outputReferenceFallbacks for css/variables formatter #1113
fix: outputReferenceFallbacks for css/variables formatter #1113
Conversation
on a side note: I created the PR #1112 for the current version on the main branch as well. When I changed and worked with the repository on the main branch I found that running and debugging the tests was much more developer friendly than it is in the v4 branch. Finding a failing test in v4 is really cumbersome compared to the v3 on the main branch. |
Can you elaborate which part of the testing DX you struggled with? For some context, just to explain what has changed and why since v3 branch with regards to testing: The reason I switched away from Jest is because it also has poor (relies on Node's --experimental-vm-modules flag) ESM support and more importantly, doesn't support running tests in real browsers. Mocha is unfortunately not too great at the moment with regards to ESM support, it's quite tricky to get it to run properly in watch-mode with ESM mochajs/mocha#4374 , and unfortunately I couldn't get "--parallel" working properly. Another option I'm interested in is perhaps using Vitest, perhaps that one supports ESM / parallel / watch mode properly while also allowing to use Chai/Mocha syntax. Anyway, your PR looks good, thanks :)! It seems this referencesFallback option was never implemented properly because I recall fixing something related to it a few months back in the type interfaces when I added first-class Typescript support. |
Ah and one more thing, can you run Edit: never mind I added one, I want to do a release in a couple of minutes so I figured I want to include this fix in it as well ;) |
- outputReferenceFallbacks options are passed through to the createPropertyFormatter function, which was previously not the case - add test for fallback - update snapshot Signed-off-by: Tobias Kuppens Groot <tkuppensgroo@uos.de>
5263264
to
336c706
Compare
Sure, I'm happy to elaborate on this a bit more. |
Which test script where you running, the browser tests or the node tests? e.g. When debugging my preferred way is to run: D and M are also super useful if you want to debug it in a browser e.g. when you're using debugger statements For logging, I'm actually discussing some changes for it here #1039 in case you'd like to chip in with your feedback |
Issue #, if available:
If options were provided with outputReferences and outputReferenceFallbacks set to true did not add the fallbacks when running with the css/variables formatter.
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.