@fibery/schema 12.0.2 → 13.0.1

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.
@@ -84,7 +84,6 @@ declare class FieldObject {
84
84
  private readonly raw;
85
85
  readonly holderType: TypeName;
86
86
  private readonly schema;
87
- /** Lazily filled; declared here so all instances share one hidden class. */
88
87
  private cache;
89
88
  constructor({ rawFieldObject, holderType, schema }: FieldObjectParams);
90
89
  toJSON(): string | RawFieldObject;
@@ -9,8 +9,6 @@ var FieldObject = class {
9
9
  raw;
10
10
  holderType;
11
11
  schema;
12
- /** Lazily filled; declared here so all instances share one hidden class. */
13
- cache;
14
12
  constructor({ rawFieldObject, holderType, schema }) {
15
13
  if (!isPlainObject(rawFieldObject)) throw new Error("rawFieldObject arg must be plain object");
16
14
  if (typeof holderType !== "string") throw new Error("holderType arg must be string");
@@ -18,7 +16,12 @@ var FieldObject = class {
18
16
  this.raw = rawFieldObject;
19
17
  this.holderType = holderType;
20
18
  this.schema = schema;
21
- this.cache = void 0;
19
+ Object.defineProperty(this, "cache", {
20
+ value: void 0,
21
+ writable: true,
22
+ enumerable: false,
23
+ configurable: false
24
+ });
22
25
  }
23
26
  toJSON() {
24
27
  if (process.env.NODE_ENV === "test") return `<schema.typeObjectsByName["${this.holderType}"].fieldObjectsByName["${this.name}"]>`;
@@ -54,7 +54,6 @@ declare class TypeObject {
54
54
  private readonly raw;
55
55
  private readonly schema;
56
56
  private readonly factory;
57
- /** Lazily filled; declared here so all instances share one hidden class. */
58
57
  private cache;
59
58
  constructor({ rawTypeObject, schema, factory }: TypeObjectParams);
60
59
  toJSON(): string | RawTypeObject;
@@ -9,15 +9,18 @@ var TypeObject = class {
9
9
  raw;
10
10
  schema;
11
11
  factory;
12
- /** Lazily filled; declared here so all instances share one hidden class. */
13
- cache;
14
12
  constructor({ rawTypeObject, schema, factory }) {
15
13
  if (!isPlainObject(rawTypeObject)) throw new Error("rawTypeObject arg must be plain object");
16
14
  if (!schema) throw new Error("schema arg must be provided");
17
15
  this.raw = rawTypeObject;
18
16
  this.schema = schema;
19
17
  this.factory = factory;
20
- this.cache = void 0;
18
+ Object.defineProperty(this, "cache", {
19
+ value: void 0,
20
+ writable: true,
21
+ enumerable: false,
22
+ configurable: false
23
+ });
21
24
  }
22
25
  toJSON() {
23
26
  if (process.env.NODE_ENV === "test") return `<schema.typeObjectsByName["${this.raw["fibery/name"]}"]>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/schema",
3
- "version": "12.0.2",
3
+ "version": "13.0.1",
4
4
  "description": "Fibery schema utils",
5
5
  "license": "UNLICENSED",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "lodash": "4.17.21",
25
- "@fibery/helpers": "4.1.1",
25
+ "@fibery/helpers": "4.2.0",
26
26
  "@fibery/pluralize": "1.2.1"
27
27
  }
28
28
  }