feat: restore unmodified files from cache during cleanup #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses the issue of large, noisy commits caused by unnecessary transformations of all
.jsx/.tsx
files. Now, during the cleanup process, any file that remains unchanged since the initial transform will be restored from its cached original.Related Issues
Closes onlook-dev#1738
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Restores unmodified
.jsx/.tsx
files from cache during cleanup by comparing file hashes, reducing unnecessary transformations..jsx/.tsx
files are restored from cache instead of being transformed again.checkIfFileChanged()
incleanup.ts
compares file hashes to determine if a file has changed.cacheFile()
andgenerateAndStoreHash()
insetup.ts
store original file content and hashes in.onlook/cache
.removeCacheDirectory()
infiles.ts
deletes the cache directory during cleanup.HashesJson
type incache/index.ts
to store file hashes and cache paths.IGNORED_DIRECTORIES
inhelpers.ts
to include.onlook
.This description was created by
for e07a04f. You can customize this summary. It will automatically update as commits are pushed.