@tinacms/datalayer 0.2.1 → 0.2.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.
@@ -30,5 +30,5 @@ export declare class FilesystemBridge implements Bridge {
30
30
  * Same as the `FileSystemBridge` except it does not save files
31
31
  */
32
32
  export declare class AuditFileSystemBridge extends FilesystemBridge {
33
- put(_filepath: string, _data: string): Promise<void>;
33
+ put(filepath: string, data: string): Promise<void>;
34
34
  }
package/dist/index.js CHANGED
@@ -109,7 +109,14 @@ var FilesystemBridge = class {
109
109
  }
110
110
  };
111
111
  var AuditFileSystemBridge = class extends FilesystemBridge {
112
- async put(_filepath, _data) {
112
+ async put(filepath, data) {
113
+ if ([
114
+ ".tina/__generated__/_lookup.json",
115
+ ".tina/__generated__/_schema.json",
116
+ ".tina/__generated__/_graphql.json"
117
+ ].includes(filepath)) {
118
+ return super.put(filepath, data);
119
+ }
113
120
  return;
114
121
  }
115
122
  };
@@ -924,8 +931,9 @@ var makeFilterSuffixes = (filterChain, index) => {
924
931
  var makeKeyForField = (definition, data, stringEscaper, maxStringLength = 100) => {
925
932
  const valueParts = [];
926
933
  for (const field of definition.fields) {
927
- if (field.name in data) {
928
- const resolvedValue = String(field.type === "datetime" ? new Date(data[field.name]).getTime() : field.type === "string" ? stringEscaper(data[field.name]) : data[field.name]).substring(0, maxStringLength);
934
+ if (field.name in data && data[field.name] !== void 0 && data[field.name] !== null) {
935
+ const rawValue = data[field.name];
936
+ const resolvedValue = String(field.type === "datetime" ? new Date(rawValue).getTime() : field.type === "string" ? stringEscaper(rawValue) : rawValue).substring(0, maxStringLength);
929
937
  valueParts.push(applyPadding(resolvedValue, field.pad));
930
938
  } else {
931
939
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/datalayer",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [