Commit graph

43 commits

Author SHA1 Message Date
Mikhail Bashkirov
8d178a548a feat(ajax): add interceptors for parsed response JSON objects 2024-11-05 22:37:42 +01:00
Thijs Louisse
519cb9c91a fix: cleanup dependencies, code and deprecated cli commands (extend-docs, search, etc.) 2024-05-14 13:47:10 +02:00
Alex Thirlwall
a8105ec278 Add caching tests for when getCacheIdentifier is asynchronous 2024-05-07 17:22:33 +02:00
Alex Thirlwall
c5ffe9cffc feat: Allow getCacheIdentifier cache option to be an asynchronous function 2024-05-07 14:32:05 +02:00
Alex Thirlwall
df8bf58f03 If session cache Id changes, reset the cache and pending requests 2024-05-07 11:54:14 +02:00
Henk vd Brink
04d08683f7
@lion/ajax: only add XSRF token on mutable requests and on same origin or whitelisted origins 2024-02-29 15:05:58 +01:00
Thijs Louisse
45fe0b4bb3 chore(ui): lint and types fixes 2023-11-08 19:08:54 +01:00
Thijs Louisse
d129dd629d
chore: allow ajax test to work with different dev server ports 2023-11-02 15:52:50 +01:00
thepassle
570f834b85 chore: fix types 2023-09-14 09:08:23 +02:00
Kristján Oddsson
55d6c7588d add tests for AjaxFetchError 2023-08-30 13:46:21 +02:00
Joren Broekema
9cdac8e947
fix: clone response when reading the response for error (#2049) 2023-08-01 10:45:27 +02:00
Joren Broekema
7a875ef1b4
feat: parsing body for failed ajax responses (#2039) 2023-07-18 13:44:22 +02:00
thepassle
08b109b2a1 fix: avoid JSON.parsing empty responses 2023-07-06 11:38:27 +02:00
Joren Broekema
63bb012e36 fix(ajax): fetchJSON to attempt parse JSON when missing content-type header
Co-authored-by: Nikhil Hundare <nikhil.hundare@gmail.com>
2023-02-28 14:04:37 +01:00
thepassle
1565bc81ca fix: relax content types when setting cache 2022-11-07 12:42:39 +01:00
Thomas Allmer
c1982965c3 feat: introduce wireit and ts use node16 resolution 2022-11-07 11:39:40 +01:00
Lars den Bakker
66abd3ea4c fix(ajax): don't throw on non-JSON responses in fetchJson 2022-09-14 23:45:12 +02:00
Lars den Bakker
362ee0e2e9 fix(ajax): align intercepted and non-intercepted response behavior 2022-05-31 13:46:54 +02:00
Martin Pool
447383bd14 feat(ajax): add maxCacheSize option 2022-05-30 12:58:18 +02:00
Martin Pool
558edcb686 feat(ajax): add a maxResponseSize cache option to specify a max size for responses to be cached 2022-05-09 17:12:51 +02:00
Martin Pool
efcdf653a4 feat: content-type filter for ajax cache 2022-05-09 12:39:49 +02:00
Martin Pool
56af96f1da feat(ajax): add an option to initialize the cache interceptors even when useCache is turned off in the global options 2022-05-09 10:09:43 +02:00
Martin Pool
b291e60794 chore(ajax): add tests for response values and headers in caching calls 2022-04-28 16:26:06 +02:00
jorenbroekema
683d5c1c9c chore: upgrade to latest TSC to fix TSC bug caused by prev commit 2022-02-10 13:40:26 +01:00
Ahmet Yesil
879598506a Race condition fix for on the fly requests, improve cache implementation and tests
Co-authored-by: Goffert van Gool <ruphin@ruphin.net>
Co-authored-by: Martin Pool <martin.pool@ing.com>
2021-09-21 13:59:08 +02:00
Goffert van Gool
73d4e222f6
Update public API of ajax & refactor package (#1371)
feat(ajax): align / break public API

Co-authored-by: Ahmet Yesil <yesil.ahmet@ing.com>
2021-05-12 15:21:18 +02:00
Ahmet Yesil
9b79b287e9 fix(ajax): bug fixes and readability improvements 2021-04-07 17:09:03 +02:00
Lars den Bakker
468223a09f fix(ajax): return cached status and headers 2021-04-07 08:33:03 +02:00
Lars den Bakker
c1a81fe4cc feat(ajax): allow caching concurrent requests 2021-04-07 08:28:50 +02:00
gerjanvangeest
4cd8159e26
Merge pull request #1240 from ing-bank/chore/update-eslint
chore: update to latest eslint
2021-02-25 09:47:42 +01:00
qa46hx
8fdfe37a3c chore: update to latest eslint 2021-02-25 09:40:14 +01:00
Joren Broekema
2cd7993da8 feat: add ajax cache improvements and demos/docs 2021-02-24 14:51:30 +01:00
Thomas Allmer
1216ce9e85 chore: use async/await in cache interceptor tests 2021-02-15 13:55:49 +01:00
Yevgeniy Valeyev
bbffd7105f feat: port caching feature to fetch proposal
Co-authored-by: Yevgeniy Valeyev <yevgeniy.valeyev@ing.com>
2021-02-11 12:28:05 +01:00
Joren Broekema
c3e5a6596d chore: add tests for all abortcontroller browser errors 2021-02-11 12:04:15 +01:00
Joren Broekema
cda7346dd3 chore: make interceptors async, add changeset breaking change 2021-02-11 12:04:14 +01:00
Thomas Allmer
78df6e7181 fix(ajax): become a 0 dependency package 2021-02-10 15:42:37 +01:00
Joren Broekema
4452d06d44 fix(ajax): rename to ajax, async interceptors 2021-02-10 15:42:37 +01:00
gerjanvangeest
1cb604c6d2
fix: enable type files for ajax 2020-11-16 14:22:53 +01:00
Joren Broekema
6cc8b95c2d feat: add types for ajax 2020-11-12 15:42:42 +01:00
Ahmet Yesil
9ecab4d5b2 chore: remove LionSingleton 2020-08-05 17:26:52 +02:00
Thomas Allmer
8d96f84090 fix: update storybook/linting; adjust story labels, eslint ignores 2019-04-28 15:02:31 +02:00
Thomas Allmer
ec8da8f12c feat: release inital public lion version
Co-authored-by: Mikhail Bashkirov <mikhail.bashkirov@ing.com>
Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>
Co-authored-by: Joren Broekema <joren.broekema@ing.com>
Co-authored-by: Gerjan van Geest <gerjan.van.geest@ing.com>
Co-authored-by: Erik Kroes <erik.kroes@ing.com>
Co-authored-by: Lars den Bakker <lars.den.bakker@ing.com>
2019-04-26 10:37:57 +02:00