Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

feat(compare-func): pass cacheData to the compare() function #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pat841
Copy link

@pat841 pat841 commented Jan 29, 2020

Also added caching the source file.

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

I needed access to the cached data object as well as the cached source file to support certain cache conditions based on the source code.

Breaking Changes

None.

@codecov
Copy link

codecov bot commented Jan 29, 2020

Codecov Report

Merging #98 into master will not change coverage.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #98   +/-   ##
=======================================
  Coverage   83.09%   83.09%           
=======================================
  Files           2        2           
  Lines         142      142           
  Branches       21       21           
=======================================
  Hits          118      118           
  Misses         24       24           
Impacted Files Coverage Δ
src/index.js 82.97% <50.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e0e3ae...d454d28. Read the comment docs.

@alexander-akait
Copy link
Member

need fix errors on CI

@pat841
Copy link
Author

pat841 commented Feb 1, 2020

@evilebottnawi -- All set.

@alexander-akait
Copy link
Member

Sorry for delay, can you describe a case can when you need it?

@mf-pherlihy
Copy link

Sorry for delay, can you describe a case can when you need it?

@evilebottnawi -- We use the https://github.com/afterwind-io/preprocessor-loader module which allows us to runs certain code blocks under given conditions. However, the cache-loader does not pick up these files that have these directives so we pass the files content to the compare function and check if they exist. If they do, we avoid caching.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants