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

fix: patch karma to allow loading virtual packages #3531

Conversation

snasirca
Copy link
Contributor

@snasirca snasirca commented Jun 7, 2020

Fixes #3530

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@snasirca
Copy link
Contributor Author

snasirca commented Jun 7, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@karmarunnerbot
Copy link
Member

Build karma 309 completed (commit f59ad662fb by @snasirca)

@AppVeyorBot
Copy link

Build karma 2707 completed (commit f59ad662fb by @snasirca)

@karmarunnerbot
Copy link
Member

Build karma 308 completed (commit f59ad662fb by @snasirca)

@snasirca snasirca force-pushed the fix-loading-source-files-from-virtual-packages branch from 21b8233 to 76a410b Compare June 7, 2020 20:32
@snasirca snasirca changed the title Patch karma to allow loading virtual packages fix: patch karma to allow loading virtual packages Jun 7, 2020
@AppVeyorBot
Copy link

Build karma 2708 completed (commit 693d0326da by @snasirca)

@karmarunnerbot
Copy link
Member

Build karma 310 completed (commit 693d0326da by @snasirca)

@karmarunnerbot
Copy link
Member

Build karma 309 completed (commit 693d0326da by @snasirca)

@snasirca snasirca marked this pull request as draft June 8, 2020 15:52
@snasirca
Copy link
Contributor Author

snasirca commented Jun 8, 2020

What would be the best way to add regression coverage to this change?

@devoto13
Copy link
Collaborator

Thanks for fixing this!

A unit test with the problematic path similar to this should be enough.

@acls
Copy link

acls commented Jun 23, 2020

I just ran into this issue yesterday and would like to get this merged as soon a possible. I can write the unit test if needed.

@snasirca snasirca force-pushed the fix-loading-source-files-from-virtual-packages branch from 76a410b to dc4fc1f Compare June 23, 2020 19:49
@snasirca
Copy link
Contributor Author

@acls @devoto13 I've added test coverage. Can you check if this is sufficient?

@snasirca snasirca force-pushed the fix-loading-source-files-from-virtual-packages branch from dc4fc1f to 90cce10 Compare June 23, 2020 19:51
@snasirca snasirca marked this pull request as ready for review June 23, 2020 19:51
@karmarunnerbot
Copy link
Member

Build karma 313 completed (commit fa250594dc by @snasirca)

@AppVeyorBot
Copy link

Build karma 2712 completed (commit fa250594dc by @snasirca)

@karmarunnerbot
Copy link
Member

Build karma 314 completed (commit fa250594dc by @snasirca)

@AppVeyorBot
Copy link

Build karma 2713 completed (commit d95e16971b by @snasirca)

@karmarunnerbot
Copy link
Member

Build karma 315 completed (commit d95e16971b by @snasirca)

@karmarunnerbot
Copy link
Member

Build karma 314 completed (commit d95e16971b by @snasirca)

@snasirca
Copy link
Contributor Author

@devoto13 can you review this?

Copy link
Collaborator

@devoto13 devoto13 left a comment

Choose a reason for hiding this comment

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

One comment for consistency, otherwise LGTM.

@@ -220,10 +220,10 @@ function createKarmaMiddleware (
}) : []

return data
.replace('%SCRIPTS%', scriptTags.join('\n'))
.replace('%SCRIPTS%', () => scriptTags.join('\n'))
.replace('%CLIENT_CONFIG%', 'window.__karma__.config = ' + JSON.stringify(client) + ';\n')
.replace('%SCRIPT_URL_ARRAY%', 'window.__karma__.scriptUrls = ' + JSON.stringify(scriptUrls) + ';\n')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this should be changed to function as well to cover this branch. Please change it and add a corresponding test.

@crownofapollo
Copy link

@snasirca wondering about the status of this. I'm running into the same issue and found this potential fix.

@snasirca
Copy link
Contributor Author

snasirca commented Sep 4, 2020

@snasirca wondering about the status of this. I'm running into the same issue and found this potential fix.

Sorry about the delay. This hasn't dropped off of radar. I'm on vacation and back by September 20. That'll be the earliest I can address the code review feedback.

@elpddev
Copy link

elpddev commented Sep 13, 2020

@snasirca Thank you for the hard work. I can confirm this is working for our project.

@johnjbarton
Copy link
Contributor

This fix was subsequently merged in #3663

@johnjbarton johnjbarton closed this Mar 8, 2021
@snasirca snasirca deleted the fix-loading-source-files-from-virtual-packages branch March 11, 2021 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect generated file paths when using Yarn 2 for virtual packages
9 participants