200 Commits

Author SHA1 Message Date
Amrendra Kumar
0214ec682c
fix: transformResponse running twice on cached requests (#775) 2024-01-18 23:54:44 -03:00
Arthur Fiorette
ed99d775bb
feat: correct ESM and CJS support, move to microbundle. (#764) 2024-01-18 23:48:33 -03:00
Arthur Fiorette
f96b55dc54
fix: type incompatibility 2023-12-26 15:46:40 -03:00
Sujeet Kc
05712980df
Ådd feature to blacklist some paths (#754)
* add feature to blacklist some paths

* format with biome

* update exclude attr definition

* improvements

* style: formatted code

* fix: lint

---------

Co-authored-by: Arthur Fiorette <me@arthur.place>
2023-12-23 17:40:05 -03:00
Arthur Fiorette
a890fc2a8c
fix: support for URLSearchParams 2023-12-13 12:19:06 -03:00
Arthur Fiorette
8d03709482
feat: pinned dependencies 2023-12-12 16:20:57 -03:00
dependabot[bot]
ed142c6ca2
chore(deps-dev): bump @biomejs/biome from 1.3.3 to 1.4.1 (#740)
* chore(deps-dev): bump @biomejs/biome from 1.3.3 to 1.4.1

Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.3.3 to 1.4.1.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/cli/v1.4.1/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* linted code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Fiorette <me@arthur.place>
2023-12-12 16:14:39 -03:00
Arthur Fiorette
ecbc27e466
style: linted code 2023-11-16 03:26:37 -03:00
Arthur Fiorette
37e2f1e85a
chore: migrated to biomejs.dev 2023-11-16 03:26:20 -03:00
Arthur Fiorette
892649c92f
fix: override and hydrate globally (#694) 2023-10-23 12:51:23 -03:00
Arthur Fiorette
309bfe1062
fix: handle axios errors without config (#674) 2023-09-30 15:57:09 -03:00
Arthur Fiorette
286b2c0296
fix: rejected response deadlocks (#685) 2023-09-30 15:44:37 -03:00
Arthur Fiorette
16e51e788b
feat: prefer noop over undefined when debugging 2023-09-30 15:03:21 -03:00
Arthur Fiorette
dd8f634d75
feat: testing with tsx and c8 2023-09-30 14:57:22 -03:00
arthurfiorette
130ef0d306
fix: infinite loading states when a restart occurs in the middle of a request. (#612) 2023-09-03 18:53:26 -03:00
José
e2b73e1c3a
fix: avoid RangeError: Maximum call stack size exceeded on streams and other objects (#616)
* refactor: change id generation location

* fix: lint

* refactor: ensures id will be created only if cache is not false

* chore(deps-dev): bump vitepress from 1.0.0-beta.5 to 1.0.0-beta.6 (#618)

* chore(deps-dev): bump @types/node from 18.16.19 to 18.17.0 (#617)

* chore(deps-dev): bump tslib from 2.6.0 to 2.6.1 (#619)

* chore(deps-dev): bump @types/node from 18.17.0 to 18.17.1 (#620)

* chore: dependabot

* ci: dependabot

* feat: handle non axios errors rejections (#609)

* fix: correct config re throw

* chore(deps-dev): bump eslint-config-prettier from 8.8.0 to 8.9.0 (#624)

* chore(deps-dev): bump jest from 29.6.1 to 29.6.2 (#622)

* feat: turn most types into interfaces (#615)

* Turn most types into interfaces

* Turn 'CacheAxiosResponse' into a interface

* Update docs

* Change docs to be more didactic

* chore(deps-dev): bump jest-environment-jsdom from 29.6.1 to 29.6.2 (#623)

* chore: removed unused eslint comment

* feat: handle errors on object-code

* feat: bring back ids

* chore: lint

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Fiorette <arthur.fiorette@gmail.com>
Co-authored-by: Denis Rossati <denis.rossatiramos@gmail.com>
2023-07-30 03:39:36 -03:00
arthurfiorette
cb3114f7e8
chore: removed unused eslint comment 2023-07-30 00:31:45 -03:00
Denis Rossati
0199ad6b97
feat: turn most types into interfaces (#615)
* Turn most types into interfaces

* Turn 'CacheAxiosResponse' into a interface

* Update docs

* Change docs to be more didactic
2023-07-30 00:22:16 -03:00
arthurfiorette
ddcac5f58f
fix: correct config re throw 2023-07-30 00:05:15 -03:00
arthurfiorette
929054e83f
feat: handle non axios errors rejections (#609) 2023-07-28 01:25:53 -03:00
Benjamin Hallion
6407cadb0f
feat: 'cloneData' option to buildMemoryStorage (#581)
* Add 'storeClone' option to buildMemoryStorage function

* fix lint issue

* fix lint issue

* add test for new storeClone option

* fix linter issue

* update comment

* update code according to review

* fix test

* Update src/storage/memory.ts

Add this comment to code coverage skip the structuredClone test

Co-authored-by: Arthur Fiorette <github@arthur.place>

* Update test/storage/memory.test.ts

Co-authored-by: Arthur Fiorette <github@arthur.place>

* fix test

* fix indent

* Update src/storage/memory.ts

* Update test/storage/memory.test.ts

* Update test/storage/memory.test.ts

* Update test/storage/memory.test.ts

* Update test/storage/memory.test.ts

* refactor: docs and more

---------

Co-authored-by: Arthur Fiorette <github@arthur.place>
Co-authored-by: arthurfiorette <arthur.fiorette@gmail.com>
2023-07-01 19:35:53 -03:00
arthurfiorette
0cca290f0b
style: formatted code 2023-06-09 13:27:58 -03:00
arthurfiorette
683dbe0f22
fix: support max-stale on header interpreter (#543) 2023-06-09 13:10:06 -03:00
arthurfiorette
82182bf7f8
fix: correct canStale checks (#543) 2023-06-09 13:10:06 -03:00
arthurfiorette
7e5ca7e68a
fix: correct lowercase test 2023-06-08 13:21:29 -03:00
arthurfiorette
ebd400bfa4
feat: max entries on memory storage #539 2023-05-25 13:14:11 -03:00
arthurfiorette
22870d7d72 fix: canStale should return false if Cache-Control: must-revalidate is present #507 2023-04-09 12:51:52 -03:00
arthurfiorette
083f4b7f4d fix: test open handles 2023-03-27 19:31:42 -03:00
arthurfiorette
72de39c4d3 feat: memory storage cleanup 2023-03-19 19:30:19 -03:00
arthurfiorette
360ba57348 feat: handle response interceptor errors 2023-03-19 17:30:02 -03:00
arthurfiorette
a9e8998026 style: formatted code 2023-03-19 17:17:41 -03:00
arthurfiorette
174ea35ab0 feat: cache predicate defaults follows RFC 7231 2023-03-19 17:13:32 -03:00
Richard Garnier
2ae4d28878
fix: Support stale-while-revalidate (#514)
* implement stale-while-revalidate

* Backward compatibility

* Fix review comments

* chore: isExpired check comment

---------

Co-authored-by: Arthur Fiorette <github@arthur.place>
2023-03-19 16:54:24 -03:00
Guilherme Mazoni
473f11c96b
docs: added docs for #506 (#509)
* Fix #506

* fix fmt

* fix docs

* fix docs
2023-02-24 11:38:16 -03:00
Guilherme Mazoni
ee8b6b36a1
feat: staleIfError using stale-if-error directive (#506)
* Fix #506

* fix fmt
2023-02-24 11:25:39 -03:00
arthurfiorette
d6b41e802f
feat: incresed tsdoc documentation a lot 2023-02-17 13:16:06 -03:00
arthurfiorette
384c6b59ee
feat: hydrate option #469 2023-02-17 12:09:00 -03:00
arthurfiorette
69f6529826
style: formatted code 2023-02-17 00:03:50 -03:00
arthurfiorette
370b9bdb6c
test: structured clone coverage ignore 2023-02-17 00:02:20 -03:00
arthurfiorette
a5ebad3d14
fix: eslint warnings 2023-02-02 20:29:21 -03:00
arthurfiorette
eddff579c5
fix: axios headers 2023-02-02 20:14:46 -03:00
Dimitris-Rafail Katsampas
7ea3023e95
fix: prevent response storage calls if method is not supported (#464)
* fix: Prevent response storage calls if method is not supported

* fix: Added missing import

* chore: File formatting

* fix: Ensure updateCache gets called before method check

* chore: Removed unnecessary optional chaining

* fix: Added methods check for reject callback

* test: Added tests that cover cache.methods cases

* test: Added assertions to axios rejecting tests

* chore: Added more details to debugging logs
2023-01-18 08:33:28 -03:00
arthurfiorette
002e065695
fix: double registration check and interceptors tests 2023-01-04 09:15:27 -03:00
arthurfiorette
7d82c5a46f
feat: cache takeover #437 2022-12-25 16:56:25 -03:00
Dimitris-Rafail Katsampas
ee25b394da
chore: default prefix parameter for web storage (#425)
* chore: Added default prefix param for web storage

* chore: Minor default prefix correction

* test: add test

Co-authored-by: arthurfiorette <arthur.fiorette@gmail.com>
2022-12-11 19:00:32 -03:00
Arthur Fiorette
88c9655ba3
Axios cache interceptor v1 roadmap (#368)
* chore(deps-dev): bump axios from 0.27.2 to 1.0.0

Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.0.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.27.2...v1.0.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* feat: initial changes

* feat: more docs

* docs: global config

* feat: comparison

* chore: more docs

* docs: migrate docs generator to vitepress (#403)

* chore(vitepress): add basic files

* chore(vitepress): add dev deps & scripts for use

* chore(vitepress config): change to ts for type checks

* chore(vitepress config): remove js file

* chore(vitepress theme): add custom theme css

* chore(vitepress docs): add simple home page

* chore(gitignore): ignore doc dist

* chore(favicon): add icon to head

* feat(doc-features): add features spotlight

* chore(doc footer): made with ❤️

* chore(structure): move md files into `./src`

* chore(config): re-organise

* chore: custom dev port

* feat: documentation pages

* refactor: modified config

* feat: social links

* style: formatted code

* feat: removed code groups temporarily

* fix: fixed bundlephobia svg

* docs: general documentation remake

* docs: more rewritting

Co-authored-by: arthurfiorette <arthur.fiorette@gmail.com>

* fix: change headers usage

* fix: adapters exporting changes

* fix: request doesnt execute after abortion

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cain <75994858+cainthebest@users.noreply.github.com>
2022-12-05 22:36:31 -03:00
arthurfiorette
67819a3d78 refactor: dependencies, lint and null assertions 2022-08-24 07:36:29 -03:00
Arthur Fiorette
f0cd5d1af2
feat: cache updater function for multiple keys. (#304)
* feat: implemented general cache updater function

* test: added tests

* docs: included cache update warning
2022-07-28 23:00:37 -03:00
Arthur Fiorette
cf97535d33
fix: cache update not being executed correctly (#283)
* test: added flaky test

* fix: fixed flaky test

* style: formatted code
2022-06-29 22:04:28 -03:00
arthurfiorette
dfe1595f3b
docs: improved override docs 2022-06-05 20:56:34 -03:00