cozy-client 27.6.0 → 27.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/CozyClient.js +1 -1
- package/dist/__tests__/fixtures.js +2 -1
- package/dist/models/file.js +2 -2
- package/dist/models/file.spec.js +3 -1
- package/package.json +4 -4
- package/types/__tests__/fixtures.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [27.6.2](https://github.com/cozy/cozy-client/compare/v27.6.1...v27.6.2) (2021-12-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Update dependency date-fns to v2.27.0 ([5ec7911](https://github.com/cozy/cozy-client/commit/5ec7911352072a72de99ec68f545f0b36c56c990))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [27.6.1](https://github.com/cozy/cozy-client/compare/v27.6.0...v27.6.1) (2021-12-15)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **filename:** Get illegal characters from file name and returns them ([7c00526](https://github.com/cozy/cozy-client/commit/7c00526283dd865aea929c2983d32f7a12121c65))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [27.6.0](https://github.com/cozy/cozy-client/compare/v27.5.1...v27.6.0) (2021-12-13)
|
|
7
29
|
|
|
8
30
|
|
package/dist/CozyClient.js
CHANGED
|
@@ -2452,7 +2452,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2452
2452
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2453
2453
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2454
2454
|
|
|
2455
|
-
CozyClient.version = "27.6.
|
|
2455
|
+
CozyClient.version = "27.6.2";
|
|
2456
2456
|
|
|
2457
2457
|
_microee.default.mixin(CozyClient);
|
|
2458
2458
|
|
package/dist/models/file.js
CHANGED
|
@@ -57,7 +57,7 @@ var FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/;
|
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
var splitFilename = function splitFilename(file) {
|
|
60
|
-
if (!(0, _isString.default)(file.name)) throw new Error('file should have a name property
|
|
60
|
+
if (!(0, _isString.default)(file.name)) throw new Error('file should have a name property');
|
|
61
61
|
|
|
62
62
|
if (file.type === 'file') {
|
|
63
63
|
var match = file.name.match(FILENAME_WITH_EXTENSION_REGEX);
|
|
@@ -483,7 +483,7 @@ var getFullpath = /*#__PURE__*/function () {
|
|
|
483
483
|
*
|
|
484
484
|
* @param {CozyClient} client - The CozyClient instance
|
|
485
485
|
* @param {string} fileId - The file's id (required)
|
|
486
|
-
* @param {object} destination
|
|
486
|
+
* @param {object} destination - The destination object containing:
|
|
487
487
|
* @param {string} destination.folderId - The destination folder's id (required)
|
|
488
488
|
* @param {string} destination.path - The file's path after the move (optional, used to optimize performance in case of conflict)
|
|
489
489
|
* @param {boolean} force - Whether we should overwrite, i.e. put to trash, the destination in case of conflict (defaults to false).
|
package/dist/models/file.spec.js
CHANGED
|
@@ -244,7 +244,9 @@ describe('File Model', () => {
|
|
|
244
244
|
expect(fileModel.splitFilename(opts)).toEqual(result)
|
|
245
245
|
})
|
|
246
246
|
it('should throw an error if the file is not correct', () => {
|
|
247
|
-
expect(() => fileModel.splitFilename({})).toThrow(
|
|
247
|
+
expect(() => fileModel.splitFilename({})).toThrow(
|
|
248
|
+
'file should have a name property'
|
|
249
|
+
)
|
|
248
250
|
expect(() => fileModel.splitFilename({ name: null })).toThrow()
|
|
249
251
|
expect(() => fileModel.splitFilename({ name: '' })).not.toThrow()
|
|
250
252
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "27.6.
|
|
3
|
+
"version": "27.6.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cozy-device-helper": "^1.12.0",
|
|
22
22
|
"cozy-flags": "2.7.1",
|
|
23
23
|
"cozy-logger": "^1.6.0",
|
|
24
|
-
"cozy-stack-client": "^27.1
|
|
24
|
+
"cozy-stack-client": "^27.6.1",
|
|
25
25
|
"json-stable-stringify": "^1.0.1",
|
|
26
26
|
"lodash": "^4.17.13",
|
|
27
27
|
"microee": "^0.0.6",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"btoa": "^1.2.1",
|
|
53
53
|
"cozy-logger": "1.7.0",
|
|
54
54
|
"cozy-ui": "48.0.0",
|
|
55
|
-
"date-fns": "2.
|
|
55
|
+
"date-fns": "2.27.0",
|
|
56
56
|
"jsdoc-plugin-intersection": "^1.0.4",
|
|
57
57
|
"mockdate": "^2.0.2",
|
|
58
58
|
"react": "16.14.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"react-native-inappbrowser-reborn": "^3.5.1"
|
|
70
70
|
},
|
|
71
71
|
"sideEffects": false,
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "36962d75de2e47cbcb11fa13f05fd0445a3aa39d"
|
|
73
73
|
}
|