@graphprotocol/grc-20 0.21.0 → 0.21.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.
@@ -4,4 +4,23 @@
4
4
  * @since 0.0.6
5
5
  */
6
6
  export declare function generateBetween(first: string | null, second: string | null): string;
7
+ /**
8
+ * Generates a random position with jittering.
9
+ *
10
+ * @returns A random position as a string.
11
+ */
12
+ export declare function generate(): string;
13
+ type MaybePosition = string | null;
14
+ export declare function compare(a: MaybePosition, b: MaybePosition): number;
15
+ /**
16
+ * Sorts a list of positions in ascending order. In
17
+ * the knowledge graph positions are optional. This
18
+ * function sorts null positions so they are always
19
+ * at the bottom.
20
+ *
21
+ * @param positions - The list of positions to sort.
22
+ * @returns The sorted list of positions.
23
+ */
24
+ export declare function sort(positions: MaybePosition[]): MaybePosition[];
25
+ export {};
7
26
  //# sourceMappingURL=position.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/core/position.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,UAE1E"}
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/core/position.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,UAE1E;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,IAAI,CAAA;AAElC,wBAAgB,OAAO,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,UAOzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAEhE"}
@@ -7,4 +7,35 @@ import { generateJitteredKeyBetween } from "fractional-indexing-jittered";
7
7
  export function generateBetween(first, second) {
8
8
  return generateJitteredKeyBetween(first, second);
9
9
  }
10
+ /**
11
+ * Generates a random position with jittering.
12
+ *
13
+ * @returns A random position as a string.
14
+ */
15
+ export function generate() {
16
+ return generateBetween(null, null);
17
+ }
18
+ export function compare(a, b) {
19
+ // This ALWAYS puts nulls at the bottom, regardless of what
20
+ // fractional indexes exist
21
+ if (a === null && b === null)
22
+ return 0;
23
+ if (a === null)
24
+ return 1; // a goes to bottom
25
+ if (b === null)
26
+ return -1; // b goes to bottom
27
+ return a.localeCompare(b);
28
+ }
29
+ /**
30
+ * Sorts a list of positions in ascending order. In
31
+ * the knowledge graph positions are optional. This
32
+ * function sorts null positions so they are always
33
+ * at the bottom.
34
+ *
35
+ * @param positions - The list of positions to sort.
36
+ * @returns The sorted list of positions.
37
+ */
38
+ export function sort(positions) {
39
+ return positions.sort(compare);
40
+ }
10
41
  //# sourceMappingURL=position.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"position.js","sourceRoot":"","sources":["../../../src/core/position.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,UAAU,eAAe,CAAC,KAAoB,EAAE,MAAqB;IACzE,OAAO,0BAA0B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"position.js","sourceRoot":"","sources":["../../../src/core/position.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,UAAU,eAAe,CAAC,KAAoB,EAAE,MAAqB;IACzE,OAAO,0BAA0B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACpC,CAAC;AAID,MAAM,UAAU,OAAO,CAAC,CAAgB,EAAE,CAAgB;IACxD,4DAA4D;IAC5D,2BAA2B;IAC3B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IACvC,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC,CAAE,mBAAmB;IAC9C,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,mBAAmB;IAC9C,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,IAAI,CAAC,SAA0B;IAC7C,OAAO,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=position.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.test.d.ts","sourceRoot":"","sources":["../../../src/core/position.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,119 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { sort } from './position.js'; // Adjust import path as needed
3
+ describe('fractional index sorting', () => {
4
+ describe('sort function', () => {
5
+ it('should handle empty array', () => {
6
+ const result = sort([]);
7
+ expect(result).toEqual([]);
8
+ });
9
+ it('should handle array with only nulls', () => {
10
+ const positions = [null, null, null];
11
+ const result = sort(positions);
12
+ expect(result).toEqual([null, null, null]);
13
+ });
14
+ it('should handle array with only strings', () => {
15
+ const positions = ['c', 'a', 'b'];
16
+ const result = sort(positions);
17
+ expect(result).toEqual(['a', 'b', 'c']);
18
+ });
19
+ it('should put null values at the bottom when mixed with strings', () => {
20
+ const positions = ['b', null, 'a', null, 'c'];
21
+ const result = sort(positions);
22
+ expect(result).toEqual(['a', 'b', 'c', null, null]);
23
+ });
24
+ it('should sort fractional indexes correctly', () => {
25
+ const positions = ['a1', 'a0', 'a2'];
26
+ const result = sort(positions);
27
+ expect(result).toEqual(['a0', 'a1', 'a2']);
28
+ });
29
+ it('should handle complex fractional indexes', () => {
30
+ const positions = ['a0V', 'a0', 'a0G', 'a1'];
31
+ const result = sort(positions);
32
+ expect(result).toEqual(['a0', 'a0G', 'a0V', 'a1']);
33
+ });
34
+ it('should maintain stable sort for identical values', () => {
35
+ const positions = ['a0', 'a0', 'a1'];
36
+ const result = sort(positions);
37
+ expect(result).toEqual(['a0', 'a0', 'a1']);
38
+ });
39
+ it('should handle single null value', () => {
40
+ const positions = [null];
41
+ const result = sort(positions);
42
+ expect(result).toEqual([null]);
43
+ });
44
+ it('should handle single string value', () => {
45
+ const positions = ['a0'];
46
+ const result = sort(positions);
47
+ expect(result).toEqual(['a0']);
48
+ });
49
+ it('should sort with nulls at bottom regardless of position in input', () => {
50
+ const positions1 = [null, 'a', 'b'];
51
+ const positions2 = ['a', null, 'b'];
52
+ const positions3 = ['a', 'b', null];
53
+ const expected = ['a', 'b', null];
54
+ expect(sort(positions1)).toEqual(expected);
55
+ expect(sort(positions2)).toEqual(expected);
56
+ expect(sort(positions3)).toEqual(expected);
57
+ });
58
+ it('should handle very long fractional indexes', () => {
59
+ const positions = [`a0${'x'.repeat(50)}`, 'a0', `a0${'y'.repeat(30)}`];
60
+ const result = sort(positions);
61
+ expect(result).toEqual(['a0', `a0${'x'.repeat(50)}`, `a0${'y'.repeat(30)}`]);
62
+ });
63
+ it('should handle mixed case and special characters', () => {
64
+ const positions = ['Z', 'a', 'A', 'z'];
65
+ const result = sort(positions);
66
+ // JavaScript's localeCompare should handle this correctly
67
+ expect(result).toEqual(['a', 'A', 'z', 'Z']);
68
+ });
69
+ it('should handle large arrays efficiently', () => {
70
+ const positions = [];
71
+ // Create a large array with mixed values
72
+ for (let i = 100; i >= 0; i--) {
73
+ positions.push(`a${i}`);
74
+ if (i % 10 === 0)
75
+ positions.push(null);
76
+ }
77
+ const result = sort(positions);
78
+ // Check that all string values are sorted before nulls
79
+ const stringValues = result.filter(p => p !== null);
80
+ const nullValues = result.filter(p => p === null);
81
+ // String values should be sorted
82
+ for (let i = 1; i < stringValues.length; i++) {
83
+ const left = stringValues[i - 1];
84
+ const right = stringValues[i];
85
+ if (left && right) {
86
+ expect(left.localeCompare(right)).toBeLessThanOrEqual(0);
87
+ }
88
+ }
89
+ // All nulls should be at the end
90
+ const firstNullIndex = result.indexOf(null);
91
+ if (firstNullIndex !== -1) {
92
+ expect(result.slice(firstNullIndex)).toEqual(nullValues);
93
+ }
94
+ });
95
+ it('should handle edge case fractional indexes that might cause sorting issues', () => {
96
+ const positions = [
97
+ 'z'.repeat(10), // Very "high" value
98
+ 'a0',
99
+ null,
100
+ '', // Empty string
101
+ 'a',
102
+ ];
103
+ const result = sort(positions);
104
+ // Empty string should come first, then sorted strings, then nulls
105
+ expect(result[0]).toBe('');
106
+ expect(result[result.length - 1]).toBe(null);
107
+ // Check that non-null, non-empty strings are sorted
108
+ const nonEmptyStrings = result.filter(p => p !== null && p !== '');
109
+ for (let i = 1; i < nonEmptyStrings.length; i++) {
110
+ const left = nonEmptyStrings[i - 1];
111
+ const right = nonEmptyStrings[i];
112
+ if (left && right) {
113
+ expect(left.localeCompare(right)).toBeLessThanOrEqual(0);
114
+ }
115
+ }
116
+ });
117
+ });
118
+ });
119
+ //# sourceMappingURL=position.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.test.js","sourceRoot":"","sources":["../../../src/core/position.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC,CAAC,+BAA+B;AAErE,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACnC,MAAM,MAAM,GAAG,IAAI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CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/grc-20",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -13,7 +13,6 @@
13
13
  "exports": {
14
14
  "./package.json": "./package.json",
15
15
  ".": "./dist/index.js",
16
- "./constants": "./dist/constants.js",
17
16
  "./proto": "./dist/proto.js",
18
17
  "./contracts": "./dist/contracts.js",
19
18
  "./abis": "./dist/abis.js"
@@ -1,7 +0,0 @@
1
- /**
2
- * This module provides common constants used in the knowledge graph.
3
- *
4
- * @since 0.0.6
5
- */
6
- export declare const INITIAL_RELATION_INDEX_VALUE: string;
7
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,4BAA4B,QAGxC,CAAC"}
package/dist/constants.js DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * This module provides common constants used in the knowledge graph.
3
- *
4
- * @since 0.0.6
5
- */
6
- import { generateJitteredKeyBetween } from "fractional-indexing-jittered";
7
- import { Position } from "./src/position.js";
8
- export const INITIAL_RELATION_INDEX_VALUE = Position.generateBetween(null, null);
9
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,4BAA4B,GAAG,QAAQ,CAAC,eAAe,CAClE,IAAI,EACJ,IAAI,CACL,CAAC"}