82 Commits

Author SHA1 Message Date
arthurfiorette
14b1e93445
docs: last commit url 2023-02-16 23:53:30 -03:00
Arthur Fiorette
6de1b13293
docs: updated readme 2023-02-09 22:59:45 -03:00
Arthur Fiorette
29f2ce4d07
docs: updated readme 2023-02-09 00:41:58 -03:00
Arthur Fiorette
0ddd1c7152
docs: sponsor notice 2023-02-08 23:32:16 -03:00
Arthur Fiorette
fa3978e73f
docs: updated badges 2023-02-07 22:00:09 -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
2fc2c17afc
docs: help this repo grow 2022-05-15 20:42:49 -03:00
Arthur Fiorette
0c27b9ec38
docs: gitter badge 2022-01-27 20:39:26 -03:00
arthurfiorette
95dc96c83e
docs: updated download urls 2022-01-23 19:25:42 -03:00
arthurfiorette
9b9ae3a260
docs: updated fossa badges 2022-01-23 17:06:52 -03:00
arthurfiorette
f1604287a4
build: build everything from webpack 2022-01-23 16:10:15 -03:00
fossabot
8415f4478b
docs: add license scan report and status (#124)
Signed off by: fossabot <badges@fossa.com>
2022-01-23 14:42:40 -03:00
arthurfiorette
989ceeca4b
docs: updated homepage 2022-01-19 09:04:40 -03:00
arthurfiorette
0e2508c020
refactor: use Object.freeze at Header enum 2022-01-15 21:42:46 -03:00
arthurfiorette
b555f95057
chore: sideEffects: false and updated badges 2022-01-15 21:16:22 -03:00
arthurfiorette
c76f2b7db8
docs: fixed casing 2022-01-08 13:31:02 -03:00
Arthur Fiorette
25b34e5d11
docs: documentation at axios-cache-interceptor.js.org (#108) 2022-01-06 18:44:36 -03:00
arthurfiorette
766b016866
docs: fixed cache.update example 2022-01-05 18:14:18 -03:00
arthurfiorette
225658fb2f
docs: added blazing fast badge 2022-01-04 15:53:07 -03:00
arthurfiorette
3c38985113
style: prettified code 2022-01-04 15:38:32 -03:00
arthurfiorette
e34bfdd92b
docs: added url-imports example 2022-01-04 15:38:16 -03:00
arthurfiorette
1f9ddb4525
docs: updated readme 2022-01-04 15:29:03 -03:00
arthurfiorette
16600b0807
docs: fixed examples and added cache: false example 2022-01-03 17:26:18 -03:00
arthurfiorette
3daf7be27b
docs: fixed development cdn link 2022-01-03 10:29:03 -03:00
arthurfiorette
1e87549eb6
feat: allow ttl to be defined based on the response 2022-01-03 10:00:39 -03:00
arthurfiorette
4c1e0ec3fc
docs: fixed tsdocs and added storages section 2022-01-03 09:13:43 -03:00
arthurfiorette
53c4d4163e
docs: added info about global axios usage 2021-12-31 10:05:34 -03:00
arthurfiorette
232e9c51fa
feat: added many build options 2021-12-30 15:50:26 -03:00
arthurfiorette
4a0a99ff28
refactor: prevent confusion by renaming createCache to useCache 2021-12-30 13:54:23 -03:00
arthurfiorette
ec523e85ae
docs: updated docs 2021-12-27 19:11:31 -03:00
arthurfiorette
37a37b7cdb
docs: fixed badges links 2021-12-27 18:57:59 -03:00
arthurfiorette
27de6292be
style: formatted code 2021-12-27 18:48:26 -03:00
arthurfiorette
5e04e5c34a
docs: updated badges 2021-12-27 18:31:54 -03:00
arthurfiorette
065b6eff74
refactor: deprecated useCache in favor of createCache (#95) 2021-12-27 14:25:55 -03:00
arthurfiorette
6e25ba6f97
perf: reduce bundle size and replaced babel by ts-loader 2021-12-26 20:24:14 -03:00
arthurfiorette
f3bd30c214
docs: updated compiled-code section 2021-12-13 18:31:43 -03:00
arthurfiorette
39520fa549
docs: added runkit example 2021-12-13 18:12:57 -03:00
arthurfiorette
b8623b6e4e
deps: updated dev dependencies 2021-12-10 20:14:15 -03:00
arthurfiorette
1fc35529fa
chore!: use google browserlist config 2021-12-09 17:13:18 -03:00
arthurfiorette
f7f9033256
docs: updated readme badges 2021-12-09 14:44:42 -03:00
arthurfiorette
3ebe9e584c
docs: updated badges 2021-12-08 20:59:05 -03:00
arthurfiorette
3c6e76f587
docs: updated badges 2021-12-08 20:44:11 -03:00
arthurfiorette
3dc8b36288
docs: updated cdn links 2021-12-08 20:43:21 -03:00
arthurfiorette
b9b4f7972f
fix: fixed tests 2021-12-08 20:26:10 -03:00
arthurfiorette
78cf406a56
feat: added web bundle and babel 2021-12-08 20:25:36 -03:00
arthurfiorette
60ad91e676
feat!: removed createCache function 2021-12-08 20:01:22 -03:00
Hazork
1e1627b5db docs: removed readme duplicated title 2021-11-15 11:47:32 -03:00
Hazork
59704833f2 fix: compile to ES2020, instead of ES2021 2021-11-15 11:33:00 -03:00
Arthur Fiorette
48e33c5d5a
feat: etag and if-modified-since support (#53)
* feat(WIP): etag and if-modified-since support

* test: fixed test name

* fix: merge response headers

* test: add etag / last-modified tests

* test: add must-revalidate tests

* fix: handle expirationTime 0 as true.

* tests: refactored some tests

* test: added keepIfStale tests

* fix: remove axios error for 304 requests

* fix: possible infinite loop on validateStatus function

* tests: ignore code that is hard test from coverage

* fix: use Last-Modified header for modifiedSince

If-Modified-Since is never sent by a server, it's
a client only header. However Last-Modified is sent
by the server to indicate the last time the returned
version was modified (it might not be the last version
depending on cache configuration on intermediate
servers)

* test: use validateStatus in mock

This more closely match default axios adapter.

* fix: validateStatus handling all cases

* refactor: use cache.createdAt if the last-modified header isn't present

* test: etag with predefined value

* test: added more test cases

* fix: fixed logic in some tests

* docs: initial documentation

* fix: manual values work out of the box

This removes header requirement from server.

* docs: add details to etag and modifiedSince features

* fix: delete custom headers from response

* feat: accept all configurations from global axios

Merging global into local configuration enable user
to use global configuration for all options and remove
the need to check local and global values every time.

* fix: preserve original types from AxiosInstance

The only value axios needs is a URL, and in the second definition of the method, there is already a URL parameter, so it can be undefined.

* Fix: defaults modifiedSince back to false.

Avoids breaking changes.

* docs: fix etag examples

* docs: document internal headers

* refactor: ternary operator :)

* style: prettified code

* test: remove modifiedSince: false in tests since this is the default

* docs: fix headers examples

* docs: fixed example formatting

* tests: split tests into multiple files to test them faster

* docs: correct jsdoc empty object

Co-authored-by: Charly Koza <cka@f4-group.com>
2021-11-15 10:43:20 -03:00
Hazork
99906e57b9 deps: bump axios to v0.24 2021-10-28 11:40:15 -03:00