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

fix(local-storage): set http headers correctly #96

Merged
merged 4 commits into from
Jan 4, 2024

Conversation

muuvmuuv
Copy link
Contributor

@muuvmuuv muuvmuuv commented Jan 1, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: CONTRIBUTING.md#commit
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #95

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

This also adds single definition of cache key, from perf perspective this makes sense:

Open for link

https://perf.link/#eyJpZCI6IjJnOWF3bmt3MmkzIiwidGl0bGUiOiJGaW5kaW5nIG51bWJlcnMgaW4gYW4gYXJyYXkgb2YgMTAwMCIsImJlZm9yZSI6ImNvbnN0IGRhdGEgPSBbLi4uQXJyYXkoMTAwMCkua2V5cygpXVxuXG5mdW5jdGlvbiBjcmVhdGVLZXkoa2V5KSB7XG4gIHJldHVybiBgc29tZS0ke2tleX1gO1xufSIsInRlc3RzIjpbeyJuYW1lIjoiRG91YmxlIGV4ZWMgdy9vIGRlZmluZSIsImNvZGUiOiJkYXRhLmZvckVhY2goeCA9PiB7XG4gIGNyZWF0ZUtleSh4KVxuICByZXR1cm4gY3JlYXRlS2V5KHgpXG59KSIsInJ1bnMiOls4MDAwLDExMDAwLDEwMDAsMTEwMDAsMTAwMCwxMDAwLDQwMDAsMTAwMCw0MDAwLDIwMDAsOTAwMCw0MDAwLDEwMDAsMjQwMDAsMTkwMDAsMTAwMCw1MDAwLDEwMDAsNzAwMCw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MCwyMDAwLDMwMDAsMjAwMCwyMzAwMCwzODAwMCwyMDAwMCwxOTAwMCwxMzAwMCwyMjAwMCwxMDAwMCwxMTAwMCw0NTAwMCw4MDAwLDQwMDAsNDIwMDAsMjAwMCwxOTAwMCwzNzAwMCwyNjAwMCwyODAwMCwyMDAwLDQxMDAwLDIxMDAwLDEwMDAsMzEwMDAsODAwMCwzNTAwMCwzMjAwMCwxOTAwMCwyMDAwLDE5MDAwLDQwMDAwLDQwMDAsMzAwMDAsMzMwMDAsNDUwMDAsMjEwMDAsMjMwMDAsMzgwMDAsMjUwMDAsMzAwMDAsMjIwMDAsMTUwMDAsMTkwMDAsNDAwMCwxNDAwMCw0NTAwMCwxNTAwMCwxNDAwMCwxNDAwMCwxMjAwMCwxMDAwLDE4MDAwLDcwMDAsMzAwMCwxMDAwLDMzMDAwLDQ1MDAwLDIwMDAwLDQwMDBdLCJvcHMiOjE3MzgwfV0sInVwZGF0ZWQiOiIyMDI0LTAxLTAxVDE1OjI2OjIwLjU1NloifQ%3D%3D

fixes #95

Copy link

stackblitz bot commented Jan 1, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

@netanel-utila netanel-utila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test that verifies the new code

@muuvmuuv
Copy link
Contributor Author

muuvmuuv commented Jan 2, 2024

Isn‘t that tested due to my change in the mock? I also noticed that the clearCachePredicate does not have a previous value in the browser when one is in localStorage, any idea why?

@NetanelBasal
Copy link
Member

You should test that the current headers persists

@muuvmuuv
Copy link
Contributor Author

muuvmuuv commented Jan 2, 2024

Do you mean like this?

@NetanelBasal
Copy link
Member

The build is stuck from some reason. Did you run the tests locally and they pass?

@muuvmuuv
Copy link
Contributor Author

muuvmuuv commented Jan 3, 2024

I did yes. I will have a look the next days

@muuvmuuv
Copy link
Contributor Author

muuvmuuv commented Jan 3, 2024

Seems to be related to GH Actions configuration and runner uptime https://github.com/ngneat/cashew/actions/runs/7378588007

@NetanelBasal NetanelBasal merged commit 8edf11f into ngneat:master Jan 4, 2024
1 check failed
@muuvmuuv muuvmuuv deleted the bugfix/set-http-headers branch January 4, 2024 06:54
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 this pull request may close these issues.

HttpHeaders are not handled
3 participants