1191 Commits

Author SHA1 Message Date
arthurfiorette
05aadff20f
chore: don't transpile node_modules 2021-12-09 14:39:09 -03:00
arthurfiorette
488cd49527
refactor: bundle does not export everything that index has 2021-12-09 14:37:21 -03:00
arthurfiorette
1a5fdf9bc1
chore: good times :) 2021-12-08 21:11:31 -03:00
arthurfiorette
3ebe9e584c
docs: updated badges 2021-12-08 20:59:05 -03:00
arthurfiorette
4fa9bc9471
deps: added missing explicit dependency 2021-12-08 20:57:14 -03:00
arthurfiorette
3a2a1635a0
tag: v0.7.0-beta3 v0.7.0-beta3 2021-12-08 20:44:20 -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
bdf5f0f7e5
deps: moved concurrently to dev dependencies 2021-12-08 20:43:14 -03:00
arthurfiorette
5884d38201
tag: v0.7.0-beta2 v0.7.0-beta2 2021-12-08 20:35:11 -03:00
arthurfiorette
ae77e6acba
fix: fixed package.json bundle index name 2021-12-08 20:35:00 -03:00
arthurfiorette
6a67d4c2bd
tag: v0.7.0-beta1 v0.7.0-beta1 2021-12-08 20:29:24 -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
arthurfiorette
704be7732b
deps: updated ts-jest 2021-12-08 17:00:21 -03:00
arthurfiorette
07ec645a9d
perf: removed tslib and typed-core in favor of fast-defer 2021-12-08 16:46:15 -03:00
dependabot[bot]
2215fb9570
chore(deps-dev): bump @typescript-eslint/parser from 5.5.0 to 5.6.0 (#69) 2021-12-07 11:56:35 +00:00
dependabot[bot]
2e756c0488
chore(deps-dev): bump eslint from 8.4.0 to 8.4.1 (#70) 2021-12-07 11:56:28 +00:00
dependabot[bot]
6bf3b0c742
chore(deps-dev): bump @typescript-eslint/eslint-plugin (#71) 2021-12-07 11:56:20 +00:00
dependabot[bot]
41051c8212
chore(deps-dev): bump @types/node from 16.11.11 to 16.11.12 (#72) 2021-12-07 11:56:12 +00:00
dependabot[bot]
4e1d61562e
chore(deps-dev): bump eslint from 8.3.0 to 8.4.0 (#66) 2021-12-06 11:02:38 +00:00
dependabot[bot]
784a2a41f5
chore(deps-dev): bump prettier from 2.5.0 to 2.5.1 (#68) 2021-12-06 11:01:59 +00:00
dependabot[bot]
a5af2eff97
chore(deps-dev): bump ts-jest from 27.0.7 to 27.1.0 (#67) 2021-12-06 11:01:31 +00:00
arthurfiorette
eeec119306
tag: v0.6.3 v0.6.3 2021-12-02 21:03:20 -03:00
arthurfiorette
3f8bd14d8e
deps: updated yarn.lock 2021-12-02 20:59:22 -03:00
arthurfiorette
8610d6aeb8
chore: use tslib to optimize builds 2021-12-02 20:57:29 -03:00
dependabot[bot]
1253e6aee1
chore(deps-dev): bump jest from 27.4.2 to 27.4.3 (#65) 2021-12-02 23:02:16 +00:00
dependabot[bot]
ebbab81954
chore(deps-dev): bump @types/node from 16.11.10 to 16.11.11 (#61) 2021-12-01 10:49:58 +00:00
dependabot[bot]
33d0cc58dc
chore(deps): bump @tusbar/cache-control from 0.6.0 to 0.6.1 (#60) 2021-12-01 10:47:22 +00:00
dependabot[bot]
5a75755594
chore(deps-dev): bump @typescript-eslint/parser from 5.4.0 to 5.5.0 (#62) 2021-12-01 10:46:14 +00:00
dependabot[bot]
66392e4616
chore(deps-dev): bump @typescript-eslint/eslint-plugin (#63) 2021-12-01 10:46:04 +00:00
dependabot[bot]
826afe0483
chore(deps-dev): bump jest from 27.4.0 to 27.4.2 (#64) 2021-12-01 10:45:56 +00:00
arthurfiorette
8070e2fc93
deps: updated dependencies 2021-11-29 11:57:21 -03:00
dependabot[bot]
41c11e93e6
chore(deps-dev): bump @types/node from 16.11.9 to 16.11.10 (#58) 2021-11-28 14:21:24 +00:00
dependabot[bot]
8ec3e60d61
chore(deps-dev): bump prettier from 2.4.1 to 2.5.0 (#59) 2021-11-28 14:21:17 +00:00
arthurfiorette
320ab6b0a2
tag: v0.6.2 v0.6.2 2021-11-23 10:03:18 -03:00
arthurfiorette
30d1268902
fix: removed old types folder mention 2021-11-23 10:00:50 -03:00
arthurfiorette
097a1798c4
tag: v0.6.1 v0.6.1 2021-11-23 09:50:53 -03:00
arthurfiorette
e2de9288bd
build: emit declaration in dist folder
If it's in the types folder, when importing a subpath like `axios-cache-interceptor/dist/storage/memory`, the types cannot be inferred.
2021-11-23 09:50:46 -03:00
dependabot[bot]
c2c409787a
chore(deps-dev): bump @types/node from 16.11.8 to 16.11.9 (#57) 2021-11-22 18:08:26 +00:00
dependabot[bot]
022f79b16b
chore(deps-dev): bump @types/jest from 27.0.2 to 27.0.3 (#56) 2021-11-19 11:15:15 +00:00
dependabot[bot]
27b2df9838
chore(deps-dev): bump @types/node from 16.11.7 to 16.11.8 (#55) 2021-11-19 11:15:13 +00:00
dependabot[bot]
2bab74fffd
chore(deps-dev): bump typescript from 4.4.4 to 4.5.2 (#54) 2021-11-18 21:30:04 +00:00
Hazork
1e1627b5db docs: removed readme duplicated title 2021-11-15 11:47:32 -03:00
Hazork
bd98a16885 tag: v0.6.0 v0.6.0 2021-11-15 11:34:26 -03:00
Hazork
59704833f2 fix: compile to ES2020, instead of ES2021 2021-11-15 11:33:00 -03:00
Hazork
19d0e9b69e style: prettier and changelog config changes
For prettier always use plugins and the changelog not get spammed with commit comments.
2021-11-15 10:58:19 -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
Arthur Fiorette
b35ae3e574
feat: storage abstractions (#52)
* refactor: better support for different storages

* test: updated tests

* feat: export AxiosStorage

* style: fix linting
2021-11-11 16:25:51 -03:00