-
Notifications
You must be signed in to change notification settings - Fork 110
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: don't cache failed script #771
Conversation
🦋 Changeset detectedLatest commit: 664377e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
7a9c81a
to
3e0fb49
Compare
3e0fb49
to
0ecf567
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @hosseinmd, sorry for the late reply and thanks again for yet another contribution 🎉. I was on sick leave during last week so wasn't able to get to this any sooner.
Overall, the changes in code looks good, I just need some explanation for the tests, take a look 👇
packages/repack/src/modules/ScriptManager/__tests__/ScriptManager.test.ts
Show resolved
Hide resolved
packages/repack/src/modules/ScriptManager/__tests__/ScriptManager.test.ts
Show resolved
Hide resolved
packages/repack/src/modules/ScriptManager/__tests__/ScriptManager.test.ts
Outdated
Show resolved
Hide resolved
packages/repack/src/modules/ScriptManager/__tests__/ScriptManager.test.ts
Outdated
Show resolved
Hide resolved
packages/repack/src/modules/ScriptManager/__tests__/ScriptManager.test.ts
Outdated
Show resolved
Hide resolved
18e15bd
to
664377e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last thing, other than that looks good!
packages/repack/src/modules/ScriptManager/__tests__/ScriptManager.test.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Thank you for your contribution @hosseinmd 👏🎉 |
Summary
#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.