Releases: cozy/cozy-client
v57.2.0
v57.1.0
v57.0.0
57.0.0 (2025-02-25)
Features
- Add a option to create a "shared drive" sharing (d78caee)
- Add FileCollection.getSharedDrivesDirectoryOrCreate (c7a36cf)
- Manage rules for shared drive sharing (542761e)
- Remove deprecated SharingCollection.share method (fdafda8)
- Remove sharingType argument from getSharingRules (7571509)
- Rename getOrCreateSharedDrivesDirectory (92aa9e4)
BREAKING CHANGES
- SharingCollection.share method has been removed. Use
SharingCollection.create method.
v56.0.0
v55.1.0
v55.0.0
55.0.0 (2025-02-19)
Bug Fixes
- Always use response body as FetchError reason (d664bc0)
Features
- Add option to always throw fetch errors (f05d997)
BREAKING CHANGES
-
The
reason
attribute of non-JSON fetch errors is no
longer a string composed of the server response status and status
text.We used to have 2 different kinds of values for the
reason
attribute
ofFetchError
built inCozyStackClient
:- a string representation of the response body sent by the server
(which may contain details about what when wrong, especially for 400
status responses) for JSON requests - a string composed of the server response status and status text for
non-JSON requests
In the non-JSON request situation, we lose information by not using
the server response body as the reason of theFetchError
which
prevents users ofcozy-client
from reacting appropriately when
receiving such an error to their request.
Therefore we homogenize ourFetchError
instances by always using the
server response body to build the errorreason
.We need to add a new
throwFetchErrors
option to
CozyStackClient.fetch
to determine when to throw the error rather
than emitting it as JSON requests expect the error to be thrown but we
can't keep reading the response body from the JSON request method to
build a new error to throw as it's already been read to build the
emitted error.
Besides, by doing so, we build the error only once, making sure we get
the same kind no matter what type of request we make. - a string representation of the response body sent by the server
v54.0.1
v54.0.0
54.0.0 (2025-02-11)
Bug Fixes
- Correctly handle replication refreshToken (38ef6aa)
- Make refreshToken work in worker and node env (e392131), closes /github.com/cozy/cozy-drive/blob/master/src/targets/browser/index.ejs#L37
BREAKING CHANGES
- The
data-cozy-token
injection is no longer supported
for refreshToken.
We used to rely on DOMParser to extract the new token during a
refreshToken procedure. However, DOMParser is a web API, which is not
available in web workers, nor in node env. Therefore, we implement our
own HTML parsing, relying on the data-cozy
attribute in HTML. We tried
using external libraries such as JSDom, fauxdom or linkedom, but got
build issues with all those libs. It was somehow manageable, but
required some additional config in consuming apps. As the HTML parsing
is quite basic, we decided that it is not worth the effort, and we now
do the parsing ourselves, making it available in web, workers, and node
envs.
As a consequence, we do not support the data-cozy-token
existence
anymore, as it would require extra work and is seen as deprecated for
several years now. If your app still somehow require it, you need to
migrate the app template to rely on data-cozy
like this: https://github.com/cozy/cozy-drive/blob/master/src/targets/browser/index.ejs#L37