callstack / repack

A Webpack-based toolkit to build your React Native application with full support of Webpack ecosystem.
https://re-pack.dev
MIT License
1.48k stars 110 forks source link

fix: don't cache failed script #771

Closed hosseinmd closed 3 weeks ago

hosseinmd commented 1 month ago

Summary

https://github.com/callstack/repack/issues/770

The root cause was where cache is saving, script Resolver should not save the cache, it should be saved after script loaded successfully.

Test plan

I added a test for failing scenario which expected to The failed script doesn't save on cache and also if scriptLoader called again, expected in second time fetch property should be true too.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 664377e96975de5a315d4288373a6374ed185f66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages | Name | Type | | ---------------------------- | ----- | | @callstack/repack | Patch | | @callstack/repack-dev-server | Patch | | @callstack/repack-init | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **repack-website** | ⬜️ Ignored ([Inspect](https://vercel.com/callstack-team/repack-website/Eb1wCHwkbJaUWZUQYKMZo9x6tQFD)) | [Visit Preview](https://repack-website-git-fork-hosseinmd-cachefa-3f39b1-callstack-team.vercel.app) | | Oct 29, 2024 8:26am |
jbroma commented 3 weeks ago

Thank you for your contribution @hosseinmd 👏🎉