cozy-client 33.0.2 → 33.0.3

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.
@@ -2636,7 +2636,7 @@ var CozyClient = /*#__PURE__*/function () {
2636
2636
  CozyClient.hooks = CozyClient.hooks || {};
2637
2637
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2638
2638
 
2639
- CozyClient.version = "33.0.2";
2639
+ CozyClient.version = "33.0.3";
2640
2640
 
2641
2641
  _microee.default.mixin(CozyClient);
2642
2642
 
@@ -110,7 +110,7 @@ var isDirectory = function isDirectory(file) {
110
110
  exports.isDirectory = isDirectory;
111
111
 
112
112
  var isNote = function isNote(file) {
113
- if (file && file.name && file.name.endsWith('.cozy-note') && file.type === FILE_TYPE && file.metadata && file.metadata.content !== undefined && file.metadata.schema !== undefined && file.metadata.title !== undefined && file.metadata.version !== undefined) return true;
113
+ if (file && file.name && file.name.endsWith('.cozy-note') && file.type === FILE_TYPE && file.metadata && file.metadata.title !== undefined && file.metadata.version !== undefined) return true;
114
114
  return false;
115
115
  };
116
116
  /**
@@ -40,24 +40,27 @@ describe('File Model', () => {
40
40
  type: 'file',
41
41
  name: 'test.cozy-note',
42
42
  metadata: {
43
- content: 'content',
44
- schema: [],
45
- title: 'title',
46
- version: 1
43
+ title: '',
44
+ version: 0
47
45
  }
48
46
  }
49
47
  expect(fileModel.isNote(note)).toBe(true)
50
- const note2 = {
48
+ const noteMissingVersion = {
49
+ type: 'file',
50
+ name: 'test.cozy-note',
51
+ metadata: {
52
+ title: ''
53
+ }
54
+ }
55
+ expect(fileModel.isNote(noteMissingVersion)).toBe(false)
56
+ const noteMissingTitle = {
51
57
  type: 'file',
52
58
  name: 'test.cozy-note',
53
59
  metadata: {
54
- content: 'content',
55
- schema: [],
56
- title: '',
57
60
  version: 0
58
61
  }
59
62
  }
60
- expect(fileModel.isNote(note2)).toBe(true)
63
+ expect(fileModel.isNote(noteMissingTitle)).toBe(false)
61
64
  })
62
65
 
63
66
  it('should test if a file is a shortcut or not', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "33.0.2",
3
+ "version": "33.0.3",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -73,5 +73,5 @@
73
73
  "react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
74
74
  },
75
75
  "sideEffects": false,
76
- "gitHead": "c00ba115384a2ba0f562adb4fa5e141ea64dbe45"
76
+ "gitHead": "97b71b70c86c57c887979e154045be077bad191f"
77
77
  }