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

Consider dropping unpkg remote dependency #1646

Closed
rodber opened this issue Jan 14, 2022 · 7 comments · Fixed by #1830
Closed

Consider dropping unpkg remote dependency #1646

rodber opened this issue Jan 14, 2022 · 7 comments · Fixed by #1830

Comments

@rodber
Copy link

rodber commented Jan 14, 2022

Is your feature request related to a problem? Please describe.
I just started using Infection and I noted that the generated HTML log includes a call to a remote resource:

<script defer src="https://www.unpkg.com/mutation-testing-elements"></script>

Unfortunately, this URL is not available 100% of the time and I'm getting constant timeout issues that restrict me from seeing the HTML logs.

Describe the solution you'd like
I would like to be able to work with Infection without having to depend on a remotely hosted resource that could fail at any time.

Describe alternatives you've considered
I believe that the mutation-testing-elements js should be included in local, otherwise host it in a more reliable place (GitHub pages?)

Additional context
image

@rodber rodber changed the title Consider dropping unpkg dependency Consider dropping unpkg remote dependency Jan 14, 2022
@maks-rafalko
Copy link
Member

maks-rafalko commented Jan 15, 2022

Interesting, didn't get this error so far.

I see that Stryker Dashboard uses the same url:

<script src="https://www.unpkg.com/mutation-testing-elements@1.7.8/dist/mutation-test-elements.js"></script>

cc @nicojs - did you experience (or Stryker users) anything like this?

@nicojs
Copy link

nicojs commented Jan 15, 2022

Yeah unpkg isn't the most reliable CDN out there. Might be time to switch over to a locally served one, or include it in the JS bundle.

Feel free to open an issue at the dashboard GH repo

@maks-rafalko
Copy link
Member

maks-rafalko commented Jan 15, 2022

I like the idea of using URL because you automatically get the new updates. With bundled JS into the file, this will be missed.

So probably it's better to move from unpkg

@nicojs
Copy link

nicojs commented Jan 15, 2022

True, we would get new updates through dependabot

@jimaek
Copy link

jimaek commented Feb 21, 2023

Consider using https://www.jsdelivr.com/, its built for high availability.
https://cdn.jsdelivr.net/npm/mutation-testing-elements@1.7.8/dist/mutation-test-elements.js

@nicojs
Copy link

nicojs commented Feb 23, 2023

Closed with stryker-mutator/stryker-dashboard#215

maks-rafalko added a commit that referenced this issue Feb 24, 2023
* Change CDN URL for mutation-testing-elements.js

Fixes #1646

* Use `composer install`, not `update` for MT annotations
@maks-rafalko
Copy link
Member

maks-rafalko commented Feb 24, 2023

Thank you guys for your help and recommendations, made the same change on generated HTML by Infection.

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 a pull request may close this issue.

4 participants